ChatDrawer is the complete chat panel from @devicai/ui: history, attachments, voice input, a timeline of the tools the assistant used, and per-message feedback.
If you are not writing React, you want the hosted widget instead — configured from the assistant, pasted into your page as a snippet.
Appearance and behaviour
onMessageSent, onMessageReceived, onToolCall, onChatCreated, onError, onOpen, onClose. Passing isOpen puts the drawer in controlled mode, so your own button can open it.
Identifying the user
The drawer takes the tenant and subtenant, either from the provider or per component:Showing what the assistant remembered
For an assistant with memory, the drawer shows a collapsible Recalled memories strip beside the message that brought them in — including while the first answer is still being produced.useDevicChat().recalledMemories. The brain button needs the credential to be allowed on /api/v1/memory/*; without it, leave it off. See Memory.
Letting users connect their own apps
When the assistant offers apps to its tenants, a stack of their logos appears in the header, opening the modal where the user connects their own accounts.The control costs no extra request when there is nothing behind it: the assistant itself reports whether it offers apps, on the call the drawer already makes for its header. Connected apps come first in the stack and unconnected ones are dimmed, so the row doubles as the status.
Polling cadence
While an answer is being produced, the widget asks the API what has been produced so far — once a second by default.Building your own interface
Everything the drawer does is available fromuseDevicChat, so a bespoke interface is not a downgrade:
useAssistantInfo, useModelInterface, useAICommandBar, useAIGenerationButton, usePolling.