Normalize line endings when splitting file chunks

This commit is contained in:
Matt Herich 2025-04-03 00:31:26 -07:00
commit f41565ce83
No known key found for this signature in database

View file

@ -378,7 +378,7 @@ async function tailFile(filePath: string, numLines: number): Promise<string> {
const chunkText = readData + remainingText;
// Split by newlines and count
const chunkLines = chunkText.split('\n');
const chunkLines = normalizeLineEndings(chunkText).split('\n');
// If this isn't the end of the file, the first line is likely incomplete
// Save it to prepend to the next chunk