assistant2: Order agent profiles in the order they are defined in settings (#27255)
This PR updates the ordering of the agent profiles in the tool selector to respect the order they are defined in in the settings instead of sorting them alphabetically. This gives the user more control, and allows them to order the profiles as they desire. Release Notes: - N/A
This commit is contained in:
parent
6397872c49
commit
0de5c2ed53
6 changed files with 17 additions and 15 deletions
|
@ -1,20 +1,20 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use collections::HashMap;
|
||||
use gpui::SharedString;
|
||||
use indexmap::IndexMap;
|
||||
|
||||
/// A profile for the Zed Agent that controls its behavior.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct AgentProfile {
|
||||
/// The name of the profile.
|
||||
pub name: SharedString,
|
||||
pub tools: HashMap<Arc<str>, bool>,
|
||||
pub tools: IndexMap<Arc<str>, bool>,
|
||||
#[allow(dead_code)]
|
||||
pub context_servers: HashMap<Arc<str>, ContextServerPreset>,
|
||||
pub context_servers: IndexMap<Arc<str>, ContextServerPreset>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ContextServerPreset {
|
||||
#[allow(dead_code)]
|
||||
pub tools: HashMap<Arc<str>, bool>,
|
||||
pub tools: IndexMap<Arc<str>, bool>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue