feat(keybindings): add mod+. shortcut to cycle agent trait#2300
feat(keybindings): add mod+. shortcut to cycle agent trait#2300JtMotoX wants to merge 3 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new keyboard shortcut feature (mod+. to cycle agent traits) with new user-facing behavior and state persistence logic. New features benefit from human review to validate the interaction design and ensure the cycling logic behaves as expected across different providers and configurations. You can customize Macroscope's approvability policy. Learn more. |
Add agent.cycle keybinding command that cycles through available agent options (e.g. Build, Plan) for the current provider model. Preserves existing model options when switching agents.
3bf472f to
e04472e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e04472e. Configure here.

What Changed
Add an
agent.cyclekeybinding command with a defaultmod+.binding (when not in terminal focus). Pressing it cycles through the available agent options (e.g. Build, Plan) for the current provider model, wrapping from last to first. No-ops when fewer than 2 agents are available.The traits dropdown now displays the
agent.cycleshortcut label next to the "Agent" section header, so users can discover the hotkey without memorizing it.Changes across 5 files (+55 lines):
packages/contracts/src/keybindings.ts— addagent.cycleto static keybinding commandsapps/server/src/keybindings.ts— add defaultmod+.bindingapps/web/src/components/ChatView.tsx— handleagent.cyclein the existing keydown handlerapps/web/src/components/chat/TraitsPicker.tsx— show theagent.cycleshortcut label (e.g.⌘.) in the traits dropdown Agent section headerapps/web/src/keybindings.test.ts— add test coverage for the new binding and its label renderingWhy
OpenCode uses
mod+.to cycle agents. T3 Code supports agent selection via the traits dropdown but has no keyboard shortcut for it. This adds parity for keyboard-driven workflows and makes the shortcut discoverable in the UI.Closes #2299
Screenshots
Checklist
Note
Add
mod+.shortcut to cycle agent trait in the composeragent.cycleto the static keybinding commands and mapsmod+.to it (when the terminal is not focused) in keybindings.ts.agent.cyclecomputes the next agent from available provider/model capabilities in a cyclic order and persists the selection withpersistSticky=true.⌘.on Mac,Ctrl+.on Linux) using theKbdcomponent.Macroscope summarized ea81efa.