microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.69k stars 28.69k forks source link

Open remote settings GUI when extension executes workbench.action.openSettings with query in remote session #102146

Open joyceerhl opened 4 years ago

joyceerhl commented 4 years ago

Steps to Reproduce:

I work on the Python extension. Currently, in a remote session, the 'Preferences: Open Settings (UI)' command correctly opens the settings GUI with the Remote setting tab selected.

However, in a remote session (WSL and Remote-SSH), vscode.commands.executeCommand('workbench.action.openSettings', 'query string') opens the GUI with the User tab, instead of the Remote setting tab, selected. This behavior is unexpected for the user, as described here: https://github.com/microsoft/vscode-python/issues/12862.

Our use case is that we'd like to direct the user to a filtered view of the settings GUI, as described in #84355, which happens when a query string is provided with workbench.action.openSettings. It would be great if workbench.action.openSettings could detect that it's being executed in a remote environment and open the GUI with the Remote settings tab selected as well.

roblourens commented 4 years ago

So the 'Preferences: Open Settings (UI)' command actually just opens the settings UI with the scope that was previously selected. I'd think the command should do the same, but I guess not. But yeah it would make sense to add a way for an extension author to open the settings editor with a specific scope.