{items.map((item) => (
{renderItem(item, onApprovalDecision)}
))}
);
if (!scroll) return body;
// Include a cheap content signature so streaming growth (text lengthening
// without the item count changing) still advances the auto-follow key.
const contentKey = items.reduce((acc, it) => {
if (it.kind === "message") return acc + it.text.length;
if (it.kind === "thinking") return acc + it.lines.reduce((n, l) => n + l.length, 0);
if (it.kind === "tool") return acc + (it.diff?.lines?.length ?? 0) + (it.status === "completed" ? 1 : 0);
return acc + 1;
}, items.length);
return