@@ -39,6 +39,11 @@ import { setImmediate } from 'vs/base/common/platform';
3939import { Schemas } from 'vs/base/common/network' ;
4040import { IEnvironmentService } from 'vs/platform/environment/common/environment' ;
4141
42+ export type ExtensionRecommendationsNotificationClassification = {
43+ userReaction : { classification : 'SystemMetaData' , purpose : 'FeatureInsight' } ;
44+ extensionId : { classification : 'PublicNonPersonalData' , purpose : 'FeatureInsight' } ;
45+ } ;
46+
4247export const milliSecondsInADay = 1000 * 60 * 60 * 24 ;
4348export const choiceNever = localize ( 'neverShowAgain' , "Don't Show Again" ) ;
4449const searchMarketplace = localize ( 'searchMarketplace' , "Search Marketplace" ) ;
@@ -635,25 +640,13 @@ export class ExtensionRecommendationsService extends Disposable implements IExte
635640 [ {
636641 label : localize ( 'install' , 'Install' ) ,
637642 run : ( ) => {
638- /* __GDPR__
639- "extensionRecommendations:popup" : {
640- "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
641- "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
642- }
643- */
644- this . telemetryService . publicLog ( 'extensionRecommendations:popup' , { userReaction : 'install' , extensionId : name } ) ;
643+ this . telemetryService . publicLog2 < { userReaction : string , extensionId : string } , ExtensionRecommendationsNotificationClassification > ( 'extensionRecommendations:popup' , { userReaction : 'install' , extensionId : name } ) ;
645644 this . instantiationService . createInstance ( InstallRecommendedExtensionAction , id ) . run ( ) ;
646645 }
647646 } , {
648647 label : localize ( 'showRecommendations' , "Show Recommendations" ) ,
649648 run : ( ) => {
650- /* __GDPR__
651- "extensionRecommendations:popup" : {
652- "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
653- "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
654- }
655- */
656- this . telemetryService . publicLog ( 'extensionRecommendations:popup' , { userReaction : 'show' , extensionId : name } ) ;
649+ this . telemetryService . publicLog2 < { userReaction : string , extensionId : string } , ExtensionRecommendationsNotificationClassification > ( 'extensionRecommendations:popup' , { userReaction : 'show' , extensionId : name } ) ;
657650
658651 const recommendationsAction = this . instantiationService . createInstance ( ShowRecommendedExtensionsAction , ShowRecommendedExtensionsAction . ID , localize ( 'showRecommendations' , "Show Recommendations" ) ) ;
659652 recommendationsAction . run ( ) ;
@@ -664,13 +657,7 @@ export class ExtensionRecommendationsService extends Disposable implements IExte
664657 isSecondary : true ,
665658 run : ( ) => {
666659 this . addToImportantRecommendationsIgnore ( id ) ;
667- /* __GDPR__
668- "extensionRecommendations:popup" : {
669- "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
670- "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
671- }
672- */
673- this . telemetryService . publicLog ( 'extensionRecommendations:popup' , { userReaction : 'neverShowAgain' , extensionId : name } ) ;
660+ this . telemetryService . publicLog2 < { userReaction : string , extensionId : string } , ExtensionRecommendationsNotificationClassification > ( 'extensionRecommendations:popup' , { userReaction : 'neverShowAgain' , extensionId : name } ) ;
674661 this . notificationService . prompt (
675662 Severity . Info ,
676663 localize ( 'ignoreExtensionRecommendations' , "Do you want to ignore all extension recommendations?" ) ,
@@ -687,13 +674,7 @@ export class ExtensionRecommendationsService extends Disposable implements IExte
687674 {
688675 sticky : true ,
689676 onCancel : ( ) => {
690- /* __GDPR__
691- "extensionRecommendations:popup" : {
692- "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
693- "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
694- }
695- */
696- this . telemetryService . publicLog ( 'extensionRecommendations:popup' , { userReaction : 'cancelled' , extensionId : name } ) ;
677+ this . telemetryService . publicLog2 < { userReaction : string , extensionId : string } , ExtensionRecommendationsNotificationClassification > ( 'extensionRecommendations:popup' , { userReaction : 'cancelled' , extensionId : name } ) ;
697678 }
698679 }
699680 ) ;
0 commit comments