assistant tools: Add Tool::icon
method instead of matching on name (#27444)
Release Notes: - N/A
This commit is contained in:
parent
0339d654d2
commit
46e86f003f
22 changed files with 98 additions and 18 deletions
|
@ -23,3 +23,4 @@ parking_lot.workspace = true
|
|||
project.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
ui.workspace = true
|
||||
|
|
|
@ -9,6 +9,7 @@ use language_model::LanguageModelRequestMessage;
|
|||
use project::Project;
|
||||
use std::fmt::{self, Debug, Formatter};
|
||||
use std::sync::Arc;
|
||||
use ui::IconName;
|
||||
|
||||
pub use crate::tool_registry::*;
|
||||
pub use crate::tool_working_set::*;
|
||||
|
@ -33,6 +34,9 @@ pub trait Tool: 'static + Send + Sync {
|
|||
/// Returns the description of the tool.
|
||||
fn description(&self) -> String;
|
||||
|
||||
/// Returns the icon for the tool.
|
||||
fn icon(&self) -> IconName;
|
||||
|
||||
/// Returns the source of the tool.
|
||||
fn source(&self) -> ToolSource {
|
||||
ToolSource::Native
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue