Introduction¶
When referencing files or directories in the current session workspace in DSH’s Composer, you usually need to manually enter the path or use copy and paste. The dsh-at-mention plugin triggers a @ symbol in the input box, directly providing fuzzy search and completion for files and directories, simulating the interaction experience of Claude Code / Codex Desktop.
Plugin Overview¶
Name: dsh-at-mention
Positioning: DSH profile bundle
Core value: Adds @-file mentions to Composer, providing prioritized fuzzy search and keyboard completion.
Maintainer: ShiraGawaAnri
License: MIT
Core Features¶
This plugin focuses on indexing files and directories within the current session workspace and provides the following capabilities:
-
Current session workspace scope
The search scope is limited to theheader.cwddirectory of the current session and its subdirectories. When switching workspaces, the index switches automatically (an LRU cache manages up to 3 workspaces, so no rescanning is required). -
Prioritized fuzzy search
The sorting priority for search results is as follows:- Exact match
- Name prefix
- Name substring
- Path prefix
- Path substring
- Fuzzy subsequence
Matches in shallower directories and with shorter paths are ranked higher.
-
Keyboard navigation
↑/↓: Move the cursor to select a candidateTab/Enter: Confirm the selectionEsc: Close the menu
Note: TheTabkey is also consumed when there are no matches, ensuring that focus does not jump away unintentionally.
-
Space-separated consecutive mentions
Supports the syntax@a @b(two independent mentions) and@a@b(a single token), consistent with the built-in trigger rules. -
Plain-text mentions
Selected files are inserted as plain text (for example,@relative/path). The text can be copied or edited later, and remains portable across Linux and Windows as plain text. -
Full-path tooltip
When a candidate’s text is truncated, hovering displays the full absolute path and relative path. -
Persistent settings
In Settings -> @ Mentions, you can configure the enable state, maximum result count, inserted path style, fuzzy search / case sensitivity / include directories / trailing space options, excluded directories, index file limit, automatic refresh interval, as well as a manual index rebuild button and real-time index status. -
Cross-platform indexing
- Linux / WSL / macOS: Uses the
findcommand for fast indexing. - Windows: When
findis unavailable, uses a purereaddirfallback.
The default excluded directories include.git,.godot,.import,node_modules,.codegraph,.kimi-code(customizable).
- Linux / WSL / macOS: Uses the
Installation & Enablement¶
Installing this plugin requires an available DSH installation environment (dsh web) and pnpm in your PATH (dsh plugin forwards to pnpm).
dsh plugin --profile web add ./dsh-at-mention
The install command runs pnpm and appends the plugin’s cordis.patch.yml to the profile’s patch stack. After installation, restart the Web application (client packages and routes are bound at startup).
To remove it:
dsh plugin --profile web remove @dsh-external/dsh-at-mention
Typical Usage¶
Type @ in the Composer input box to open the prioritized fuzzy search menu.
- Use the
↑and↓keys to move through the list. - Press
TaborEnterto select a file and insert the mention text. - Press
Escto close the menu.
Mention syntax examples:
* @a @b: Represents two independent mentions
* @a@b: Represents a single token
Configuration & API¶
The plugin’s configuration and status are managed through the following same-origin API routes:
GET /_dsh/at-mention/api?q=&sessionId=&root=: Performs fuzzy search over the current session workspace index.GET /_dsh/at-mention/api/settings: Retrieves the current settings snapshot.POST /_dsh/at-mention/api/settings: Saves settings (parameter format:{ action: 'save', value: {...} }).GET /_dsh/at-mention/api/status: Queries index status (root directory, count, build time, error messages).POST /_dsh/at-mention/api/rebuild: Rebuilds the index for the current workspace.
POST routes reject cross-site requests (CSRF).
Notes¶
- The plugin runs with the current DSH process permissions; please review the source code and license before installing.
- The inserted mention text is plain text (
@relative/path). During a session, the model resolves it as a file reference in the current workspace, and relative paths remain compatible between Linux and Windows. - While the mention menu is open, the built-in
/command menu remains unaffected, but the built-in@trigger menu is hidden (both share the@trigger).
Conclusion¶
dsh-at-mention optimizes the workflow for referencing local files in DSH Composer by providing prioritized fuzzy search, keyboard completion, and plain-text referencing. This aligns with DSH’s “everything is a plugin” ecosystem philosophy.