@@ -7,7 +7,7 @@ import { Disposable } from 'vs/base/common/lifecycle';
77import { IChannel , IServerChannel , getDelayedChannel } from 'vs/base/parts/ipc/common/ipc' ;
88import { Client } from 'vs/base/parts/ipc/common/ipc.net' ;
99import { IEnvironmentService } from 'vs/platform/environment/common/environment' ;
10- import { connectRemoteAgentManagement } from 'vs/platform/remote/node/remoteAgentConnection' ;
10+ import { connectRemoteAgentManagement , IConnectionOptions } from 'vs/platform/remote/node/remoteAgentConnection' ;
1111import { IWindowConfiguration } from 'vs/platform/windows/common/windows' ;
1212import { IRemoteAgentConnection , IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService' ;
1313import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver' ;
@@ -18,6 +18,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
1818import { RemoteExtensionEnvironmentChannelClient } from 'vs/workbench/services/remote/node/remoteAgentEnvironmentChannel' ;
1919import { INotificationService } from 'vs/platform/notification/common/notification' ;
2020import { localize } from 'vs/nls' ;
21+ import product from 'vs/platform/product/node/product' ;
2122
2223export class RemoteAgentService extends Disposable implements IRemoteAgentService {
2324
@@ -86,8 +87,17 @@ class RemoteAgentConnection extends Disposable implements IRemoteAgentConnection
8687 }
8788
8889 private async _createConnection ( ) : Promise < Client < RemoteAgentConnectionContext > > {
89- const resolvedAuthority = await this . _remoteAuthorityResolverService . resolveAuthority ( this . remoteAuthority ) ;
90- const connection = await connectRemoteAgentManagement ( this . remoteAuthority , resolvedAuthority . host , resolvedAuthority . port , `renderer` , this . _environmentService . isBuilt ) ;
90+ const options : IConnectionOptions = {
91+ isBuilt : this . _environmentService . isBuilt ,
92+ commit : product . commit ,
93+ addressProvider : {
94+ getAddress : async ( ) => {
95+ const { host, port } = await this . _remoteAuthorityResolverService . resolveAuthority ( this . remoteAuthority ) ;
96+ return { host, port } ;
97+ }
98+ }
99+ } ;
100+ const connection = await connectRemoteAgentManagement ( options , this . remoteAuthority , `renderer` ) ;
91101 this . _register ( connection ) ;
92102 return connection . client ;
93103 }
0 commit comments