Like Codex/Claude Code: drag any file or folder (no format limit) onto the DSH web page and its real absolute path is inserted into the composer instantly — no typing paths by hand. Workspace-first smart lookup, size checks, same-name picker, batch and clipboard paste support, Windows/macOS.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Rudyy898/dsh-drag-path
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
dsh-drag-path
拖拽工程文件/文件夹进 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.
这是什么 / What is this
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.
特性 / Features
- 📁 文件 & 文件夹都支持 — 拖
.swift/.xlsx/.ipa/ 目录… 都行 - 🎯 真实绝对路径 — 不是上传副本,Agent 操作的就是你的原文件
- 🔍 智能定位 — 优先当前工作区,再常见目录(Downloads/Desktop/Documents/Home),
find精确名匹配 +mdfind补充 + 大小校验 - 📍 就近适配 — 批量拖入的同目录文件,用前一个已定位路径作线索,秒级命中
- 🧩 同名多候选弹选择器 —
README.md这种全盘同名文件,弹出候选列表让你点选(工作区内项高亮) - 📋 支持粘贴文件 — 复制文件后 Ctrl+V 也能插入路径
- 🖼️ 图片不受影响 — 图片拖拽照常走官方流程
- 🔄 批量拖入 — 一次拖多个文件,逐个定位插入,换行分隔
- 👁️ 拖拽视觉反馈 — 拖文件到窗口时显示「松开以插入文件路径」提示条
安装 / Install
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).
使用 / Usage
直接从 Finder/资源管理器把文件或文件夹拖到 DSH 页面任意位置:
- 唯一命中 → 绝对路径直接插入输入框:
/Users/you/Downloads/project.xlsx - 同名多候选 → 弹出选择器,点选正确的路径
- 找不到 → 插入文件名(控制台有提示)
Drag any file or folder onto the DSH page:
- Unique hit → absolute path inserted:
/Users/you/Downloads/project.xlsx - Name collision → a picker lists the candidates, click the right one
- Not found → filename inserted (console logs the reason)
原理 / How it works
浏览器拖拽 / 粘贴文件(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.
目录结构 / Structure
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
平台支持 / Platforms
- 🍎 macOS —
find精确名匹配 +mdfind(Spotlight) 补充 - 🪟 Windows — PowerShell
Get-ChildItem递归 +where全局;支持中文目录名(下载/桌面/文档) - 搜索顺序:当前工作区 → 平台常见目录(下载/桌面/文档)→ 全局兜底
配置 / Configuration
无需配置。所有行为开箱即用。
No configuration needed.
许可证 / License
Made with ❤️ for the DSH community.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 8978
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 8978
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 5292
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
ccch1mneyyy/dsh-TUI★ 4819
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
omdsh-dev/DSH-better-sidebar★ 4290
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
Devin-AXIS/deepseek-design#deepseek-idesign★ 1478
Visual design studio for websites, app prototypes, posters, cards, reports, and magazines, with templates, direct element editing, selection-aware AI draft handoff, and export.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.