Skip to content

Conversation

@shuv1337
Copy link
Contributor

@shuv1337 shuv1337 commented Nov 15, 2025

Introduce model favorites across in TUI with grouping, bookmarking (ctrl+f), and cycle keybinds; update config, SDKs, and docs.

  • Shared UI:
    • SelectDialog (packages/ui/src/components/select-dialog.tsx) adds onKeyEvent to handle custom keyboard actions and passes the currently selected item.
  • State/Local Context:
    • Desktop local.model (packages/desktop/src/context/local.tsx) adds favorites persistence (localStorage), favorite() getter, and toggleFavorite().
    • TUI local.model (packages/opencode/src/cli/cmd/tui/context/local.tsx) adds persistent favorite list (saved to model.json), favorite(), toggleFavorite(), and cycleFavorite() with recent list updates and validation/toasts.
  • TUI:
    • Command palette (packages/opencode/src/cli/cmd/tui/app.tsx) adds actions for cycling favorite models forward/reverse.
    • Model dialog (packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx) shows Favorites section, stars for favorites, orders recents with current first, hides duplicates, and supports ctrl+f to toggle favorite.
  • Config/SDK/Docs:
    • Keybinds: add model_cycle_favorite and model_cycle_favorite_reverse in packages/opencode/src/config/config.ts, surfaced in SDKs (Go/TS/Python) and docs (web/docs/keybinds.mdx).

* adding favorite model picker
@shuv1337
Copy link
Contributor Author

image

@shuv1337
Copy link
Contributor Author

@rekram1-node - please review when you have a chance!

@shuv1337
Copy link
Contributor Author

Patched for new 1.0.85 UI updates:

CleanShot 2025-11-21 at 00 09 13@2x

@github-actions github-actions bot force-pushed the dev branch 2 times, most recently from 917250b to f4593c6 Compare November 22, 2025 05:02
@rekram1-node
Copy link
Collaborator

Screenshot 2025-11-24 at 11 55 22 PM

Spacing here isn't ideal

@rekram1-node
Copy link
Collaborator

The logic for rendering favorites also doesnt really seem to work amazing? I favorite a model and it doesnt show up in favorites

@rekram1-node
Copy link
Collaborator

Also if something was your "favorite" wouldn't it act as a pin? So it'd be at the top?

Idk that could be more natural prolly

@shuv1337
Copy link
Contributor Author

Also if something was your "favorite" wouldn't it act as a pin? So it'd be at the top?

Idk that could be more natural prolly

@rekram1-node

how would you like favorites vs recents to show up? if a model is both a favorite and a recent (which is going to be the case most of the time), should it show up twice, in both of the top 2 sections all the time? I thought it would be better to deduplicate and show recent favorites just in the recent list, but still indicated with a star.

if you have a better idea, i'm all ears

@shuv1337
Copy link
Contributor Author

shuv1337 commented Nov 25, 2025

Screenshot 2025-11-24 at 11 55 22 PM Spacing here isn't ideal

@rekram1-node
that's fair. the connect provider thing didn't exist when I submitted this PR so it was merged it after the fact. I can add more spacing there.

@shuv1337
Copy link
Contributor Author

@rekram1-node how does this look?

When currently selected model is a favorite:

image

When currently selected model is not a favorite:

image

…rite recents, instead of counting the favorites against the recents if a model is both
@shuv1337 shuv1337 force-pushed the add-model-favorites branch from c6e3cbc to 13b2839 Compare November 25, 2025 10:05
@rekram1-node rekram1-node merged commit 335f461 into anomalyco:dev Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants