For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.1/en/components/agent-composer.md.
Task Composer turns an instruction, file context, source selections, skills, run settings, and follow-up messages into one recoverable submission. The primary input is always backed by TipTap. A plain textarea cannot reliably support Markdown, structured triggers, composition input, selection, and controlled drafts, so it is not part of the production contract.
The composer answers four questions: what should happen, which resources may be used, which run settings apply, and whether the instruction sends now or joins the queue. Uploads, model transport, authorization, and persistence remain host responsibilities.
Enter submits and Shift + Enter inserts a line break. Never intercept Enter during IME composition.
@ opens the workspace tree, $ opens skills, and / opens built-in commands. Suggestions use a listbox or tree while focus remains in the editor through aria-activedescendant.
Files and directories can arrive through a picker or drag and drop. Every resource keeps a stable identifier, visible type, and remove action.
Running states distinguish send, queue, stop, and unavailable actions with text, not an icon swap alone.
Failed submissions preserve Markdown, selection, resources, settings, and focus, then name a concrete recovery action.
When the editor also needs a drop hint, validation message, or other host-owned
content, wrap the input with data-composer-editor. Intermediate wrappers stay
shrinkable, and long unbroken text scrolls inside the input instead of widening
the workbench:
<form class="agent-composer" aria-label="Message the coding agent"> <section class="agent-composer-editor" data-composer-editor> <p data-composer-editor-message role="status">Drop a workspace file here</p> <div> <textarea data-composer-input name="prompt" aria-label="Instruction" placeholder="Describe the task to complete…" ></textarea> </div> </section></form>
Update submitting, streaming, stopping, offline, or error state
setError(message)
Preserve the draft while presenting a recoverable error
runAction(action, options)
Run a host action after its cancelable authorization event
Important events include a3s:composer-before-submit, a3s:composer-submit, a3s:composer-draft-change, a3s:composer-trigger-change, a3s:composer-before-action, a3s:composer-action, and a3s:composer-queue-action.
Validate IME composition, undo and redo, long Markdown, empty drafts, focus restoration, keyboard suggestions, directory drops, resource deduplication, repeated stop attempts, offline recovery, queue editing, and 320px layouts. A test that proves only typing and submission is not enough for a production task workspace.