@@ -17,6 +17,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
17
17
import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile' ;
18
18
import { NativeProfileAwareExtensionManagementService } from 'vs/workbench/services/extensionManagement/common/profileAwareExtensionManagementService' ;
19
19
import { Disposable } from 'vs/base/common/lifecycle' ;
20
+ import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile' ;
20
21
21
22
export class ExtensionManagementServerService extends Disposable implements IExtensionManagementServerService {
22
23
@@ -30,12 +31,18 @@ export class ExtensionManagementServerService extends Disposable implements IExt
30
31
@ISharedProcessService sharedProcessService : ISharedProcessService ,
31
32
@IRemoteAgentService remoteAgentService : IRemoteAgentService ,
32
33
@ILabelService labelService : ILabelService ,
34
+ @IUserDataProfilesService userDataProfilesService : IUserDataProfilesService ,
33
35
@IUserDataProfileService userDataProfileService : IUserDataProfileService ,
34
36
@IInstantiationService instantiationService : IInstantiationService ,
35
37
) {
36
38
super ( ) ;
37
39
const localExtensionManagementService = this . _register ( instantiationService . createInstance ( NativeProfileAwareExtensionManagementService , sharedProcessService . getChannel ( 'extensions' ) , userDataProfileService . currentProfile . extensionsResource ) ) ;
38
40
this . localExtensionManagementServer = { extensionManagementService : localExtensionManagementService , id : 'local' , label : localize ( 'local' , "Local" ) } ;
41
+ this . _register ( userDataProfilesService . onDidChangeProfiles ( e => {
42
+ if ( userDataProfileService . currentProfile . isDefault ) {
43
+ localExtensionManagementService . extensionsProfileResource = userDataProfilesService . defaultProfile . extensionsResource ;
44
+ }
45
+ } ) ) ;
39
46
this . _register ( userDataProfileService . onDidChangeCurrentProfile ( e => e . join ( localExtensionManagementService . switchExtensionsProfile ( e . profile . extensionsResource ) ) ) ) ;
40
47
const remoteAgentConnection = remoteAgentService . getConnection ( ) ;
41
48
if ( remoteAgentConnection ) {
0 commit comments