Commit 6a452a8
committed
fix(ui): use content-level comparison for tail duplicate detection
The previous isTailDuplicate used messageDisplaySignature which only
compared text content, causing false positives when two messages had
the same text but different content structure (e.g., text-only vs
text+canvas). Switch to JSON.stringify comparison of content arrays
so messages with different block types or counts are not incorrectly
deduplicated.
This fixes the upstream test 'keeps repeated assistant final text
within the same turn' which expects both a text-only and a
text+canvas message to be preserved even when they share the same
display text.
Signed-off-by: Sebastien Tardif <[email protected]>1 parent a037c11 commit 6a452a8
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1228 | 1228 | | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | | - | |
1232 | | - | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1233 | 1240 | | |
1234 | 1241 | | |
1235 | | - | |
1236 | | - | |
1237 | 1242 | | |
1238 | 1243 | | |
1239 | 1244 | | |
| |||
0 commit comments