From 1b73f144abaa27eb512b22f88bfb6767abdcd79b Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 23 Jan 2026 18:58:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(ModelSelect):=20resolve=20to?= =?UTF-8?q?oltip=20hover=20causing=20popup=20to=20close=20(#11742)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ⬆️ chore: upgrade @lobehub/ui to 4.27.5 - Upgrade @lobehub/ui from 4.27.4 to 4.27.5 - Remove unused tooltip styles in ModelSelect component --- package.json | 2 +- src/components/ModelSelect/index.tsx | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index b530201b72..1d83a2c72c 100644 --- a/package.json +++ b/package.json @@ -205,7 +205,7 @@ "@lobehub/icons": "^4.0.2", "@lobehub/market-sdk": "0.29.1", "@lobehub/tts": "^4.0.2", - "@lobehub/ui": "^4.27.4", + "@lobehub/ui": "^4.27.5", "@modelcontextprotocol/sdk": "^1.25.1", "@napi-rs/canvas": "^0.1.88", "@neondatabase/serverless": "^1.0.2", diff --git a/src/components/ModelSelect/index.tsx b/src/components/ModelSelect/index.tsx index f4454d2c5d..907f76ddd8 100644 --- a/src/components/ModelSelect/index.tsx +++ b/src/components/ModelSelect/index.tsx @@ -14,7 +14,7 @@ import { } from 'lucide-react'; import { type ModelAbilities } from 'model-bank'; import numeral from 'numeral'; -import { CSSProperties, type ComponentProps, type FC, memo } from 'react'; +import { CSSProperties, type FC, memo } from 'react'; import { useTranslation } from 'react-i18next'; import { type AiProviderSourceType } from '@/types/aiProvider'; @@ -51,14 +51,6 @@ const styles = createStaticStyles(({ css, cssVar }) => ({ type TooltipStyles = typeof styles; -const DEFAULT_TOOLTIP_STYLES = { - root: { pointerEvents: 'none' }, -} as const satisfies ComponentProps['styles']; - -const FUNCTION_CALL_TOOLTIP_STYLES = { - root: { maxWidth: 'unset', pointerEvents: 'none' }, -} as const satisfies ComponentProps['styles']; - interface ModelInfoTagsProps extends ModelAbilities { contextWindowTokens?: number | null; directionReverse?: boolean; @@ -82,11 +74,10 @@ interface FeatureTagItemProps { icon: Parameters[0]['icon']; placement: 'top' | 'right'; title: string; - tooltipStyles?: ComponentProps['styles']; } const FeatureTagItem = memo( - ({ className, color, enabled, icon, placement, title, tooltipStyles }) => { + ({ className, color, enabled, icon, placement, title }) => { if (!enabled) return null; const tag = ( @@ -96,7 +87,7 @@ const FeatureTagItem = memo( ); return ( - + {tag} ); @@ -158,7 +149,6 @@ const FeatureTags = memo( icon={ToyBrick} placement={placement} title={t('ModelSelect.featureTag.functionCall')} - tooltipStyles={FUNCTION_CALL_TOOLTIP_STYLES} />