From 9893bf267e6175a49ea85e1de36233c2cd7da5c7 Mon Sep 17 00:00:00 2001 From: yyh Date: Thu, 5 Feb 2026 16:53:27 +0800 Subject: [PATCH] feat(web): add import skills menu item with tooltip to skill file tree Add "Import skills(.zip)" option to root-level context menu and sidebar add menu with a question mark tooltip showing usage hint. Update menu item labels and icons for consistency with design. --- .../workflow/skill/file-tree/menu-item.tsx | 19 +++++++- .../workflow/skill/file-tree/node-menu.tsx | 28 ++++++++++- .../workflow/skill/sidebar-search-add.tsx | 48 +++++++++---------- web/i18n/en-US/workflow.json | 7 +-- web/i18n/zh-Hans/workflow.json | 5 +- 5 files changed, 73 insertions(+), 34 deletions(-) diff --git a/web/app/components/workflow/skill/file-tree/menu-item.tsx b/web/app/components/workflow/skill/file-tree/menu-item.tsx index b6bf17b88d..d76b1cf391 100644 --- a/web/app/components/workflow/skill/file-tree/menu-item.tsx +++ b/web/app/components/workflow/skill/file-tree/menu-item.tsx @@ -1,8 +1,10 @@ 'use client' import type { VariantProps } from 'class-variance-authority' +import { RiQuestionLine } from '@remixicon/react' import { cva } from 'class-variance-authority' import * as React from 'react' +import Tooltip from '@/app/components/base/tooltip' import ShortcutsName from '@/app/components/workflow/shortcuts-name' import { cn } from '@/utils/classnames' @@ -55,9 +57,10 @@ export type MenuItemProps = { kbd?: readonly string[] onClick: React.MouseEventHandler disabled?: boolean + tooltip?: string } & VariantProps -const MenuItem = ({ icon: Icon, label, kbd, onClick, disabled, variant }: MenuItemProps) => { +const MenuItem = ({ icon: Icon, label, kbd, onClick, disabled, variant, tooltip }: MenuItemProps) => { const handleClick = React.useCallback((event: React.MouseEvent) => { event.stopPropagation() onClick(event) @@ -73,6 +76,20 @@ const MenuItem = ({ icon: Icon, label, kbd, onClick, disabled, variant }: MenuIt