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
|
@ -11,6 +11,7 @@ use project::{
|
|||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{cmp, fmt::Write, sync::Arc};
|
||||
use ui::IconName;
|
||||
use util::paths::PathMatcher;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
|
||||
|
@ -49,6 +50,10 @@ impl Tool for RegexSearchTool {
|
|||
include_str!("./regex_search_tool/description.md").into()
|
||||
}
|
||||
|
||||
fn icon(&self) -> IconName {
|
||||
IconName::Regex
|
||||
}
|
||||
|
||||
fn input_schema(&self) -> serde_json::Value {
|
||||
let schema = schemars::schema_for!(RegexSearchToolInput);
|
||||
serde_json::to_value(&schema).unwrap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue