fix flow dev sync (#6198)

This commit is contained in:
Guilhem
2025-07-16 11:28:01 +01:00
committed by GitHub
parent 8b7c50f2b7
commit aef173a87f
+5 -4
View File
@@ -17,7 +17,7 @@
} from '$lib/gen'
import { inferArgs } from '$lib/infer'
import { setCopilotInfo, userStore, workspaceStore } from '$lib/stores'
import { emptySchema, sendUserToast } from '$lib/utils'
import { emptySchema, readFieldsRecursively, sendUserToast } from '$lib/utils'
import { Pane, Splitpanes } from 'svelte-splitpanes'
import { onDestroy, onMount, setContext, untrack } from 'svelte'
import DarkModeToggle from '$lib/components/sidebar/DarkModeToggle.svelte'
@@ -500,8 +500,8 @@
return
}
if (!deepEqual(flow, lastSent)) {
lastSent = JSON.parse(JSON.stringify(flow))
window?.parent.postMessage({ type: 'flow', flow, uriPath: lastUriPath }, '*')
lastSent = $state.snapshot(flow)
window?.parent.postMessage({ type: 'flow', flow: lastSent, uriPath: lastUriPath }, '*')
}
}
@@ -512,7 +512,7 @@
return
}
//@ts-ignore
dfs(flowStore.value.modules, async (mod) => {
dfs(flowStore.val.value.modules, async (mod) => {
if (mod.id == selectedIdStore) {
if (
mod.value.type == 'rawscript' ||
@@ -566,6 +566,7 @@
untrack(() => initializeMode())
})
$effect(() => {
readFieldsRecursively(flowStore.val)
flowStore.val && untrack(() => updateFlow(flowStore.val))
})
$effect(() => {