未验证 提交 9dd69b3a 编写于 作者: R Rob Lourens 提交者: Alex Dima

Don't reconnect to task terminals

上级 cc33c911
......@@ -1085,6 +1085,7 @@ export class TerminalTaskSystem implements ITaskSystem {
if (options.env) {
shellLaunchConfig.env = options.env;
}
shellLaunchConfig.isFeatureTerminal = true;
return shellLaunchConfig;
}
......@@ -1118,7 +1119,8 @@ export class TerminalTaskSystem implements ITaskSystem {
isExtensionTerminal: true,
waitOnExit,
name: this.createTerminalName(task),
initialText: task.command.presentation && task.command.presentation.echo ? `\x1b[1m> Executing task: ${task._label} <\x1b[0m\n` : undefined
initialText: task.command.presentation && task.command.presentation.echo ? `\x1b[1m> Executing task: ${task._label} <\x1b[0m\n` : undefined,
isFeatureTerminal: true
};
} else {
let resolvedResult: { command: CommandString, args: CommandString[] } = this.resolveCommandAndArgs(resolver, task.command);
......
......@@ -121,6 +121,7 @@ export class RemoteTerminalProcess extends Disposable implements ITerminalChildP
const result = await this._remoteTerminalChannel.createTerminalProcess(
shellLaunchConfigDto,
this._activeWorkspaceRootUri,
!this._shellLaunchConfig.isFeatureTerminal,
this._cols,
this._rows,
isWorkspaceShellAllowed,
......
......@@ -71,6 +71,7 @@ export interface ICreateTerminalProcessArguments {
workspaceFolders: IWorkspaceFolderData[];
activeWorkspaceFolder: IWorkspaceFolderData | null;
activeFileResource: UriComponents | undefined;
shouldPersistTerminal: boolean;
cols: number;
rows: number;
isWorkspaceShellAllowed: boolean;
......@@ -205,7 +206,7 @@ export class RemoteTerminalChannelClient {
};
}
public async createTerminalProcess(shellLaunchConfig: IShellLaunchConfigDto, activeWorkspaceRootUri: URI | undefined, cols: number, rows: number, isWorkspaceShellAllowed: boolean): Promise<ICreateTerminalProcessResult> {
public async createTerminalProcess(shellLaunchConfig: IShellLaunchConfigDto, activeWorkspaceRootUri: URI | undefined, shouldPersistTerminal: boolean, cols: number, rows: number, isWorkspaceShellAllowed: boolean): Promise<ICreateTerminalProcessResult> {
const terminalConfig = this._configurationService.getValue<ITerminalConfiguration>(TERMINAL_CONFIG_SECTION);
const configuration: ICompleteTerminalConfiguration = {
'terminal.integrated.automationShell.windows': this._readSingleTerminalConfiguration('terminal.integrated.automationShell.windows'),
......@@ -272,6 +273,7 @@ export class RemoteTerminalChannelClient {
workspaceFolders,
activeWorkspaceFolder,
activeFileResource,
shouldPersistTerminal,
cols,
rows,
isWorkspaceShellAllowed,
......
......@@ -246,6 +246,12 @@ export interface IShellLaunchConfig {
* as normal.
*/
hideFromUser?: boolean;
/**
* Whether this terminal is not a terminal that the user directly created and uses, but rather
* a terminal used to drive some VS Code feature.
*/
isFeatureTerminal?: boolean;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册