mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 02:02:42 +00:00
While streaming, the Claude Agent SDK emits one assistant message per completed non-empty content block, each carrying only that block and sharing the message id. The timeline assembler treated each of those as a snapshot of the whole message, so when a message had two or more thinking (or text) blocks, the last block's snapshot did not start with the accumulated text, the emitted cursor reset, and the block was sent again. The Thinking sheet then showed the last paragraph twice. Track text per content block, keyed by the stream block index, and match each snapshot to the earliest block of its kind that has not had one. A snapshot only appends text the deltas missed. Snapshot-only blocks become their own blocks, and a redelivered snapshot uuid is ignored.