Skip to main content

merge

Function merge 

Source
fn merge(last: &mut SessionUpdate, update: &SessionUpdate) -> bool
Expand description

Fold update into last when the two are consecutive token appends for one seat, and answer whether it did.

Both views draw a turn’s estimate as the SUM of the deltas, because estimated_tokens restarts at each thinking block and the running value is not a turn total - so one frame carrying the sum draws exactly what the run drew, and the run itself is what a storm is made of.

Everything but the growth is the arrival being folded in: the running value, the id and the session are that frame’s own, and only the counter is the run’s.