Skip to content

Commit 1d257e9

Browse files
committed
feat: update
1 parent 1896f00 commit 1d257e9

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/copilot/contextProvider.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,12 @@ import * as vscode from 'vscode';
1212
import { CopilotHelper } from './context/copilotHelper';
1313
import { sendInfo } from "vscode-extension-telemetry-wrapper";
1414
import { contextCache } from './context/contextCache';
15-
import { TreatmentVariables } from '../exp/TreatmentVariables';
16-
import { getExpService } from '../exp';
1715
import { logger, getProjectJavaVersion } from './utils';
1816
import { getExtensionName } from '../utils/extension';
1917

2018
export 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);

src/exp/TreatmentVariables.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ export class TreatmentVariables {
66
public static readonly PresentWelcomePageByDefault = 'presentWelcomePageByDefault';
77
public static readonly JavaWalkthroughEnabled = "gettingStarted.overrideCategory.vscjava.vscode-java-pack.javaWelcome.when";
88
public static readonly JavaCompletionSampling = "javaCompletionSampling";
9-
public static readonly ContextProviderEnabled = "ContextProviderIsEnabled";
109
}

0 commit comments

Comments
 (0)