79750306

Date: 2025-08-29 13:04:59
Score: 1
Natty:
Report link

@Marks's solution works if the panel never opens, but if it sometimes opens that can be annoying since it's a toggle. As far as I can tell there's no action to open the panel, but I cobbled something together with closePanel, togglePanel, and compound tasks:

{
    "label": "close Panel",
    "command": "${command:workbench.action.closePanel}",
    "type": "shell",
    "problemMatcher": [],
},
{
    "label": "open Panel",
    "command": "${command:workbench.action.togglePanel}",
    "type": "shell",
    "problemMatcher": [],
    "dependsOn": [
        "close Panel"
    ],
    "runOptions": {
        "runOn": "folderOpen"
    }
},

Not the prettiest, but it gets the job done.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Marks's
  • Low reputation (1):
Posted by: Christophe AGUETTAZ