Merge pull request #2563 from hdoer/patch-2

fix: incorrect prefix/suffix range handling in /edit command
This commit is contained in:
Patrick Erichsen 2024-10-24 12:01:20 -07:00 • committed by GitHub
commit 84171d1dc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -95,10 +95,10 @@ export async function getPromptParts(
}
let filePrefix = fullFileContentsList
.slice(curStartLine, maxStartLine)
.slice(curStartLine, maxStartLine - 1)
.join("\n");
let fileSuffix = fullFileContentsList
.slice(minEndLine, curEndLine - 1)
.slice(minEndLine, curEndLine + 1)
.join("\n");
if (rif.contents.length > 0) {