@@ -19,6 +19,7 @@ import { UserDataSyncStoreClient } from 'vs/platform/userDataSync/common/userDat
19
19
import { AuthenticationSession , AuthenticationSessionsChangeEvent , IAuthenticationService } from 'vs/workbench/services/authentication/common/authentication' ;
20
20
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' ;
21
21
import { EDIT_SESSIONS_SIGNED_IN , EditSession , EDIT_SESSION_SYNC_CATEGORY , IEditSessionsWorkbenchService , EDIT_SESSIONS_SIGNED_IN_KEY , IEditSessionsLogService } from 'vs/workbench/contrib/editSessions/common/editSessions' ;
22
+ import { IDialogService } from 'vs/platform/dialogs/common/dialogs' ;
22
23
import { generateUuid } from 'vs/base/common/uuid' ;
23
24
24
25
type ExistingSession = IQuickPickItem & { session : AuthenticationSession & { providerId : string } } ;
@@ -48,6 +49,7 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
48
49
@IProductService private readonly productService : IProductService ,
49
50
@IContextKeyService private readonly contextKeyService : IContextKeyService ,
50
51
@IRequestService private readonly requestService : IRequestService ,
52
+ @IDialogService private readonly dialogService : IDialogService ,
51
53
) {
52
54
super ( ) ;
53
55
@@ -352,8 +354,19 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
352
354
} ) ;
353
355
}
354
356
355
- run ( ) {
356
- that . clearAuthenticationPreference ( ) ;
357
+ async run ( ) {
358
+ const result = await that . dialogService . confirm ( {
359
+ type : 'info' ,
360
+ message : localize ( 'sign out of edit sessions clear data prompt' , 'Do you want to sign out of edit sessions?' ) ,
361
+ checkbox : { label : localize ( 'delete all edit sessions' , 'Delete all stored edit sessions from the cloud.' ) } ,
362
+ primaryButton : localize ( 'clear data confirm' , 'Yes' ) ,
363
+ } ) ;
364
+ if ( result . confirmed ) {
365
+ if ( result . checkboxChecked ) {
366
+ that . storeClient ?. delete ( 'editSessions' , null ) ;
367
+ }
368
+ that . clearAuthenticationPreference ( ) ;
369
+ }
357
370
}
358
371
} ) ) ;
359
372
}
0 commit comments