fix(ui): friendly name and icon for the get_ast_outline tool card
Nightly Build / build (push) Successful in 7m54s
Nightly Build / build (push) Successful in 7m54s
get_ast_outline was the one registry tool with no Tool::display_name and no Tool::icon, so its chat card fell back to the raw function id and the generic Filesystem glyph. It now declares "Code Outline" plus a new semantic icon key 'outline', mapped frontend-side to bi-list-nested with its own accent var in both themes.
This commit is contained in:
@@ -115,8 +115,8 @@ pub trait Tool: Send + Sync {
|
||||
|
||||
/// Semantic icon key for the chat card — **not** a glyph. The frontend maps the
|
||||
/// key to a concrete icon + accent color (themeable), so the core commits to a
|
||||
/// meaning, never a look. Known keys: `edit`, `read`, `list`, `search`, `shell`,
|
||||
/// `subagent`, `image`, `config`, `introspection`. The default derives from
|
||||
/// meaning, never a look. Known keys: `edit`, `read`, `list`, `search`, `outline`,
|
||||
/// `shell`, `subagent`, `image`, `config`, `introspection`. The default derives from
|
||||
/// [`category`](Self::category).
|
||||
fn icon(&self) -> &str {
|
||||
match self.category() {
|
||||
|
||||
@@ -23,6 +23,8 @@ impl AstOutline {
|
||||
impl Tool for AstOutline {
|
||||
fn name(&self) -> &str { "get_ast_outline" }
|
||||
fn category(&self) -> crate::tools::ToolCategory { crate::tools::ToolCategory::Filesystem }
|
||||
fn display_name(&self) -> &str { "Code Outline" }
|
||||
fn icon(&self) -> &str { "outline" }
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"Start here when you need to understand a source file you don't already know — especially a large one. \
|
||||
|
||||
Reference in New Issue
Block a user