mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tui: prioritize opencode provider in model selection so users see their default provider first instead of hunting through alphabetically sorted list
This commit is contained in:
parent
78c479ac05
commit
c23341e4c8
1 changed files with 5 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { createMemo } from "solid-js"
|
||||
import { useLocal } from "@tui/context/local"
|
||||
import { useSync } from "@tui/context/sync"
|
||||
import { map, pipe, flatMap, entries, filter, isDeepEqual } from "remeda"
|
||||
import { map, pipe, flatMap, entries, filter, isDeepEqual, sortBy } from "remeda"
|
||||
import { DialogSelect } from "@tui/ui/dialog-select"
|
||||
import { useDialog } from "@tui/ui/dialog"
|
||||
|
||||
|
|
@ -27,6 +27,10 @@ export function DialogModel() {
|
|||
}),
|
||||
...pipe(
|
||||
sync.data.provider,
|
||||
sortBy(
|
||||
(provider) => provider.id !== "opencode",
|
||||
(provider) => provider.name,
|
||||
),
|
||||
flatMap((provider) =>
|
||||
pipe(
|
||||
provider.models,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue