mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Remote ext host ready from terminal service
This commit is contained in:
parent
c3bdf6c825
commit
09d22f9bbb
|
@ -92,8 +92,6 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
|
|||
this._updateDefaultProfile();
|
||||
});
|
||||
this._terminalService.onDidChangeAvailableProfiles(() => this._updateDefaultProfile());
|
||||
|
||||
this._terminalService.extHostReady(_extHostContext.remoteAuthority!); // TODO@Tyriar: remove null assertion
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
|
|
|
@ -187,7 +187,6 @@ export interface ITerminalService {
|
|||
|
||||
setContainers(panelContainer: HTMLElement, terminalContainer: HTMLElement): void;
|
||||
|
||||
extHostReady(remoteAuthority: string): void;
|
||||
requestStartExtensionTerminal(proxy: ITerminalProcessExtHostProxy, cols: number, rows: number): Promise<ITerminalLaunchError | undefined>;
|
||||
isAttachedToTerminal(remoteTerm: IRemoteTerminalAttachTarget): boolean;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ export class TerminalService implements ITerminalService {
|
|||
private _terminalGroups: ITerminalGroup[] = [];
|
||||
private _backgroundedTerminalInstances: ITerminalInstance[] = [];
|
||||
private _findState: FindReplaceState;
|
||||
private _extHostsReady: { [authority: string]: IExtHostReadyEntry | undefined } = {};
|
||||
private _activeGroupIndex: number;
|
||||
private _activeInstanceIndex: number;
|
||||
private _linkProviders: Set<ITerminalExternalLinkProvider> = new Set();
|
||||
|
@ -324,11 +323,6 @@ export class TerminalService implements ITerminalService {
|
|||
});
|
||||
}
|
||||
|
||||
async extHostReady(remoteAuthority: string): Promise<void> {
|
||||
this._createExtHostReadyEntry(remoteAuthority);
|
||||
this._extHostsReady[remoteAuthority]!.resolve();
|
||||
}
|
||||
|
||||
@throttle(10000)
|
||||
private async _refreshAvailableProfiles(): Promise<void> {
|
||||
const result = await this._detectProfiles(true);
|
||||
|
@ -348,16 +342,6 @@ export class TerminalService implements ITerminalService {
|
|||
return offProcService?.getProfiles(!configuredProfilesOnly);
|
||||
}
|
||||
|
||||
private _createExtHostReadyEntry(remoteAuthority: string): void {
|
||||
if (this._extHostsReady[remoteAuthority]) {
|
||||
return;
|
||||
}
|
||||
|
||||
let resolve!: () => void;
|
||||
const promise = new Promise<void>(r => resolve = r);
|
||||
this._extHostsReady[remoteAuthority] = { promise, resolve };
|
||||
}
|
||||
|
||||
private _onBeforeShutdown(reason: ShutdownReason): boolean | Promise<boolean> {
|
||||
if (this.terminalInstances.length === 0) {
|
||||
// No terminal instances, don't veto
|
||||
|
@ -1042,11 +1026,6 @@ interface IProfileQuickPickItem extends IQuickPickItem {
|
|||
profile: ITerminalProfile | ITerminalTypeContribution;
|
||||
}
|
||||
|
||||
interface IExtHostReadyEntry {
|
||||
promise: Promise<void>;
|
||||
resolve: () => void;
|
||||
}
|
||||
|
||||
interface IInstanceLocation {
|
||||
group: ITerminalGroup,
|
||||
groupIndex: number,
|
||||
|
|
Loading…
Reference in a new issue