feat: add directional model and reasoning shortcuts - #1247
Open
smsunarto wants to merge 4 commits into
Open
Conversation
Cycling was the only way to move through models and reasoning efforts, so reaching the previous entry meant wrapping all the way around. Add five commands with explicit direction: modelPicker.previousModel Mod+ArrowLeft modelPicker.nextModel Mod+ArrowRight modelPicker.decreaseReasoning Mod+ArrowDown modelPicker.increaseReasoning Mod+ArrowUp modelPicker.cycleProvider Command+Right Option (macOS) Distinguishing the provider chord needs the physical side of the Option key, which `key` reports as "Alt" for both; `normalizeAppShortcutInputKey` now falls back to `code` for AltRight. The two existing commands keep their chords and are relabelled to say what they do: "Next model" becomes "Cycle model", "Next reasoning level" becomes "Cycle reasoning effort". The repeated composer activation context is extracted to `composerWithoutModal`. Bundled SDK types and templates are regenerated for the new command ids. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The provider chord was Command+Right Option, which only macOS can produce, so Windows and Linux had no way to reach it. Move it to Alt+P, completing the Alt+M / Alt+P / Alt+T cycle family, and drop the right-Option handling that existed solely for the old chord — the shortcut recorder rejects modifier-only keys, so no user could bind it anyway. An Option chord that reaches the browser inserts a composed character, so the handler now claims the chord whenever it is in scope and no-ops when there is nowhere to rotate. It also owns the chord while the popover is open, matching the model and reasoning cycles. Group the cycle commands ahead of the directional ones in the picker, the default bindings, and Settings → Keyboard, and move the directional chords from prose into the shortcut table.
Three copies of the open-picker context literal, three copies of the cycle-chord ownership expression, and a hand-rolled reverse of `nextCycleValue` had accumulated across the model picker keybindings. Name the open-picker scope once as `pickerOpenOnly`, add `ownsCycleChord` beside the existing `ownsClosedNavigationChord`, and derive `previousCycleValue` from `nextCycleValue` over the reversed list so both directions share one policy for wrapping and absent values. No behavior change.
The expected-binding array spelled out all six shortcut fields six times and repeated both `when` shapes verbatim, so the Alt chord table was around ninety lines of near-identical literals. Hoist the two scopes, add an `altChord` builder, and fold the navigation `when` check into the tuple assertion beside it. Every field is still asserted; only the spelling is shorter. The scopes stay test-local literals rather than imports so the assertions cannot go circular.
smsunarto
marked this pull request as ready for review
August 10, 2026 07:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cycling was the only way to move through models and reasoning efforts, so reaching the previous entry meant wrapping all the way around. This adds explicit directional commands, and a provider cycle that works on every platform.
Alt+MAlt+PAlt+TMod+←/Mod+→Mod+↓/Mod+↑The two existing chords keep their keys and are relabelled to say what they do: "Next model" becomes "Cycle model", "Next reasoning level" becomes "Cycle reasoning effort".
Models wrap at either end; reasoning effort clamps. The cycle chords also work while the picker popover is open, since the popover is itself modal and would otherwise block them.
macOS composes
Option+<letter>into another character, so the Alt chords match on the physical key. For the same reason an in-scope cycle chord always claims the key, even with nowhere to rotate — otherwise the composed character lands in the prompt.Commits
feat(app): add directional model and reasoning shortcuts— the five new commands and their bindingsfix: cycle providers with a cross-platform chord— replaces the macOS-onlyCommand+Right OptionwithAlt+Pand drops the right-Option handling it neededrefactor: dedupe model picker keybinding scopes— one named open-picker scope, one ownership helper, one cycle-direction policytest(server): compact app keybinding chord assertionsTest plan
turbo run typecheck test lintover@bb/app,@bb/server,@bb/domain: 505 test files pass, 0 lint errors🤖 Generated with Claude Code