fix(agent_tasks): update task phase to REPORTING on completion

- Change task phase from COMPLETED to REPORTING when agent task finishes
- Ensures proper phase progression through task lifecycle
- Aligns with agent workflow state management requirements
This commit is contained in:
lintsinghua 2025-12-12 16:09:50 +08:00
parent eed111c04d
commit b392e049e8
1 changed files with 1 additions and 1 deletions

View File

@ -368,7 +368,7 @@ async def _execute_agent_task(task_id: str):
# 更新任务统计
task.status = AgentTaskStatus.COMPLETED
task.completed_at = datetime.now(timezone.utc)
task.current_phase = AgentTaskPhase.COMPLETED
task.current_phase = AgentTaskPhase.REPORTING
task.findings_count = len(findings)
task.total_iterations = result.iterations
task.tool_calls_count = result.tool_calls