Turns a thread's messages into the items the message list renders, folding
retries of the same tool into one group: when a tool call fails and the
model calls the same tool again (usually with corrected arguments), the
later attempts join the first card instead of stacking a fresh card per
try. A user message closes every open group. Pure — no React.
Turns a thread's messages into the items the message list renders, folding retries of the same tool into one group: when a tool call fails and the model calls the same tool again (usually with corrected arguments), the later attempts join the first card instead of stacking a fresh card per try. A user message closes every open group. Pure — no React.