Skip to content

Commit 0d1bc08

Browse files
committed
Clean up pty services
1 parent 074121e commit 0d1bc08

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/vs/platform/terminal/common/terminal.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ export interface IFixedTerminalDimensions {
264264
rows?: number;
265265
}
266266

267-
export const IPtyService = createDecorator<IPtyService>('ptyService');
267+
/**
268+
* A service that communicates with a pty host.
269+
*/
268270
export interface IPtyService {
269271
readonly _serviceBrand: undefined;
270272

@@ -344,6 +346,7 @@ export interface IPtyService {
344346
// TODO: Make mandatory and remove impl from pty host service
345347
refreshIgnoreProcessNames?(names: string[]): Promise<void>;
346348
}
349+
export const IPtyService = createDecorator<IPtyService>('ptyService');
347350

348351
export interface IPtyHostController {
349352
readonly onPtyHostExit: Event<number>;
@@ -357,7 +360,10 @@ export interface IPtyHostController {
357360
getProfiles(workspaceId: string, profiles: unknown, defaultProfile: unknown, includeDetectedProfiles?: boolean): Promise<ITerminalProfile[]>;
358361
}
359362

360-
export const IPtyHostService = createDecorator<IPtyHostService>('ptyHostService');
363+
/**
364+
* A service that communicates with a pty host controller (eg. main or server
365+
* process) and is able to launch and forward requests to the pty host.
366+
*/
361367
export interface IPtyHostService extends IPtyService, IPtyHostController {
362368
}
363369

src/vs/server/node/serverServices.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import { ITelemetryService, TelemetryLevel } from 'vs/platform/telemetry/common/
4848
import { ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService';
4949
import { getPiiPathsFromEnvironment, isInternalTelemetry, ITelemetryAppender, NullAppender, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
5050
import ErrorTelemetry from 'vs/platform/telemetry/node/errorTelemetry';
51-
import { IPtyService, IPtyHostService, TerminalSettingId } from 'vs/platform/terminal/common/terminal';
51+
import { IPtyService, TerminalSettingId } from 'vs/platform/terminal/common/terminal';
5252
import { PtyHostService } from 'vs/platform/terminal/node/ptyHostService';
5353
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
5454
import { UriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentityService';
@@ -199,7 +199,6 @@ export async function setupServerServices(connectionToken: ServerConnectionToken
199199
);
200200
const ptyHostService = instantiationService.createInstance(PtyHostService, ptyHostStarter);
201201
services.set(IPtyService, ptyHostService);
202-
services.set(IPtyHostService, ptyHostService);
203202

204203
services.set(ICredentialsMainService, new SyncDescriptor(CredentialsWebMainService));
205204

0 commit comments

Comments
 (0)