One composer built from small parts: input, model, effort, permission, context, top tray and bottom tray.
Type and press Enter to send, Shift + Enter for a new line. While the agent writes, Enter steers the message into the current run and Command + Enter adds it to the queue strip. With an empty input the send button becomes Stop. Click it to see a spinner until the run has stopped.
Options for the assembled component.
placeholder*stringHint shown in the empty input.
onSubmit*(submission: Submission) => void | Promise<void>Called with text, attachments, model, permission and busy mode. A rejected promise keeps the input and shows the error.
valuestringControlled text. Pair with onValueChange.
busybooleanThe agent run is still going.
busyPolicy"block""queue""steerable"What Enter does while busy. Steerable steers on Enter and queues on Command + Enter. Defaults to block.
onStop() => void | Promise<void>Turns the send button into Stop when busy and empty. A returned promise keeps the button in its stopping state until it settles.
modelModelControlCatalog, selection and change handler. Shows the model and effort pickers.
permissionPermissionControlCurrent mode, change handler and allowed modes.
attachAttachControlShows the attach button. Accepts an accept filter.
stripsStrip[]Queue, goal, changes or usage strips above the card.
contextContextControlWindow size and token segments. Shows the token ring and breakdown.
trayTrayControlDirectory, repo, branch and host pickers below the card.
density"regular""compact"Compact fits side panels.
composer/prompt-composer.tsxAssembles the parts. Holds text, attachments, busy mode and errors, and builds one submission.
composer/parts/prompt-input.tsxCard frame, auto-growing textarea, the Enter rule and header, start and end slots.
composer/parts/send-button.tsxSend, steer or stop. Morphs between arrow, stop and spinner. A split menu adds Add to queue while a run is busy.
composer/parts/attach-button.tsxPicks files and lists them above the input.
composer/parts/permission-picker.tsxAsk, Edit, Auto or Bypass for tool calls.
composer/parts/model-picker.tsxSearchable model list with context, price bar and a detail footer.
composer/parts/effort-picker.tsxEffort levels the chosen model supports. Hidden when there is only one.
composer/parts/context-usage.tsxToken ring that opens the context breakdown on hover.
composer/parts/strips/top-tray.tsxShows the top strip by priority: queue, goal, changes, usage.
composer/parts/bottom-tray.tsxDirectory, repo and branch on the left, host and status on the right.
components/ui/base/Popover, Menu, Combobox and Tooltip adapted from shadcn Base UI sources.
Ported from the agent-builder prompt composer.