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.
This commit is contained in:
kiloconnect[bot]
2026-05-27 12:47:30 +00:00
parent aa1f857ba4
commit 29c3798faa
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -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).
@@ -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,