auto-sync: 2026-05-23 23:32:33
This commit is contained in:
@@ -82,13 +82,13 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_
|
||||
-d '{{"agent": "{agent_id}", "type": "code", "title": "main.py", "content_path": "/path/to/file.py", "summary": "主程序"}}'
|
||||
```
|
||||
|
||||
### 步骤 4: 提交审查或标记失败
|
||||
### 步骤 4: 提交完成或标记失败
|
||||
|
||||
✅ 成功完成:
|
||||
```bash
|
||||
curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_id}/status \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{{"status": "review", "agent": "{agent_id}"}}'
|
||||
-d '{{"status": "{completion_status}", "agent": "{agent_id}"}}'
|
||||
```
|
||||
|
||||
❌ 无法完成:
|
||||
@@ -197,6 +197,8 @@ class AgentSpawner:
|
||||
logger.exception("BootstrapBuilder failed, falling back to template")
|
||||
|
||||
# Fallback: 使用硬编码模板
|
||||
# mail 任务直接 done,不走 review
|
||||
completion_status = "done" if project_id == "_mail" else "review"
|
||||
return SPAWN_PROMPT_TEMPLATE.format(
|
||||
project_id=project_id,
|
||||
task_id=task_id,
|
||||
@@ -210,6 +212,7 @@ class AgentSpawner:
|
||||
api_port=self.api_port,
|
||||
current_status=current_status or "claimed",
|
||||
retry_context=retry_context or "",
|
||||
completion_status=completion_status,
|
||||
)
|
||||
|
||||
def _build_api_section(self, project_id: str, task_id: str,
|
||||
|
||||
Reference in New Issue
Block a user