diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index ab865cc5224bedbc120d728bd6cc3073d3fe45ed..d1cdcc4c13199a607a0694d93c88956cd32f475c 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -323,6 +323,13 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape this._getTerminalProcess(terminalId).then(e => e.emitCwd(cwd)); } + public $sendResolvedLaunchConfig(terminalId: number, shellLaunchConfig: IShellLaunchConfig): void { + const instance = this._terminalService.getInstanceFromId(terminalId); + if (instance) { + instance.shellLaunchConfig = shellLaunchConfig; + } + } + private async _onRequestLatency(terminalId: number): Promise { const COUNT = 2; let sum = 0; diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index d1f9840554d6e86f0b20dc315aaa6c219bf4e961..cde31c599a3fef19f443b6a697b25d0df3f2bba1 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -42,7 +42,7 @@ import { IRevealOptions, ITreeItem } from 'vs/workbench/common/views'; import * as callHierarchy from 'vs/workbench/contrib/callHierarchy/common/callHierarchy'; import { IAdapterDescriptor, IConfig, ITerminalSettings } from 'vs/workbench/contrib/debug/common/debug'; import { ITextQueryBuilderOptions } from 'vs/workbench/contrib/search/common/queryBuilder'; -import { ITerminalDimensions } from 'vs/workbench/contrib/terminal/common/terminal'; +import { ITerminalDimensions, IShellLaunchConfig } from 'vs/workbench/contrib/terminal/common/terminal'; import { ExtensionActivationError } from 'vs/workbench/services/extensions/common/extensions'; import { createExtHostContextProxyIdentifier as createExtId, createMainContextProxyIdentifier as createMainId, IRPCProtocol } from 'vs/workbench/services/extensions/common/proxyIdentifier'; import * as search from 'vs/workbench/services/search/common/search'; @@ -404,6 +404,7 @@ export interface MainThreadTerminalServiceShape extends IDisposable { $sendOverrideDimensions(terminalId: number, dimensions: ITerminalDimensions | undefined): void; $sendProcessInitialCwd(terminalId: number, cwd: string): void; $sendProcessCwd(terminalId: number, initialCwd: string): void; + $sendResolvedLaunchConfig(terminalId: number, shellLaunchConfig: IShellLaunchConfig): void; // Renderer $terminalRendererSetName(terminalId: number, name: string): void; diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index 37044a2f362e619dc42423dfa589e825536bb8e5..55942c11733728df6cf275ceb49a64c9a53cbb73 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -617,6 +617,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape { // TODO: Support conpty on remote, it doesn't seem to work for some reason? // TODO: When conpty is enabled, only enable it when accessibilityMode is off const enableConpty = false; //terminalConfig.get('windowsEnableConpty') as boolean; + this._proxy.$sendResolvedLaunchConfig(id, shellLaunchConfig); this._setupExtHostProcessListeners(id, new TerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env, enableConpty, this._logService)); } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 1dc49e0e24257490114c1e5afeab40f2770cba1a..1e385d4c22382db6268e4e74848b38b8ae3bed35 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -223,6 +223,7 @@ export class TerminalInstance implements ITerminalInstance { public get hadFocusOnExit(): boolean { return this._hadFocusOnExit; } public get isTitleSetByProcess(): boolean { return !!this._messageTitleDisposable; } public get shellLaunchConfig(): IShellLaunchConfig { return this._shellLaunchConfig; } + public set shellLaunchConfig(shellLaunchConfig: IShellLaunchConfig) { this._shellLaunchConfig = shellLaunchConfig; } public get commandTracker(): TerminalCommandTracker { return this._commandTracker; } private readonly _onExit = new Emitter(); diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index c126bf709783bdbc38ab7faa6fd74380c3891287..02825b35a222bbb9fd007c1c25c26a61e309050b 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -468,7 +468,7 @@ export interface ITerminalInstance { /** * The shell launch config used to launch the shell. */ - readonly shellLaunchConfig: IShellLaunchConfig; + shellLaunchConfig: IShellLaunchConfig; /** * Whether to disable layout for the terminal. This is useful when the size of the terminal is