pub fn dedup_tool_outputs(messages: &mut [Value]) -> DedupStatsExpand description
Replace repeated, non-recent tool outputs in messages with references to
an earlier, verbatim tool result in the same slice.
Pure function of messages and of whether protection holds: equal input
yields equal output. A block’s rewrite depends only on the blocks before it
and on whether it is among the newest tool outputs, which always stay
verbatim.