@@ -58,14 +58,14 @@ const components = {
58
58
LinkComponent : < ModelManagerLink /> ,
59
59
} ;
60
60
61
- const NoOptionsFallback = memo ( ( ) => {
61
+ const NoOptionsFallback = memo ( ( { noOptionsText } : { noOptionsText ?: string } ) => {
62
62
const { t } = useTranslation ( ) ;
63
63
const isModelsTabDisabled = useAppSelector ( selectIsModelsTabDisabled ) ;
64
64
const onClickGoToModelManager = useStore ( $onClickGoToModelManager ) ;
65
65
66
66
return (
67
67
< Flex flexDir = "column" gap = { 4 } alignItems = "center" >
68
- < Text color = "base.200" > { t ( 'modelManager.modelPickerFallbackNoModelsInstalled' ) } </ Text >
68
+ < Text color = "base.200" > { noOptionsText ?? t ( 'modelManager.modelPickerFallbackNoModelsInstalled' ) } </ Text >
69
69
{ ( ! isModelsTabDisabled || onClickGoToModelManager ) && (
70
70
< Text color = "base.200" >
71
71
< Trans i18nKey = "modelManager.modelPickerFallbackNoModelsInstalled2" components = { components } />
@@ -124,6 +124,7 @@ export const ModelPicker = typedMemo(
124
124
isDisabled,
125
125
isInvalid,
126
126
className,
127
+ noOptionsText,
127
128
} : {
128
129
modelConfigs : T [ ] ;
129
130
selectedModelConfig : T | undefined ;
@@ -135,6 +136,7 @@ export const ModelPicker = typedMemo(
135
136
isDisabled ?: boolean ;
136
137
isInvalid ?: boolean ;
137
138
className ?: string ;
139
+ noOptionsText ?: string ;
138
140
} ) => {
139
141
const { t } = useTranslation ( ) ;
140
142
const options = useMemo < T [ ] | Group < T > [ ] > ( ( ) => {
@@ -237,7 +239,7 @@ export const ModelPicker = typedMemo(
237
239
selectedOption = { selectedModelConfig }
238
240
isMatch = { isMatch }
239
241
OptionComponent = { PickerOptionComponent }
240
- noOptionsFallback = { < NoOptionsFallback /> }
242
+ noOptionsFallback = { < NoOptionsFallback noOptionsText = { noOptionsText } /> }
241
243
noMatchesFallback = { t ( 'modelManager.noMatchingModels' ) }
242
244
NextToSearchBar = { < NavigateToModelManagerButton /> }
243
245
getIsOptionDisabled = { getIsOptionDisabled }
0 commit comments