Streaming Answer Recovery
Build a browser answer view and local event stream for developers integrating assistant output. Handle split UTF-8 bytes, event IDs, reconnection, cancellation and partial citations. Preserve the difference between an interrupted draft and a completed answer, with a downloadable event trace to reproduce rendering failures.
Reusable browser component, SSE fixture server and replayable event trace
Streaming Answer Recovery in 4 stages
Reconnect a streamed answer without duplicating text or hiding an incomplete result.
Decode chunked bytes into complete events
Let UTF-8 and SSE framing survive arbitrary transport boundaries.
starter · ~2 hours · TypeScript
TextDecoderSSE framingpersistent IDRender text and citations by stable identity
Make duplicate delivery harmless while preserving incomplete state.
core · ~2 hours · TypeScript
event identitydeduplicationpartial citationsHandle reconnect and cancellation
Resume after the last accepted event, not the last partial byte.
core · ~2 hours · TypeScript + Go
Last-Event-IDHTTP fixtureAbortSignalExport and replay an interrupted-answer trace
Ship the browser component with a replayable accepted-event artifact.
core · ~2 hours · TypeScript
trace schemabrowser componentdownload