jkearins/vscode-action-buttons

VSCode Command and ExtraCommands

fabltd opened this issue · 4 comments

Hi

I have an issue with ExtraCommands.

I have a button that opens a vscode API command ( Its Platform IOs terminal) I then wish to pass a command to the terminal to start a script.

I can open the terminal but the ExtraCommand is never sent.

Thanks

JT

Hi, could you please show "actionButtons" contents in settings.json?

"actionButtons": {
        "commands": [
            {   "cwd" : "/Users/jt/Documents/GitHub/",
                "name": "Prog",
                "command" : "platformio-ide.newTerminal",
                "extraCommands" : ["workbench.action.terminal.paste"],
                "useVsCodeApi" : true
            },
            ],
        "defaultColor": "white",
        "reloadButton": "",
        "loadNpmCommands": false
}

For useVsCodeApi=true try to use 'args' instead of 'extraCommands':

"commands": [
    {   "cwd" : "/Users/jt/Documents/GitHub/",
            "name": "Prog",
            "command" : "platformio-ide.newTerminal",
            "args" : ["workbench.action.terminal.paste"],
            "useVsCodeApi" : true
    },
],

Please reopen if you still need help.