dsh-plugin-verified-search
f0909172434
Verified current-source search workflow for DeepSeek Harness
shililinghu/dsh-file-upload-deepseek-harness-plug-in
DeepSeek Harness 工作区文件上传插件:文件/zip 上传、自动解压、拖拽上传、上限可配置、中英双语 | Workspace file upload plugin for DeepSeek Harness: file & zip upload, auto-extract, drag & drop, configurable limits, zh/en UI
PROJECT TOPICS
PROJECT README
中文 | English
DeepSeek Harness 工作区文件上传插件 —— 支持普通文件上传、zip 自动解压、页面级拖拽上传,上传/解压上限可在设置面板图形化调整,界面中英双语。
.agent-hub/uploads/ 目录推荐直接从 GitHub 安装:
dsh plugin --profile web add github:shililinghu/dsh-file-upload-deepseek-harness-plug-in
# 重启 dsh web 后刷新浏览器页面
也可以使用本地源码目录安装:
# 将本仓库克隆到 Harness 的插件目录(Windows 示例)
git clone https://github.com/shililinghu/dsh-file-upload-deepseek-harness-plug-in.git "$HOME\.dsh\plugins\agent-hub-workspace-file-upload"
~/.dsh/profiles/<profile>/cordis.patch.yml:- insert:
- id: agent-hub-workspace-file-upload
name: '@agent-hub/dsh-workspace-file-upload'
package.json 中添加依赖(指向插件目录):{
"dependencies": {
"@agent-hub/dsh-workspace-file-upload": "link:C:/Users/<你>/.dsh/plugins/agent-hub-workspace-file-upload"
}
}
每个文件 chip 显示序号、文件名、大小(zip 带徽标):
已上传: 1. report.zip 2.3 MB [zip] [✕] 2. 文档.md 12 KB [✕] 3. ….zip [✕] [清空]
.agent-hub/uploads/ 里的文件副本(zip 连同解压目录)上传 zip 后会自动解压,chip 带 zip 徽标,悬停可看到解压目录。之后你可以在输入框里自由下命令,比如:
"读取 .agent-hub/uploads/xxx/ 下的 README"
"修改解压目录里 config.json 的某个配置"
若由系统工具兜底解压(如 bzip2 压缩),悬停提示会标注解压方式
若解压超限,chip 会显示红色 ⚠️,悬停给出中文/英文友好提示("文件已保存但未解压,请调高 zip 解压上限…"),zip 文件本身保留
超过上传上限的文件会被拒绝并提示当前限制值。解压超限时 zip 文件仍保留,可调高上限后重新拖入。
config.json(运行时配置,已被 .gitignore 排除,不会入库).agent-hub/uploads/,会占用工作区磁盘空间;大 zip 解压后占用更多,请留意剩余空间tar;7z(7-Zip)如已安装会优先使用;PowerShell Expand-Archive 作为最后兜底lib/client.js(客户端)刷新页面即可;改 lib/index.js / lib/zip.js(宿主端)需重启 Harnesslib/index.js):通过 webServer 注册 /agent-hub/file-upload 上传路由、/agent-hub/file-upload/delete 删除路由与 /agent-hub/file-upload/config 配置路由;上传采用流式写入,zip 魔数嗅探 + 自动解压;解压失败时按 7z → tar → PowerShell 顺序兜底;删除路由校验路径必须位于 uploads 目录内,防止路径穿越lib/zip.js):零依赖纯 JS zip 解析(node:zlib),支持 STORE/DEFLATE、ZIP64、UTF-8 文件名;结构化错误码(ENTRY_LIMIT / SIZE_LIMIT / CORRUPT)供客户端本地化提示lib/client.js):注册 conversation.input.left(上传按钮 + 文件列表)与 settings.general.item(上限设置行)两个 Slot;文件列表为模块级 store(按会话隔离,删除/清空只影响当前会话);接入 DSH locale 服务实现中英双语;页面级拖拽通过 window 事件监听实现(非图片文件才拦截)agent-hub-file-upload 命名空间(zh / en,对应 DSH 的语言 id),组件订阅 locale 变更自动重渲染发现问题或有改进建议,请在 反馈 issue 中留言。
本项目采用 MIT License。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。