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:
Danilo Leal 2025-07-09 19:28:46 -03:00 committed by GitHub
parent 66dda8e368
commit 862e733ef5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 47 additions and 34 deletions

View file

@ -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 {