File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
webview-ui/src/components/settings Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " roo-cline " : patch
3+ ---
4+
5+ small function that alphabetizes the configuration profile names in the dropdown
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ interface ApiConfigManagerProps {
1515 onUpsertConfig : ( configName : string ) => void
1616}
1717
18+ const sortConfigOptions = ( configs : ApiConfigMeta [ ] ) => {
19+ return [ ...configs ] . sort ( ( a , b ) => a . name . toLowerCase ( ) . localeCompare ( b . name . toLowerCase ( ) ) )
20+ }
21+
1822const ApiConfigManager = ( {
1923 currentApiConfigName = "" ,
2024 listApiConfigMeta = [ ] ,
@@ -225,7 +229,7 @@ const ApiConfigManager = ({
225229 zIndex : 1002 ,
226230 } }
227231 role = "combobox"
228- options = { listApiConfigMeta . map ( ( config ) => ( {
232+ options = { sortConfigOptions ( listApiConfigMeta ) . map ( ( config ) => ( {
229233 value : config . name ,
230234 label : config . name ,
231235 } ) ) }
You can’t perform that action at this time.
0 commit comments