reset completion id only on esc

This commit is contained in:
Jacob Kim 2025-07-03 14:15:47 -07:00
parent 05158532f3
commit cbd54b2914

View file

@ -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,