diff --git a/vscode/package.json b/vscode/package.json index 7edff5d563a6..242144ee0be5 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -1074,7 +1074,7 @@ "cody.experimental.autoedits.enabled": { "order": 99, "type": "boolean", - "markdownDescription": "Enable Autoedit, an experimental feature that automatically applies suggested edits.", + "markdownDescription": "Enable Autoedit, an experimental feature which suggest smarter code edits as you type.", "default": false }, "cody.experimental.tracing": { diff --git a/vscode/src/autoedits/autoedit-onboarding.ts b/vscode/src/autoedits/autoedit-onboarding.ts index e2538794f501..60dc81b3772d 100644 --- a/vscode/src/autoedits/autoedit-onboarding.ts +++ b/vscode/src/autoedits/autoedit-onboarding.ts @@ -8,14 +8,14 @@ import { import * as vscode from 'vscode' import { isRunningInsideAgent } from './../jsonrpc/isRunningInsideAgent' -export async function showAutoeditOnboarding(): Promise { +export async function showAutoeditOnboardingIfEligible(): Promise { // Determine if we should show the onboarding popup if (!shouldShowAutoeditsOnboardingPopup()) { return } const selection = await vscode.window.showInformationMessage( - '✨ Try Cody Autoedits - An alternative to autocomplete that helps you edit code more efficiently', + '✨ Try Cody Autoedits - experimental feature which suggest smarter code edits as you type.', 'Enable Autoedits' ) diff --git a/vscode/src/completions/inline-completion-item-provider.ts b/vscode/src/completions/inline-completion-item-provider.ts index 4b5ded14f481..c931105add0b 100644 --- a/vscode/src/completions/inline-completion-item-provider.ts +++ b/vscode/src/completions/inline-completion-item-provider.ts @@ -21,7 +21,7 @@ import { autocompleteStageCounterLogger } from '../services/autocomplete-stage-c import { recordExposedExperimentsToSpan } from '../services/open-telemetry/utils' import { isInTutorial } from '../tutorial/helpers' -import { showAutoeditOnboarding } from '../autoedits/autoedit-onboarding' +import { showAutoeditOnboardingIfEligible } from '../autoedits/autoedit-onboarding' import { ContextRankingStrategy } from '../completions/context/completions-context-ranker' import type { CompletionBookkeepingEvent, CompletionItemID, CompletionLogID } from './analytics-logger' import * as CompletionAnalyticsLogger from './analytics-logger' @@ -139,8 +139,9 @@ export class InlineCompletionItemProvider tracer = null, ...config }: CodyCompletionItemProviderConfig) { - // Show the onboarding if the user has not enabled autoedits and want to use that instead of autocomplete - showAutoeditOnboarding() + // Show the autoedits onboarding message if the user hasn't enabled autoedits + // but is eligible to use them as an alternative to autocomplete + showAutoeditOnboardingIfEligible() // This is a static field to allow for easy access in the static `configuration` getter. // There must only be one instance of this class at a time. diff --git a/vscode/src/main.ts b/vscode/src/main.ts index 8b20756d48bd..3e6d3ddac9db 100644 --- a/vscode/src/main.ts +++ b/vscode/src/main.ts @@ -707,8 +707,14 @@ function registerAutoEdits(chatClient: ChatClient, disposables: vscode.Disposabl ) ) .pipe( - map(([config, authStatus, autoeditEnabled]) => { - if (shouldEnableExperimentalAutoedits(config, autoeditEnabled, authStatus)) { + map(([config, authStatus, autoeditFeatureFlagEnabled]) => { + if ( + shouldEnableExperimentalAutoedits( + config, + autoeditFeatureFlagEnabled, + authStatus + ) + ) { const provider = new AutoeditsProvider(chatClient) const completionRegistration = vscode.languages.registerInlineCompletionItemProvider(