fix: 为镜头提示词缺少首帧提供操作指引

This commit is contained in:
GouJ committed 2026-09-23 09:29:24 +08:00
1 parent 0ce9ae00e7
commit de26dd0c19
8 files changed
+149 -19

No files matched your search

+25 -2
View File
@@ -33,11 +33,23 @@ provide(projectContextKey, context)
const operation = computed(() => getOperation(id.value))
const complete = computed(() => isProjectComplete(context.project.value, id.value))
const isCreation = computed(() => route.path.replace(/\/+$/, '').endsWith('/create-drama'))
type OperationGuide = { title: string; description: string; action?: string; target?: 'profile' | 'style' | 'identity' }
type OperationGuide = {
title: string
description: string
action?: string
target?: 'profile' | 'style' | 'identity' | 'keyframe'
}
const operationGuide = computed<OperationGuide | null>(() => {
const error = operation.value.error?.trim()
if (!error) return null
const normalized = error.toLowerCase()
if (normalized.includes('primary keyframe') || error.includes('主首帧'))
return {
title: '缺少镜头主首帧',
description: '视频提示词需要主首帧完成起点校验。请先生成并确认主首帧,再返回分镜页读取/生成提示词。',
action: '先生成主首帧',
target: 'keyframe'
}
if (normalized.includes('creative profile'))
return {
title: '缺少项目生成配置',
@@ -65,7 +77,18 @@ const operationGuide = computed<OperationGuide | null>(() => {
/** 已知前置条件直接送达对应工作区;保留当前页面,修复后可继续原操作。 */
function resolveOperationError() {
const target = operationGuide.value?.target
if (target === 'style') void router.push(`/projects/${id.value}/visual-style`)
if (target === 'keyframe') {
const recovery = operation.value.recovery?.target === 'keyframe' ? operation.value.recovery : null
const query = recovery
? {
...(recovery.episodeNo ? { episodeNo: String(recovery.episodeNo) } : {}),
shotId: recovery.shotId,
action: 'keyframe'
}
: { action: 'keyframe' }
operation.value.error = ''
void router.push({ path: `/projects/${id.value}/production`, query })
} else if (target === 'style') void router.push(`/projects/${id.value}/visual-style`)
else if (target === 'identity') void router.push(`/projects/${id.value}/subject-identity`)
else if (target === 'profile') {
const onIdentityPage = route.path.replace(/\/+$/, '').endsWith('/subject-identity')