diff --git a/static/src/components/chat/MinimalBlocks.vue b/static/src/components/chat/MinimalBlocks.vue index e249589..6f44147 100644 --- a/static/src/components/chat/MinimalBlocks.vue +++ b/static/src/components/chat/MinimalBlocks.vue @@ -584,12 +584,25 @@ const blockGroups = computed(() => { return groups; }); -type ToolCategory = 'read' | 'command' | 'edit' | 'search' | 'webpage' | 'other'; +type ToolCategory = + | 'read' + | 'command' + | 'edit' + | 'search' + | 'webpage' + | 'memory_update' + | 'memory_read' + | 'conversation' + | 'sub_agent' + | 'other'; const TOOL_CATEGORY_MAP: Record = { - // 读取文件 + // 读取文件 / 视觉内容 read_file: 'read', read_skill: 'read', + vlm_analyze: 'read', + view_image: 'read', + view_video: 'read', // 运行指令 run_command: 'command', @@ -604,13 +617,27 @@ const TOOL_CATEGORY_MAP: Record = { delete_file: 'edit', rename_file: 'edit', create_folder: 'edit', - save_webpage: 'edit', // 搜索 web_search: 'search', // 查看网页 - extract_webpage: 'webpage' + extract_webpage: 'webpage', + save_webpage: 'webpage', + + // 更新记忆 + update_memory: 'memory_update', + update_project_memory: 'memory_update', + + // 查看记忆 + recall_project_memory: 'memory_read', + + // 回顾对话 + conversation_search: 'conversation', + conversation_review: 'conversation', + + // 子智能体 + create_sub_agent: 'sub_agent' }; const CATEGORY_LABELS: Record string> = { @@ -619,10 +646,25 @@ const CATEGORY_LABELS: Record string> = { edit: (n) => `编辑了 ${n} 次文件`, search: (n) => `搜索了 ${n} 次`, webpage: (n) => `查看了 ${n} 次网页`, + memory_update: (n) => `更新了 ${n} 次记忆`, + memory_read: (n) => `查看了 ${n} 次记忆`, + conversation: (n) => `回顾了 ${n} 次对话`, + sub_agent: (n) => `创建了 ${n} 个子智能体`, other: (n) => `执行了 ${n} 次其他操作` }; -const CATEGORY_ORDER: ToolCategory[] = ['read', 'command', 'edit', 'search', 'webpage', 'other']; +const CATEGORY_ORDER: ToolCategory[] = [ + 'read', + 'command', + 'edit', + 'search', + 'webpage', + 'memory_update', + 'memory_read', + 'conversation', + 'sub_agent', + 'other' +]; const getToolCategory = (action: Action): ToolCategory => { const name = action.tool?.name;