vscode icon indicating copy to clipboard operation
vscode copied to clipboard

chat.focusWindowOnConfirmation isn't working for terminal tool confirmation

Open roblourens opened this issue 7 months ago • 10 comments

That is enabled by default but if agent mode asks to run a terminal command, the window isn't focused

roblourens avatar May 20 '25 18:05 roblourens

The default for this behavior is it "notify" the window, which will cause it to flash on the Windows taskbar or bounce in the macOS dock. Is that not something you see?

connor4312 avatar May 20 '25 18:05 connor4312

Oh I thought it was supposed to bring the window to the foreground? That's what "focus" implies to me

roblourens avatar May 20 '25 21:05 roblourens

It didn't do that before?

roblourens avatar May 20 '25 21:05 roblourens

The behavior varied by platform, but this was changed in https://github.com/microsoft/vscode/issues/247609

connor4312 avatar May 20 '25 21:05 connor4312

I think we should update the setting description/name

roblourens avatar May 20 '25 22:05 roblourens

For my understanding, is this now the behavior?

Given my focus is not in the chat panel, when there's a tool confirmation, then there's a:

  • 'notify' alert from VSCode (flash on taskbar or bouncing icon)
  • tool confirmation sound (Megan's recent addition)
  • for screen reader users, an announcement that there's a tool confirmation

But nothing changes with my windows/focus?

jo-oikawa avatar May 21 '25 17:05 jo-oikawa

@jo-oikawa that is what will happen when the VS Code window with the incoming tool confirmation is not focused. So, if a user runs a request, focuses a different window, then these will occur:

  • 'notify' alert from VSCode (flash on taskbar or bouncing icon)
  • tool confirmation sound (Megan's recent addition)
  • But nothing changes with my windows/focus?

This happens regardless of window focus:

for screen reader users, an announcement that there's a tool confirmation

meganrogge avatar May 21 '25 17:05 meganrogge

@connor4312 / @roblourens are we sure users want the bouncing behavior? When i saw that, it felt like a bug to me

meganrogge avatar May 21 '25 17:05 meganrogge

There is an option to configure it

connor4312 avatar May 21 '25 17:05 connor4312

Let's update the description at least though

roblourens avatar May 22 '25 04:05 roblourens

Is there a better way we can notify the users that there's a tool confirmation when they're already inside the app? A notification and/or badge on the chat panel?

I think of the bouncing/flashing app icon as a way to bring users back into an app when they've left (ex: new dm in slack, meeting starting in teams...). It's a pretty high-salience notification and we aren't providing a visual cue inside VS Code to communicate where the issue/alert is coming from (correct me if I'm wrong there).

So the scenario I'd like to avoid is: user is focused on something elsewhere in VS Code, gets a jarring alert, and then can't figure out why VS Code did that.

jo-oikawa avatar May 22 '25 16:05 jo-oikawa

@jo-oikawa there's currently no jarring notification/ behavior when the window is focused. This only happens if the user hasn't focused the window.

meganrogge avatar May 22 '25 18:05 meganrogge

I will re-enable this setting, for a while now we have badge notifications, that work on Linux. And I am about to add system level notifications.

bpasero avatar Jul 14 '25 09:07 bpasero