MCPcopy Index your code
hub / github.com/simstudioai/sim / captureBaselineSnapshot

Function captureBaselineSnapshot

apps/sim/stores/workflow-diff/utils.ts:103–112  ·  view source on GitHub ↗
(workflowId: string)

Source from the content-addressed store, hash-verified

101}
102
103export function captureBaselineSnapshot(workflowId: string): WorkflowState {
104 const workflowStore = useWorkflowStore.getState()
105 const currentState = workflowStore.getWorkflowState()
106 const mergedBlocks = mergeSubblockState(currentState.blocks, workflowId)
107
108 return {
109 ...cloneWorkflowState(currentState),
110 blocks: structuredClone(mergedBlocks),
111 }
112}
113
114export async function persistWorkflowStateToServer(
115 workflowId: string,

Callers 2

store.tsFile · 0.90
panel.tsxFile · 0.90

Calls 2

mergeSubblockStateFunction · 0.90
cloneWorkflowStateFunction · 0.85

Tested by

no test coverage detected