MCPcopy Create free account
hub / github.com/coderoad/coderoad-vscode / runVSCodeCommands

Function runVSCodeCommands

src/services/hooks/utils/runVSCodeCommands.ts:10–24  ·  view source on GitHub ↗
(commands: TT.VSCodeCommand[] = [])

Source from the content-addressed store, hash-verified

8// - https://code.visualstudio.com/docs/getstarted/keybindings (anything keybound is a command)
9
10const runVSCodeCommands = async (commands: TT.VSCodeCommand[] = []): Promise<void> => {
11 if (!commands.length) {
12 return
13 }
14 for (const command of commands) {
15 if (typeof command === 'string') {
16 // string named commands
17 await vscode.commands.executeCommand(command)
18 } else if (Array.isArray(command)) {
19 // array commands with params
20 const [name, params] = command
21 await vscode.commands.executeCommand(name, params)
22 }
23 }
24}
25
26export default runVSCodeCommands

Callers 5

onInitFunction · 0.85
onSetupEnterFunction · 0.85
onSolutionEnterFunction · 0.85
onResetFunction · 0.85
onContinueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected