feat: Add agent configuration and cleanup scripts for database migrations
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* Tool Icons Utility
|
||||
* Maps tool names and match types to icons for better UI display
|
||||
*/
|
||||
|
||||
// Tool name to icon mapping
|
||||
export const toolIcons: Record<string, string> = {
|
||||
multi_kb_search: '🔍',
|
||||
knowledge_search: '📚',
|
||||
get_chunk_detail: '📄',
|
||||
get_related_chunks: '🔗',
|
||||
list_knowledge_bases: '📂',
|
||||
get_document_info: 'ℹ️',
|
||||
query_knowledge_graph: '🕸️',
|
||||
think: '💭',
|
||||
todo_write: '📋',
|
||||
};
|
||||
|
||||
// Match type to icon mapping
|
||||
export const matchTypeIcons: Record<string, string> = {
|
||||
'向量匹配': '🎯',
|
||||
'关键词匹配': '🔤',
|
||||
'相邻块匹配': '📌',
|
||||
'历史匹配': '📜',
|
||||
'父块匹配': '⬆️',
|
||||
'关系块匹配': '🔗',
|
||||
'图谱匹配': '🕸️',
|
||||
};
|
||||
|
||||
// Get icon for a tool name
|
||||
export function getToolIcon(toolName: string): string {
|
||||
return toolIcons[toolName] || '🛠️';
|
||||
}
|
||||
|
||||
// Get icon for a match type
|
||||
export function getMatchTypeIcon(matchType: string): string {
|
||||
return matchTypeIcons[matchType] || '📍';
|
||||
}
|
||||
|
||||
// Get tool display name (user-friendly)
|
||||
export function getToolDisplayName(toolName: string): string {
|
||||
const displayNames: Record<string, string> = {
|
||||
multi_kb_search: '跨库搜索',
|
||||
knowledge_search: '知识库搜索',
|
||||
get_chunk_detail: '获取片段详情',
|
||||
get_related_chunks: '获取相关片段',
|
||||
list_knowledge_bases: '列出知识库',
|
||||
get_document_info: '获取文档信息',
|
||||
query_knowledge_graph: '查询知识图谱',
|
||||
think: '思考',
|
||||
todo_write: '制定计划',
|
||||
};
|
||||
return displayNames[toolName] || toolName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user