@@ -12,25 +12,12 @@ import * as vscode from 'vscode';
1212import { CopilotHelper } from './context/copilotHelper' ;
1313import { sendInfo } from "vscode-extension-telemetry-wrapper" ;
1414import { contextCache } from './context/contextCache' ;
15- import { TreatmentVariables } from '../exp/TreatmentVariables' ;
16- import { getExpService } from '../exp' ;
1715import { logger , getProjectJavaVersion } from './utils' ;
1816import { getExtensionName } from '../utils/extension' ;
1917
2018export async function registerCopilotContextProviders (
2119 context : vscode . ExtensionContext
2220) {
23- const contextProviderIsEnabled = await getExpService ( ) . getTreatmentVariableAsync ( TreatmentVariables . VSCodeConfig , TreatmentVariables . ContextProviderEnabled , true ) ;
24- if ( ! contextProviderIsEnabled ) {
25- sendInfo ( "" , {
26- "contextProviderEnabled" : "false" ,
27- } ) ;
28- return ;
29- }
30- sendInfo ( "" , {
31- "contextProviderEnabled" : "true" ,
32- } ) ;
33-
3421 // Initialize the context cache
3522 contextCache . initialize ( context ) ;
3623
@@ -89,6 +76,12 @@ export async function registerCopilotContextProviders(
8976 return ;
9077 }
9178 logger . info ( 'Registration of Java context provider for GitHub Copilot extension succeeded.' ) ;
79+ sendInfo ( "" , {
80+ "action" : "registerCopilotContextProvider" ,
81+ "extension" : getExtensionName ( ) ,
82+ "status" : "succeeded" ,
83+ "installCount" : installCount
84+ } ) ;
9285 }
9386 catch ( error ) {
9487 logger . error ( 'Error occurred while registering Java context provider for GitHub Copilot extension:' , error ) ;
0 commit comments