ChatWindow
The assistant window: its header over the turns, the composer at the foot, and the saved chats coming in beside or over them.
Master
Switch between the docked column and full screen. Change the page the assistant was opened from: the scope row takes its name, and goes when there is nothing to scope to. Pick a suggestion or type to start; open Chats or Playbooks from the options menu, and watch where the panel lands in each size.
Assistant
Get Started
AI can make mistakes, verify important information.
Usage
Use ChatWindow for the assistant beside a screen, or for its full-screen view. It is a blueprint: it composes kit pieces and keeps no state of its own, so the screen decides what is shown. The box runs edge to edge at the foot of the window, with one line over it, rather than sitting in the body as a card of its own. Pass the turns as ChatMessage children, the box as composer, and the saved chats as panel. Before anyone has asked anything the window shows its own Get Started block: the art and the name in the middle, and starters as a stacked list of Buttons against the start edge. onStarter says which one was picked. art is ai-chip for the first open and chat-search for a new chat; artAnimated plays it. empty replaces the whole block when a screen needs something else. autoFocus puts the caret in the box when the window opens, so a keyboard user can type straight away. notice writes the line about the assistant making mistakes: a quiet line at the foot of the turns, right over the box, with a close of its own when onNoticeDismiss is passed. size panel is the 395 column beside the page; size full fills the space it is given and sets the chats beside the conversation instead of over it; inside AppShell, pair it with assistantSize full. The header props go straight to the kit ChatHeader. See contracts/chatwindow.json for the full contract. On a phone-width frame the panel gives up its 395 column and takes the whole width, since the assistant stands in for the page there rather than sitting beside it.
Do's
- The assistant docked beside a product screen.
- The assistant's full-screen view, with the saved chats beside it.
Don'ts
- Do not add state to it; it is a blueprint. Keep the view, the turns and the panel in the screen.
- Do not build the header, the turns or the box inside it. Pass the kit pieces.
- Do not build the Get Started block from EmptyState, Illustration and Buttons in the screen. Pass starters and art.
- Do not use it as an overlay dialog. Use Drawer or Modal.
- Do not invent a second assistant layout beside it.
- Do not use raw hex.
<ChatWindow size="panel" />