phase 7
This commit is contained in:
@@ -2,6 +2,7 @@ import { ref, computed, watch } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import type { DataSource } from 'mpr-ui-framework'
|
||||
import { usePipelineStore } from '../stores/pipeline'
|
||||
import { useStageRegistry } from './useStageRegistry'
|
||||
|
||||
interface CheckpointFrame {
|
||||
seq: number
|
||||
@@ -65,19 +66,17 @@ export function useCheckpointLoader(
|
||||
currentFrameRef.value = frame.seq
|
||||
}
|
||||
|
||||
const { checkpointStageFor } = useStageRegistry()
|
||||
|
||||
// Auto-load checkpoint when entering editor mode
|
||||
watch(
|
||||
() => [pipeline.layoutMode, pipeline.editorStage, jobId.value] as const,
|
||||
([mode, stage, job]) => {
|
||||
if (mode === 'bbox_editor' && stage && job) {
|
||||
const stageMap: Record<string, string> = {
|
||||
detect_edges: 'filter_scenes',
|
||||
detect_contours: 'detect_edges',
|
||||
detect_color: 'detect_contours',
|
||||
merge_regions: 'detect_color',
|
||||
const cpStage = checkpointStageFor(stage)
|
||||
if (cpStage) {
|
||||
loadCheckpoint(job, cpStage)
|
||||
}
|
||||
const cpStage = stageMap[stage] ?? 'filter_scenes'
|
||||
loadCheckpoint(job, cpStage)
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
|
||||
Reference in New Issue
Block a user