How to use dsh-at-file
Adds a Codex-style `@` file selector to DSH Web: after selecting a path, only injects an existence reference to the model without reading file
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
dsh-at-file
— source: plugin_wiki.wiki_content
Install & verify
dsh plugin --profile web add github:omdsh-dev/dsh-at-file
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
Key points
- Global contains rules shared by every workspace.
- Workspace contains additional rules for the selected workspace path. Each workspace keeps its own list, and the panel shows the global rules it inherits.
- Exact matches one complete basename. Path separators are not accepted.
- Regex runs a JavaScript regular expression against the complete basename. It does not receive the parent directory or workspace path.
- Case-sensitive can be enabled independently for any Exact or Regex rule. It is off by default.
— source: plugin_wiki.readme_en (fallback readme_raw)
FAQ
Will pasted @ paths be recognized?
No by default. The plugin marks pasted @ with a U+2060 invisible character and has "Ignore @ mentions in pasted text" checked by default in Settings → File mentions; to restore the old behavior, just uncheck it (README.md:25 / src/paste.ts:7).
Will the plugin send file contents to the model?
No. The plugin only scans for @path in the message body, verifies the path exists in the current workspace, then injects a small message containing only the path and type <workspace-reference path="…" kind="file|directory" /> into the prompt; the agent reads the file content itself using tools like read / read_image in the current session (src/mention.ts:1-8 / README.md:23).
Can I reference files outside the workspace?
No. The Host directly rejects absolute paths and relative paths that escape the cwd at src/mention.ts:69-74 (using path.relative to detect and discard out-of-bounds), so out-of-bounds tokens remain as plain text.
How do I filter out files I don't want in the selector?
Go to Settings → File mentions: the Global list is the base shared across all workspaces, the Workspace list contains additional rules for the current workspace; each rule can independently choose Exact/Regex and case sensitivity, saving will error if Regex is malformed and the Host will also reject it (README.md:60-66 / src/contract.ts:66-79).
Will large workspace indexing freeze?
Default maxIndexedFiles=5000, walk uses opendir streaming one entry at a time and doesn't follow symlinks; when exceeded it stops immediately and returns truncated=true; users can also adjust the limit to 10000 or other values in cordis.patch.yml (src/files.ts:99-158 / src/index.ts:52).
What about PDFs?
The selector treats PDFs as regular path entries with no special handling; whether the model can read PDFs depends on the agent tools mounted in the current session (DSH provides read for UTF-8 text, read_image for supported images, PDFs need additional tools), this is the boundary documented in README.md:98.
How do I upgrade to a new version?
Just re-run the same installation command (README.md:49 emphasizes update=reinstall), then restart dsh web, making sure both Host and browser load the new version; the built artifacts in lib/ are committed to the repo, no need to build from source.
Is the path index recalculated on every input?
No. The client caches the index for 30 seconds per session (src/client/source.ts:34 INDEX_TTL_MS), the Host caches by cwd; filter changes or connection resets clear the cache.
— source: plugin_wiki.faq_json
Compatibility
- DSH: 未声明
- Node: 未声明
- Platforms: macOS, Windows, Linux
— source: plugin_wiki.compatibility_json
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule