Skip to Content
Which part for what

Conversation and code

ChatMessage, Composer, CodeBlock and DiffView.

ChatMessage

The person writes in a bubble, and the assistant writes on the page. Tool steps are rows that expand. The running step glows, and finished steps do not. Decisions are approval cards.

ConversationThe person writes in a bubble; the assistant writes on the page. The approval card at the end decides.
Open the example ↗
Tool step statesOnly the running step glows; its hue is in its text.
Open the example ↗
Pending and decidedThe card's edge stays a hairline in every state: its state is its dot and word.
Open the example ↗

Composer

Composer is the AI input, a contenteditable field.

  • / at the start of a line picks a command.
  • @ adds context.
  • $ adds a skill.

Picked commands, mentions and skills are atomic chips. The value is a list of text and chip segments, ComposerValue. The component only exposes callbacks. It doesn't talk to the network or the microphone. Dictation comes in through TranscriberProvider.

LiveTry “/re”, “look at @use”, “then $re”. Enter sends; Shift+Enter adds a line. The mic cycles through the dictation states.
Open the example ↗
Chips in the inputA value with chips: each one is a single unit. One backspace removes it, the caret never enters it.
Open the example ↗
Dictation with a transcriberUnder a TranscriberProvider the composer and TextArea dictate by themselves: click the mic, or hold Ctrl Shift Space. This one is a pretend transcriber; a real one records from the microphone.
Open the example ↗
Composer in the gallery ↗

CodeBlock

CodeBlock shows code with line numbers and the colours of the syn tokens. The bar shows the file name, with Copy and an optional Apply.

TypeScript, current line and a diagnostic
Open the example ↗

DiffView

DiffView shows a split or unified diff, with changes marked by word, and controls to accept or reject. It takes two strings or a unified patch.

From a pair of stringsTwo lines of context; the gap between hunks is folded. Accept and reject at the top.
Open the example ↗
Edit on GitHub

Last updated on

On this page