-
Notifications
You must be signed in to change notification settings - Fork 828
feat(tui): ctrl+l/ctrl+m to open model switcher #1274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
refs #1273 Signed-off-by: Carlos Alexandro Becker <[email protected]>
Signed-off-by: Carlos Alexandro Becker <[email protected]>
Signed-off-by: Carlos Alexandro Becker <[email protected]>
aymanbagabas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bubble Tea will only return ctrl+m when enhanced keyboard is enabled. Otherwise, pressing ctrl+m gives the same control code as enter which Bubble Tea reports as msg.String() == "enter" for both of these events.
andreynering
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working nice now. I really miss this! Hope to get it merged soon 😄
Same here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new keyboard shortcut for opening the models dialog, with support for keyboard disambiguation to prefer "ctrl+m" over "ctrl+l" when supported.
- Introduces a new
Modelskey binding that supports both "ctrl+l" and "ctrl+m" - Implements keyboard enhancement detection to dynamically update help text to prefer "ctrl+m" when disambiguation is supported
- Updates the "Switch Model" command shortcut display to show "ctrl+l"
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/tui/keys.go | Adds the Models key binding with "ctrl+l" and "ctrl+m" keys |
| internal/tui/tui.go | Implements keyboard enhancement detection and Models dialog handler; removes auto-close logic for commands dialog when opening sessions |
| internal/tui/page/chat/chat.go | Adds models binding to help display with keyboard disambiguation support |
| internal/tui/components/dialogs/commands/commands.go | Updates "Switch Model" command to display "ctrl+l" shortcut |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
maybe its not too obvious how to switch models?
if so, maybe this would help? (unsure about the key bind itself though -
ctrl+m== enter).refs #1273