diff --git a/frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte b/frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte index 2111eddce1..e0a1d2222b 100644 --- a/frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte +++ b/frontend/src/lib/components/flows/map/FlowModuleSchemaMap.svelte @@ -16,7 +16,6 @@ import FlowConstantsItem from './FlowConstantsItem.svelte' import { dfs } from '../dfs' - import { FlowGraph } from '$lib/components/graph' import FlowErrorHandlerItem from './FlowErrorHandlerItem.svelte' import { push } from '$lib/history' import ConfirmationModal from '$lib/components/common/confirmationModal/ConfirmationModal.svelte' @@ -29,6 +28,7 @@ import FlowTutorials from '$lib/components/FlowTutorials.svelte' import { ignoredTutorials } from '$lib/components/tutorials/ignoredTutorials' import { tutorialInProgress } from '$lib/tutorialUtils' + import FlowGraphV2 from '$lib/components/graph/FlowGraphV2.svelte' export let modules: FlowModule[] | undefined export let sidebarSize: number | undefined = undefined @@ -251,7 +251,7 @@
- { push(history, $flowStore) + + console.log('deleting node', e.id) + selectNextId(e.id) + removeAtId($flowStore.value.modules, e.id) if ($flowInputsStore) { diff --git a/frontend/src/lib/components/flows/map/MapItem.svelte b/frontend/src/lib/components/flows/map/MapItem.svelte index a617520781..34c545f6d5 100644 --- a/frontend/src/lib/components/flows/map/MapItem.svelte +++ b/frontend/src/lib/components/flows/map/MapItem.svelte @@ -74,41 +74,25 @@ {#if mod} - {#if insertable} -
- {#if moving} - - {:else} - { - dispatch('insert', { modules, index: idx + 1, detail: 'script', script: e.detail }) - }} - on:new={(e) => { - dispatch('insert', { modules, index: idx, detail: e.detail }) - }} - index={idx} - {modules} - /> - {/if} -
- {/if} +
+ {#if moving} + + {/if} +
{#if moving == mod.id}
diff --git a/frontend/src/lib/components/flows/map/VirtualItem.svelte b/frontend/src/lib/components/flows/map/VirtualItem.svelte index a7993f636d..a77dfb1ab3 100644 --- a/frontend/src/lib/components/flows/map/VirtualItem.svelte +++ b/frontend/src/lib/components/flows/map/VirtualItem.svelte @@ -5,7 +5,6 @@ import { classNames } from '$lib/utils' import { ClipboardCopy, ExternalLink, Wand2, X } from 'lucide-svelte' import { createEventDispatcher, getContext } from 'svelte' - import InsertModuleButton from './InsertModuleButton.svelte' import type { FlowCopilotContext } from '$lib/components/copilot/flow' import { copilotInfo } from '$lib/stores' import Menu from '$lib/components/common/menu/Menu.svelte' @@ -103,7 +102,7 @@
-{#if insertable && modules && (label != 'Input' || modules.length == 0)} +{#if modules && (label != 'Input' || modules.length == 0)}
- handleNodeClick(e)} - > - - - {#if download} - dispatch('expand')} class="!bg-surface"> - - - {/if} - - + {#key renderCount} + handleNodeClick(e)} + on:delete={(e) => { + console.log('delete', e.detail) + }} + > + + + {#if download} + dispatch('expand')} class="!bg-surface"> + + + {/if} + + + {/key}