agent: Make all icons used for tool calls consistent (#34160)
Starting to use the `Tool...` family of icons dedicated & designed for the agent panel. Release Notes: - N/A
This commit is contained in:
parent
66dda8e368
commit
862e733ef5
24 changed files with 47 additions and 34 deletions
|
@ -2581,8 +2581,8 @@ impl ActiveThread {
|
|||
h_flex()
|
||||
.gap_1p5()
|
||||
.child(
|
||||
Icon::new(IconName::LightBulb)
|
||||
.size(IconSize::XSmall)
|
||||
Icon::new(IconName::ToolBulb)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Muted),
|
||||
)
|
||||
.child(LoadingLabel::new("Thinking").size(LabelSize::Small)),
|
||||
|
@ -2995,7 +2995,7 @@ impl ActiveThread {
|
|||
.overflow_x_scroll()
|
||||
.child(
|
||||
Icon::new(tool_use.icon)
|
||||
.size(IconSize::XSmall)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Muted),
|
||||
)
|
||||
.child(
|
||||
|
|
|
@ -57,7 +57,7 @@ impl Tool for CopyPathTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::Clipboard
|
||||
IconName::ToolCopy
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -46,7 +46,7 @@ impl Tool for CreateDirectoryTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::Folder
|
||||
IconName::ToolFolder
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -46,7 +46,7 @@ impl Tool for DeletePathTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::FileDelete
|
||||
IconName::ToolDeleteFile
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -59,7 +59,7 @@ impl Tool for DiagnosticsTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::XCircle
|
||||
IconName::ToolDiagnostics
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -139,7 +139,7 @@ impl Tool for EditFileTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::Pencil
|
||||
IconName::ToolPencil
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
@ -783,8 +783,8 @@ impl ToolCard for EditFileToolCard {
|
|||
.child(
|
||||
h_flex()
|
||||
.child(
|
||||
Icon::new(IconName::Pencil)
|
||||
.size(IconSize::XSmall)
|
||||
Icon::new(IconName::ToolPencil)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Muted),
|
||||
)
|
||||
.child(
|
||||
|
|
|
@ -130,7 +130,7 @@ impl Tool for FetchTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::Globe
|
||||
IconName::ToolWeb
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -68,7 +68,7 @@ impl Tool for FindPathTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::SearchCode
|
||||
IconName::ToolSearch
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
@ -313,7 +313,7 @@ impl ToolCard for FindPathToolCard {
|
|||
.mb_2()
|
||||
.gap_1()
|
||||
.child(
|
||||
ToolCallCardHeader::new(IconName::SearchCode, matches_label)
|
||||
ToolCallCardHeader::new(IconName::ToolSearch, matches_label)
|
||||
.with_code_path(&self.glob)
|
||||
.disclosure_slot(
|
||||
Disclosure::new("path-search-disclosure", self.expanded)
|
||||
|
|
|
@ -70,7 +70,7 @@ impl Tool for GrepTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::Regex
|
||||
IconName::ToolRegex
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -58,7 +58,7 @@ impl Tool for ListDirectoryTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::Folder
|
||||
IconName::ToolFolder
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -31,7 +31,7 @@ impl Tool for ProjectNotificationsTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::Envelope
|
||||
IconName::ToolNotification
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -68,7 +68,7 @@ impl Tool for ReadFileTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::FileSearch
|
||||
IconName::ToolSearch
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -90,7 +90,7 @@ impl Tool for TerminalTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::Terminal
|
||||
IconName::ToolTerminal
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -37,7 +37,7 @@ impl Tool for ThinkingTool {
|
|||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::LightBulb
|
||||
IconName::ToolBulb
|
||||
}
|
||||
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
|
|
|
@ -82,7 +82,7 @@ impl RenderOnce for ToolCallCardHeader {
|
|||
.child(
|
||||
h_flex().h(line_height).justify_center().child(
|
||||
Icon::new(self.icon)
|
||||
.size(IconSize::XSmall)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Muted),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -143,6 +143,8 @@ impl ToolCard for WebSearchToolCard {
|
|||
_workspace: WeakEntity<Workspace>,
|
||||
cx: &mut Context<Self>,
|
||||
) -> impl IntoElement {
|
||||
let icon = IconName::ToolWeb;
|
||||
|
||||
let header = match self.response.as_ref() {
|
||||
Some(Ok(response)) => {
|
||||
let text: SharedString = if response.results.len() == 1 {
|
||||
|
@ -150,13 +152,12 @@ impl ToolCard for WebSearchToolCard {
|
|||
} else {
|
||||
format!("{} results", response.results.len()).into()
|
||||
};
|
||||
ToolCallCardHeader::new(IconName::Globe, "Searched the Web")
|
||||
.with_secondary_text(text)
|
||||
ToolCallCardHeader::new(icon, "Searched the Web").with_secondary_text(text)
|
||||
}
|
||||
Some(Err(error)) => {
|
||||
ToolCallCardHeader::new(IconName::Globe, "Web Search").with_error(error.to_string())
|
||||
ToolCallCardHeader::new(icon, "Web Search").with_error(error.to_string())
|
||||
}
|
||||
None => ToolCallCardHeader::new(IconName::Globe, "Searching the Web").loading(),
|
||||
None => ToolCallCardHeader::new(icon, "Searching the Web").loading(),
|
||||
};
|
||||
|
||||
let content = self.response.as_ref().and_then(|response| match response {
|
||||
|
|
|
@ -66,7 +66,6 @@ pub enum IconName {
|
|||
Circle,
|
||||
CircleOff,
|
||||
CircleHelp,
|
||||
Clipboard,
|
||||
Close,
|
||||
Cloud,
|
||||
Code,
|
||||
|
@ -118,7 +117,6 @@ pub enum IconName {
|
|||
File,
|
||||
FileCode,
|
||||
FileCreate,
|
||||
FileDelete,
|
||||
FileDiff,
|
||||
FileDoc,
|
||||
FileGeneric,
|
||||
|
@ -215,7 +213,6 @@ pub enum IconName {
|
|||
Scissors,
|
||||
Screen,
|
||||
ScrollText,
|
||||
SearchCode,
|
||||
SearchSelection,
|
||||
SelectAll,
|
||||
Send,
|
||||
|
@ -254,8 +251,12 @@ pub enum IconName {
|
|||
ThumbsDown,
|
||||
ThumbsUp,
|
||||
ToolBulb,
|
||||
ToolCopy,
|
||||
ToolDeleteFile,
|
||||
ToolDiagnostics,
|
||||
ToolFolder,
|
||||
ToolHammer,
|
||||
ToolNotification,
|
||||
ToolPencil,
|
||||
ToolRegex,
|
||||
ToolSearch,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue