fix model dialog sorting

This commit is contained in:
Dax Raad 2025-11-18 12:10:06 -05:00
parent fc5fc2c570
commit 50bfff89c0

View file

@ -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),
),
),
),