Skip to content

hucj09/dsh-file-mention

30Last commit Aug 15, 2026

dsh-file-mention DSH plugin

This plugin adds a file mention feature to the DSH Web GUI chat input. When you type '@', it shows a real-time filtered list of workspace files, driven by git tracking and optional .aiinclude rules. It integrates seamlessly with the existing input triggers mechanism, enabling you to reference files directly in prompts.

How to install the dsh-file-mention DSH plugin

dsh plugin --profile web add @hucj/dsh-file-mention

Copying does not run this command. Review the repository and version before installing the dsh-file-mention DSH plugin.

dsh-file-mention DSH plugin data source

dsh-file-mention DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-file-mention DSH plugin can do

  • @ trigger with real-time filtering by filename or path (case-insensitive, up to 30 items)
  • Git-aware file listing: tracked files + untracked non-ignored files; deleted files auto-hidden
  • `.aiinclude` configuration to re-include gitignored files (e.g., docs/, build artifacts)
  • Directory referencing: select a directory to insert @path/ and let the model explore its contents
  • Smart caching with stale-while-revalidate (30s client TTL, hierarchical host caches)
  • Fallback mode when git is unavailable: uses .gitignore parsing and full scan

Where the dsh-file-mention DSH plugin fits

  • Quickly reference a specific source file while discussing code with the AI model
  • Include newly created files that haven't been `git add` yet into the AI context
  • Reach documentation or generated files that are normally gitignored (via .aiinclude)
  • Refer to an entire directory structure for the model to explore relevant files

Who the dsh-file-mention DSH plugin is for

  • Developers using DSH Web GUI to interact with AI models on project codebases
  • Teams that want to share project files (including untracked or ignored ones) with AI assistants

dsh-file-mention DSH plugin limitations

  • Only works in DSH Web GUI (not in CLI or other interfaces)
  • Requires a git repository for best performance; fallback mode is slower and less accurate
  • File list capped at 10,000 items and traversal depth 32 to avoid performance issues
  • Heavy directories like `node_modules` are skipped by default (unless explicitly added via .aiinclude)

dsh-file-mention DSH plugin: from the repository README

Quoted from the hucj09/dsh-file-mention README, the upstream source of the dsh-file-mention DSH plugin. Copyright remains with the original authors.

DSH(DeepSeek Harness)Web GUI 的 **`@` 关联工作区文件**插件:在聊天输入框输入 `@`,按输入字符实时过滤并选择工作区文件,选中后插入 `@相对路径`,模型即可直接读取该文件——类似 Codex CLI / Claude Code CLI 的 `@file` 引用体验。 > npm 包名 `@hucj/dsh-file-mention`(个人 scoped 包);插件组合行 id 为 `file-mention`。 - **git 驱动过滤**:跟踪文件 + 未跟踪且未被忽略的新文件(新建文件无需 `git add` 即可 @ 引用);天然遵守 `.gitignore`,编译产物自动排除 - **`.aiinclude` 重新纳入**:被忽略、但 AI 需要访问的文件(如项目文档)可显式加回扫描范围 - **零外部依赖**:Host/Client 双端均为纯手写代码 + 手写构建脚本 ## 功能特性 | 特性 | 说明 | |------|------| | `@` 输入触发 | 与技能 `/` 菜单、`@pluginId`、`@子代理` 同一套 `inputTriggers` 机制,多源并存 | | 实时过滤 | 按文件名或完整路径匹配(大小写不敏感),最多展示 30 条(渲染性能取舍) | | 类型图标 | 按扩展名区分 4 类图标:⌨️ 代码 / 📝 文档 / 🖼️ 图片 / 📄 其他;目录显示 📁 | | 目录引用 | 目录由文件列表自动派生(零额外扫描),可 @ 选中并插入 `@docs/ ` 供模型探索目录内容;**逐级展开**——`@app` 顶层、`@app/` 第二层、`@app/src/` 再进一层;**单段查询直达子目录**(`@10_logcat_analyze` 直接命中 `docs/10_logcat_analyze/`,无需输完整路径) | | 菜单适配 | 候选菜单加宽至 720px(官方默认 537px)+ 行字号 14→13px + 行高压缩(40→32px,同屏 +25% 行数)(高特异性选择器覆盖官方 CSS,仅影响 `@` 候选菜单) | | 命中排序 | **精确匹配**(路径/basename 全等)→ **前缀匹配** → 子串匹配(组内再按变更优先 + 字母序) | | 默认排序 | **最近修改/新增的变更文件置顶(上限 5 个,按修改时间降序)** → 📁 目录(字母序)→ 其余变更 + 普通文件(字母序)→ 隐藏路径 | | git 跟踪过滤 | `git ls-files -c` 跟踪文件 ∪ `-o --exclude-standard` 未跟踪非忽略文件;新建文件自动出现,编译产物不进来 | | 删除/重命名 | 已删除文件自动隐藏(`git

Read the full READMERepository license: MIT

dsh-file-mention DSH plugin questions

How do I install @hucj/dsh-file-mention?

Run `dsh plugin --profile web add @hucj/dsh-file-mention` in your terminal. Then restart DSH web and force refresh your browser with Ctrl+F5. After that, typing '@' in the chat input should show the file menu.

Why can't I see some files when I type '@'?

The plugin only shows files tracked by git or untracked files that are not gitignored. If a file is in .gitignore, it won't appear unless you add it to an `.aiinclude` file in your workspace root. Also, the list is capped at 10,000 items and traversal depth 32.

How do I configure the .aiinclude file?

Create a file named `.aiinclude` in your workspace root. Use the same syntax as .gitignore (e.g., `doc/` to include a directory, `*.log` to include all log files). Changes take effect within about 90 seconds due to caching.

Can I reference a directory instead of a file?

Yes. The plugin automatically derives directory entries from the file list. You can type `@dir/` to insert the directory path, and the model can then explore its contents. Nested directories are supported with single-segment queries.

How do I uninstall this plugin?

Run `dsh plugin --profile web remove @hucj/dsh-file-mention`. This removes the dependency, the bundle line, and the package directory. Then restart DSH web to complete the removal.