From b4e9ca403b85a898296d8122c71ec32fd5fd3fea Mon Sep 17 00:00:00 2001 From: cfdaily Date: Wed, 3 Jun 2026 18:28:44 +0800 Subject: [PATCH] auto-sync: 2026-06-03 18:28:44 (catch-all) --- src/api/checkpoint_routes.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/api/checkpoint_routes.py b/src/api/checkpoint_routes.py index 807587b..173b3d3 100644 --- a/src/api/checkpoint_routes.py +++ b/src/api/checkpoint_routes.py @@ -81,6 +81,18 @@ def approve_checkpoint(project_id: str, task_id: str, checkpoint_id: str, req: R raise HTTPException(status_code=404, detail="Checkpoint not found") if "error" in result: raise HTTPException(status_code=400, detail=result["error"]) + # #10: SSE 通知前端 checkpoint 已处理 + try: + from src.api.sse_routes import get_broker + broker = get_broker() + broker.publish_sync("checkpoint_resolved", { + "project_id": project_id, + "task_id": task_id, + "checkpoint_id": checkpoint_id, + "action": "approve", + }) + except Exception: + pass return {"ok": True, **result}