ed7ca5df docs(ui): add five chat UI recipes
The framework guides open with one example that registers tools,
interrupts, structured output, input and parts at once. A reader wiring
their first chat box has to skip past all of it. These five pages each do
one thing, in order:
1. `basic-chat` — layout, message, text part. No tools.
2. `format-a-tool` — one tool, branching on `part.state`.
3. `tool-approval` — `needsApproval`, inline or in the list.
4. `custom-interrupt` — `defineInterrupt` with your own schemas.
5. `request-context` — `forwardedProps` from screen to route.
Two gaps these close: there was no starting point smaller than the full
example, and nothing documented sending per-request context from the
chat UI. `docs/advanced/runtime-context.md` covers only the server half,
so the new page shows both and says plainly that `forwardedProps` is
client-controlled and must not be trusted for identity.
React only. The Solid, Vue and Svelte guides already point at the React
page for the full map, and each now links here too.
Named `recipes`, not `examples`: `scripts/verify-links.ts` treats any
path containing `/examples/` as a directory link for the site's app
examples, so `docs/ui/examples/*.md` reported every internal link
broken.
While writing these I checked the API instead of trusting the existing
prose, and corrected two things in my own drafts: the terminal tool state
is `complete`, not `output-available`, and `ToolCallPart` has no
`errorMessage` field. I also confirmed the grouped `ToolProps` snippet is
really type-checked by breaking it on purpose and watching kiira fail.
All 1183 doc snippets typecheck. `pnpm test:ci` and `pnpm test:dts` pass
across all 86 projects.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>