Skip to content

Commit

Permalink
Alphabetical sort of the api configuration menu in ChatTextArea
Browse files Browse the repository at this point in the history
  • Loading branch information
cfdude committed Mar 2, 2025
1 parent 6ff8838 commit eaeec77
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions webview-ui/src/components/chat/ChatTextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -874,16 +874,18 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
width: "100%",
textOverflow: "ellipsis",
}}>
{(listApiConfigMeta || []).map((config) => (
<option
key={config.name}
value={config.name}
style={{
...optionStyle,
}}>
{config.name}
</option>
))}
{(listApiConfigMeta || [])
.sort((a, b) => a.name.localeCompare(b.name))
.map((config) => (
<option
key={config.name}
value={config.name}
style={{
...optionStyle,
}}>
{config.name}
</option>
))}
<option
disabled
style={{
Expand Down

0 comments on commit eaeec77

Please sign in to comment.