mirror of
https://github.com/zadam/trilium.git
synced 2026-07-07 15:33:42 +02:00
feat(llm): improve tool call icons
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user