vscode icon indicating copy to clipboard operation
vscode copied to clipboard

`Cmd+Shift+I` should toggle chat view

Open hawkticehurst opened this issue 7 months ago • 7 comments

Using the Cmd+Shift+I keybinding will currently only open chat.

I think it would be a nice quality of life improvement to have this keybinding toggle the chat open and close.

hawkticehurst avatar May 09 '25 07:05 hawkticehurst

This would be inconsistent with shortcuts like Ctrl+Shift+E (to open the explorer) etcetera. If we do this, those should be changed as well.

NicoWeio avatar May 09 '25 09:05 NicoWeio

@NicoWeio great call out! We should update that keybinding too.

I was also going to say we should update the keybinding for opening a terminal Ctrl+~ in that case, but it looks like that binding already does toggle the terminal open and close.

hawkticehurst avatar May 09 '25 14:05 hawkticehurst

I don't think we should change the basic behavior of keybindings like cmd+shift+E. It has always toggled focus (which I don't really like) and if it closed the sidebar I would like that even less 🙂

ctrl+cmd+i has this focus toggle behavior in chat. cmd+shift+i doesn't because it sets Agent mode, and I want that to work even when you are inside the chat view already

roblourens avatar May 09 '25 15:05 roblourens

I don't think we should change the basic behavior of keybindings like cmd+shift+E. It has always toggled focus (which I don't really like) and if it closed the sidebar I would like that even less 🙂

Ooh yeah gross, I didn't realize it toggles focus (versus the sidebar). I don't like that either. And assuming we can't reasonably change the behavior to open the side bar, I agree it wouldn't make sense to have the same binding toggle different behaviors (apply focus vs close side bar).

ctrl+cmd+i has this focus toggle behavior in chat. cmd+shift+i doesn't because it sets Agent mode, and I want that to work even when you are inside the chat view already

Ah! I always forget about ctrl+cmd+i, great to see this does have the toggle behavior.

With that said, a (timely) issue just got opened that seems to indicate that other folks are getting caught up on the same issue. I'm waiting for confirmation but I suspect they were also attempting to use cmd+shift+i.

As an alternative option, could we explore doing what Cursor does? cmd+i will open chat in agent mode and close chat when in agent mode, but you're in another mode it will switch to agent mode.

hawkticehurst avatar May 09 '25 18:05 hawkticehurst

Why do you want the same keybinding to close the sidebar? We have so many other ways to do that or move focus around. It feels weird to me to have the same keybinding do something and undo something because it means I have to carefully check where focus is before using it. I prefer idempotent keybindings 🙂

I'm surprised Cursor went that route, maybe I'm in the minority

roblourens avatar May 10 '25 00:05 roblourens

Why do you want the same keybinding to close the sidebar? We have so many other ways to do that or move focus around.

Simplicity / less stuff to remember.

I'm surprised Cursor went that route, maybe I'm in the minority

Not sure about majority / minority, but anecdotally I'm fairly used to apps that have a single keybinding that toggles between states.

Off the top of my head Chrome has cmd+shift+b to show/hide bookmarks bar, YouTube has m and c to toggle mute and captions, Figma has cmd+\ to show/hide the UI, etc.

hawkticehurst avatar May 21 '25 23:05 hawkticehurst

To me it's not really "toggle" though because it does multiple different things depending on the starting state, and pressing it more times may or may not restore the starting state. eg it can change the chat mode, reveal the view if I had a different view open, open the sidebar if it was closed, move focus from anywhere in the UI. Our implementation for the view toggle keybindings then just arbitrarily put focus back in the editor and don't close anything. cmd+b in vscode is a pure toggle, all the other view keybindings are more complicated

roblourens avatar May 23 '25 16:05 roblourens

Seeing as how the keybinding is working as expected, @hawkticehurst should we close this issue?

kkbrooks avatar Jun 30 '25 22:06 kkbrooks

Yeah we can close this

hawkticehurst avatar Jun 30 '25 22:06 hawkticehurst