Files
Enterprise-Knowledge-Base/frontend/src/utils/agent-tool-icons.ts
T
wizardchen c6f1b54f73 feat(chat): refactor agent stream display and tool result rendering
Add RagPipelineProgress timeline, simplify AgentStreamDisplay structure,
group grep hits per document, and add KnowledgeChunksList tool result UI.
2026-06-16 01:21:19 +08:00

32 lines
883 B
TypeScript

/** TDesign icon names for agent / RAG pipeline tool steps. */
export function getAgentToolIconName(toolName: string): string {
if (toolName === 'thinking') {
return 'ai-search'
}
if (toolName === 'search_knowledge' || toolName === 'knowledge_search') {
return 'data-search'
}
if (toolName === 'grep_chunks') {
return 'search'
}
if (toolName === 'web_search') {
return 'internet'
}
if (toolName === 'get_document_info' || toolName === 'list_knowledge_chunks') {
return 'file-search'
}
if (toolName === 'get_document_content' || toolName === 'wiki_read_source_doc') {
return 'file-search'
}
if (toolName === 'todo_write') {
return 'task'
}
if (toolName === 'image_analysis' || toolName === 'query_understand') {
return 'ai-search'
}
if (toolName.startsWith('mcp_')) {
return 'terminal'
}
return 'file-paste'
}