@@ -72,6 +72,7 @@ import { IQuickInputService } from '../../../../platform/quickinput/common/quick
72
72
import { IMarkdownString , MarkdownString } from '../../../../base/common/htmlContent.js' ;
73
73
import { ExtensionGalleryResourceType , getExtensionGalleryManifestResourceUri , IExtensionGalleryManifestService } from '../../../../platform/extensionManagement/common/extensionGalleryManifest.js' ;
74
74
import { fromNow } from '../../../../base/common/date.js' ;
75
+ import { IUserDataProfilesService } from '../../../../platform/userDataProfile/common/userDataProfile.js' ;
75
76
76
77
interface IExtensionStateProvider < T > {
77
78
( extension : Extension ) : T ;
@@ -961,6 +962,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
961
962
@ILifecycleService private readonly lifecycleService : ILifecycleService ,
962
963
@IFileService private readonly fileService : IFileService ,
963
964
@IUserDataProfileService private readonly userDataProfileService : IUserDataProfileService ,
965
+ @IUserDataProfilesService private readonly userDataProfilesService : IUserDataProfilesService ,
964
966
@IStorageService private readonly storageService : IStorageService ,
965
967
@IDialogService private readonly dialogService : IDialogService ,
966
968
@IUserDataSyncEnablementService private readonly userDataSyncEnablementService : IUserDataSyncEnablementService ,
@@ -2599,6 +2601,18 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
2599
2601
throw new Error ( 'Missing local' ) ;
2600
2602
}
2601
2603
2604
+ if ( extension . local . isApplicationScoped && this . userDataProfilesService . profiles . length > 1 ) {
2605
+ const { confirmed } = await this . dialogService . confirm ( {
2606
+ title : nls . localize ( 'uninstallApplicationScoped' , "Uninstall Extension" ) ,
2607
+ type : Severity . Info ,
2608
+ message : nls . localize ( 'uninstallApplicationScopedMessage' , "Would you like to Uninstall {0} from all profiles?" , extension . displayName ) ,
2609
+ primaryButton : nls . localize ( 'uninstallAllProfiles' , "Uninstall (All Profiles)" )
2610
+ } ) ;
2611
+ if ( ! confirmed ) {
2612
+ throw new CancellationError ( ) ;
2613
+ }
2614
+ }
2615
+
2602
2616
const extensionsToUninstall : UninstallExtensionInfo [ ] = [ { extension : extension . local } ] ;
2603
2617
for ( const packExtension of this . getAllPackedExtensions ( extension , this . local ) ) {
2604
2618
if ( packExtension . local && ! extensionsToUninstall . some ( e => areSameExtensions ( e . extension . identifier , packExtension . identifier ) ) ) {
0 commit comments