MCPcopy Create free account
hub / github.com/continuedev/continue / runCommand

Method runCommand

extensions/vscode/src/VsCodeIde.ts:336–356  ·  view source on GitHub ↗
(
    command: string,
    options: TerminalOptions = { reuseTerminal: true },
  )

Source from the content-addressed store, hash-verified

334 }
335
336 async runCommand(
337 command: string,
338 options: TerminalOptions = { reuseTerminal: true },
339 ): Promise<void> {
340 let terminal: vscode.Terminal | undefined;
341 if (vscode.window.terminals.length && options.reuseTerminal) {
342 if (options.terminalName) {
343 terminal = vscode.window.terminals.find(
344 (t) => t?.name === options.terminalName,
345 );
346 } else {
347 terminal = vscode.window.activeTerminal ?? vscode.window.terminals[0];
348 }
349 }
350
351 if (!terminal) {
352 terminal = vscode.window.createTerminal(options?.terminalName);
353 }
354 terminal.show();
355 terminal.sendText(command, false);
356 }
357
358 async saveFile(fileUri: string): Promise<void> {
359 await this.ideUtils.saveFile(vscode.Uri.parse(fileUri));

Callers

nothing calls this directly

Calls 1

showMethod · 0.65

Tested by

no test coverage detected