merge chore/workflow-performance

This commit is contained in:
zxhlyh
2025-10-11 14:04:19 +08:00
20 changed files with 157 additions and 132 deletions

View File

@ -1,12 +1,11 @@
import {
useCallback,
} from 'react'
import { useNodes } from 'reactflow'
import { useStore as useReactFlowStore } from 'reactflow'
import {
useStore,
useWorkflowStore,
} from '../store'
import type { StartNodeType } from '../nodes/start/types'
import {
useNodesInteractions,
useNodesReadOnly,
@ -40,8 +39,7 @@ const HeaderInNormal = ({
const setShowDebugAndPreviewPanel = useStore(s => s.setShowDebugAndPreviewPanel)
const setShowVariableInspectPanel = useStore(s => s.setShowVariableInspectPanel)
const setShowChatVariablePanel = useStore(s => s.setShowChatVariablePanel)
const nodes = useNodes<StartNodeType>()
const selectedNode = nodes.find(node => node.data.selected)
const selectedNode = useReactFlowStore(s => s.getNodes().find(node => node.data.selected))
const { handleBackupDraft } = useWorkflowRun()
const { closeAllInputFieldPanels } = useInputFieldPanel()