Skip to content

Commit 63e5454

Browse files
fix: Sort themes in the /theme modal alphabetically (resolves sst#5217) (sst#5219)
Co-authored-by: Aiden Cline <[email protected]>
1 parent c3f7a88 commit 63e5454

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/opencode/src/cli/cmd/tui/component/dialog-theme-list.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import { onCleanup, onMount } from "solid-js"
55

66
export function DialogThemeList() {
77
const theme = useTheme()
8-
const options = Object.keys(theme.all()).map((value) => ({
9-
title: value,
10-
value: value,
11-
}))
8+
const options = Object.keys(theme.all())
9+
.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' }))
10+
.map((value) => ({
11+
title: value,
12+
value: value,
13+
}))
1214
const dialog = useDialog()
1315
let confirmed = false
1416
let ref: DialogSelectRef<string>

0 commit comments

Comments
 (0)