fix edit command prefix and suffix range bug

maxStartLine should minus 1
curEndLine should plus 1
This commit is contained in:
董文涛 2024-10-18 15:56:39 +08:00 • committed by GitHub
parent d213b395c9
commit f8f681b523
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) {