reset nextEditWindowActive contexts to false for failsafe

This commit is contained in:
Jacob Kim 2025-06-24 18:12:11 -07:00
parent eb3dae6cb5
commit b763713879

View file

@ -258,7 +258,7 @@ export class VsCodeMessenger {
this.onWebview("optInNextEditFeature", async (msg) => {
if (msg.data.optIn) {
// Set up next edit window manager only for Continue team members
setupNextEditWindowManager(context, {
await setupNextEditWindowManager(context, {
applyText: async (editor, diff, position) => {
const editableRegionStartLine = Math.max(0, position.line - 5);
const editableRegionEndLine = Math.min(
@ -282,9 +282,19 @@ export class VsCodeMessenger {
});
this.vsCodeExtension.activateNextEdit();
await vscode.commands.executeCommand(
"setContext",
"nextEditWindowActive",
false,
);
} else {
NextEditWindowManager.clearInstance();
this.vsCodeExtension.deactivateNextEdit();
await vscode.commands.executeCommand(
"setContext",
"nextEditWindowActive",
false,
);
}
});