dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
像 Codex/Claude 一样:拖入任意格式文件或文件夹,真实绝对路径立即插入输入框,不用一个个打字。工作区优先智能定位、大小校验、同名弹候选选择器,支持批量拖入与粘贴,兼容 Windows/macOS。
拖拽工程文件/文件夹进 DeepSeek Harness,自动定位真实绝对路径插入输入框
Drag non-image files & folders into DeepSeek Harness web — real absolute paths land in your composer, no more "only images allowed".
✨ 像 Codex / Claude Code 一样——拖入任意格式的文件或文件夹,路径直接进输入框,不用一个个打字,Agent 立刻知道你在说哪个文件,开发效率拉满。
Like Codex / Claude Code: drag in any file or folder (no format limit), the path lands in your composer instantly — no more typing paths by hand.
DSH 官方输入框的拖拽只接受图片(PNG/JPG/WebP/GIF),拖入工程文件会弹「仅支持 PNG、JPG、WebP、GIF 格式的图片」,让你完全没法把代码、文档、配置文件拖给 Agent 看。
本插件解决这个问题:拖入任意非图片文件或文件夹,自动定位它的真实绝对路径并插入输入框——Agent 直接就能读写原文件,像 Codex 一样顺畅。
The stock DSH composer only accepts image drags. This plugin intercepts non-image drags, locates the file's real absolute path on disk, and inserts it into the composer — so the agent can read and write the original file, just like Codex.
.swift / .xlsx / .ipa / 目录… 都行find 精确名匹配 + mdfind 补充 + 大小校验README.md 这种全盘同名文件,弹出候选列表让你点选(工作区内项高亮)dsh plugin --profile web add https://github.com/Rudyy898/dsh-drag-path
或从市场安装(若已收录)。重启 dsh web,刷新浏览器(⌘⇧R)即可生效。
Or install from the plugin market once listed. Restart dsh web and hard-refresh the browser (⌘⇧R).
直接从 Finder/资源管理器把文件或文件夹拖到 DSH 页面任意位置:
/Users/you/Downloads/project.xlsxDrag any file or folder onto the DSH page:
/Users/you/Downloads/project.xlsx浏览器拖拽 / 粘贴文件(File 对象:只有 name/size,没有路径)
│
▼
client capture 阶段拦截(官方 toast 被阻断,蒙版手动复位)
│ POST /api/drag-path/locate { fileName, sizeBytes, sessionId, hintPath }
▼
host 定位:会话工作区优先 → 常见目录 → Home;find 精确匹配 + mdfind 补充
│ 就近适配:hintPath 同目录优先;目录直接采用 / 文件按大小校验
▼
唯一命中 → 插入绝对路径;多候选 → 弹选择器;无结果 → 文件名
为什么拿不到路径:浏览器安全沙箱只暴露
File对象(name/size/type),不提供绝对路径——任何网页插件都无法直接从拖拽事件读取路径。本插件通过 host 端(Node)按文件名+大小在文件系统里定位,绕开了这个限制。
Why no path from the browser: the web sandbox only exposes
File(name/size/type) — no absolute path is available to any web plugin. This plugin locates the file on the filesystem from the host side (Node) by name + size.
dsh-drag-path/
├── package.json # dsh.bundle + dsh.client 声明
├── cordis.patch.yml # 插件装载补丁
├── lib/
│ ├── index.js # host:/api/drag-path/locate 路由
│ ├── locate.js # find + mdfind 定位逻辑
│ └── client.js # 浏览器端 capture 拦截 + 候选选择器
└── README.md
find 精确名匹配 + mdfind(Spotlight) 补充Get-ChildItem 递归 + where 全局;支持中文目录名(下载/桌面/文档)无需配置。所有行为开箱即用。
No configuration needed.
Made with ❤️ for the DSH community.