agent-gui / data /frontend /src /toolIcons.ts
introvoyz041's picture
Migrated from GitHub
c453128 verified
Raw
History Blame Contribute Delete
1.49 kB
// Tool β†’ emoji icon map for the activity feed. MIRRORS agent_gui/activity_parser.py
// TOOL_ICONS β€” keep the two in sync so a live (WS-streamed) tool event renders the
// same icon the DB-backed timeline will use once the turn is persisted, with no
// icon flip when the live row hands off to the parsed row. Unknown tools fall back
// to DEFAULT_TOOL_ICON.
const TOOL_ICONS: Record<string, string> = {
bash: "⚑", execute_command: "⚑", terminal: "⚑", run_command: "⚑",
write_file: "πŸ“", create_file: "πŸ“", file_write: "πŸ“",
str_replace_editor: "✏️", edit_file: "✏️",
read_file: "πŸ“–", file_read: "πŸ“–",
web_search: "πŸ”", search: "πŸ”",
browser: "🌐", web_fetch: "🌐",
memory: "🧠", remember: "🧠",
compress: "πŸ—œοΈ", summarize: "πŸ—œοΈ",
delegate: "πŸ‘₯", spawn_agent: "πŸ‘₯", subagent: "πŸ‘₯",
skill_view: "πŸ“š", skill_run: "πŸ“š",
python: "🐍",
// Claude Code (Claude Agent SDK) tool names β€” PascalCase.
Read: "πŸ“–", Write: "πŸ“", Edit: "✏️", MultiEdit: "✏️", NotebookEdit: "✏️",
Bash: "⚑", BashOutput: "⚑", KillShell: "⚑",
Glob: "πŸ”", Grep: "πŸ”", WebSearch: "πŸ”", WebFetch: "🌐",
Task: "πŸ‘₯", TodoWrite: "πŸ“‹", ExitPlanMode: "πŸ“‹",
};
export const DEFAULT_TOOL_ICON = "πŸ”§";
/** Icon for a tool by name, mirroring the backend parser. Falls back to πŸ”§. */
export function toolIcon(name?: string | null): string {
return (name && TOOL_ICONS[name]) || DEFAULT_TOOL_ICON;
}