diff --git a/web/app/components/workflow/skill/file-tree/node-menu.tsx b/web/app/components/workflow/skill/file-tree/node-menu.tsx index 0e9a263872..c208c8a9be 100644 --- a/web/app/components/workflow/skill/file-tree/node-menu.tsx +++ b/web/app/components/workflow/skill/file-tree/node-menu.tsx @@ -9,7 +9,6 @@ import { RiDeleteBinLine, RiEdit2Line, RiFileAddLine, - RiFileCopyLine, RiFolderAddLine, RiFolderUploadLine, RiScissorsLine, @@ -31,7 +30,6 @@ export const MENU_CONTAINER_STYLES = [ 'bg-components-panel-bg-blur p-1 shadow-lg backdrop-blur-[5px]', ] as const -const KBD_COPY = ['ctrl', 'c'] as const const KBD_CUT = ['ctrl', 'x'] as const const KBD_PASTE = ['ctrl', 'v'] as const @@ -78,14 +76,6 @@ const NodeMenu: FC = ({ const currentNodeId = node?.data.id ?? nodeId - const handleCopy = useCallback(() => { - const ids = selectedNodeIds.size > 0 ? [...selectedNodeIds] : (currentNodeId ? [currentNodeId] : []) - if (ids.length > 0) { - storeApi.getState().copyNodes(ids) - onClose() - } - }, [currentNodeId, onClose, selectedNodeIds, storeApi]) - const handleCut = useCallback(() => { const ids = selectedNodeIds.size > 0 ? [...selectedNodeIds] : (currentNodeId ? [currentNodeId] : []) if (ids.length > 0) { @@ -182,13 +172,6 @@ const NodeMenu: FC = ({ onClick={handleCut} disabled={isLoading} /> - )} diff --git a/web/app/components/workflow/skill/hooks/use-paste-operation.ts b/web/app/components/workflow/skill/hooks/use-paste-operation.ts index e53b2ef6de..74b8f23f27 100644 --- a/web/app/components/workflow/skill/hooks/use-paste-operation.ts +++ b/web/app/components/workflow/skill/hooks/use-paste-operation.ts @@ -100,12 +100,6 @@ export function usePasteOperation({ isPastingRef.current = false } } - else { - Toast.notify({ - type: 'info', - message: t('skillSidebar.menu.copyNotSupported'), - }) - } }, [appId, moveNode, storeApi, t, treeData?.children, treeRef]) useEffect(() => { diff --git a/web/app/components/workflow/skill/hooks/use-skill-shortcuts.ts b/web/app/components/workflow/skill/hooks/use-skill-shortcuts.ts index bdb741c4d3..9230e264b6 100644 --- a/web/app/components/workflow/skill/hooks/use-skill-shortcuts.ts +++ b/web/app/components/workflow/skill/hooks/use-skill-shortcuts.ts @@ -46,16 +46,6 @@ export function useSkillShortcuts({ return tree.selectedNodes.map(n => n.id) }, [treeRef]) - useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => { - if (shouldHandle(e)) { - const nodeIds = getSelectedNodeIds() - if (nodeIds.length > 0) { - e.preventDefault() - storeApi.getState().copyNodes(nodeIds) - } - } - }, { exactMatch: true, useCapture: true }) - useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.x`, (e) => { if (shouldHandle(e)) { const nodeIds = getSelectedNodeIds() diff --git a/web/app/components/workflow/store/workflow/skill-editor/clipboard-slice.ts b/web/app/components/workflow/store/workflow/skill-editor/clipboard-slice.ts index c1a95a154a..e72ff3428a 100644 --- a/web/app/components/workflow/store/workflow/skill-editor/clipboard-slice.ts +++ b/web/app/components/workflow/store/workflow/skill-editor/clipboard-slice.ts @@ -11,12 +11,6 @@ export const createClipboardSlice: StateCreator< > = (set, get) => ({ clipboard: null, - copyNodes: (nodeIds) => { - if (nodeIds.length === 0) - return - set({ clipboard: { operation: 'copy', nodeIds: new Set(nodeIds) } }) - }, - cutNodes: (nodeIds) => { if (nodeIds.length === 0) return diff --git a/web/app/components/workflow/store/workflow/skill-editor/types.ts b/web/app/components/workflow/store/workflow/skill-editor/types.ts index 5b0ac8ab60..b3e6a16ec1 100644 --- a/web/app/components/workflow/store/workflow/skill-editor/types.ts +++ b/web/app/components/workflow/store/workflow/skill-editor/types.ts @@ -48,7 +48,7 @@ export type FileTreeSliceShape = { setFileTreeSearchTerm: (term: string) => void } -export type ClipboardOperation = 'copy' | 'cut' +export type ClipboardOperation = 'cut' export type ClipboardItem = { operation: ClipboardOperation @@ -57,7 +57,6 @@ export type ClipboardItem = { export type ClipboardSliceShape = { clipboard: ClipboardItem | null - copyNodes: (nodeIds: string[]) => void cutNodes: (nodeIds: string[]) => void clearClipboard: () => void isCutNode: (nodeId: string) => boolean diff --git a/web/i18n/en-US/workflow.json b/web/i18n/en-US/workflow.json index b394ce3ade..a11f8c95cf 100644 --- a/web/i18n/en-US/workflow.json +++ b/web/i18n/en-US/workflow.json @@ -1088,8 +1088,6 @@ "skillSidebar.loadError": "Failed to load files", "skillSidebar.menu.cannotMoveToDescendant": "Cannot move a folder into its descendant", "skillSidebar.menu.cannotMoveToSelf": "Cannot move a folder into itself", - "skillSidebar.menu.copy": "Copy", - "skillSidebar.menu.copyNotSupported": "Copy is not supported yet", "skillSidebar.menu.createError": "Failed to create item", "skillSidebar.menu.cut": "Cut", "skillSidebar.menu.delete": "Delete", diff --git a/web/i18n/zh-Hans/workflow.json b/web/i18n/zh-Hans/workflow.json index 353077bbcb..d476e51f2c 100644 --- a/web/i18n/zh-Hans/workflow.json +++ b/web/i18n/zh-Hans/workflow.json @@ -1080,8 +1080,6 @@ "skillSidebar.loadError": "加载文件失败", "skillSidebar.menu.cannotMoveToDescendant": "无法将文件夹移动到其子文件夹中", "skillSidebar.menu.cannotMoveToSelf": "无法将文件夹移动到自身内部", - "skillSidebar.menu.copy": "复制", - "skillSidebar.menu.copyNotSupported": "暂不支持复制功能", "skillSidebar.menu.createError": "创建失败", "skillSidebar.menu.cut": "剪切", "skillSidebar.menu.delete": "删除",