From b74eb9feedcea27d37a080b56a5bcb6e14230765 Mon Sep 17 00:00:00 2001 From: GouJ Date: Tue, 1 Sep 2026 15:34:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A6=96=E5=B8=A7=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=BB=98=E8=AE=A4=E9=99=90=E5=AE=9A=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E5=89=A7=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/production/useProduction.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/features/production/useProduction.ts b/src/features/production/useProduction.ts index 6d6a084..70543e3 100644 --- a/src/features/production/useProduction.ts +++ b/src/features/production/useProduction.ts @@ -83,9 +83,14 @@ export function useProduction() { const input = { concurrency: concurrency.value, force: force.value } const target = getProductionSession(projectId) target.receipt = null + const staleKeyframes = query.data.value?.keyframes.stalePrimaryKeyframe ?? 0 const labels: Record = { prompts: force.value ? '重生成项目视频提示词' : '补齐项目视频提示词', - keyframes: force.value ? '新增项目首帧候选' : '补齐或更新项目主首帧', + keyframes: force.value + ? '新增项目首帧候选' + : staleKeyframes > 0 + ? `更新 ${staleKeyframes} 个过期主首帧` + : `补齐第 ${episodeNo.value} 集主首帧`, videos: force.value ? '新增项目视频候选' : '提交就绪视频任务', 'retry-videos': '重试失败视频任务' } @@ -100,7 +105,12 @@ export function useProduction() { target.receipt = { kind: 'keyframes', title: labels[command], - result: await productionApi.generateKeyframes(projectId, { provider: 'seedream', ...input }) + result: await productionApi.generateKeyframes(projectId, { + provider: 'seedream', + ...input, + // 有 stale 时由后端优先处理全部 stale;否则只补当前剧集,避免误跑整个项目。 + ...(force.value || staleKeyframes > 0 ? {} : { episodeNo: episodeNo.value }) + }) } } else if (command === 'videos') { target.receipt = {