assistant tools: Add Tool::icon method instead of matching on name (#27444)

Release Notes:

- N/A
This commit is contained in:
Agus Zubiaga
2025-03-25 18:17:36 +00:00
committed by GitHub
parent 0339d654d2
commit 46e86f003f
22 changed files with 98 additions and 18 deletions
@@ -5,6 +5,7 @@ use assistant_tool::{ActionLog, Tool, ToolSource};
use gpui::{App, Entity, Task};
use language_model::LanguageModelRequestMessage;
use project::Project;
use ui::IconName;
use crate::manager::ContextServerManager;
use crate::types;
@@ -38,6 +39,10 @@ impl Tool for ContextServerTool {
self.tool.description.clone().unwrap_or_default()
}
fn icon(&self) -> IconName {
IconName::Cog
}
fn source(&self) -> ToolSource {
ToolSource::ContextServer {
id: self.server_id.clone().into(),