From 1cd1e09f4f04c9a8f2a12b7063318fafc6a10c8e Mon Sep 17 00:00:00 2001 From: Tom Ross Date: Thu, 21 Mar 2024 13:57:46 +0000 Subject: [PATCH] Edit: Remove ghost hint feature flag (#3492) --- .../experimentation/FeatureFlagProvider.ts | 3 --- vscode/src/commands/GhostHintDecorator.ts | 26 +++++-------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/lib/shared/src/experimentation/FeatureFlagProvider.ts b/lib/shared/src/experimentation/FeatureFlagProvider.ts index 6622fa729148..4c477054c5cb 100644 --- a/lib/shared/src/experimentation/FeatureFlagProvider.ts +++ b/lib/shared/src/experimentation/FeatureFlagProvider.ts @@ -44,9 +44,6 @@ export enum FeatureFlag { // When enabled, fuses embeddings and symf context for chat. CodyChatFusedContext = 'cody-chat-fused-context', - // Show command hints alongside editor selections. "Opt+K to Edit, Opt+L to Chat" - CodyCommandHints = 'cody-command-hints', - // Show document hints above a symbol if the users' cursor is there. "Opt+D to Document" CodyDocumentHints = 'cody-document-hints', diff --git a/vscode/src/commands/GhostHintDecorator.ts b/vscode/src/commands/GhostHintDecorator.ts index ad8e8d64d7d6..a2a3ca1abbfd 100644 --- a/vscode/src/commands/GhostHintDecorator.ts +++ b/vscode/src/commands/GhostHintDecorator.ts @@ -101,9 +101,11 @@ export async function getGhostHintEnablement(): Promise { // Return the actual configuration setting, if set. Otherwise return the default value from the feature flag. return { - EditOrChat: - settingValue ?? - (await featureFlagProvider.evaluateFeatureFlag(FeatureFlag.CodyCommandHints)), + /** + * We're not running an A/B test on the "Opt+K to Text". + * We can safely set the default of this to `true`. + */ + EditOrChat: settingValue ?? true, Document: settingValue ?? (await featureFlagProvider.evaluateFeatureFlag(FeatureFlag.CodyDocumentHints)), @@ -177,8 +179,7 @@ export class GhostHintDecorator implements vscode.Disposable { * Tracks whether the user has recorded an enrollment for each ghost variant. * This is _only_ to help us measure usage via an A/B test. */ - private enrollmentRecorded: Record, boolean> = { - EditOrChat: false, + private enrollmentRecorded: Record, boolean> = { Document: false, } @@ -434,21 +435,6 @@ export class GhostHintDecorator implements vscode.Disposable { // We do not need to repeatedly mark the users' enrollment. this.enrollmentRecorded.Document = true } - - if (variant === 'EditOrChat' && !this.enrollmentRecorded.EditOrChat) { - const testGroup = enablement.EditOrChat ? 'treatment' : 'control' - telemetryService.log( - 'CodyVSCodeExtension:experiment:ghostText:enrolled', - { variant: testGroup }, - { hasV2Event: true } - ) - telemetryRecorder.recordEvent('cody.experiment.ghostText', 'enrolled', { - privateMetadata: { variant: testGroup }, - }) - // Mark this enrollment as recorded for the current session - // We do not need to repeatedly mark the users' enrollment. - this.enrollmentRecorded.EditOrChat = true - } } private async updateEnablement(authStatus: AuthStatus): Promise {