From c74d1aa7e9d386c9bd6fb2522dad6d7e2877bf70 Mon Sep 17 00:00:00 2001 From: GouJ Date: Sat, 26 Sep 2026 20:21:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=B2=E8=81=94=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=90=AF=E7=94=A8=E6=97=A0=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../production/useAdvancedProduction.ts | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/features/production/useAdvancedProduction.ts b/src/features/production/useAdvancedProduction.ts index 23afc09..d491b5e 100644 --- a/src/features/production/useAdvancedProduction.ts +++ b/src/features/production/useAdvancedProduction.ts @@ -79,6 +79,9 @@ export function useAdvancedProduction() { const session = computed(() => getProductionSession(id.value)) const checking = ref(false) const error = ref('') + /** 默认使用无视频测试模式,只有用户明确切换后才允许提交高费用视频任务。 */ + const safeMode = ref(true) + const testKeyframeLimit = ref(1) const check = ref> | null>(null) const blocked = computed( () => @@ -142,15 +145,20 @@ export function useAdvancedProduction() { if (result.issues.length) throw new Error('提交前预检发现条件变化,未启动生产。请处理下方问题。') target.pipelineReceipt = null submitted = true - const receipt = await productionApi.startPipeline( - projectId, - result.profile + const receipt = await productionApi.startPipeline(projectId, { + ...(result.profile ? { imageProvider: result.profile.imageProvider, videoProvider: result.profile.videoProvider } - : undefined - ) + : {}), + ...(safeMode.value + ? { + stopAfter: 'videoPrompts' as const, + ...(testKeyframeLimit.value ? { keyframeLimit: testKeyframeLimit.value } : {}) + } + : {}) + }) if (!receipt || receipt.projectId !== projectId) throw new Error('回执项目不匹配,请读取资产状态核对,不要直接重试。') target.pipelineReceipt = receipt @@ -160,5 +168,17 @@ export function useAdvancedProduction() { await context.refresh() } } - return { id, operation, session, checking, error, check, blocked, preflight, start } + return { + id, + operation, + session, + checking, + error, + check, + blocked, + safeMode, + testKeyframeLimit, + preflight, + start + } }