feat: 串联生产默认启用无视频安全模式

This commit is contained in:
GouJ committed 2026-09-26 20:21:24 +08:00
1 parent 61768236e0
commit c74d1aa7e9
1 file changed
+26 -6
@@ -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<number | null>(1)
const check = ref<Awaited<ReturnType<typeof checkPipeline>> | 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
}
}