Skip to main content

load_materialized_transcript_after

Function load_materialized_transcript_after 

Source
pub fn load_materialized_transcript_after(
    session_id: &str,
    after_seq: u64,
    limit: usize,
) -> Result<Option<TranscriptPage>>
Expand description

Read the transcript items whose sequence is above after_seq, oldest first. Returns None when the session has no projection row.

The sequence is COALESCE(latest_content_event_ordinal, position): an agent message is rewritten while it streams, so paging by position would hand a caller the message as it was first created and never send the finished text. Paging by this sequence sends the item again exactly when it changed, and a caller that keeps the highest sequence it saw resumes from there whether the session is live or long stopped.