09 / 20AI, realtime & offline
AI Chat Interface
The conversational UX patterns I design for production AI: streaming, citations, tools.
- AI UX
- Streaming UI
- Tool calls
- Citations
- Abort & retry
stirling.lab/ai-chat Live demo
Loading demo…
What to notice
- Token-by-token streaming with a stop button wired to an AbortController
- Inline citations that link to source cards, and tool-call steps with status
- Markdown and code rendering with copy buttons, edit and regenerate
- Graceful states: thinking, partial failure, retry, and empty conversation
How it's built
- The model is a scripted local stream, so the demo is deterministic and needs no API key.
- Rendering is incremental: a two-channel store means only the streaming message re-renders per token.
Hand-built in React 19 + TypeScript, with no UI or chart libraries.