From 67292f9fd32acac4b0e4fce51f0bb91d80d2fc79 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Fri, 10 Jul 2026 14:03:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(chat):=20=E6=89=A9=E5=B1=95=E6=9E=81?= =?UTF-8?q?=E7=AE=80=E6=A8=A1=E5=BC=8F=E5=B7=A5=E5=85=B7=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/src/components/chat/MinimalBlocks.vue | 52 ++++++++++++++++++-- 1 file changed, 47 insertions(+), 5 deletions(-) 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;