fix(skill): remove non-functional copy menu item from file tree context menu

This commit is contained in:
yyh
2026-01-28 16:34:38 +08:00
parent 000bdf6bc0
commit 3c7f641f60
7 changed files with 1 additions and 45 deletions

View File

@ -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<NodeMenuProps> = ({
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<NodeMenuProps> = ({
onClick={handleCut}
disabled={isLoading}
/>
<MenuItem
icon={RiFileCopyLine}
label={t('skillSidebar.menu.copy')}
kbd={KBD_COPY}
onClick={handleCopy}
disabled={isLoading}
/>
</>
)}