From cbd54b291475f765f3a22fcbbe1f71cf745e29c9 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 3 Jul 2025 14:15:47 -0700 Subject: [PATCH] reset completion id only on esc --- extensions/vscode/src/activation/NextEditWindowManager.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/src/activation/NextEditWindowManager.ts b/extensions/vscode/src/activation/NextEditWindowManager.ts index 8f79e0489..fd8aa3f3d 100644 --- a/extensions/vscode/src/activation/NextEditWindowManager.ts +++ b/extensions/vscode/src/activation/NextEditWindowManager.ts @@ -181,7 +181,7 @@ export class NextEditWindowManager { // Register HIDE_TOOLTIP_COMMAND and ACCEPT_NEXT_EDIT_COMMAND with their corresponding callbacks. this.registerCommandSafely( HIDE_NEXT_EDIT_SUGGESTION_COMMAND, - async () => await this.hideAllNextEditWindows(), + async () => await this.hideAllNextEditWindowsAndResetCompletionId(), ); this.registerCommandSafely( ACCEPT_NEXT_EDIT_SUGGESTION_COMMAND, @@ -309,8 +309,12 @@ export class NextEditWindowManager { } await NextEditWindowManager.freeTabAndEsc(); + } - // TODO: Log with accept = false. + public async hideAllNextEditWindowsAndResetCompletionId() { + this.hideAllNextEditWindows(); + + // Log with accept = false. await vscode.commands.executeCommand( "continue.logNextEditOutcomeReject", this.mostRecentCompletionId,