Owned MIT fork of DSH's shared /, @ and # autocomplete engine. It preserves the upstream source/controller/menu pipeline and resolves typed @ tokens the way Codex's composer does (src/caret-token.ts, ported from codex-rs/tui/src/bottom_pane/chat_composer/completion_target.rs):
- the token is the whitespace-delimited run the caret touches, on either side of same-line separator whitespace; a line break never gives affinity, and a chip is an atomic boundary;
- the hit spans the whole token, so a pick with the caret mid-token replaces all of it;
- whitespace closes the menu:
@ some sentenceor@dsh trying to select itsearches nothing. A title with spaces is found by one of its words (@deploy) or a quoted phrase (@"fix the deploy); #is a third trigger with the same caret-token rules (an atomic chip, no affinity across a line break), so a source can offer pull requests and issues without a second gesture.#inside a URL stays prose:https://example.com/path#anchoropens nothing.
The backlog's plain text boxes import the same resolver through the @dshfiles/input-trigger/caret-token module, so every composer in the app opens and closes @ (and #) completion on the same rules.
The native Loader row is disabled by this bundle's Cordis patch. Source registrations keep using the inputTriggers service and its existing contract. This is tokenization only, not the separate Host session-query cost, so lookup latency is unchanged. See UPSTREAM.md for provenance and the update policy.
@dshfiles/input-trigger/entity-registry is the one place a plugin makes something mentionable (plan
ade-ux §5 entityProvider). A provider adds one EntityKinds item:
plugin.add(EntityKinds, {
kind: 'backlog',
label: 'Backlog item',
mentionPrefixes: ['b', 'backlog'], // `@b:` / `@backlog:` list only this kind
mentionSource: mentions, // registered with `inputTriggers` here, in registry order
Preview: decorate(BacklogCard), // the body of the one shared reference card
})@groups: input-trigger registers everymentionSourcewith its owninputTriggersservice, so@sources go through the registry.EntityRegistryModel.foreignScope(kinds, kind, query)tells a source that another kind owns the typed scope (mentions' file/thread source uses it instead of a hard-coded list).- References:
@dshfiles/input-trigger/entity-referenceexportsReferencePreviewAnchor, the one hover/focus behavior every kind wraps its chip in: a 160 ms dwell or focus callsEntityPreview.request({ kind, id, range? }, element), leaving or blurring callsEntityPreview.dismiss(), and the shared card waits out its grace before closing so the pointer can move into it. Oneshell.overlaycard ([data-dshfiles-entity-preview="<kind>"]) positions itself under the reference, follows it while the page scrolls, closes when it scrolls away, and draws the kind'sPreview.Decorationsis an optional headless component the overlay keeps mounted (agents uses it to decorate@handlementions from its live agent list). - Draft restore: a trigger source may declare
restore(session, text): the serialized references its own text still names, as spans whoseclipboardTextequals the matched text. The composer'srestoreReferences()asks the per-session controller for every source's spans, drops overlaps, and re-imports the draft with those chips — so a queued message comes back as the chips it was sent with. - Providers today: mentions (files and threads), thread-sidebar (skills), mcp-servers (
@mcp:), backlog (b:), agents (@handle), memory (memory: n:… / t:…). A provider that is not loaded simply contributes nothing.
pnpm test
pnpm typecheck
pnpm build
