3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
- import { FileAccess } from 'vs/base/common/network' ;
7
- import { Client , IIPCOptions } from 'vs/base/parts/ipc/node/ipc.cp' ;
8
6
import { IEnvironmentService , INativeEnvironmentService } from 'vs/platform/environment/common/environment' ;
9
- import { parsePtyHostDebugPort } from 'vs/platform/environment/node/environmentService' ;
10
7
import { IReconnectConstants } from 'vs/platform/terminal/common/terminal' ;
8
+ import { NodePtyHostStarter } from 'vs/platform/terminal/node/nodePtyHostStarter' ;
11
9
import { IPtyHostConnection , IPtyHostStarter } from 'vs/platform/terminal/node/ptyHost' ;
12
- import { UtilityProcess } from 'vs/platform/utilityProcess/electron-main/utilityProcess' ;
10
+ // import { FileAccess } from 'vs/base/common/network';
11
+ // import { Client, IIPCOptions } from 'vs/base/parts/ipc/node/ipc.cp';
12
+ // import { parsePtyHostDebugPort } from 'vs/platform/environment/node/environmentService';
13
+ // import { UtilityProcess } from 'vs/platform/utilityProcess/electron-main/utilityProcess';
13
14
14
15
export class ElectronPtyHostStarter implements IPtyHostStarter {
15
16
16
- private utilityProcess : UtilityProcess | undefined = undefined ;
17
+ // private utilityProcess: UtilityProcess | undefined = undefined;
17
18
18
19
constructor (
19
20
private readonly _reconnectConstants : IReconnectConstants ,
@@ -23,41 +24,41 @@ export class ElectronPtyHostStarter implements IPtyHostStarter {
23
24
}
24
25
25
26
start ( lastPtyId : number ) : IPtyHostConnection {
26
- // return new NodePtyHostStarter(this._reconnectConstants, this._isRemote, this._environmentService).start(lastPtyId);
27
-
28
- console . log ( 'use utility proc' ) ;
29
-
30
- // TODO: Convert to use utility process
31
- const opts : IIPCOptions = {
32
- serverName : 'Pty Host' ,
33
- args : [ '--type=ptyHost' , '--logsPath' , this . _environmentService . logsHome . fsPath ] ,
34
- env : {
35
- VSCODE_LAST_PTY_ID : lastPtyId ,
36
- VSCODE_PTY_REMOTE : this . _isRemote ,
37
- VSCODE_AMD_ENTRYPOINT : 'vs/platform/terminal/node/ptyHostMain' ,
38
- VSCODE_PIPE_LOGGING : 'true' ,
39
- VSCODE_VERBOSE_LOGGING : 'true' , // transmit console logs from server to client,
40
- VSCODE_RECONNECT_GRACE_TIME : this . _reconnectConstants . graceTime ,
41
- VSCODE_RECONNECT_SHORT_GRACE_TIME : this . _reconnectConstants . shortGraceTime ,
42
- VSCODE_RECONNECT_SCROLLBACK : this . _reconnectConstants . scrollback
43
- }
44
- } ;
45
-
46
- const ptyHostDebug = parsePtyHostDebugPort ( this . _environmentService . args , this . _environmentService . isBuilt ) ;
47
- if ( ptyHostDebug ) {
48
- if ( ptyHostDebug . break && ptyHostDebug . port ) {
49
- opts . debugBrk = ptyHostDebug . port ;
50
- } else if ( ! ptyHostDebug . break && ptyHostDebug . port ) {
51
- opts . debug = ptyHostDebug . port ;
52
- }
53
- }
54
-
55
- const client = new Client ( FileAccess . asFileUri ( 'bootstrap-fork' ) . fsPath , opts ) ;
56
-
57
- return {
58
- client,
59
- dispose : client . dispose ,
60
- onDidProcessExit : client . onDidProcessExit
61
- } ;
27
+ return new NodePtyHostStarter ( this . _reconnectConstants , this . _isRemote , this . _environmentService ) . start ( lastPtyId ) ;
28
+
29
+ // console.log('use utility proc');
30
+
31
+ // // TODO: Convert to use utility process
32
+ // const opts: IIPCOptions = {
33
+ // serverName: 'Pty Host',
34
+ // args: ['--type=ptyHost', '--logsPath', this._environmentService.logsHome.fsPath],
35
+ // env: {
36
+ // VSCODE_LAST_PTY_ID: lastPtyId,
37
+ // VSCODE_PTY_REMOTE: this._isRemote,
38
+ // VSCODE_AMD_ENTRYPOINT: 'vs/platform/terminal/node/ptyHostMain',
39
+ // VSCODE_PIPE_LOGGING: 'true',
40
+ // VSCODE_VERBOSE_LOGGING: 'true', // transmit console logs from server to client,
41
+ // VSCODE_RECONNECT_GRACE_TIME: this._reconnectConstants.graceTime,
42
+ // VSCODE_RECONNECT_SHORT_GRACE_TIME: this._reconnectConstants.shortGraceTime,
43
+ // VSCODE_RECONNECT_SCROLLBACK: this._reconnectConstants.scrollback
44
+ // }
45
+ // };
46
+
47
+ // const ptyHostDebug = parsePtyHostDebugPort(this._environmentService.args, this._environmentService.isBuilt);
48
+ // if (ptyHostDebug) {
49
+ // if (ptyHostDebug.break && ptyHostDebug.port) {
50
+ // opts.debugBrk = ptyHostDebug.port;
51
+ // } else if (!ptyHostDebug.break && ptyHostDebug.port) {
52
+ // opts.debug = ptyHostDebug.port;
53
+ // }
54
+ // }
55
+
56
+ // const client = new Client(FileAccess.asFileUri('bootstrap-fork').fsPath, opts);
57
+
58
+ // return {
59
+ // client,
60
+ // dispose: client.dispose,
61
+ // onDidProcessExit: client.onDidProcessExit
62
+ // };
62
63
}
63
64
}
0 commit comments