description: "Input trigger pipeline for the Web GUI: / and @ detection under the caret, the grouped candidate menu, and pick routing to registered sources; for users and maintainers of slash commands and references."
English | 中文
This package powers the input trigger pipeline of the Web GUI: it detects / and @ typed under the caret, shows a grouped candidate menu, and routes a pick to the registered source. Sources register through ctx.inputTriggers — the / command source (ui-commands), the @ file and session reference sources (ui-reference), and any business package — and the conversation wiring drives the pipeline per session. Typing a trigger seeds every source registered for it; a chrome launcher can also open exactly one source over the current selection. The pipeline is presentation-only: picks produce command claims or reference inserts whose consequences belong to the consuming host and input packages.
Mount this plugin alongside ui-conversation; the menu then appears in the input overlay when the user types a trigger under the caret. Grouped candidates render under title rows; a pick routes to the source, and the consuming surface applies the result — a slash command opens its popup or executes, a reference inserts its inline token.
The composer surface keeps focus while the menu is open: rows pick on mousedown, the highlight rides aria-activedescendant, and a pointer press outside both the menu and the composer card dismisses it. Space and Enter adjudication polls the optional matchSpace/matchEnter hooks in registration order; the first non-undefined answer wins, and a source can refuse a submission it cannot consume whole. Tab acts on the highlighted completion: a candidate declaring drill: true routes through onPick with action: 'drill', while an ordinary candidate settles through action: 'pick'; without a highlight, Tab passes untouched so native focus traversal survives. A drillable row's trailing chevron exposes the same second verb to pointer users. A source implementing the optional header hook additionally publishes crumbs above its group: the pipeline re-polls it on every hit with the live query and whether a drill, rather than typing, produced it, and a crumb pick routes back through onPick with action: 'drill'.
Read these pages when the trigger pipeline is not enough. They move from the pipeline to the sources that register into it and the shell that owns the input.
/ command source into this pipeline and owns the command popup shell.@ file and session reference sources.None, as the trigger pipeline is browser presentation only — picks produce command claims and reference inserts whose model-visible consequences are owned by the consuming host and input-machine packages.
None; this package neither assembles nor sends a provider request.
These limits define the current trigger pipeline. They are current package constraints, not a general menu comparison or a task backlog.
InputTriggerCandidate.icon renders as text — MenuView drops the string into the icon slot verbatim; wiring to the design-system icon enum lands when that enum ships.conversation.input.overlay merge lives here, while ui-conversation owns its anchor, children declaration, and lifecycle because the dependency direction is ui-conversation → ui-input-trigger.Runtime invariant: No companion is published. The trigger pipeline is a browser-side pure core (detect/reduce/match) plus a registry whose disposal is proven by the HMR-safety spec; it emits no cordis events and owns no cross-plugin mutable state.