mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 20:19:12 +08:00
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)." (#19687)
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
parent
17b929124f
commit
e040f8069b
@ -37,8 +37,13 @@ export type WorkflowSliceShape = {
|
||||
export const createWorkflowSlice: StateCreator<WorkflowSliceShape> = set => ({
|
||||
workflowRunningData: undefined,
|
||||
setWorkflowRunningData: workflowRunningData => set(() => ({ workflowRunningData })),
|
||||
clipboardElements: [],
|
||||
setClipboardElements: clipboardElements => set(() => ({ clipboardElements })),
|
||||
clipboardElements: (() => {
|
||||
const storedElements = localStorage.getItem('clipboard_elements')
|
||||
return storedElements ? JSON.parse(storedElements) : []
|
||||
})(),
|
||||
setClipboardElements: (clipboardElements) => {
|
||||
localStorage.setItem('clipboard_elements', JSON.stringify(clipboardElements))
|
||||
},
|
||||
selection: null,
|
||||
setSelection: selection => set(() => ({ selection })),
|
||||
bundleNodeSize: null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user