@djangocfg/widget-chat
A chat surface for React: transcript, composer, tool calls, streaming markdown. It also carries the site assistant (./assistant) and the page tooling that lets a chat see and act on the page. Transport-agnostic: the host supplies an adapter, the package supplies everything a chat looks like.
pnpm add @djangocfg/widget-chat @djangocfg/ui-core
@import "@djangocfg/widget-chat/styles";
import { Chat } from '@djangocfg/widget-chat';
<Chat adapter={myAdapter} renderers={myRenderers} capabilities={{ tools, voice }} body={{ kind: 'packaged' }} />
A chat needs an adapter and a renderer per part type it draws: getting started has the smallest working one.
Every capability is optional and absent means absent, never stubbed. <Chat> has seven props, and a new feature is a capability, a part type or a slot, never a prop (concepts). A file belongs in this package when a second product would have to write it again, unchanged.
Docs
@docs/ is organised by the reader's question:
| I want to | Start at |
|---|---|
| mount a chat | getting started, concepts, capabilities, subpaths |
| change how it behaves | composer, attachments, blocks, media, run block, room, phones |
| add a site assistant | assistant |
| let the chat see the page | page tooling |
| restyle, translate, test | styling, i18n, testing |
CLAUDE.md answers a different question: what is easy to break.
Verify
pnpm --filter @djangocfg/widget-chat check-types test