auto-sync: 2026-06-03 18:28:44 (catch-all)

This commit is contained in:
cfdaily
2026-06-03 18:28:44 +08:00
parent 14e757f01e
commit b4e9ca403b
+12
View File
@@ -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}