|
|
|
@ -10,10 +10,10 @@ import { RiCloseLine, RiEqualizer2Line } from '@remixicon/react'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
import { useNodes } from 'reactflow'
|
|
|
|
import { useNodes } from 'reactflow'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
useEdgesInteractions,
|
|
|
|
|
|
|
|
useNodesInteractions,
|
|
|
|
|
|
|
|
useWorkflowInteractions,
|
|
|
|
useWorkflowInteractions,
|
|
|
|
} from '../../hooks'
|
|
|
|
} from '../../hooks'
|
|
|
|
|
|
|
|
import { useEdgesInteractionsWithoutSync } from '@/app/components/workflow/hooks/use-edges-interactions-without-sync'
|
|
|
|
|
|
|
|
import { useNodesInteractionsWithoutSync } from '@/app/components/workflow/hooks/use-nodes-interactions-without-sync'
|
|
|
|
import { BlockEnum } from '../../types'
|
|
|
|
import { BlockEnum } from '../../types'
|
|
|
|
import type { StartNodeType } from '../../nodes/start/types'
|
|
|
|
import type { StartNodeType } from '../../nodes/start/types'
|
|
|
|
import ChatWrapper from './chat-wrapper'
|
|
|
|
import ChatWrapper from './chat-wrapper'
|
|
|
|
@ -32,8 +32,8 @@ const DebugAndPreview = () => {
|
|
|
|
const { t } = useTranslation()
|
|
|
|
const { t } = useTranslation()
|
|
|
|
const chatRef = useRef({ handleRestart: noop })
|
|
|
|
const chatRef = useRef({ handleRestart: noop })
|
|
|
|
const { handleCancelDebugAndPreviewPanel } = useWorkflowInteractions()
|
|
|
|
const { handleCancelDebugAndPreviewPanel } = useWorkflowInteractions()
|
|
|
|
const { handleNodeCancelRunningStatus } = useNodesInteractions()
|
|
|
|
const { handleNodeCancelRunningStatus } = useNodesInteractionsWithoutSync()
|
|
|
|
const { handleEdgeCancelRunningStatus } = useEdgesInteractions()
|
|
|
|
const { handleEdgeCancelRunningStatus } = useEdgesInteractionsWithoutSync()
|
|
|
|
const varList = useStore(s => s.conversationVariables)
|
|
|
|
const varList = useStore(s => s.conversationVariables)
|
|
|
|
const [expanded, setExpanded] = useState(true)
|
|
|
|
const [expanded, setExpanded] = useState(true)
|
|
|
|
const nodes = useNodes<StartNodeType>()
|
|
|
|
const nodes = useNodes<StartNodeType>()
|
|
|
|
|