description: "Web @file and @session reference source for the composer: candidates, ordering, and atomic inline references (unified file/session picking)."
English | 中文
Use dsh-client-ui-reference when Web users need to mention files, folders, or sessions from one @ completion menu. It lists files before sessions and keeps either group available when the other cannot load. Picking a file, folder, or session inserts an atomic reference with a stable clipboard form; folder rows also let users descend without closing completion. File rows omit redundant root locations, and session rows show a workspace only when it differs from the current one. Session mentions are validated before model context is captured, while browsing candidates has no model effect.
The source is active whenever the composition mounts this package and a Host ctx.fileReferences provider is available. Type @ followed by an unquoted token to see files first, then sessions; open @"… to search files only. The candidate list is a completion menu, not a search result page: pick once and keep typing.
A file closes completion as an atomic inline reference displayed with a file glyph and business-color filename. A directory row carries two verbs: the settling pick (row click or Enter) resolves the folder itself as the same kind of atomic reference — folder glyph, trailing-slash label, canonical @dir/ mention as its serialized form — while the drill action (Tab or the row's chevron) keeps plain editable path text with a folder glyph and the menu active at its trailing slash, so you can descend another level. Paths containing whitespace use @"path with spaces", and a quote the user opened explicitly remains quoted.
A session pick inserts an atomic inline reference whose hidden ref and clipboard representation is the canonical @[label](dsh-session:…) mention returned by the Host; its visible form is a chat-bubble glyph plus the session title. Sending carries the mention through session.prompt, and the session-reference service validates it and captures model context at agent/pre-step.
One unavailable or failed candidate domain yields no rows for that domain while the other still lists. A session-reference preparation failure occurs after prompt acceptance and terminates that agent turn.
These pages cover the suggestion machinery, the reference seams, and the input pipeline.
@file seam and its provider contract.@session seam and prepared snapshot semantics.Indirectly, through Host-owned providers, which own the file guidance and session snapshot preparation this package's reference selection delegates to them.
Candidate browsing has no model effect. A selected file or session changes only the new user-message suffix and any Host-prepared session-reference context that follows that message; earlier target history remains unchanged.
These limits define when the reference source cannot help; they are current package constraints.
ctx.fileReferences provider; the browser cannot fall back to its own filesystem.ctx.sessionReferenceResolver; message bodies and full transcripts are not searched.Runtime invariant: No companion is published. A single slash-source registration whose disposal is proven by the HMR-safety spec — it emits no cordis events and owns no cross-plugin mutable state.