fn close_traced(
trace: &mut TurnTrace,
known_over: bool,
keys: &mut HashMap<String, usize>,
turns: &mut [TurnSpan],
open: Option<usize>,
)Expand description
Name the turn a transcript’s own rows support, then start the next turn’s trace. A turn the wire already settled is named by its own result frame and this one nothing, so the two never name one turn twice.
known_over is whether whatever closed the turn says so - the next prompt.
A turn closing at the end of a conversation has nothing saying it, and
needs its own last frame to have stopped rather than handed back for a
tool call.