suanlayu666/suanlayu-dsh-plugins--plugins-dsh-file-upload ↗★ 0
dsh-file-upload
File upload plugin for the dsh web profile: POST /file-upload host route with text extraction (txt/md/code, PDF/DOCX/XLSX via optional parsers), plus a browser client adding an attach button and drag-drop in the composer.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:suanlayu666/suanlayu-dsh-plugins#ed0bf66a83f75dda76b978406bbacad83cc4bb61&path:plugins/dsh-file-upload说明文档
阅读完整 README ↗使用
- 输入框工具栏(权限切换右侧)点 📎 选文件(可多选),或把文件拖进页面
- 文件变为输入框上方的附件卡片(显示大小与解析状态,可点 × 移除)
- 正常打字提问 → 发送 → agent 收到文件路径并自行读取分析
脚本/自动化场景可直接调 HTTP 接口:
curl -X POST --data-binary "@report.pdf" "http://127.0.0.1:3080/file-upload?name=report.pdf"
响应字段:
| 字段 | 说明 |
|---|---|
| path | 文件落盘绝对路径 |
| size | 字节数 |
| text | 提取文本(≤4000 字;更长则截断 + 写侧车文件) |
| truncated / extractedPath | 是否截断 / 侧车文件路径 |
| parseError | 解析失败原因(可选) |
配置
在 profile 补丁层覆盖(config 为整体替换,三个键都要写全):