feat(llm): improve tool call icons

This commit is contained in:
Elian Doran
2026-04-03 21:28:52 +03:00
parent 21d24b7bea
commit 6ff949fdb5
2 changed files with 11 additions and 3 deletions

View File

@@ -14,7 +14,7 @@
.llm-chat-tool-call-section-summary {
display: flex;
flex-wrap: wrap;
align-items: baseline;
align-items: center;
gap: 0.25rem;
padding: 0.5rem 0.75rem;
cursor: pointer;

View File

@@ -52,8 +52,16 @@ function getToolCallContext(toolCall: ToolCall): ToolCallContext {
function toolCallIcon(toolCall: ToolCall): string {
if (toolCall.isError) return "bx bx-error-circle";
if (toolCall.result) return "bx bx-check";
return "bx bx-loader-alt bx-spin";
if (!toolCall.result) return "bx bx-loader-alt bx-spin";
const name = toolCall.toolName;
if (name.includes("search")) return "bx bx-search";
if (name.includes("note")) return "bx bx-note";
if (name.includes("attribute")) return "bx bx-purchase-tag";
if (name.includes("attachment")) return "bx bx-paperclip";
if (name.includes("skill")) return "bx bx-book-open";
if (name.includes("web")) return "bx bx-globe";
return "bx bx-wrench";
}
/** Try to parse a JSON string into a structured value. */