From b00b3c4e777f874c43847ade75d441c4e62b6a5c Mon Sep 17 00:00:00 2001 From: GouJ Date: Fri, 16 Oct 2026 12:36:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF=E6=8E=A5=E5=85=A5?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=8A=A8=E4=BD=9C=E8=AF=8A=E6=96=AD=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=92=8C=E6=89=B9=E9=87=8F=E5=BC=82=E6=AD=A5=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/breakdown/api.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/features/breakdown/api.ts b/src/features/breakdown/api.ts index 538338d..cd137d3 100644 --- a/src/features/breakdown/api.ts +++ b/src/features/breakdown/api.ts @@ -1,5 +1,5 @@ import { optionalResource, request } from '../../lib/http' -import type { BreakdownAction, BreakdownInput, BreakdownPreview, BreakdownState, StoryboardHandOccupancyDiagnostics, StoryboardHandRepairPreview, StoryboardHandRepairHistory } from './types' +import type { BreakdownAction, BreakdownInput, BreakdownPreview, BreakdownState, StoryboardHandOccupancyDiagnostics, StoryboardHandRepairPreview, StoryboardHandRepairHistory, LegacyActionDiagnosisPreview, LegacyActionDiagnosisBatchStart } from './types' import type { WorkflowExecutionStart } from '../workflows/execution.types' /** Breakdown API;预览为 GET,启动和恢复为等待完成的长 POST。 */ @@ -14,6 +14,22 @@ export const breakdownApi = { request(`/projects/${encodeURIComponent(id)}/breakdown/storyboard-hand-occupancy-repair-preview`, { signal }), handRepairHistory: (id: string, shotId: string, signal?: AbortSignal) => request(`/projects/${encodeURIComponent(id)}/breakdown/storyboard-hand-occupancy-repair-history/${encodeURIComponent(shotId)}`, { signal }), + legacyActionDiagnosisPreview: (id: string, episodeNo: number, beatNo?: number, shotNo?: number) => { + const query = new URLSearchParams({ episodeNo: String(episodeNo) }) + if (beatNo !== undefined) query.set('beatNo', String(beatNo)) + if (shotNo !== undefined) query.set('shotNo', String(shotNo)) + return request(`/projects/${encodeURIComponent(id)}/breakdown/storyboard-legacy-action-diagnosis-preview?${query}`) + }, + startLegacyActionDiagnosis: (id: string, input: { + episodeNo?: number + beatNo?: number + shotNo?: number + concurrency: number + confirmed: true + }) => request( + `/projects/${encodeURIComponent(id)}/breakdown/storyboard-legacy-action-diagnose-batch`, + { method: 'POST', body: input } + ), latest: (id: string, signal?: AbortSignal) => optionalResource(request(`/projects/${encodeURIComponent(id)}/breakdown/latest`, { signal })), run: (id: string, action: BreakdownAction, input?: BreakdownInput) =>