@@ -20,7 +20,7 @@ import { ILogService } from 'vs/platform/log/common/log';
20
20
import product from 'vs/platform/product/common/product' ;
21
21
import { IRemoteAgentEnvironment , RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment' ;
22
22
import { ITelemetryData , ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
23
- import { IPtyService , IShellLaunchConfig , ITerminalEnvironment } from 'vs/platform/terminal/common/terminal' ;
23
+ import { IShellLaunchConfig , ITerminalEnvironment } from 'vs/platform/terminal/common/terminal' ;
24
24
import { getTranslations } from 'vs/server/nls' ;
25
25
import { getUriTransformer } from 'vs/server/util' ;
26
26
import { IFileChangeDto } from 'vs/workbench/api/common/extHost.protocol' ;
@@ -31,6 +31,7 @@ import * as terminal from 'vs/workbench/contrib/terminal/common/remoteTerminalCh
31
31
import * as terminalEnvironment from 'vs/workbench/contrib/terminal/common/terminalEnvironment' ;
32
32
import { AbstractVariableResolverService } from 'vs/workbench/services/configurationResolver/common/variableResolver' ;
33
33
import { ExtensionScanner , ExtensionScannerInput } from 'vs/workbench/services/extensions/node/extensionPoints' ;
34
+ import { PtyHostService } from 'vs/platform/terminal/node/ptyHostService' ;
34
35
35
36
/**
36
37
* Extend the file provider to allow unwatching.
@@ -386,7 +387,7 @@ class VariableResolverService extends AbstractVariableResolverService {
386
387
export class TerminalProviderChannel implements IServerChannel < RemoteAgentConnectionContext > , IDisposable {
387
388
public constructor (
388
389
private readonly logService : ILogService ,
389
- private readonly ptyService : IPtyService ,
390
+ private readonly ptyService : PtyHostService ,
390
391
) { }
391
392
392
393
public listen ( _ : RemoteAgentConnectionContext , event : string , args : any ) : Event < any > {
@@ -397,7 +398,7 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
397
398
case '$onPtyHostStartEvent' : return this . ptyService . onPtyHostStart || Event . None ;
398
399
case '$onPtyHostUnresponsiveEvent' : return this . ptyService . onPtyHostUnresponsive || Event . None ;
399
400
case '$onPtyHostResponsiveEvent' : return this . ptyService . onPtyHostResponsive || Event . None ;
400
- case '$onPtyHostRequestResolveVariablesEvent' : return this . ptyService . onPtyHostRequestResolveVariables || Event . None ;
401
+ case '$onPtyHostRequestResolveVariablesEvent' : return this . ptyService . onPtyHostRequestResolveVariables || Event . None ;
401
402
case '$onProcessDataEvent' : return this . ptyService . onProcessData ;
402
403
case '$onProcessExitEvent' : return this . ptyService . onProcessExit ;
403
404
case '$onProcessReadyEvent' : return this . ptyService . onProcessReady ;
@@ -411,6 +412,8 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
411
412
// commands on the terminal that will do things in VS Code but we
412
413
// already have that functionality via a socket so I'm not sure what
413
414
// this is for.
415
+ // NOTE: VSCODE_IPC_HOOK_CLI is now missing, perhaps this is meant to
416
+ // replace that in some way.
414
417
case '$onExecuteCommand' : return Event . None ;
415
418
}
416
419
@@ -421,7 +424,7 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
421
424
logger . trace ( 'TerminalProviderChannel:call' , field ( 'command' , command ) , field ( 'args' , args ) ) ;
422
425
423
426
switch ( command ) {
424
- case '$restartPtyHost' : return this . restartPtyHost ( ) ;
427
+ case '$restartPtyHost' : return this . ptyService . restartPtyHost ( ) ;
425
428
case '$createProcess' : return this . createProcess ( context . remoteAuthority , args ) ;
426
429
case '$attachToProcess' : return this . ptyService . attachToProcess ( args [ 0 ] ) ;
427
430
case '$start' : return this . ptyService . start ( args [ 0 ] ) ;
@@ -440,8 +443,8 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
440
443
case '$getDefaultSystemShell' : return this . ptyService . getDefaultSystemShell ( args [ 0 ] ) ;
441
444
case '$reduceConnectionGraceTime' : return this . ptyService . reduceConnectionGraceTime ( ) ;
442
445
case '$updateTitle' : return this . ptyService . updateTitle ( args [ 0 ] , args [ 1 ] , args [ 2 ] ) ;
443
- case '$getProfiles' : return this . ptyService . getProfiles ! ( args [ 0 ] , args [ 1 ] , args [ 2 ] ) ;
444
- case '$acceptPtyHostResolvedVariables' : return this . ptyService . acceptPtyHostResolvedVariables ! ( args [ 0 ] , args [ 1 ] ) ;
446
+ case '$getProfiles' : return this . ptyService . getProfiles ( args [ 0 ] , args [ 1 ] , args [ 2 ] ) ;
447
+ case '$acceptPtyHostResolvedVariables' : return this . ptyService . acceptPtyHostResolvedVariables ( args [ 0 ] , args [ 1 ] ) ;
445
448
}
446
449
447
450
throw new Error ( `Invalid call '${ command } '` ) ;
@@ -451,13 +454,6 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
451
454
// Nothing at the moment.
452
455
}
453
456
454
- private async restartPtyHost ( ) : Promise < void > {
455
- if ( this . ptyService . restartPtyHost ) {
456
- return this . ptyService . restartPtyHost ( ) ;
457
- }
458
- }
459
-
460
-
461
457
// References: - ../../workbench/api/node/extHostTerminalService.ts
462
458
// - ../../workbench/contrib/terminal/browser/terminalProcessManager.ts
463
459
private async createProcess ( remoteAuthority : string , args : terminal . ICreateTerminalProcessArguments ) : Promise < terminal . ICreateTerminalProcessResult > {
0 commit comments