feat: 接入持久化工作流执行状态

This commit is contained in:
GouJ committed 2026-09-23 19:53:55 +08:00
1 parent 7d2900c705
commit 3caea26924
14 files changed
+532 -44

No files matched your search

+17
View File
@@ -17,6 +17,7 @@ import type {
RetryVideosResult,
ShotKeyframe,
ShotVideo,
ShotVideoQualityStatus,
ShotVideoQualityResult,
VideoQualityBatchResult,
VideoQualityConfig,
@@ -25,6 +26,7 @@ import type {
ProjectAssemblyReadiness,
EpisodeAssemblyResult
} from './types'
import type { WorkflowExecutionStart } from '../workflows/execution.types'
/** 项目路径统一编码,避免业务组件手工拼接 ID。 */
function projectPath(id: string) {
@@ -78,6 +80,12 @@ export const productionApi = {
body: input,
timeoutMs: 0
}),
/** 后台生成视频提示词;刷新页面后可凭 executionId 继续观察。 */
startPromptExecution: (projectId: string, input: StoryboardBatchInput) =>
request<WorkflowExecutionStart>(`${projectPath(projectId)}/video-prompts/generate/start`, {
method: 'POST',
body: input
}),
keyframeReadiness: (projectId: string, force: boolean, signal?: AbortSignal) =>
request<KeyframeReadiness>(`${projectPath(projectId)}/keyframes/readiness?force=${force}`, { signal }),
generateKeyframes: (projectId: string, input: GenerateKeyframesInput) =>
@@ -95,8 +103,17 @@ export const productionApi = {
body: input,
timeoutMs: 0
}),
/** 后台启动项目级视频质量任务;后续状态通过 WorkflowExecution 查询。 */
startQualityVideoExecution: (projectId: string, input: GenerateQualityVideosInput) =>
request<WorkflowExecutionStart>(`${projectPath(projectId)}/videos/generate-quality/start`, {
method: 'POST',
body: input
}),
projectVideoStatus: (projectId: string, signal?: AbortSignal) =>
request<ProjectVideoStatus>(`${projectPath(projectId)}/videos/status`, { signal }),
/** 读取单镜头已持久化的质量链状态,不触发新的视觉校验。 */
videoQualityStatus: (shotId: string, signal?: AbortSignal) =>
request<ShotVideoQualityStatus>(`${shotPath(shotId)}/videos/quality-status`, { signal }),
retryVideos: (projectId: string, concurrency: number) =>
request<RetryVideosResult>(`${projectPath(projectId)}/videos/retry-failed`, {
method: 'POST',