Chat
- What it does
- One conversation for the whole project, in two states. Given a send handler it is a full chat — a feed plus an input field with file attachment; without one it is a read-only feed, which is exactly what a log needs. A message carries text, who wrote it, when, an optional mark of which channel made it, and up to six kinds of attachment: four the library knows by itself — audio, image, video, document — and two of ours, a place and a calendar event.
- How to use it
- The feed, the message and the input field come from AI Elements, vendored into `components/ai-elements/` in 80-2; this tool only decides what appears in them. Four kinds of attachment the library recognises by media type on its own, the two of ours are drawn here in the same row shape, so a person sees one list under a message rather than two. Scrolling belongs to `Conversation`: it holds the bottom and offers a way back, and no hand-written scroll work is allowed to appear here again. The tool never talks to the network — it takes messages as a prop and hands sent ones back out, so polling and cursors stay with whoever owns the storage.
- What it gives you
- Anything that shows a run of messages is the same thing under different names — a chat with a person, a chat with a model, a feed, a bot log, an inbox. Before this tool each of them was built by hand, and the log feed of 77-5 was assembled from list items while the library already sat in the repository. One implementation, three consumers: the block view, the architect layer, and the future messenger.
Package to install: ai, streamdown, use-stick-to-bottom, nanoid
Not used by anything yet — it is here, ready to be taken.