@@ -14,7 +14,7 @@ import {
1414} from 'lucide-react' ;
1515import { type ModelAbilities } from 'model-bank' ;
1616import numeral from 'numeral' ;
17- import { CSSProperties , type ComponentProps , type FC , memo } from 'react' ;
17+ import { CSSProperties , type FC , memo } from 'react' ;
1818import { useTranslation } from 'react-i18next' ;
1919
2020import { type AiProviderSourceType } from '@/types/aiProvider' ;
@@ -51,14 +51,6 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
5151
5252type TooltipStyles = typeof styles ;
5353
54- const DEFAULT_TOOLTIP_STYLES = {
55- root : { pointerEvents : 'none' } ,
56- } as const satisfies ComponentProps < typeof Tooltip > [ 'styles' ] ;
57-
58- const FUNCTION_CALL_TOOLTIP_STYLES = {
59- root : { maxWidth : 'unset' , pointerEvents : 'none' } ,
60- } as const satisfies ComponentProps < typeof Tooltip > [ 'styles' ] ;
61-
6254interface ModelInfoTagsProps extends ModelAbilities {
6355 contextWindowTokens ?: number | null ;
6456 directionReverse ?: boolean ;
@@ -82,11 +74,10 @@ interface FeatureTagItemProps {
8274 icon : Parameters < typeof Icon > [ 0 ] [ 'icon' ] ;
8375 placement : 'top' | 'right' ;
8476 title : string ;
85- tooltipStyles ?: ComponentProps < typeof Tooltip > [ 'styles' ] ;
8677}
8778
8879const FeatureTagItem = memo < FeatureTagItemProps > (
89- ( { className, color, enabled, icon, placement, title, tooltipStyles } ) => {
80+ ( { className, color, enabled, icon, placement, title } ) => {
9081 if ( ! enabled ) return null ;
9182
9283 const tag = (
@@ -96,7 +87,7 @@ const FeatureTagItem = memo<FeatureTagItemProps>(
9687 ) ;
9788
9889 return (
99- < Tooltip placement = { placement } styles = { tooltipStyles ?? DEFAULT_TOOLTIP_STYLES } title = { title } >
90+ < Tooltip placement = { placement } title = { title } >
10091 { tag }
10192 </ Tooltip >
10293 ) ;
@@ -158,7 +149,6 @@ const FeatureTags = memo<FeatureTagsProps>(
158149 icon = { ToyBrick }
159150 placement = { placement }
160151 title = { t ( 'ModelSelect.featureTag.functionCall' ) }
161- tooltipStyles = { FUNCTION_CALL_TOOLTIP_STYLES }
162152 />
163153 < FeatureTagItem
164154 className = { tagClassName }
0 commit comments