Files
Cursor Agent d9c24fafd3 Fix reversed iteration overwriting newest diff and message values
In deriveTurnDiffSummaries, events are iterated newest-first via
toReversed(). The filesByPath merging correctly used ?? so the first
(newest) encounter takes priority. However, summary.unifiedDiff and
summary.assistantMessageId were unconditionally overwritten on each
iteration, so the oldest value ended up winning instead of the newest.

Fix by using ??= (nullish coalescing assignment) so the first (newest)
value encountered is preserved and older values do not overwrite it.
2026-02-17 18:54:09 +00:00
..