mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode 31e03b8ffbb218a87e3941f2b63a249f061fe0e4 (#4986)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import * as terminalEnvironment from 'vs/workbench/contrib/terminal/common/terminalEnvironment';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ProcessState, ITerminalProcessManager, IShellLaunchConfig, ITerminalConfigHelper, ITerminalChildProcess } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { ProcessState, ITerminalProcessManager, IShellLaunchConfig, ITerminalConfigHelper, ITerminalChildProcess, IBeforeProcessDataEvent } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { IHistoryService } from 'vs/workbench/services/history/common/history';
|
||||
@@ -14,11 +14,10 @@ import { TerminalProcessExtHostProxy } from 'vs/workbench/contrib/terminal/commo
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver';
|
||||
import { IWindowService } from 'vs/platform/windows/common/windows';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { REMOTE_HOST_SCHEME, getRemoteAuthority } from 'vs/platform/remote/common/remoteHosts';
|
||||
import { sanitizeProcessEnvironment } from 'vs/base/common/processes';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { IProductService } from 'vs/platform/product/common/product';
|
||||
import { ITerminalInstanceService } from 'vs/workbench/contrib/terminal/browser/terminal';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
@@ -57,6 +56,8 @@ export class TerminalProcessManager implements ITerminalProcessManager {
|
||||
|
||||
private readonly _onProcessReady = new Emitter<void>();
|
||||
public get onProcessReady(): Event<void> { return this._onProcessReady.event; }
|
||||
private readonly _onBeforeProcessData = new Emitter<IBeforeProcessDataEvent>();
|
||||
public get onBeforeProcessData(): Event<IBeforeProcessDataEvent> { return this._onBeforeProcessData.event; }
|
||||
private readonly _onProcessData = new Emitter<string>();
|
||||
public get onProcessData(): Event<string> { return this._onProcessData.event; }
|
||||
private readonly _onProcessTitle = new Emitter<string>();
|
||||
@@ -72,9 +73,8 @@ export class TerminalProcessManager implements ITerminalProcessManager {
|
||||
@ILogService private readonly _logService: ILogService,
|
||||
@IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService,
|
||||
@IConfigurationResolverService private readonly _configurationResolverService: IConfigurationResolverService,
|
||||
@IWindowService private readonly _windowService: IWindowService,
|
||||
@IConfigurationService private readonly _workspaceConfigurationService: IConfigurationService,
|
||||
@IEnvironmentService private readonly _environmentService: IEnvironmentService,
|
||||
@IWorkbenchEnvironmentService private readonly _environmentService: IWorkbenchEnvironmentService,
|
||||
@IProductService private readonly _productService: IProductService,
|
||||
@ITerminalInstanceService private readonly _terminalInstanceService: ITerminalInstanceService,
|
||||
@IRemoteAgentService private readonly _remoteAgentService: IRemoteAgentService
|
||||
@@ -114,7 +114,7 @@ export class TerminalProcessManager implements ITerminalProcessManager {
|
||||
if (shellLaunchConfig.cwd && typeof shellLaunchConfig.cwd === 'object') {
|
||||
this.remoteAuthority = getRemoteAuthority(shellLaunchConfig.cwd);
|
||||
} else {
|
||||
this.remoteAuthority = this._windowService.getConfiguration().remoteAuthority;
|
||||
this.remoteAuthority = this._environmentService.configuration.remoteAuthority;
|
||||
}
|
||||
const hasRemoteAuthority = !!this.remoteAuthority;
|
||||
let launchRemotely = hasRemoteAuthority || forceExtHostProcess;
|
||||
@@ -183,7 +183,11 @@ export class TerminalProcessManager implements ITerminalProcessManager {
|
||||
const p = this._process!;
|
||||
|
||||
p.onProcessData(data => {
|
||||
this._onProcessData.fire(data);
|
||||
const beforeProcessDataEvent: IBeforeProcessDataEvent = { data };
|
||||
this._onBeforeProcessData.fire(beforeProcessDataEvent);
|
||||
if (beforeProcessDataEvent.data && beforeProcessDataEvent.data.length > 0) {
|
||||
this._onProcessData.fire(beforeProcessDataEvent.data);
|
||||
}
|
||||
});
|
||||
|
||||
p.onProcessIdReady(pid => {
|
||||
|
||||
Reference in New Issue
Block a user