Mixins / foldkit-mixins-ui
Chat
| Widget | What it does | State |
|---|---|---|
ChatMessage | User, assistant, or system message bubble (ChatMessage.group) | Stateless |
MessageScroller | Auto-scrolling role="log" with unread jump button | Small Model / Bundle |
ThinkingIndicator | Polite live status indicator (dots, pulse, shimmer) | Stateless |
ThinkingSteps | Collapsible trace of assistant steps and durations | Application / Bundle |
Questionnaire | Multi-step chat prompt form yielding Answered summary | Small Model |
- ChatMessage. Renders
userbubbles at the inline end andassistantreplies at the start; supportssending/sent/failedstates withonRetry, hover/focusactions, andstreaming: true(aria-busywithtext-wrap: wrap). Render Markdown content withfoldkit-richtext-markdown+foldkit-richtext-dom/view. - ThinkingIndicator. Mount with
active: falsebefore work starts so transitions to active announce cleanly in the polite live region; animations honor reduced motion. - ThinkingSteps. Displays
pending,running,done,failed, orskippedsteps (Option<boolean>openness auto-opens while running and closes on finish;Bundles.ThinkingStepsmanages open step state). - Questionnaire. Composes
single,multiple, andtextQuestionschemas;updatevalidates required answers, focuses missing prompts, and emitsOutMessage.Answered({ answers })before showing the summary.
MessageScroller
The log follows the newest message while the reader is at the end and stops when they scroll up, or when an upward wheel or ArrowUp, PageUp or Home arrives before that scroll. A Ctrl wheel, a wheel over a nested element that can scroll up itself, and a key another handler prevented, with Ctrl, Meta or Alt down, or typed into an input, textarea, select or editable element, do not count. A shorter viewport stays at the end while following. The messages and the text of a streamed answer are the application's.