Skip to content

Comments

feat: Added keyboard shortcut for model selection#12922

Open
longyuxi wants to merge 2 commits intoCherryHQ:mainfrom
longyuxi:main
Open

feat: Added keyboard shortcut for model selection#12922
longyuxi wants to merge 2 commits intoCherryHQ:mainfrom
longyuxi:main

Conversation

@longyuxi
Copy link
Contributor

What this PR does

Before this PR:
There was no keyboard shortcut to open the model selector. Users had to click the model selector button in the chat navbar to switch models.

After this PR:
Pressing Cmd+Shift+M (or Ctrl+Shift+M on Windows/Linux) opens the model selector popup, allowing users to switch models without leaving the keyboard. The shortcut appears in the Keyboard Shortcuts settings page and is editable/toggleable like other shortcuts.

Why we need it and why it was done in this way

Model switching is a frequent action during chat sessions. A keyboard shortcut makes this faster and more accessible for power users.

The following tradeoffs were made:

  • The shortcut handler is placed in Chat.tsx alongside other chat shortcuts (search_message_in_chat, rename_topic, new_topic), keeping all chat-scoped shortcuts co-located.
  • The handler reuses the same SelectModelPopup.show() API and model filter logic as SelectModelButton, ensuring identical behavior to the click-based flow.

The following alternatives were considered:

  • Placing the handler in a shared hook or the SelectModelButton component itself. This was rejected because the shortcut needs access to the assistant context from Chat.tsx, and the existing pattern places all chat shortcuts directly in that component.

Breaking changes

None. This is an additive feature with no changes to existing behavior or APIs.

Special notes for your reviewer

  • This PR does not alter Redux data models or IndexedDB schemas. The store migration (v199) only appends a new entry to the existing shortcuts array, which is the standard pattern used by all prior shortcut additions.
  • The migration inserts select_model after the toggle_new_context shortcut.
  • i18n labels were added to all 11 locale/translation files.

Checklist

Release note

feat: add Cmd+Shift+M keyboard shortcut to open the model selector in chat

@longyuxi longyuxi requested a review from 0xfullex as a code owner February 14, 2026 02:01
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.

2 participants