feat(short-drama-agent-front): 同步拆解候选审核与安全提交

This commit is contained in:
GJ committed 2026-10-17 20:18:20 +08:00
1 parent cc27d463e0
commit 190333d4f9
26 files changed
+1495 -249

No files matched your search

@@ -2,7 +2,7 @@
import ContextNotice from '../../components/ui/ContextNotice.vue'
import { computed } from 'vue'
import { NButton, NProgress, NTag } from 'naive-ui'
import { NButton, NCollapse, NCollapseItem, NProgress, NTag } from 'naive-ui'
import { LoaderCircle, X } from '@lucide/vue'
import { formatDate } from '../../lib/format'
import { executionPercentage, executionStageLabel } from './execution'
@@ -345,8 +345,9 @@ function isInputMode(value: unknown, inputMode: string): boolean {
}}
</p>
</ContextNotice>
<details v-if="!breakdownTask" class="mt-3 text-[10px] text-muted">
<summary class="cursor-pointer">任务详情</summary>
<!-- 以下是非拆解任务的 Naive 详情折叠模块 -->
<NCollapse v-if="!breakdownTask" class="mt-3 text-xs text-muted">
<NCollapseItem name="task-details" title="任务详情">
<p class="mt-2 break-all font-mono">任务编号 · {{ execution.id }}</p>
<!-- 以下是逐镜已结束质量任务的持久化状态模块 -->
<ul v-if="videoQuality && settledItems.length" class="mt-2 space-y-2">
@@ -359,7 +360,8 @@ function isInputMode(value: unknown, inputMode: string): boolean {
· {{ executionStageLabel(item.status) }} · 视频 {{ item.videoId }}
</li>
</ul>
</details>
</NCollapseItem>
</NCollapse>
</template>
<!-- 以下是运行期间已经终止的过期候选统计模块 -->
<p
+12 -1
View File
@@ -1,5 +1,6 @@
import type { BreakdownState } from '../breakdown/types'
import type { Checkpoint } from './types'
import { normalizeBreakdownState, selectBreakdownSource } from '../breakdown/quality'
/** 按工作流隔离并排序,后端数组顺序变化不会影响恢复判断。 */
export function workflowCheckpoints(checkpoints: Checkpoint[], name: string): Checkpoint[] {
@@ -19,7 +20,17 @@ export function breakdownSnapshot(checkpoints: Checkpoint[]): BreakdownState | n
.toReversed()
.find(item => item.state.runConfig || item.state.breakdownResult || item.state.storyboardPlans?.length)
?.state ?? {}
return { ...data, workflowExecution: latest.state.workflowExecution }
return { ...normalizeBreakdownState(data), workflowExecution: latest.state.workflowExecution }
}
/**
* 正式工作区只消费已提交或兼容旧版的正式快照,不读取未提交候选正文。
* @param checkpoints 项目检查点
* @returns 单个正式版本的数据,缺失时不以候选补造
*/
export function formalBreakdownSnapshot(checkpoints: Checkpoint[]): BreakdownState | null {
const formal = selectBreakdownSource(workflowCheckpoints(checkpoints, 'breakdown')).formal
return formal ? normalizeBreakdownState(formal.state) : null
}
/** 根据最近后端可恢复窗口推导操作;页面仍需先确认任务已经结束。 */