run existing terminal if possible

This commit is contained in:
Ty Dunn 2023-06-21 21:36:24 -07:00
parent cc7ef4631f
commit 24198f9724

View file

@ -326,9 +326,13 @@ class IdeProtocolClient {
}
async runCommand(command: string) {
const terminal = vscode.window.createTerminal();
terminal.show();
terminal.sendText(command);
if (vscode.window.terminals.length) {
vscode.window.terminals[0].sendText(command);
} else {
const terminal = vscode.window.createTerminal();
terminal.show();
terminal.sendText(command);
}
}
sendCommandOutput(output: string) {