auto-sync: 2026-05-18 11:42:23

This commit is contained in:
cfdaily
2026-05-18 11:42:23 +08:00
parent c8b1117f53
commit 8247ef1347
+11
View File
@@ -82,6 +82,17 @@ async def create_task(project_id: str, body: Dict[str, Any]):
return {"ok": True, "task_id": task.id}
@router.get("/tasks/{task_id}/progress")
async def task_progress(project_id: str, task_id: str):
"""Task Stage 进度(含子 Task 统计)"""
from src.blackboard.queries import Queries
queries = Queries(_db_path(project_id))
progress = queries.parent_task_progress(task_id)
if not progress:
raise HTTPException(404, "Task not found")
return progress
@router.post("/tasks/{task_id}/claim")
async def claim_task(project_id: str, task_id: str, body: Dict[str, Any]):
bb = _bb(project_id)