From e7824a58309c3c3665724f49011b1199a585ac42 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Wed, 3 Jun 2026 18:28:53 +0800 Subject: [PATCH] auto-sync: 2026-06-03 18:28:53 --- 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 173b3d3..c713067 100644 --- a/src/api/checkpoint_routes.py +++ b/src/api/checkpoint_routes.py @@ -105,4 +105,16 @@ def reject_checkpoint(project_id: str, task_id: str, checkpoint_id: str, req: Re 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": "reject", + }) + except Exception: + pass return {"ok": True, **result}