pub async fn summarize(
client: &dyn LlmProvider,
transcript: &str,
original_goal: &str,
max_chars: usize,
on_progress: Option<&(dyn Fn(usize) + Sync)>,
) -> AgentResult<String>Expand description
Summarise a transcript block via the LLM.
client— the LLM client to call.transcript— serialised older conversation (output ofserialize_block).original_goal— first user message, truncated to avoid blowing the prompt.max_chars— target max length for the summary.on_progress— optional callback invoked with cumulative character count as the LLM streams in. Useful for showing “generating summary… X chars”.
Returns the summary text, truncated to max_chars if the LLM over-shoots.