fix(chat): handle truncated diff headers

This commit is contained in:
Pascal André
2026-08-21 12:00:01 +02:00
parent 0d70a631f6
commit cb1f961ea9
2 changed files with 25 additions and 2 deletions
@@ -575,7 +575,7 @@ export const parseDiffToUnified = (diffText: string): UnifiedDiffHunk[] => {
if (line.startsWith('Index:') || line.startsWith('===') || line.startsWith('---') || line.startsWith('+++')) {
if (line.startsWith('Index:')) {
currentFile = line.split(' ')[1].split('/').pop() || 'file';
currentFile = line.slice('Index:'.length).trim().split('/').pop() || 'file';
}
i++;
continue;