@@ -8,11 +8,12 @@ import { useAppTranslation } from "@src/i18n/TranslationContext"
88import { useExtensionState } from "@src/context/ExtensionStateContext"
99import {
1010 Button ,
11- Select ,
12- SelectContent ,
13- SelectItem ,
14- SelectTrigger ,
15- SelectValue ,
11+ SearchableSelect ,
12+ // Select,
13+ // SelectContent,
14+ // SelectItem,
15+ // SelectTrigger,
16+ // SelectValue,
1617 StandardTooltip ,
1718} from "@src/components/ui"
1819import { SectionHeader } from "./SectionHeader"
@@ -145,20 +146,19 @@ const PromptsSettings = ({
145146
146147 < Section >
147148 < div >
148- < Select
149+ < SearchableSelect
149150 value = { activeSupportOption }
150- onValueChange = { ( type ) => setActiveSupportOption ( type as SupportPromptType ) } >
151- < SelectTrigger className = "w-full" data-testid = "support-prompt-select-trigger" >
152- < SelectValue placeholder = { t ( "settings:common.select" ) } />
153- </ SelectTrigger >
154- < SelectContent >
155- { Object . keys ( supportPrompt . default ) . map ( ( type ) => (
156- < SelectItem key = { type } value = { type } data-testid = { `${ type } -option` } >
157- { t ( `prompts:supportPrompts.types.${ type } .label` ) }
158- </ SelectItem >
159- ) ) }
160- </ SelectContent >
161- </ Select >
151+ onValueChange = { ( type ) => setActiveSupportOption ( type as SupportPromptType ) }
152+ options = { Object . keys ( supportPrompt . default ) . map ( ( type ) => ( {
153+ value : type ,
154+ label : t ( `prompts:supportPrompts.types.${ type } .label` ) ,
155+ } ) ) }
156+ placeholder = { t ( "settings:common.select" ) }
157+ searchPlaceholder = { "" }
158+ emptyMessage = { "" }
159+ className = "w-full"
160+ data-testid = "provider-select"
161+ />
162162 < div className = "text-sm text-vscode-descriptionForeground mt-1" >
163163 { t ( `prompts:supportPrompts.types.${ activeSupportOption } .description` ) }
164164 </ div >
@@ -198,7 +198,7 @@ const PromptsSettings = ({
198198 ? t ( "prompts:supportPrompts.enhance.apiConfiguration" )
199199 : t ( "prompts:supportPrompts.condense.apiConfiguration" ) }
200200 </ label >
201- < Select
201+ < SearchableSelect
202202 value = {
203203 activeSupportOption === "ENHANCE"
204204 ? enhancementApiConfigId || "-"
@@ -219,32 +219,28 @@ const PromptsSettings = ({
219219 text : newConfigId ,
220220 } )
221221 }
222- } } >
223- < SelectTrigger data-testid = "api-config-select" className = "w-full" >
224- < SelectValue
225- placeholder = {
222+ } }
223+ options = { [
224+ {
225+ id : "-" ,
226+ name :
226227 activeSupportOption === "ENHANCE"
227228 ? t ( "prompts:supportPrompts.enhance.useCurrentConfig" )
228- : t ( "prompts:supportPrompts.condense.useCurrentConfig" )
229- }
230- />
231- </ SelectTrigger >
232- < SelectContent >
233- < SelectItem value = "-" >
234- { activeSupportOption === "ENHANCE"
235- ? t ( "prompts:supportPrompts.enhance.useCurrentConfig" )
236- : t ( "prompts:supportPrompts.condense.useCurrentConfig" ) }
237- </ SelectItem >
238- { ( listApiConfigMeta || [ ] ) . map ( ( config ) => (
239- < SelectItem
240- key = { config . id }
241- value = { config . id }
242- data-testid = { `${ config . id } -option` } >
243- { config . name }
244- </ SelectItem >
245- ) ) }
246- </ SelectContent >
247- </ Select >
229+ : t ( "prompts:supportPrompts.condense.useCurrentConfig" ) ,
230+ } ,
231+ ...( listApiConfigMeta || [ ] ) ,
232+ ] . map ( ( { id, name } ) => ( { value : id , label : name } ) ) }
233+ placeholder = {
234+ activeSupportOption === "ENHANCE"
235+ ? t ( "prompts:supportPrompts.enhance.useCurrentConfig" )
236+ : t ( "prompts:supportPrompts.condense.useCurrentConfig" )
237+ }
238+ searchPlaceholder = { "" }
239+ emptyMessage = { "" }
240+ disabledSearch
241+ className = "w-full"
242+ data-testid = "provider-select"
243+ />
248244 < div className = "text-sm text-vscode-descriptionForeground mt-1" >
249245 { activeSupportOption === "ENHANCE"
250246 ? t ( "prompts:supportPrompts.enhance.apiConfigDescription" )
0 commit comments