fix: clarify wait tool and todo prompts
This commit is contained in:
parent
3eec18b8a9
commit
dc1d566db3
@ -1397,7 +1397,7 @@ class MainTerminal:
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "wait_sub_agent",
|
||||
"description": "等待指定子智能体任务结束(或超时)。任务完成后会返回交付目录,并将结果复制到指定的项目文件夹。",
|
||||
"description": "等待指定子智能体任务结束(或超时)。任务完成后会返回交付目录,并将结果复制到指定的项目文件夹。调用时 `timeout_seconds` 应不少于对应子智能体的 `timeout_seconds`,否则可能提前终止等待。",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@ -68,10 +68,7 @@ class TodoManager:
|
||||
|
||||
overview = (overview or "").strip()
|
||||
if not overview:
|
||||
return {
|
||||
"success": False,
|
||||
"error": "任务概述不能为空。请用一句话概括清单目标,例如“整理比亚迪新能源销量数据”。"
|
||||
}
|
||||
return {"success": False, "error": "任务概述不能为空。"}
|
||||
if len(overview) > self.MAX_OVERVIEW_LENGTH:
|
||||
return {
|
||||
"success": False,
|
||||
@ -80,10 +77,7 @@ class TodoManager:
|
||||
|
||||
normalized_tasks = self._normalize_tasks(tasks or [])
|
||||
if not normalized_tasks:
|
||||
return {
|
||||
"success": False,
|
||||
"error": "需要至少提供一个任务。每个任务应是可执行的步骤,如“收集车型销量数据”而不是“处理”这类模糊词。"
|
||||
}
|
||||
return {"success": False, "error": "需要至少提供一个任务。"}
|
||||
if len(tasks or []) > self.MAX_TASKS:
|
||||
return {
|
||||
"success": False,
|
||||
|
||||
@ -68,10 +68,7 @@ class TodoManager:
|
||||
|
||||
overview = (overview or "").strip()
|
||||
if not overview:
|
||||
return {
|
||||
"success": False,
|
||||
"error": "任务概述不能为空。请用一句话概括清单目标,例如“整理车型销量”或“编写 result.md”。"
|
||||
}
|
||||
return {"success": False, "error": "任务概述不能为空。"}
|
||||
if len(overview) > self.MAX_OVERVIEW_LENGTH:
|
||||
return {
|
||||
"success": False,
|
||||
@ -80,10 +77,7 @@ class TodoManager:
|
||||
|
||||
normalized_tasks = self._normalize_tasks(tasks or [])
|
||||
if not normalized_tasks:
|
||||
return {
|
||||
"success": False,
|
||||
"error": "需要至少提供一个任务。请把计划分成可执行的小步骤,例如“读取文件”“整理总结”等。"
|
||||
}
|
||||
return {"success": False, "error": "需要至少提供一个任务。"}
|
||||
if len(tasks or []) > self.MAX_TASKS:
|
||||
return {
|
||||
"success": False,
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
## 使用流程
|
||||
1. **先规划**:在创建清单前,用自然语言写下你准备执行的流程,让自己确认无遗漏。
|
||||
2. **todo_create**:把概述与任务数组一次性写对,创建后尽量不要反复删除重建。概述 ≤ 50 字,直接写清“我要做什么”;任务数组列出 2~4 条动词+对象的步骤,例如“读取 physics_problems.txt”“整理 result.md 结论”。
|
||||
2. **todo_create**:把概述与任务数组一次性写对,创建后尽量不要反复删除重建。概述 ≤ 50 字,直接写清“我要做什么”(例如“整理 deliverables/result.md”);任务数组写 2~4 条“动词+对象+目标”的步骤,例如“读取 physics_problems.txt,列出 5 道题”“在 result.md 中总结风险”。
|
||||
3. **todo_update_task**:每完成一项立刻勾选;若步骤发生变化,先写明原因再修改对应任务。
|
||||
4. **todo_finish**:所有任务完成后调用。若仍有未完项但必须停止,先调用 `todo_finish`,再用 `todo_finish_confirm` 说明原因与后续建议。
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user