Skip to main content

cursor_is_new_fragment

Function cursor_is_new_fragment 

Source
fn cursor_is_new_fragment(segment: &mut String, text: &str) -> bool
Expand description

cursor streams a message as fragment deltas (with --stream-partial-output), then repeats the whole message as one consolidation event whose text equals the accumulated fragments. Track the running segment so that consolidation is dropped instead of printed a second time. Returns true if text is a new fragment to print, false if it is the repeat (and the segment is reset, ready for the next message).