refactor(core): task_output 工具使用外部描述文件
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
- Retrieves output from a running or completed task (background shell, agent, or remote session)
|
||||
- Takes a task_id parameter identifying the task
|
||||
- Returns the task output along with status information
|
||||
- Use block=true (default) to wait for task completion
|
||||
- Use block=false for non-blocking check of current status
|
||||
- Task IDs can be found using the /tasks command
|
||||
- Works with all task types: background shells, async agents, and remote sessions
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { ToolWithMetadata } from '../types.js';
|
||||
import { getAgentManager } from '../../agent/manager.js';
|
||||
import { loadDescription } from '../load_description.js';
|
||||
|
||||
/**
|
||||
* TaskOutput 工具
|
||||
@@ -7,15 +8,7 @@ import { getAgentManager } from '../../agent/manager.js';
|
||||
*/
|
||||
export const taskOutputTool: ToolWithMetadata = {
|
||||
name: 'task_output',
|
||||
description: `获取后台运行的 Agent 执行结果。
|
||||
|
||||
当使用 task 工具的 run_in_background 参数启动后台 Agent 后,
|
||||
使用此工具查询执行状态和结果。
|
||||
|
||||
使用示例:
|
||||
- 查询结果(阻塞等待): task_output({ task_id: "abc123" })
|
||||
- 检查状态(不阻塞): task_output({ task_id: "abc123", block: false })
|
||||
- 设置超时: task_output({ task_id: "abc123", timeout: 60000 })`,
|
||||
description: loadDescription('task_output'),
|
||||
parameters: {
|
||||
task_id: {
|
||||
type: 'string',
|
||||
|
||||
Reference in New Issue
Block a user