Skip to content

Align AI chat toggle keybinding with VS Code on macOS #14850

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

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

cdamus
Copy link
Contributor

@cdamus cdamus commented Feb 5, 2025

What it does

On macOS, assign Control+Command+I keybinding and on other platforms Control+Alternate+I to align with VS Code on Mac and not clash with Chrome devtools on all platforms.

Fixes #14814

How to test

  1. On macOS,
    1. Hit ++I repeatedly and see the AI Chat view toggle on and off.
    2. Hit ++I and see the Chrome devtools appear.
  2. On Linux and Windows,
    1. Hit Ctrl+Alt+I repeatedly and see the AI Chat view toggle on and off.
    2. Hit whatever is the platform's keyboard shortcut for Chrome devtools and see them appear.

Review the keybinding editor. On macOS, you should see something like this (never mind that Theia shows the modifiers in the wrong order):

CleanShot 2025-02-05 at 13 36 42

Follow-ups

None.

Breaking changes

None.

Attribution

None.

Review checklist

Reminder for reviewers

On macOS, assign Control+Command+I keybinding and on other platforms
Control+Alternate+I to align with VS Code on Mac and not clash with
Chrome devtools on all platforms.

Fixes eclipse-theia#14814

Signed-off-by: Christian W. Damus <[email protected]>
@JonasHelming JonasHelming self-requested a review February 5, 2025 18:56
Copy link
Contributor

@JonasHelming JonasHelming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM (on Linux)

@kittaakos Could you confirm this solves your issue?

Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes. I confirm that I can use the default shortcut Option + Command + I to open the DevTools in the browser.

The recent devex improvements on macOS are much appreciated, but the PR only partially addresses #14814. I find the title of the PR to be misleading if we merge the changeset as is. The default shortcut for opening the AI chat (GitHub Copilot) in VS Code is Shift + Command + I on macOS.

From #14814 (comment):

This would allow users to utilize the ⌘+⇧+I combination for the AI chat.

Therefore, binding the Theia AI chat to Ctrl + Command + I does not align with VS Code's shortcut.

Please note that the current Shift + Command + I shortcut is already assigned to the Outline view on macOS and Windows. (I'm unsure why it isn't bound on Linux, though):

toggleCommandId: 'outlineView:toggle',
toggleKeybinding: OS.type() !== OS.Type.Linux
? 'ctrlcmd+shift+i'
: undefined

I'm not aware of the direction for the Theia AI chat, is it intended to be a complete replacement for Copilot? If so, I would suggest that Theia aims to make the user experience as similar to VS Code as possible.

@JonasHelming
Copy link
Contributor

@kittaakos When you refer to "Copilot" Are you referring to the action "workbench.action.chat.open" ?

I believe Christian checked the default keybinding for this on Mac and it was ⌃+⌘+I (not SHIFT),

AFAIK, the chat view is not contributed by Copilot (says contributed by "System"), hence we want to align the keybindings of both chat views.

@kittaakos
Copy link
Contributor

I believe Christian checked the default keybinding for this on Mac and it was ⌃+⌘+I (not SHIFT),

Yes, I was wrong. Thanks for the correction. I am consistently using the openEditSession instead of open...

Screenshot 2025-02-06 at 09 29 35

(👆 This is what I never use, apparently; it does not have the current editor as the initial context.)

Screenshot 2025-02-06 at 09 29 48

All is looking good in the PR.

@JonasHelming JonasHelming merged commit 6c05489 into eclipse-theia:master Feb 6, 2025
11 checks passed
@github-actions github-actions bot added this to the 1.59.0 milestone Feb 6, 2025
@cdamus cdamus deleted the issues/14814 branch February 6, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Align AI chat window keybinding with VS Code defaults (on macOS)
3 participants