From da71020003f0d052e19cec6e8d16833c1deafb06 Mon Sep 17 00:00:00 2001 From: thzxx Date: Fri, 5 Jun 2026 10:52:47 +0800 Subject: [PATCH] =?UTF-8?q?spawn=5Ftask=20=E6=94=AF=E6=8C=81=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E5=AD=90=E4=BB=A3=E7=90=86=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 工具定义新增 model 参数,可指定小模型跑简单任务 - learn_task 子代理说明更新:展示只读工具能力 --- src/renderer/services/tool-registry.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/renderer/services/tool-registry.ts b/src/renderer/services/tool-registry.ts index c82a987..572648b 100644 --- a/src/renderer/services/tool-registry.ts +++ b/src/renderer/services/tool-registry.ts @@ -480,13 +480,14 @@ export const TOOL_DEFINITIONS: ToolDefinition[] = [ type: 'function', function: { name: 'spawn_task', - description: 'Spawn a sub-agent to independently execute a task. The sub-agent runs in isolation without tool access and returns a result. Use this to parallelize independent sub-tasks or delegate focused work.', + description: 'Spawn a sub-agent to independently execute a task using read-only tools (file reading, web search, browser viewing, memory/session/skill queries). Use this to parallelize independent research or analysis sub-tasks.', parameters: { type: 'object', required: ['task'], properties: { task: { type: 'string', description: 'The task description for the sub-agent to execute.' }, - context: { type: 'string', description: 'Optional additional context or reference data for the sub-agent.' } + context: { type: 'string', description: 'Optional additional context or reference data for the sub-agent.' }, + model: { type: 'string', description: 'Optional model name for the sub-agent. Use a smaller/faster model for simple tasks. Defaults to current model.' } } } } @@ -767,9 +768,10 @@ export async function executeTool(toolName: string, args: Record