Skip to main content

snapshot_preview

Function snapshot_preview 

Source
pub(crate) fn snapshot_preview(bytes: &[u8]) -> (String, usize)
Expand description

(preview, node_count) from an output.state.json snapshot’s bytes, or ("", 0) when they don’t parse or have no nodes array. The preview is the first user_message, skipping a leading “# Session Context” bootstrap message when a later one exists, collapsed to one line of at most 240 chars.