🐛 fix(ModelSelect): resolve tooltip hover causing popup to close (#11742)

⬆️ 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
This commit is contained in:
Innei
2026-01-23 18:58:47 +08:00
committed by GitHub
parent c136c372c2
commit 1b73f144ab
2 changed files with 4 additions and 14 deletions

View File

@@ -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",

View File

@@ -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<typeof Tooltip>['styles'];
const FUNCTION_CALL_TOOLTIP_STYLES = {
root: { maxWidth: 'unset', pointerEvents: 'none' },
} as const satisfies ComponentProps<typeof Tooltip>['styles'];
interface ModelInfoTagsProps extends ModelAbilities {
contextWindowTokens?: number | null;
directionReverse?: boolean;
@@ -82,11 +74,10 @@ interface FeatureTagItemProps {
icon: Parameters<typeof Icon>[0]['icon'];
placement: 'top' | 'right';
title: string;
tooltipStyles?: ComponentProps<typeof Tooltip>['styles'];
}
const FeatureTagItem = memo<FeatureTagItemProps>(
({ 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<FeatureTagItemProps>(
);
return (
<Tooltip placement={placement} styles={tooltipStyles ?? DEFAULT_TOOLTIP_STYLES} title={title}>
<Tooltip placement={placement} title={title}>
{tag}
</Tooltip>
);
@@ -158,7 +149,6 @@ const FeatureTags = memo<FeatureTagsProps>(
icon={ToyBrick}
placement={placement}
title={t('ModelSelect.featureTag.functionCall')}
tooltipStyles={FUNCTION_CALL_TOOLTIP_STYLES}
/>
<FeatureTagItem
className={tagClassName}