agent: Tweak wording when configuring profiles (#30027)
cc @danilo-leal Release Notes: - N/A Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
parent
35ed225a08
commit
ee9040ad6e
@ -124,7 +124,7 @@ impl ManageProfilesModal {
|
|||||||
let mut this = Self::new(fs, tools, thread_store, window, cx);
|
let mut this = Self::new(fs, tools, thread_store, window, cx);
|
||||||
|
|
||||||
if let Some(profile_id) = action.customize_tools.clone() {
|
if let Some(profile_id) = action.customize_tools.clone() {
|
||||||
this.configure_tools(profile_id, window, cx);
|
this.configure_builtin_tools(profile_id, window, cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
this
|
this
|
||||||
@ -190,7 +190,7 @@ impl ManageProfilesModal {
|
|||||||
self.focus_handle(cx).focus(window);
|
self.focus_handle(cx).focus(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn configure_mcps(
|
fn configure_mcp_tools(
|
||||||
&mut self,
|
&mut self,
|
||||||
profile_id: AgentProfileId,
|
profile_id: AgentProfileId,
|
||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
@ -228,7 +228,7 @@ impl ManageProfilesModal {
|
|||||||
self.focus_handle(cx).focus(window);
|
self.focus_handle(cx).focus(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn configure_tools(
|
fn configure_builtin_tools(
|
||||||
&mut self,
|
&mut self,
|
||||||
profile_id: AgentProfileId,
|
profile_id: AgentProfileId,
|
||||||
window: &mut Window,
|
window: &mut Window,
|
||||||
@ -581,16 +581,20 @@ impl ManageProfilesModal {
|
|||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
div()
|
div()
|
||||||
.id("configure-tools")
|
.id("configure-builtin-tools")
|
||||||
.track_focus(&mode.configure_tools.focus_handle)
|
.track_focus(&mode.configure_tools.focus_handle)
|
||||||
.on_action({
|
.on_action({
|
||||||
let profile_id = mode.profile_id.clone();
|
let profile_id = mode.profile_id.clone();
|
||||||
cx.listener(move |this, _: &menu::Confirm, window, cx| {
|
cx.listener(move |this, _: &menu::Confirm, window, cx| {
|
||||||
this.configure_tools(profile_id.clone(), window, cx);
|
this.configure_builtin_tools(
|
||||||
|
profile_id.clone(),
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.child(
|
.child(
|
||||||
ListItem::new("configure-tools")
|
ListItem::new("configure-builtin-tools-item")
|
||||||
.toggle_state(
|
.toggle_state(
|
||||||
mode.configure_tools
|
mode.configure_tools
|
||||||
.focus_handle
|
.focus_handle
|
||||||
@ -603,11 +607,11 @@ impl ManageProfilesModal {
|
|||||||
.size(IconSize::Small)
|
.size(IconSize::Small)
|
||||||
.color(Color::Muted),
|
.color(Color::Muted),
|
||||||
)
|
)
|
||||||
.child(Label::new("Configure Tools"))
|
.child(Label::new("Configure Built-in Tools"))
|
||||||
.on_click({
|
.on_click({
|
||||||
let profile_id = mode.profile_id.clone();
|
let profile_id = mode.profile_id.clone();
|
||||||
cx.listener(move |this, _, window, cx| {
|
cx.listener(move |this, _, window, cx| {
|
||||||
this.configure_tools(
|
this.configure_builtin_tools(
|
||||||
profile_id.clone(),
|
profile_id.clone(),
|
||||||
window,
|
window,
|
||||||
cx,
|
cx,
|
||||||
@ -623,11 +627,11 @@ impl ManageProfilesModal {
|
|||||||
.on_action({
|
.on_action({
|
||||||
let profile_id = mode.profile_id.clone();
|
let profile_id = mode.profile_id.clone();
|
||||||
cx.listener(move |this, _: &menu::Confirm, window, cx| {
|
cx.listener(move |this, _: &menu::Confirm, window, cx| {
|
||||||
this.configure_mcps(profile_id.clone(), window, cx);
|
this.configure_mcp_tools(profile_id.clone(), window, cx);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.child(
|
.child(
|
||||||
ListItem::new("configure-mcps")
|
ListItem::new("configure-mcp-tools")
|
||||||
.toggle_state(
|
.toggle_state(
|
||||||
mode.configure_mcps
|
mode.configure_mcps
|
||||||
.focus_handle
|
.focus_handle
|
||||||
@ -640,11 +644,15 @@ impl ManageProfilesModal {
|
|||||||
.size(IconSize::Small)
|
.size(IconSize::Small)
|
||||||
.color(Color::Muted),
|
.color(Color::Muted),
|
||||||
)
|
)
|
||||||
.child(Label::new("Configure MCP Servers"))
|
.child(Label::new("Configure MCP Tools"))
|
||||||
.on_click({
|
.on_click({
|
||||||
let profile_id = mode.profile_id.clone();
|
let profile_id = mode.profile_id.clone();
|
||||||
cx.listener(move |this, _, window, cx| {
|
cx.listener(move |this, _, window, cx| {
|
||||||
this.configure_mcps(profile_id.clone(), window, cx);
|
this.configure_mcp_tools(
|
||||||
|
profile_id.clone(),
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
);
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
@ -777,7 +785,7 @@ impl Render for ManageProfilesModal {
|
|||||||
v_flex()
|
v_flex()
|
||||||
.pb_1()
|
.pb_1()
|
||||||
.child(ProfileModalHeader::new(
|
.child(ProfileModalHeader::new(
|
||||||
format!("{profile_name} — Configure Tools"),
|
format!("{profile_name} — Configure Built-in Tools"),
|
||||||
Some(IconName::Cog),
|
Some(IconName::Cog),
|
||||||
))
|
))
|
||||||
.child(ListSeparator)
|
.child(ListSeparator)
|
||||||
@ -800,7 +808,7 @@ impl Render for ManageProfilesModal {
|
|||||||
v_flex()
|
v_flex()
|
||||||
.pb_1()
|
.pb_1()
|
||||||
.child(ProfileModalHeader::new(
|
.child(ProfileModalHeader::new(
|
||||||
format!("{profile_name} — Configure MCP Servers"),
|
format!("{profile_name} — Configure MCP Tools"),
|
||||||
Some(IconName::Hammer),
|
Some(IconName::Hammer),
|
||||||
))
|
))
|
||||||
.child(ListSeparator)
|
.child(ListSeparator)
|
||||||
|
@ -176,7 +176,7 @@ impl PickerDelegate for ToolPickerDelegate {
|
|||||||
fn placeholder_text(&self, _window: &mut Window, _cx: &mut App) -> Arc<str> {
|
fn placeholder_text(&self, _window: &mut Window, _cx: &mut App) -> Arc<str> {
|
||||||
match self.mode {
|
match self.mode {
|
||||||
ToolPickerMode::BuiltinTools => "Search built-in tools…",
|
ToolPickerMode::BuiltinTools => "Search built-in tools…",
|
||||||
ToolPickerMode::McpTools => "Search MCP servers…",
|
ToolPickerMode::McpTools => "Search MCP tools…",
|
||||||
}
|
}
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user