Skip to main content

read_new_transcript_lines

Function read_new_transcript_lines 

Source
pub fn read_new_transcript_lines(
    transcript_path: &Path,
    offset_path: &Path,
) -> Result<(Vec<Value>, i64, i64), Error>
Expand description

Returns (lines, start_offset, end_offset): start_offset is the seek position read from offset_path (0 if absent), and end_offset is the byte offset after the last line read (the old bytes_read).

Callers should send start_offset as StreamEventRequest::transcript_offset (so the server’s chunk_index = transcript_offset + line_index is stable per physical line across overlapping/retried reads) and persist end_offset to .stream_offset as the next read’s seek position.