Start a chat-based planning workflow. Returns a task ID that can be used to track progress via WebSocket.
(
request: ChatPlanningRequest,
background_tasks: BackgroundTasks,
)
| 46 | |
| 47 | @router.post("/chat-planning", response_model=TaskResponse) |
| 48 | async def start_chat_planning( |
| 49 | request: ChatPlanningRequest, |
| 50 | background_tasks: BackgroundTasks, |
| 51 | ): |
| 52 | """ |
| 53 | Start a chat-based planning workflow. |
| 54 | Returns a task ID that can be used to track progress via WebSocket. |
| 55 | """ |
| 56 | task = workflow_service.create_task() |
| 57 | |
| 58 | # Run workflow in background |
| 59 | background_tasks.add_task( |
| 60 | workflow_service.execute_chat_planning, |
| 61 | task.task_id, |
| 62 | request.requirements, |
| 63 | request.enable_indexing, |
| 64 | ) |
| 65 | |
| 66 | return TaskResponse( |
| 67 | task_id=task.task_id, |
| 68 | status="started", |
| 69 | message="Chat planning workflow started", |
| 70 | ) |
| 71 | |
| 72 | |
| 73 | @router.get("/status/{task_id}") |
nothing calls this directly
no test coverage detected