mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
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:
@@ -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).
|
||||
+4
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user