feat(short-drama-agent-front): 新增拆解候选与质量修订

This commit is contained in:
GJ committed 2026-10-17 08:25:16 +08:00
1 parent 49ad08a63e
commit 3414cc8232
32 files changed
+2319 -454

No files matched your search

@@ -10,7 +10,34 @@ import { ApiError, errorMessage } from '../../lib/http'
import { generationConfigApi } from '../generation-config/api'
import { productionApi } from './api'
import { getProductionSession } from './model'
import type { ProductionStartInput, ProductionStage } from './types'
import type { ProductionPlan, ProductionStartInput, ProductionStage } from './types'
/**
* 指定续跑阶段会跳过上游生成,必须使用已有有效资产而非可生成数量。
* @param plan 后端当前真实生产计划
* @param scope 用户选择的本轮执行范围
* @returns 与后端续跑门禁一致的阻断原因
*/
export function productionResumeIssues(
plan: Pick<ProductionPlan, 'characterIdentity' | 'subjectImages' | 'keyframes'>,
scope: ProductionStartInput
): string[] {
if (!scope.startFrom) return []
const issues: string[] = []
const identity = plan.characterIdentity
if (!identity || identity.ready !== identity.total) issues.push('指定阶段续跑前,需要全部角色身份确认并锁定。')
if (
(scope.startFrom === 'keyframes' || scope.startFrom === 'videoPrompts') &&
(!plan.subjectImages.total || plan.subjectImages.skipped !== plan.subjectImages.total)
)
issues.push('指定阶段续跑前,需要全部主体参考图有效且未过期。')
if (
scope.startFrom === 'videoPrompts' &&
(!plan.keyframes.total || plan.keyframes.skipped !== plan.keyframes.total)
)
issues.push('从视频提示词续跑前,需要全部有效首帧就绪。')
return issues
}
/**
* 使用后端计划区分可自动补齐和人工阻塞,保留项目归属及活动任务检查。
@@ -45,6 +72,7 @@ export async function checkPipeline(projectId: string, scope: ProductionStartInp
const issues: string[] = []
if (plan.entryReadiness && !plan.entryReadiness.ready)
issues.push(plan.entryReadiness.reason || '项目尚未满足生产入口条件。')
issues.push(...productionResumeIssues(plan, scope))
if (!profile) issues.push('尚未配置项目画布与生成模型,请先在右上角“项目配置”中保存配置。')
const shotIds = new Set(plan.details.keyframes.map(item => item.shotId))
if (