dannyvan/dsh-file-drop

Project Overview项目介绍

This repository is dannyvan/dsh-file-drop, a native plugin built exclusively for DeepSeek Harness that enables uploads of non-image files like PDFs, Word documents, Excel spreadsheets, ZIP archives, and plain text files. Once a file is uploaded or dragged in, the plugin writes the full file path directly to the input box draft so the DSH agent can read it immediately. It offers three different interaction entry points for users: dragging files anywhere on the DSH window, clicking the paperclip button on the left side of the input bar’s tool row, or hovering the input area to trigger the prompt bubble. The plugin intercepts drag events during the window capture phase, before DSH’s default image-only drag processing runs, so it avoids the common “unsupported non-image format” error.

The plugin follows a clear priority order for retrieving file paths, starting with the highest priority option that works with the custom DSH Electron desktop shell. Through window.dshDesktop, it pulls the original file path directly from your system file manager without any file upload needed. The second option captures the existing text/uri-list path from the drag event, which works for common use cases like dragging a note directly from Obsidian. As a fallback for browsers or environments without the desktop shell, the plugin saves the uploaded file to the .dsh-drops/ directory in the current session workspace and returns the relative workspace path. Text-based files are written directly as content, while binary files are decoded to raw bytes for storage.

The dsh-file-drop plugin is released under the permissive MIT open source license, and currently has 4 stars on GitHub. It has a 25MB size limit per file for the fallback upload path, but files retrieved via the desktop shell direct path method do not have this size restriction. If the original file path is outside the current workspace, the agent needs explicit sandbox permission to read the file, so users must configure workspace-write permissions ahead of time. To install the plugin, users run the DSH CLI command dsh plugin --profile web add "local-plugin-path", then restart the DSH web service for the changes to take effect.

dannyvan/dsh-file-drop 是一款专为 DeepSeek Harness 开发的原生插件,核心功能是支持拖拽或点击上传非图片类文件,包括 PDF、Word、Excel、ZIP、各类文本文件等,上传后会将文件路径直接写入输入框草稿供 agent 读取。插件提供三个交互入口:拖拽文件到窗口任意位置、点击输入框工具行左侧的回形针按钮打开系统文件选择器、hover 触发提示气泡。它会在 window 捕获阶段拦截拖拽事件,优先于 DSH 自带的文档级图片拖拽处理,避免触发不支持非图片格式的报错。

插件按优先级处理文件路径获取,优先级最高的是配合配套的 DSH Electron 桌面壳,通过 window.dshDesktop 直取文件原始路径,无需上传就能获得 Finder 中的真实路径,完全零上传。其次是获取拖拽自带的 text/uri-list 路径,比如从 Obsidian 拖拽笔记的场景。兜底方案是浏览器或无壳环境下上传,将文件保存到当前会话工作区的 .dsh-drops/ 目录,返回工作区相对路径。文本类文件会直接写入内容,二进制文件则会解码为真实字节存储。

插件采用 MIT 许可证开源,目前在 GitHub 获得 4 个 stars,单文件大小限制为 25MB (仅针对上传兜底场景,桌面壳直取路径不受此限制)。如果文件原始路径在工作区外,agent 读取文件需要沙箱放行权限,需提前配置 workspace-write 模式权限。安装时通过 DSH CLI 执行命令,安装后重启 DSH web 即可生效,推荐搭配可选的配套 Electron 桌面壳使用以获得最佳体验。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:dannyvan/dsh-file-drop

把 dannyvan/dsh-file-drop 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-file-drop · 拖拽上传任意文件

DeepSeek Harness 持久插件:支持拖拽 / 点击上传非图片文件(PDF / Word / Excel / ZIP / 文本等),把文件路径直接写入输入框草稿,agent 即可读取。

工作方式(三个入口共用一套逻辑)

入口 行为
拖拽到窗口任意位置 全屏高亮浮层 → 松手 → 获取文件
回形针按钮(输入框工具行左侧,28px 圆形原生风格) 点击弹系统文件选择器(多选)
hover 气泡 「点击选择文件 · 也可把文件拖到窗口任意位置」,1.5s 自动消失,每次 hover 循环

处理顺序(按可用性优先):

  1. 桌面壳直取原始路径(Electron 壳 window.dshDesktop,webUtils.getPathForFile)—— 零上传,拿到 Finder 里的真实路径;
  2. 拖拽自带路径(text/uri-list,如 Obsidian 拖笔记);
  3. 上传兜底(浏览器/无壳时)—— POST /api/dsh-file-drop 保存到 <会话工作区>/.dsh-drops/,返回工作区路径。

拖拽监听挂在 window 捕获阶段,先于 DSH 自带的 document 级图片拖拽处理拦截(stopPropagation),不会触发「不支持非图片格式」报错。

限制

  • 单文件 ≤ 25MB(上传兜底路径;壳直取路径不受限)
  • 文本类(md/txt/json/代码等)按文本直写;二进制(PDF/Word/Excel/ZIP 等)经 base64 解码写真实字节
  • 壳直取路径指向工作区外文件时,agent 读取需要沙箱放行(workspace-write 模式下需权限配置)

文件结构

index.js          Host half:POST /api/dsh-file-drop 保存路由(node fs 原生能力)
client.js         Client half:回形针按钮 + 拖拽监听 + 状态徽标(__ModuleLoader__ 格式)
cordis.patch.yml  组合行(inject: webServer, sessions)
dsh.plugin.json   插件清单

安装(已安装,仅备查)

dsh plugin --profile web add "link:/Users/fanxiaokang/dsh-file-drop"
# 重启 dsh web 生效

配套桌面壳(可选,推荐)

~/dsh-desktop/:Electron 壳,npm start 启动。自动复用/拉起 dsh web(127.0.0.1:3080), preload 注入 window.dshDesktop(getPathForFile + drainDroppedPaths),使拖拽直取 Finder 原始路径。

视觉引擎基准(modlens,2026-08 实测)

DSH 的 modlens_read_image 走 modlens 视觉桥;单次分析为一次结构化输出(summary/OCR/版面/语义/视觉/不确定项)。

引擎 完整流程耗时 结论
智谱 glm-4v-flash(国内直连,免费) ~3.7s ✅ 当前配置,最优
智谱 glm-4.6v ~17s ❌ 慢 4.6 倍
智谱 glm-4.5v 失败 ❌ 不返回符合 schema 的 JSON
Gemini 免费 key(海外) 429 额度用尽 / 兜底 codex-cli ~14s ❌

配置位置:~/.modlens/config.json(providers.openai → baseUrl=https://open.bigmodel.cn/api/paas/v4,model=glm-4v-flash)。

端到端等待(贴图→回复)≈ 读图 3.7s + 模型回复生成时间,后者通常是主要部分。

← 上一个 Prev dsh-custom-ui 下一个 Next dsh-reference-checker →