feat: Breakdown 所有执行操作统一返回任务 ID

This commit is contained in:
GouJ committed 2026-09-26 20:16:55 +08:00
1 parent 33ebea2722
commit 2c5a42fa78
1 file changed
+4 -10
+4 -10
View File
@@ -11,14 +11,8 @@ export const breakdownApi = {
latest: (id: string, signal?: AbortSignal) => latest: (id: string, signal?: AbortSignal) =>
optionalResource(request<BreakdownState>(`/projects/${encodeURIComponent(id)}/breakdown/latest`, { signal })), optionalResource(request<BreakdownState>(`/projects/${encodeURIComponent(id)}/breakdown/latest`, { signal })),
run: (id: string, action: BreakdownAction, input?: BreakdownInput) => run: (id: string, action: BreakdownAction, input?: BreakdownInput) =>
action === 'start' request<WorkflowExecutionStart>(`/projects/${encodeURIComponent(id)}/breakdown/${action}`, {
? request<WorkflowExecutionStart>(`/projects/${encodeURIComponent(id)}/breakdown/start`, { method: 'POST',
method: 'POST', body: input
body: input })
})
: request<BreakdownState>(`/projects/${encodeURIComponent(id)}/breakdown/${action}`, {
method: 'POST',
body: input,
timeoutMs: 0
})
} }