Start of terminal virtual processes

This commit is contained in:
Daniel Imms
2019-07-01 12:27:15 -07:00
parent c61bf317af
commit 2205cb69ed
6 changed files with 85 additions and 28 deletions

View File

@@ -116,14 +116,19 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi
env?: { [key: string]: string | null },
waitOnExit?: boolean,
strictEnv?: boolean,
hideFromUser?: boolean
hideFromUser?: boolean,
isVirtualProcess?: boolean
): void {
this._proxy.$createTerminal(this._name, shellPath, shellArgs, cwd, env, waitOnExit, strictEnv, hideFromUser).then(terminal => {
this._proxy.$createTerminal(this._name, shellPath, shellArgs, cwd, env, waitOnExit, strictEnv, hideFromUser, isVirtualProcess).then(terminal => {
this._name = terminal.name;
this._runQueuedRequests(terminal.id);
});
}
public createVirtualProcess(): void {
this.create(undefined, undefined, undefined, undefined, undefined, undefined, undefined, true);
}
public get name(): string {
return this._name || '';
}
@@ -313,7 +318,11 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
public createTerminalFromOptions(options: vscode.TerminalOptions): vscode.Terminal {
const terminal = new ExtHostTerminal(this._proxy, options.name);
terminal.create(options.shellPath, options.shellArgs, options.cwd, options.env, /*options.waitOnExit*/ undefined, options.strictEnv, options.hideFromUser);
if ((<any>options).isVirtualProcess) {
terminal.createVirtualProcess();
} else {
terminal.create(options.shellPath, options.shellArgs, options.cwd, options.env, /*options.waitOnExit*/ undefined, options.strictEnv, options.hideFromUser);
}
this._terminals.push(terminal);
return terminal;
}