feat: 对齐后端能力并补齐形态提示词与生产诊断

This commit is contained in:
GouJ committed 2026-09-02 18:21:20 +08:00
1 parent 7d8074f90e
commit f71d2bf0a4
30 files changed
+1707 -66

No files matched your search

+19 -3
View File
@@ -6,7 +6,7 @@ import { storyboardApi } from '../storyboard/api'
import { breakdownSnapshot } from '../workflows/selectors'
import { getOperation, runOperation } from '../workflows/operations'
import { productionApi } from './api'
import { getProductionSession } from './model'
import { getProductionSession, validOptionalSize } from './model'
/** 项目级生产动作;每次请求都由统一项目锁防止重复提交。 */
export type ProductionCommand = 'prompts' | 'keyframes' | 'videos' | 'retry-videos'
@@ -19,6 +19,9 @@ export function useProduction() {
const selectedShot = ref('')
const concurrency = ref(2)
const force = ref(false)
const keyframeLimit = ref<number | ''>('')
const keyframeWidth = ref<number | ''>('')
const keyframeHeight = ref<number | ''>('')
const snapshot = computed(() => breakdownSnapshot(context.checkpoints.value))
const sourceEpisodes = computed(
() => snapshot.value?.storyboardEpisodeShots ?? snapshot.value?.breakdownResult?.storyboardEpisodeShots ?? []
@@ -67,6 +70,11 @@ export function useProduction() {
const operation = computed(() => getOperation(id.value))
const session = computed(() => getProductionSession(id.value))
const batchValid = computed(() => Number.isSafeInteger(concurrency.value) && concurrency.value > 0)
const keyframeValid = computed(
() =>
(keyframeLimit.value === '' || (Number.isSafeInteger(keyframeLimit.value) && keyframeLimit.value > 0)) &&
validOptionalSize(keyframeWidth.value, keyframeHeight.value)
)
const blocked = computed(
() =>
operation.value.pending ||
@@ -78,7 +86,7 @@ export function useProduction() {
/** 批量操作只向就绪镜头提交;最终资产状态由轮询查询确认。 */
async function run(command: ProductionCommand) {
if (blocked.value || !batchValid.value) return
if (blocked.value || !batchValid.value || (command === 'keyframes' && !keyframeValid.value)) return
const projectId = id.value
const input = { concurrency: concurrency.value, force: force.value }
const target = getProductionSession(projectId)
@@ -114,7 +122,11 @@ export function useProduction() {
provider: 'seedream',
...input,
// 有 stale 时由后端优先处理全部 stale;否则只补当前剧集,避免误跑整个项目。
...(force.value || staleKeyframes > 0 ? {} : { episodeNo: episodeNo.value })
...(force.value || staleKeyframes > 0 ? {} : { episodeNo: episodeNo.value }),
...(keyframeLimit.value === '' ? {} : { limit: keyframeLimit.value }),
...(keyframeWidth.value === '' || keyframeHeight.value === ''
? {}
: { width: keyframeWidth.value, height: keyframeHeight.value })
})
}
} else if (command === 'videos') {
@@ -151,6 +163,10 @@ export function useProduction() {
session,
concurrency,
force,
keyframeLimit,
keyframeWidth,
keyframeHeight,
keyframeValid,
batchValid,
blocked,
run