DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-image-picker

l

dsh-image-picker

Manifest valid

Paperclip image-picker button for the DeepSeek Harness web composer - pick reference images via the system file dialog and feed them into the official attachment pipeline.

hasBundlePatch

dsh-image-picker

DeepSeek Harness Web GUI 插件:在会话输入框左侧添加一个 📎 按钮,通过系统文件选择器添加附件。

  • 图片(png/jpeg/webp/gif)→ 合成 drop 注入官方附件管线:缩略图 rail、数量/大小校验、随消息上传
  • 文本类(.txt / .md / .markdown / .docx)→ 浏览器读出内容后 POST 到本地服务端暂存,消息里只插入一段极短的"回执"(保存路径 + 字符数 + 预览),正文不进会话上下文,agent 用普通读取工具按需取用

为什么这样设计

  1. 官方管线是图片专用——非图文件直接报"不支持类型"。文本类走不了上传路径。
  2. 浏览器 File 对象拿不到真实磁盘路径——"传路径让 agent 自己读"在纯前端走不通:拖拽路径会被浏览器安全策略隐藏,对话框也取不到绝对路径。
  3. 全文内联会撑爆上下文——几万字直接塞进消息既浪费又容易截断。

于是:脚本把选中文件的内容暂存为 ~/.dsh/picker-attachments/ 下的本地文件,消息里给出绝对路径 + 短预览。浏览器端无法偷懒绕过,但服务端 shell(host 插件)可以——它运行在 dsh web 进程里,有完整文件系统访问权。 .docx 在浏览器内用迷你 ZIP 解析 + DecompressionStream("deflate-raw") 提取正文后再暂存。

容量与安全护栏

护栏说明
单文件暂存上限25 MB(超出返回 413)
文件名自动清洗非法字符并加时间戳前缀,防路径遍历
暂存目录~/.dsh/picker-attachments/
降级若暂存接口不可用,自动回退为全文内联(单文件 3 万字符截断)

工作原理

点击 📎 → <input type="file" multiple>
  ├─ image/*  → DataTransfer + 合成 drop → 官方 ComposerAttachments 接收
  └─ 文本/docx → 浏览器读出 → POST /dsh-image-picker/store
              → 落盘 ~/.dsh/picker-attachments/<time>-<name>
              → 插入"回执"(路径+字符数+120字预览)到输入框

投递通道:host 壳(lib/index.js)激活时注册

  • GET /dsh-image-picker/client.js —— client 脚本,每次请求现读磁盘(改完刷新页面即生效)
  • POST /dsh-image-picker/store —— 文本类附件落盘
  • 并通过 webServer.tapIndex 注入 <script defer> 标签(whale-widget 同款模式)

client 端是免模块系统的自执行 IIFE,不对 window.__ModuleLoader__ 有任何依赖。

安装(web profile)

dsh plugin --profile web add github:liujia-io/dsh-image-picker
# 重启 dsh web 生效

要求:仓库已声明 dsh.bundle;正在申请收录 awesome-dsh-plugin(PR #3278)。

版本

  • 1.2.0 — 文本/docx 改为"暂存为本地文件 + 回执",正文不进上下文;/store 落盘路由;文档类支持
  • 1.1.0 — 文本与 docx 内容内联插入草稿;容量护栏;跳过清单
  • 1.0.1 — 打包修复:真实的 lib/index.js host 入口 + "." 导出;client 改经 webServer 路由投递
  • 1.0.0 — 📎 选图按钮(官方附件管线)

Comments

Loading…

Similar plugins

dsh-add-image-button

by Yaya716

Persistent "Add image" button in the composer tool row for DeepSeek Harness Web: opens the system file picker (image/*, multi-select) and routes selected images through the official draft attachment p

Manifest valid

★ 0

JavaScript

Aug 23, 2026

dsh plugin --profile web add @local/dsh-add-image-button

by zmm863-commits

DSH Web GUI paperclip button: a 📎 button in the composer opens a file picker (drag & drop supported) and inserts file contents into the textarea.

UI & ExperienceManifest valid

★ 4

↓ 382/wk

MIT

TypeScript

Oct 4, 2026

dsh plugin --profile web add dsh-paperclip

by qwerty-k-de

DSH Web composer toolbar picture button: pick images via the OS file dialog - no drag-and-drop needed.

UI & ExperienceManifest valid

★ 0

↓ 58/wk

MIT

JavaScript

Sep 1, 2026

dsh plugin --profile web add dsh-attach-picker

by JackEngineer

One-click DSH screenshot: capture the DeepSeek Harness window (or the whole desktop) and drop the PNG straight into the composer draft

UI & ExperienceManifest valid

★ 0

MIT

JavaScript

Oct 17, 2026

dsh plugin --profile web add dsh-quick-screenshot

by XWIDE

DeepSeek Harness plugin: keeps the images you pasted or attached in the composer, per session; they are mirrored locally and put back when you return to that conversation, and forgotten once the messa

UI & ExperienceDevelopment & InfrastructureManifest valid

★ 1

MIT

JavaScript

Oct 8, 2026

dsh plugin --profile web add dsh-draft-keeper

by shukookie

Wallpaper switcher for DeepSeek Harness - sidebar picker with local image upload, dim slider, and one-click next-wallpaper button.

Manifest valid

★ 0

MIT

JavaScript

Aug 17, 2026

dsh plugin --profile web add dsh-plugin-wallpaper