Skip to main content

parse_cli_stream

Function parse_cli_stream 

Source
fn parse_cli_stream(stdout: &str) -> (String, Option<TokenCounts>)
Expand description

The last assistant text block (sanitized) and the usage from a claude -p --output-format stream-json transcript. Text is empty when the model said nothing, or only wrapped nothing in a fence.