MCPcopy
hub / github.com/HKUDS/DeepCode / start_chat_planning

Function start_chat_planning

new_ui/backend/api/routes/workflows.py:48–70  ·  view source on GitHub ↗

Start a chat-based planning workflow. Returns a task ID that can be used to track progress via WebSocket.

(
    request: ChatPlanningRequest,
    background_tasks: BackgroundTasks,
)

Source from the content-addressed store, hash-verified

46
47@router.post("/chat-planning", response_model=TaskResponse)
48async 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}")

Callers

nothing calls this directly

Calls 2

TaskResponseClass · 0.90
create_taskMethod · 0.80

Tested by

no test coverage detected