fix: 为镜头提示词缺少首帧提供操作指引
This commit is contained in:
1 parent
0ce9ae00e7
commit
de26dd0c19
8 files changed
+149
-19
No files matched your search
@@ -419,7 +419,13 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
>
|
||||
<div v-if="detailTab === 'design'" class="pt-6"><ShotDesign :shot="shot" /></div>
|
||||
<div v-if="detailTab === 'tools'" class="pt-6">
|
||||
<ShotTools :key="shot.shotId" :project-id="id" :shot="shot" :disabled="blocked" />
|
||||
<ShotTools
|
||||
:key="shot.shotId"
|
||||
:project-id="id"
|
||||
:episode-no="episodeNo"
|
||||
:shot="shot"
|
||||
:disabled="blocked"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</NScrollbar>
|
||||
|
||||
@@ -13,7 +13,7 @@ import { getOperation, runOperation } from '../../workflows/operations'
|
||||
import ConfirmAction from '../../workflows/ConfirmAction.vue'
|
||||
|
||||
/** 镜头级只读资源与显式 Prompt 生成;查询与耗费模型的操作分开。 */
|
||||
const props = defineProps<{ projectId: string; shot: DesignedShot; disabled: boolean }>()
|
||||
const props = defineProps<{ projectId: string; shot: DesignedShot; episodeNo?: number; disabled: boolean }>()
|
||||
const references = ref<ShotReferences | null>(null)
|
||||
const spec = ref<ShotGenerationSpec | null>(null)
|
||||
const errors = ref({ references: '', spec: '' })
|
||||
@@ -72,7 +72,7 @@ async function generatePrompt() {
|
||||
const projectId = props.projectId
|
||||
const shotId = props.shot.shotId
|
||||
const overwrite = force.value
|
||||
await runOperation(projectId, `读取/生成镜头 ${props.shot.shotNo} 提示词`, async () => {
|
||||
const ok = await runOperation(projectId, `读取/生成镜头 ${props.shot.shotNo} 提示词`, async () => {
|
||||
const session = getStoryboardSession(projectId)
|
||||
// 请求结果不确定时不要保留可能已被覆盖的旧正文。
|
||||
delete session.prompts[shotId]
|
||||
@@ -81,6 +81,13 @@ async function generatePrompt() {
|
||||
throw new Error('接口未返回此镜头的有效提示词,请检查后端记录后重试。')
|
||||
session.prompts[shotId] = result
|
||||
})
|
||||
if (!ok && /primary keyframe|主首帧/i.test(operation.value.error)) {
|
||||
operation.value.recovery = {
|
||||
target: 'keyframe',
|
||||
shotId,
|
||||
episodeNo: props.episodeNo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 仅导出已返回的真实规格或提示词,不在前端补造内容。 */
|
||||
|
||||
Reference in new issue
Block a user