Assistant
Slant / Components
A chat with an assistant: its reasoning shimmers while it thinks, then folds away as the answer lands. Some answers ask to run a command or ask questions first, and `@` and `/` open menus as you type.
The theme follows the link: share a page with ?theme=moon.
Usage
- A
ThreadofMessages over aPromptInput, whose toolbar holdsPromptInput.Attachand aPromptInput.Modelsmenu (Fast, Balanced, Deep). - Each answer opens with a
Reasoningthat thinks for about a second, then folds itself and says how long it took. Some answers carry aCodeBlockor aSourceslist of Slant docs pages; each has copy, retry and rate under it. - While a reply is on its way, Send turns into Stop, which cancels it. Retry writes the latest answer again in place; stopping a retry keeps the answer it was replacing.
- One answer asks to run a command through an
AgentApprovalinside itsMessage. Allow once runs it as anAgentTaskwhose nestedsubtasksfinish after a moment; Allow always does the same and lets later commands run without asking; Reject leaves aMarker("Command rejected"). - Another asks two
AgentQuestions, one choice recommended and an Other field for your own words. Sent, they turn into a summary, and the next answer is built from them: it asks to run the tests they describe. - The
PromptInputhastriggers:@mentions a person or a file as a chip, which the answer names, and/at the start picks/review,/testor/explain, whose answers come out of turn. - An answer whose request you answered keeps it, so it has no Retry. Switching model leaves a
Marker("Switched to Deep"). Attached files are listed above the field and on the sent message, never uploaded.
Keyboard
| Enter | sends the draft |
| Shift + Enter | adds a line; the field grows to five lines, then scrolls |
| @ or / | opens the mention or the command menu while the field keeps focus; `/` only at the start of the draft |
| ↑ / ↓ | moves through the open mention or command menu, or between the models in the open model menu |
| Enter / Tab | in an open mention or command menu, picks the active choice (Enter sends nothing then) |
| Escape | in the field, closes an open mention or command menu, else stops a reply on its way |
| Enter | in an approval card, anywhere but a button, allows the command once |
| Escape | in an approval card, rejects the command |
| ↑ / ↓ / ← / → | moves between a question's choices |
| Enter | in a question's Other field, sends the answers |
| Tab | reaches the toggles, the copy, retry and rate buttons, the cards' buttons and choices, and the composer's controls |
| Enter / Space | opens a toggle or presses a button |
Accessibility
- The thread is a polite
log, so answers and markers are read as they arrive. - The reasoning and sources toggles are buttons with
aria-expanded; when thinking ends, how long it took is announced. - Copy, Retry and the rate buttons are named icon buttons in a group named "Message actions"; the rate buttons are toggles with
aria-pressed. - Send and Stop are one button, so focus stays on it as it changes; after Stop or Retry, focus goes to the field.
- The approval card is a group named by its title, with the command in a scrollable "Request details" group. The decision replaces the buttons and is announced, and focus on a pressed button moves to the card.
- The task reads its status after its title and announces when it is done; its subtasks are a nested list under a toggle that counts them.
- Each question is a radio group named by the question; the Recommended badge is part of its choice's name. Missing answers show under their question, are announced, and the first one takes focus; once sent, focus moves to the summary and "Answers sent" is announced.
- While a mention or command menu is open, the field points at it with
aria-controlsandaria-activedescendant; the number of matches and each chip added are announced.
Assistant in React and SwiftUI.
The React tab is the component’s real source; the SwiftUI tab is its twin in TUTTNKit.