File tree Expand file tree Collapse file tree
webview-ui/src/components/settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -510,26 +510,28 @@ export const ContextManagementSettings = ({
510510 { t ( "settings:contextManagement.condensingThreshold.defaultProfile" ) ||
511511 "Default (applies to all unconfigured profiles)" }
512512 </ SelectItem >
513- { ( listApiConfigMeta || [ ] ) . map ( ( config ) => {
514- const profileThreshold = profileThresholds [ config . id ]
515- const thresholdDisplay =
516- profileThreshold !== undefined
517- ? profileThreshold === - 1
518- ? ` ${ t (
519- "settings:contextManagement.condensingThreshold.usesGlobal" ,
520- {
521- threshold : autoCondenseContextPercent ,
522- } ,
523- ) } `
524- : ` (${ profileThreshold } %)`
525- : ""
526- return (
527- < SelectItem key = { config . id } value = { config . id } >
528- { config . name }
529- { thresholdDisplay }
530- </ SelectItem >
531- )
532- } ) }
513+ { ( listApiConfigMeta || [ ] )
514+ . filter ( ( config ) => config . id )
515+ . map ( ( config ) => {
516+ const profileThreshold = profileThresholds [ config . id ]
517+ const thresholdDisplay =
518+ profileThreshold !== undefined
519+ ? profileThreshold === - 1
520+ ? ` ${ t (
521+ "settings:contextManagement.condensingThreshold.usesGlobal" ,
522+ {
523+ threshold : autoCondenseContextPercent ,
524+ } ,
525+ ) } `
526+ : ` (${ profileThreshold } %)`
527+ : ""
528+ return (
529+ < SelectItem key = { config . id } value = { config . id } >
530+ { config . name }
531+ { thresholdDisplay }
532+ </ SelectItem >
533+ )
534+ } ) }
533535 </ SelectContent >
534536 </ Select >
535537 </ div >
Original file line number Diff line number Diff line change @@ -182,14 +182,16 @@ const PromptsSettings = ({
182182 < SelectItem value = "-" >
183183 { t ( "prompts:supportPrompts.enhance.useCurrentConfig" ) }
184184 </ SelectItem >
185- { ( listApiConfigMeta || [ ] ) . map ( ( config ) => (
186- < SelectItem
187- key = { config . id }
188- value = { config . id }
189- data-testid = { `${ config . id } -option` } >
190- { config . name }
191- </ SelectItem >
192- ) ) }
185+ { ( listApiConfigMeta || [ ] )
186+ . filter ( ( config ) => config . id )
187+ . map ( ( config ) => (
188+ < SelectItem
189+ key = { config . id }
190+ value = { config . id }
191+ data-testid = { `${ config . id } -option` } >
192+ { config . name }
193+ </ SelectItem >
194+ ) ) }
193195 </ SelectContent >
194196 </ Select >
195197 < div className = "text-sm text-vscode-descriptionForeground mt-1" >
You can’t perform that action at this time.
0 commit comments