Skip to slide
Chapter 8 · Streaming and Real-Time UX
73 / 191

CHAPTER 08 · Streaming and Real-Time UX · 7 / 10

Persisting the stream for replay

The stream is ephemeral, but the conversation must survive a reload. So persist the same event timeline you streamed. Store the assistant turn as the ordered array of events (not just the final text). On reload, the client replays the events to reconstruct the full rich rendering, the chips, the cards, the citations, exactly as they appeared live. This is why the data model stores conversation content as structured events, not plain strings (Chapter 9). Streaming and persistence share one representation.

← → arrow keys work too