From 854390b826dd47c8fd733f64d160207e1e6fb272 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Wed, 29 Apr 2026 18:06:28 +0200 Subject: [PATCH] add per-tool icon mapping for tool call display --- src/components/ChatPane.tsx | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/components/ChatPane.tsx b/src/components/ChatPane.tsx index d555ab9..2eaecb9 100644 --- a/src/components/ChatPane.tsx +++ b/src/components/ChatPane.tsx @@ -366,6 +366,28 @@ function formatToolContent(raw: string): { name: string; detail: string; body: s } } +const TOOL_ICONS: Record = { + reasoning_think: '๐Ÿ’ญ', + file_edit: '๐Ÿ“', + file_write: '๐Ÿ“', + file_read: '๐Ÿ“„', + file_glob: '๐Ÿ“‚', + file_grep: '๐Ÿ”', + memory_recall: '๐Ÿง ', + memory_remember: '๐Ÿง ', + browser_screencap: '๐Ÿ“ธ', + denote_view: '๐Ÿ““', + subagent_spawn: '๐Ÿงต', + task_add: 'โ˜‘๏ธ', + task_check: 'โ˜‘๏ธ', + task_clear: 'โ˜‘๏ธ', + bash: '๐Ÿ–ฅ๏ธ', +} + +function toolIcon(detail: string): string { + return TOOL_ICONS[detail] ?? '๐Ÿ–ฅ๏ธ' +} + function ToolCall({ content }: { content: string }) { const { name, detail, body, output } = formatToolContent(content) const [open, setOpen] = useState(false) @@ -373,7 +395,7 @@ function ToolCall({ content }: { content: string }) {
setOpen((e.target as HTMLDetailsElement).open)}> - ๐Ÿ–ฅ๏ธ + {toolIcon(detail)} {name && {name}} {detail && {detail}}