提交 89540b65 编写于 作者: R Rob Lourens

Don't persist debug terminals

#109084
上级 08e0ace7
......@@ -111,7 +111,8 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
env: launchConfig.env,
strictEnv: launchConfig.strictEnv,
hideFromUser: launchConfig.hideFromUser,
isExtensionTerminal: launchConfig.isExtensionTerminal
isExtensionTerminal: launchConfig.isExtensionTerminal,
isFeatureTerminal: launchConfig.isFeatureTerminal
};
const terminal = this._terminalService.createTerminal(shellLaunchConfig);
return Promise.resolve({
......
......@@ -447,6 +447,7 @@ export interface TerminalLaunchConfig {
strictEnv?: boolean;
hideFromUser?: boolean;
isExtensionTerminal?: boolean;
isFeatureTerminal?: boolean;
}
export interface MainThreadTerminalServiceShape extends IDisposable {
......
......@@ -36,7 +36,7 @@ export interface IExtHostTerminalService extends ExtHostTerminalServiceShape, ID
onDidWriteTerminalData: Event<vscode.TerminalDataWriteEvent>;
createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal;
createTerminalFromOptions(options: vscode.TerminalOptions): vscode.Terminal;
createTerminalFromOptions(options: vscode.TerminalOptions, isFeatureTerminal?: boolean): vscode.Terminal;
createExtensionTerminal(options: vscode.ExtensionTerminalOptions): vscode.Terminal;
attachPtyToTerminal(id: number, pty: vscode.Pseudoterminal): void;
getDefaultShell(useAutomationShell: boolean, configProvider: ExtHostConfigProvider): string;
......@@ -130,9 +130,10 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi
env?: { [key: string]: string | null },
waitOnExit?: boolean,
strictEnv?: boolean,
hideFromUser?: boolean
hideFromUser?: boolean,
isFeatureTerminal?: boolean
): Promise<void> {
const result = await this._proxy.$createTerminal({ name: this._name, shellPath, shellArgs, cwd, env, waitOnExit, strictEnv, hideFromUser });
const result = await this._proxy.$createTerminal({ name: this._name, shellPath, shellArgs, cwd, env, waitOnExit, strictEnv, hideFromUser, isFeatureTerminal });
this._name = result.name;
this._runQueuedRequests(result.id);
}
......
......@@ -100,7 +100,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
cwd: args.cwd,
name: args.title || nls.localize('debug.terminal.title', "debuggee"),
};
this._integratedTerminalInstance = this._terminalService.createTerminalFromOptions(options);
this._integratedTerminalInstance = this._terminalService.createTerminalFromOptions(options, true);
} else {
cwdForPrepareCommand = args.cwd;
}
......
......@@ -53,10 +53,10 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
return terminal;
}
public createTerminalFromOptions(options: vscode.TerminalOptions): vscode.Terminal {
public createTerminalFromOptions(options: vscode.TerminalOptions, isFeatureTerminal?: boolean): vscode.Terminal {
const terminal = new ExtHostTerminal(this._proxy, options, options.name);
this._terminals.push(terminal);
terminal.create(options.shellPath, options.shellArgs, options.cwd, options.env, /*options.waitOnExit*/ undefined, options.strictEnv, options.hideFromUser);
terminal.create(options.shellPath, options.shellArgs, options.cwd, options.env, /*options.waitOnExit*/ undefined, options.strictEnv, options.hideFromUser, isFeatureTerminal);
return terminal;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册