Fired BEFORE the Skills button opens the dropdown. Flip Cancel to veto — a host gating
skills by entitlement, or surfacing them elsewhere, blocks it here.
A pair rather than a lone emitter because this is an ACTION a host might reasonably refuse
(UI_LAYERING_GUIDE section 6, rule 1). Handlers must be synchronous; Cancel travels back
through EventEmitter's synchronous dispatch.
Composer lost focus — hosts persist drafts on this.
Whether a voice session can be started right now (mic Disabled when false).
OptionalCurrentMaster switch for all mention/command triggers (pass-through to the mention editor).
Shows the in-composer Plan Mode toggle button when true.
Shows the in-composer mic button when true.
Shows the in-composer Skills button when true.
Gated separately from EnableMentions because a host can have the / trigger active and
still not want the button — but the common case is that a composer offering skill commands
should advertise them, since / is otherwise invisible.
Discovery-mode filter: provider Keys to skip (pass-through to the mention editor).
OptionalMentionCurrent Plan Mode toggle state (renders the button in its active state).
Emitted when the user clicks the in-composer Plan Mode toggle button.
Optional metadata provider scoping this composer (pass-through to the mention editor).
What the send slot is doing; see SendSlotMode. The box never decides this itself.
An elapsed time shown after StatusText, e.g. "41s". Separate from the text so it is kept out of the live region (a ticking clock must not be announced every second) and dropped on narrow screens.
A status line rendered bottom-left inside the box while non-null, e.g. "Sage is working". It is a polite live region, so a change is announced once; keep it short.
Fired when the send slot is clicked in stop mode. The box only reports the click; what is
stopped, and how, is the host's business (this widget knows nothing about agents or runs).
How many things a stop would stop. Above 1 in stop mode the slot reads "Stop all" with this count.
Tooltip and accessible name of the slot in stop mode, e.g. "Stop Sage" or "Stop all 2 runs".
Explicit trigger-provider list (pass-through to the mention editor; explicit list wins over discovery).
Whether a realtime voice session is currently active (mic renders in its active state).
Emitted when the user clicks the small caret next to the phone button — the host opens the voice agent/model picker so call options (which agent, which voice model) stay reachable without adding friction to the plain phone click's instant-start path.
Emitted when the user clicks the mic button to start/stop a voice session.
True when the slot reads "Stop all": stop mode with more than one thing to stop.
Use MentionEditor.
The slot's disabled state per mode: Send follows CanSend; Stop is always live; Stopping waits.
The slot's tooltip and accessible name per mode.
True while the skill dropdown is open, driving the button's expanded state.
Note the ARIA differs from Plan Mode next to it, deliberately: Plan Mode is a toggle BUTTON
(a mode that stays on), so aria-pressed is right there. This one opens a popup, so it is
aria-expanded + aria-haspopup. Using aria-pressed here would have a screen reader
announce "pressed" for something that actually just revealed a list.
DERIVED, not an @Input, and this is the difference from Plan Mode. Plan Mode's active state is a persisted user preference the host owns and threads down. "Is the skill dropdown open" is intrinsic to this composer, so an
Add an artifact as a pending attachment (called by parent after artifact selection)
Use Focus.
Focus with the caret at the end of content (see MentionEditorComponent.FocusCaretAtEnd).
Get pending attachments from the editor
Inserts a resolved mention chip + space and focuses (see MentionEditorComponent.InsertMention).
Handle attachment click from MentionEditorComponent
Handle attachment errors from MentionEditorComponent
Handle attachment changes from MentionEditorComponent
Handle clicks on the container - focus the mention editor Only moves cursor to end if clicking outside the contentEditable area
Handle Enter key from MentionEditorComponent Extracts plain text with JSON-encoded mentions for message submission
Handle mention selection from MentionEditorComponent
Send the message Extracts plain text with JSON-encoded mentions for proper persistence
The slot's click: a stop request in stop mode, a send in send mode, nothing while stopping.
NOTE: the template pairs this with
(mousedown)="$event.preventDefault(); $event.stopPropagation()", and BOTH halves are
load-bearing.
preventDefault — a
stopPropagation — the editor's click-away listener is on document:mousedown and exempts only
presses inside the EDITOR's host. This button is a sibling of <mj-mention-editor>, so a press
on it read as an outside press: mousedown closed the dropdown, then click saw SkillsActive
already false and reopened it. The menu blinked, could not be dismissed by the button that
opened it, and the Before/After pair fired on every click — the exact over-counting the toggle
branch below exists to prevent. Stopping propagation states that this press belongs to the
dropdown machinery.
Optionalevent: EventHandle Value changes from MentionEditorComponent
Open file picker programmatically
Fired AFTER the dropdown actually opened. Not emitted on the canceled path, and not emitted when no active provider owns the trigger — so a host counting this counts dropdowns the user saw, rather than clicks.