Clean up pty services

This commit is contained in:
Daniel Imms 2023-07-06 11:45:42 -07:00
parent 074121ee30
commit 0d1bc0818c
No known key found for this signature in database
GPG key ID: E5CF412B63651C69
2 changed files with 9 additions and 4 deletions

View file

@ -264,7 +264,9 @@ export interface IFixedTerminalDimensions {
rows?: number;
}
export const IPtyService = createDecorator<IPtyService>('ptyService');
/**
* A service that communicates with a pty host.
*/
export interface IPtyService {
readonly _serviceBrand: undefined;
@ -344,6 +346,7 @@ export interface IPtyService {
// TODO: Make mandatory and remove impl from pty host service
refreshIgnoreProcessNames?(names: string[]): Promise<void>;
}
export const IPtyService = createDecorator<IPtyService>('ptyService');
export interface IPtyHostController {
readonly onPtyHostExit: Event<number>;
@ -357,7 +360,10 @@ export interface IPtyHostController {
getProfiles(workspaceId: string, profiles: unknown, defaultProfile: unknown, includeDetectedProfiles?: boolean): Promise<ITerminalProfile[]>;
}
export const IPtyHostService = createDecorator<IPtyHostService>('ptyHostService');
/**
* A service that communicates with a pty host controller (eg. main or server
* process) and is able to launch and forward requests to the pty host.
*/
export interface IPtyHostService extends IPtyService, IPtyHostController {
}

View file

@ -48,7 +48,7 @@ import { ITelemetryService, TelemetryLevel } from 'vs/platform/telemetry/common/
import { ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService';
import { getPiiPathsFromEnvironment, isInternalTelemetry, ITelemetryAppender, NullAppender, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
import ErrorTelemetry from 'vs/platform/telemetry/node/errorTelemetry';
import { IPtyService, IPtyHostService, TerminalSettingId } from 'vs/platform/terminal/common/terminal';
import { IPtyService, TerminalSettingId } from 'vs/platform/terminal/common/terminal';
import { PtyHostService } from 'vs/platform/terminal/node/ptyHostService';
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
import { UriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentityService';
@ -199,7 +199,6 @@ export async function setupServerServices(connectionToken: ServerConnectionToken
);
const ptyHostService = instantiationService.createInstance(PtyHostService, ptyHostStarter);
services.set(IPtyService, ptyHostService);
services.set(IPtyHostService, ptyHostService);
services.set(ICredentialsMainService, new SyncDescriptor(CredentialsWebMainService));