Skip to content

Conversation

@caarlos0
Copy link
Member

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

refs #1273

Signed-off-by: Carlos Alexandro Becker <[email protected]>
@caarlos0 caarlos0 self-assigned this Oct 21, 2025
@caarlos0 caarlos0 requested a review from a team as a code owner October 21, 2025 13:38
@caarlos0 caarlos0 requested review from andreynering and meowgorithm and removed request for a team October 21, 2025 13:38
@caarlos0 caarlos0 changed the title feat(tui): alt+m to open model switcher feat(tui): ctrl+l/ctrl+m to open model switcher Oct 23, 2025
Signed-off-by: Carlos Alexandro Becker <[email protected]>
Copy link
Member

@aymanbagabas aymanbagabas left a 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.

Copy link
Member

@andreynering andreynering left a 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 😄

@LarsArtmann
Copy link

Working nice now. I really miss this! Hope to get it merged soon 😄

Same here.

@caarlos0 caarlos0 requested a review from Copilot October 31, 2025 17:25
Copy link
Contributor

Copilot AI left a 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 Models key 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.

@meowgorithm meowgorithm merged commit 5306907 into main Nov 6, 2025
17 checks passed
@meowgorithm meowgorithm deleted the switch-model-keybind branch November 6, 2025 15:58
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.

6 participants