fix(chat): stop prefix dedupe merging distinct messages (#1335) (#1340)

This commit is contained in:
m57 authored and GitHub committed 2026-09-28 00:32:07 +03:00
1 parent d81fc39f25
commit 2bf51cb911
2 files changed
+165

No files matched your search

@@ -201,6 +201,9 @@ internal class TranscriptComparison(
) {
return true
}
// #842 / #1335: prefix drift only exists for sealed assistant narration; two REST
// rows already returned above, so user rows must never collapse by prefix.
if (a.role != MessageRole.ASSISTANT) return false
return ta.length >= 40 && tb.length >= 40 && (tb.startsWith(ta) || ta.startsWith(tb))
}
}