Builds the render list. A tool call joins the most recent group with the
same tool name when that group's latest attempt ended in error (a retry);
otherwise it starts a new group. Assistant text between attempts stays
where it was; a user message resets grouping.
Builds the render list. A tool call joins the most recent group with the same tool name when that group's latest attempt ended in
error(a retry); otherwise it starts a new group. Assistant text between attempts stays where it was; a user message resets grouping.