re-fix: don't set current task on simple task

This commit is contained in:
a7m-1st 2025-11-13 03:46:27 +03:00
parent 7d6fc664d1
commit c1cd127ae7

View file

@ -543,9 +543,6 @@ async def step_solve(options: Chat, request: Request, task_lock: TaskLock):
# Now trigger end of previous task using stored result
yield sse_json("end", old_task_result)
# Update the sync_step with new task_id before sending new task sse events
set_current_task_id(options.project_id, task_id)
# Always yield new_task_state first - this is not optional
yield sse_json("new_task_state", item.data)
# Trigger Queue Removal
@ -577,6 +574,9 @@ async def step_solve(options: Chat, request: Request, task_lock: TaskLock):
workforce.resume()
continue # This continues the main while loop, waiting for next action
# Update the sync_step with new task_id before sending new task sse events
set_current_task_id(options.project_id, task_id)
yield sse_json("confirmed", {"question": new_task_content})
task_lock.status = Status.confirmed