Revert "Support for copying nodes between workflows (This feature is unrelated to remove functions. When using the copy function, the browser will permanently retain the last copied node)."" (#19708)

This commit is contained in:
crazywoola 2025-05-15 10:26:23 +08:00 committed by GitHub
parent 303c6ecc1d
commit dd4419fd5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,13 +37,8 @@ export type WorkflowSliceShape = {
export const createWorkflowSlice: StateCreator<WorkflowSliceShape> = set => ({ export const createWorkflowSlice: StateCreator<WorkflowSliceShape> = set => ({
workflowRunningData: undefined, workflowRunningData: undefined,
setWorkflowRunningData: workflowRunningData => set(() => ({ workflowRunningData })), setWorkflowRunningData: workflowRunningData => set(() => ({ workflowRunningData })),
clipboardElements: (() => { clipboardElements: [],
const storedElements = localStorage.getItem('clipboard_elements') setClipboardElements: clipboardElements => set(() => ({ clipboardElements })),
return storedElements ? JSON.parse(storedElements) : []
})(),
setClipboardElements: (clipboardElements) => {
localStorage.setItem('clipboard_elements', JSON.stringify(clipboardElements))
},
selection: null, selection: null,
setSelection: selection => set(() => ({ selection })), setSelection: selection => set(() => ({ selection })),
bundleNodeSize: null, bundleNodeSize: null,