mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
refactor collaboration
This commit is contained in:
@ -83,7 +83,6 @@ import Confirm from '@/app/components/base/confirm'
|
||||
import DatasetsDetailProvider from './datasets-detail-store/provider'
|
||||
import { HooksStoreContextProvider } from './hooks-store'
|
||||
import type { Shape as HooksStoreShape } from './hooks-store'
|
||||
import { useCollaborationStore } from '@/app/components/workflow/store/collaboration-store'
|
||||
|
||||
const nodeTypes = {
|
||||
[CUSTOM_NODE]: CustomNode,
|
||||
@ -128,21 +127,6 @@ export const Workflow: FC<WorkflowProps> = memo(({
|
||||
return workflowCanvasHeight - bottomPanelHeight
|
||||
}, [workflowCanvasHeight, bottomPanelHeight])
|
||||
|
||||
const collaborationNodes = useCollaborationStore((state) => {
|
||||
return state.nodes
|
||||
})
|
||||
const collaborationEdges = useCollaborationStore((state) => {
|
||||
return state.edges
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
setNodes(collaborationNodes)
|
||||
}, [collaborationNodes, setNodes])
|
||||
|
||||
useEffect(() => {
|
||||
setEdges(collaborationEdges)
|
||||
}, [collaborationEdges, setEdges])
|
||||
|
||||
// update workflow Canvas width and height
|
||||
useEffect(() => {
|
||||
if (workflowContainerRef.current) {
|
||||
|
||||
Reference in New Issue
Block a user