Skip to content

feat(tui): expose favorite model cycling with Alt+C/Alt+X keybinds#16802

Open
Oerum wants to merge 2 commits intoanomalyco:devfrom
Oerum:fav_model_cycle
Open

feat(tui): expose favorite model cycling with Alt+C/Alt+X keybinds#16802
Oerum wants to merge 2 commits intoanomalyco:devfrom
Oerum:fav_model_cycle

Conversation

@Oerum
Copy link

@Oerum Oerum commented Mar 9, 2026

Issue for this PR

Closes #16801

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Exposes the existing favorite model cycling feature in the TUI by providing default keybinds and making the commands visible in the palette.

Changes:

  • Set default keybinds for favorite model cycling to Alt+C (next) and Alt+X (previous).
  • Unhide the commands in the TUI app registration so they appear in the Ctrl+P command palette.
  • Updated TUI tips to mention the new shortcuts.
  • Updated Keybind.toString to render the meta modifier as option on macOS for better user experience.

How did you verify your code works?

  • Added a config test in packages/opencode/test/config/tui.test.ts to verify the new default keybinds are correctly applied.
  • Added a test in packages/opencode/test/keybind.test.ts to verify macOS-specific modifier display logic.
  • Manually verified the shortcuts in the TUI (via bun run src/index.ts):
    • Alt+C and Alt+X correctly cycle through favorited models.
    • The command palette correctly displays the shortcuts.

Screenshots / recordings

N/A - TUI internal command exposure

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

- Set default keybinds for favorite model cycling to Alt+C and Alt+X.
- Unhide favorite cycle commands in the command palette.
- Update TUI tips to include the new shortcuts.
- Update keybind display to use 'Option' modifier on macOS.
- Add tests for new defaults and macOS display logic.

Closes anomalyco#16801
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Mar 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[FEATURE]: Expose favorite model cycling keybinds in TUI

1 participant