fix CRLF bug in diff stream

This commit is contained in:
Nate 2024-09-05 17:52:12 -07:00
parent 22363da9e1
commit cc0259e6b3

View file

@ -81,6 +81,9 @@ export async function* streamDiffLines(
oldLines = [];
}
// Trim end of oldLines, otherwise we have trailing \r on every line for CRLF files
oldLines = oldLines.map((line) => line.trimEnd());
const prompt = constructPrompt(
prefix,
highlighted,