From 2baa9a3725a04488f38d91920a794f7b331b4846 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 29 Aug 2025 16:18:38 -0700 Subject: [PATCH] docs: add comments to window manager --- .../src/activation/NextEditWindowManager.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/extensions/vscode/src/activation/NextEditWindowManager.ts b/extensions/vscode/src/activation/NextEditWindowManager.ts index 1279a95da..1c1da98fd 100644 --- a/extensions/vscode/src/activation/NextEditWindowManager.ts +++ b/extensions/vscode/src/activation/NextEditWindowManager.ts @@ -97,6 +97,11 @@ export const HIDE_NEXT_EDIT_SUGGESTION_COMMAND = export const ACCEPT_NEXT_EDIT_SUGGESTION_COMMAND = "continue.nextEditWindow.acceptNextEditSuggestion"; +/** + * This is where we create SVG windows and deletion decorations for non-FIM next edit suggestions. + * This class controls the decoration object lifetime. + * The syntax highlighting and the actual building of SVG happens inside core/codeRenderer/CodeRenderer.ts. + */ export class NextEditWindowManager { private static instance: NextEditWindowManager | undefined; @@ -492,9 +497,6 @@ export class NextEditWindowManager { this.mostRecentCompletionId = null; } - /** - * Accept the current next edit suggestion by inserting it at cursor position. - */ /** * Accept the current next edit suggestion by inserting it at cursor position. */ @@ -840,15 +842,6 @@ export class NextEditWindowManager { editor: vscode.TextEditor, position: vscode.Position, ): vscode.Position { - // Create a position that's offset spaces to the right of the cursor. - - // const line = editor.document.lineAt(position.line); - // const offsetChar = Math.min( - // position.character + SVG_CONFIG.cursorOffset, - // line.text.length, - // ); - // return new vscode.Position(position.line, offsetChar); - // Place decoration at the end of the current line const line = editor.document.lineAt(position.line); return new vscode.Position(position.line, line.text.length);