diff --git a/frontend/src/lib/components/FirstStepInputs.svelte b/frontend/src/lib/components/FirstStepInputs.svelte index 775dccdda8..68bc0afe8c 100644 --- a/frontend/src/lib/components/FirstStepInputs.svelte +++ b/frontend/src/lib/components/FirstStepInputs.svelte @@ -28,7 +28,7 @@ } } $effect(() => { - flowStore.val && flowStateStore && untrack(() => loadSchema()) + flowStore.val && flowStateStore.val && untrack(() => loadSchema()) }) function handleClick() { diff --git a/frontend/src/lib/components/FlowBuilder.svelte b/frontend/src/lib/components/FlowBuilder.svelte index 78a0363012..0573c67c40 100644 --- a/frontend/src/lib/components/FlowBuilder.svelte +++ b/frontend/src/lib/components/FlowBuilder.svelte @@ -1157,7 +1157,7 @@ - {#if flowStateStore} + {#if flowStateStore.val} >{}) onMount(() => { - testSteps?.updateStepArgs(mod.id, flowStateStore, flowStore?.val, previewArgs?.val) + testSteps?.updateStepArgs(mod.id, flowStateStore.val, flowStore?.val, previewArgs?.val) args = testSteps?.getStepArgs(mod.id) ?? { value: {} } }) diff --git a/frontend/src/lib/components/ModuleTest.svelte b/frontend/src/lib/components/ModuleTest.svelte index aacd0b10a6..d382e2580c 100644 --- a/frontend/src/lib/components/ModuleTest.svelte +++ b/frontend/src/lib/components/ModuleTest.svelte @@ -35,7 +35,8 @@ } export function loadArgsAndRunTest() { - testSteps?.updateStepArgs(mod.id, flowStateStore, flowStore?.val, previewArgs?.val) + console.log('loadArgsAndRunTest', flowStateStore.val) + testSteps?.updateStepArgs(mod.id, flowStateStore.val, flowStore?.val, previewArgs?.val) runTest(testSteps.getStepArgs(mod.id)?.value) } diff --git a/frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts b/frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts index 29e4e1bef7..ed6b8f019c 100644 --- a/frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts +++ b/frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts @@ -936,7 +936,7 @@ class AIChatManager { const module = getModule(id) if (module && module.value.type === 'rawscript') { - const moduleState: FlowModuleState | undefined = flowStateStore.val[module.id] + const moduleState: FlowModuleState | undefined = flowStateStore[module.id] const editorRelated = currentEditor && currentEditor.type === 'script' && currentEditor.stepId === module.id diff --git a/frontend/src/lib/components/copilot/chat/flow/FlowAIChat.svelte b/frontend/src/lib/components/copilot/chat/flow/FlowAIChat.svelte index c0688bafd8..7c9d76cafd 100644 --- a/frontend/src/lib/components/copilot/chat/flow/FlowAIChat.svelte +++ b/frontend/src/lib/components/copilot/chat/flow/FlowAIChat.svelte @@ -514,7 +514,7 @@ const cleanup = aiChatManager.listenForSelectedIdChanges( $selectedId, flowStore.val, - flowStateStore, + flowStateStore.val, $currentEditor ) return cleanup diff --git a/frontend/src/lib/components/flows/content/FlowEditorPanel.svelte b/frontend/src/lib/components/flows/content/FlowEditorPanel.svelte index 763de8e3fb..668fcf2d54 100644 --- a/frontend/src/lib/components/flows/content/FlowEditorPanel.svelte +++ b/frontend/src/lib/components/flows/content/FlowEditorPanel.svelte @@ -78,7 +78,7 @@ } $effect(() => { - computeMissingInputWarnings(flowStore, flowStateStore, flowInputsStore) + computeMissingInputWarnings(flowStore, flowStateStore.val, flowInputsStore) }) diff --git a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte index 308324c4a3..40528b4dbe 100644 --- a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte +++ b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte @@ -250,7 +250,7 @@ let stepPropPicker = $derived( $executionCount != undefined && failureModule - ? getFailureStepPropPicker(flowStateStore, flowStore.val, previewArgs.val) + ? getFailureStepPropPicker(flowStateStore.val, flowStore.val, previewArgs.val) : getStepPropPicker( flowStateStore.val, parentModule, diff --git a/frontend/src/lib/components/flows/flowStateUtils.svelte.ts b/frontend/src/lib/components/flows/flowStateUtils.svelte.ts index ced1907a2b..63739f2c41 100644 --- a/frontend/src/lib/components/flows/flowStateUtils.svelte.ts +++ b/frontend/src/lib/components/flows/flowStateUtils.svelte.ts @@ -260,7 +260,7 @@ export async function createScriptFromInlineScript( return pickScript(availablePath, flowModule.summary ?? '', flowModule.id, hash) } -export function deleteFlowStateById(id: string, flowStateStore: FlowState) { +export function deleteFlowStateById(id: string, flowStateStore: StateStore) { delete flowStateStore.val[id] } @@ -295,7 +295,7 @@ export function sliceModules( export async function insertNewPreprocessorModule( flowStore: StateStore, - flowStateStore: FlowState, + flowStateStore: StateStore, inlineScript?: { language: RawScript['language'] }, @@ -325,7 +325,7 @@ export async function insertNewPreprocessorModule( export async function insertNewFailureModule( flowStore: StateStore, - flowStateStore: FlowState, + flowStateStore: StateStore, inlineScript?: { language: RawScript['language'] subkind: 'pgsql' | 'flow' diff --git a/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte b/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte index ab8e565bce..27b59ef366 100644 --- a/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte +++ b/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte @@ -2,7 +2,7 @@ import { preventDefault, stopPropagation } from 'svelte/legacy' import Popover from '$lib/components/Popover.svelte' - import { classNames } from '$lib/utils' + import { classNames, type StateStore } from '$lib/utils' import { AlertTriangle, Bed, @@ -158,7 +158,7 @@ id: string | undefined, pickableIds: Record | undefined, flowPropPickerConfig: any | undefined, - flowStateStore: FlowState | undefined + flowStateStore: StateStore | undefined ) { if (!id) return connectingData = diff --git a/frontend/src/lib/components/flows/propPicker/InputPickerInner.svelte b/frontend/src/lib/components/flows/propPicker/InputPickerInner.svelte index 816804b007..11473aca9c 100644 --- a/frontend/src/lib/components/flows/propPicker/InputPickerInner.svelte +++ b/frontend/src/lib/components/flows/propPicker/InputPickerInner.svelte @@ -45,7 +45,7 @@ {#if testSteps?.isArgManuallySet(id, key)}