Skip to main content

reconstruct_conversation

Function reconstruct_conversation 

Source
pub fn reconstruct_conversation(events: &[Event]) -> Conversation
Expand description

Reconstruct the full Conversation from a stream-json event trajectory.

Init.preamble seeds the System/Developer prompt and each Event::Message appends a turn; Result/Error events are run metadata, not part of the history. This is the inverse of what locode-exec emits — the stream is a complete source.