Skip to content

Conversation

@shuv1337
Copy link
Collaborator

@shuv1337 shuv1337 commented Nov 15, 2025

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

  • Desktop UI:
  • Model picker in packages/desktop/src/components/prompt-input.tsx groups by Favorites and Recent, prioritizes favorites, shows a bookmark icon, and supports ctrl+f to toggle favorite via SelectDialog.onKeyEvent.
  • 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).

@shuv1337 shuv1337 merged commit 66546ce into add-model-favorites Nov 15, 2025
7 checks passed
shuv1337 added a commit that referenced this pull request Nov 26, 2025
Co-authored-by: Github Action <action@github.com>
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