Skip to content

Commit 9612470

Browse files
committed
fix: build failure
1 parent 168b10d commit 9612470

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/client/common/terminal/syncTerminalService.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'use strict';
55

66
import { inject } from 'inversify';
7-
import { CancellationToken, Disposable, Event, TerminalShellExecution } from 'vscode';
7+
import { CancellationToken, Disposable, Event, Terminal, TerminalShellExecution } from 'vscode';
88
import { IInterpreterService } from '../../interpreter/contracts';
99
import { traceVerbose } from '../../logging';
1010
import { PythonEnvironment } from '../../pythonEnvironments/info';
@@ -152,6 +152,17 @@ export class SynchronousTerminalService implements ITerminalService, Disposable
152152
return this.terminalService.show(preserveFocus);
153153
}
154154

155+
/**
156+
* Ensures that a terminal exists, creating one if necessary.
157+
*
158+
* @param {boolean} [preserveFocus] Whether the editor should keep focus after the terminal is shown. Defaults to `true`.
159+
* @returns {Promise<Terminal>} The terminal instance.
160+
* @memberof SynchronousTerminalService
161+
*/
162+
public async ensureTerminal(preserveFocus: boolean = true): Promise<Terminal> {
163+
return this.terminalService.ensureTerminal(preserveFocus);
164+
}
165+
155166
private createLockFile(): Promise<TemporaryFile> {
156167
return this.fs.createTemporaryFile('.log').then((l) => {
157168
this.disposables.push(l);

0 commit comments

Comments
 (0)