From 29c3798faae2b82cba8ce531304630fee10f23b3 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 12:44:19 +0000 Subject: [PATCH] fix(vscode): send workspace-relative current file path for next edit Match classic autocomplete's policy of never sending absolute fsPaths upstream. Mercury only needs the path for language/context hints, and the workspace-relative form is what recentlyViewedSnippets already uses. --- .changeset/mercury-next-edit.md | 5 +++++ .../next-edit/NextEditInlineCompletionProvider.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/mercury-next-edit.md diff --git a/.changeset/mercury-next-edit.md b/.changeset/mercury-next-edit.md new file mode 100644 index 00000000000..8df4ee70bbe --- /dev/null +++ b/.changeset/mercury-next-edit.md @@ -0,0 +1,5 @@ +--- +"kilo-code": minor +--- + +Add Mercury Next Edit as an opt-in autocomplete mode. Predicts multi-line edits beyond the cursor (including off-cursor and pure-insertion edits) and surfaces them with a Tab-to-jump / Tab-to-apply affordance. Select "Mercury Next Edit" under the autocomplete model setting to enable it (requires an Inception API key). diff --git a/packages/kilo-vscode/src/services/autocomplete/next-edit/NextEditInlineCompletionProvider.ts b/packages/kilo-vscode/src/services/autocomplete/next-edit/NextEditInlineCompletionProvider.ts index f92ad608c2f..67a85f04dd4 100644 --- a/packages/kilo-vscode/src/services/autocomplete/next-edit/NextEditInlineCompletionProvider.ts +++ b/packages/kilo-vscode/src/services/autocomplete/next-edit/NextEditInlineCompletionProvider.ts @@ -119,7 +119,10 @@ export class NextEditInlineCompletionProvider implements vscode.InlineCompletion }) await this.editHistoryTracker.flush(document) return { - currentFilePath: document.uri.fsPath, + // Mirror classic autocomplete's policy: never send an absolute fsPath upstream. + // Mercury only needs the path for language/context hints, and the workspace-relative + // form is what `recentlyViewedSnippets` already uses (see recentSnippetsAdapter.ts). + currentFilePath: vscode.workspace.asRelativePath(document.uri, false), currentFileContent: document.getText(), cursorLine: position.line, cursorCharacter: position.character,