Browse Source

fix model dialog sorting

Dax Raad 3 months ago
parent
commit
50bfff89c0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx

+ 1 - 1
packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx

@@ -16,7 +16,6 @@ export function DialogModel() {
   const sync = useSync()
   const dialog = useDialog()
   const [ref, setRef] = createSignal<DialogSelectRef<unknown>>()
-  const { theme } = useTheme()
 
   const options = createMemo(() => {
     return [
@@ -62,6 +61,7 @@ export function DialogModel() {
               footer: info.cost?.input === 0 && provider.id === "opencode" ? <Free /> : undefined,
             })),
             filter((x) => Boolean(ref()?.filter) || !local.model.recent().find((y) => isDeepEqual(y, x.value))),
+            sortBy((x) => x.title),
           ),
         ),
       ),