🧩 Declarative Partial Updates with the Prompt API

A city guide whose five cards are written by five concurrent Prompt API sessions. Each one pipes its answer into its card's streamHTML(), which runs every chunk through the Sanitizer API, in whatever order the answers arrive. Follow-up questions stream the same way. Read more in Declarative partial updates.

Streaming HTML insertion
…
Sanitizing
…
checking Checking availability…
The HTML streamed into the cards, chunk by chunk and colored by card

      

Follow-up