hit-cxf
2026-05-31 0bc7753fba9b44d4caa5d12bc4075fd402aa689a
video-claw/video-claw/backend/api/services/project_helpers.py
@@ -1,4 +1,5 @@
import asyncio
import copy
import json
import queue
import threading
@@ -131,9 +132,7 @@
                    break
            if await request.is_disconnected():
                if on_disconnect:
                    on_disconnect()
                yield json.dumps({"type": "error", "content": "Client disconnected"}) + "\n"
                workflow_engine.track_background_task(task)
                return
        while not progress_events.empty():
@@ -145,11 +144,13 @@
        result = task.result()
        workflow_engine.save_session_to_disk(state.session_id)
        with workflow_engine._state_lock:
            status_snapshot = copy.deepcopy(state.status)
        payload = {
            "type": "stage_complete",
            "stage": stage,
            "status": state.status,
            "status": status_snapshot,
            "requires_intervention": result.get("requires_intervention", False),
            "openclaw": build_openclaw_message(stage, result),
        }