DeepSeek Harness plugin

dsh-image-bridge-haitang1

让文本模型(如 DeepSeek)也能正常粘贴并发送图片:图片落盘到工作区,消息转成仅模型可见的路径文本,由模型调用视觉/MCP 工具识别。

Jump to install

Source facts

Repository
haitang1/dsh-image-bridge
Latest update
Aug 18, 2026
Category
Tools & Capabilities
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/haitang1/dsh-image-bridge
Plugin: dsh-image-bridge-haitang1
Author: haitang1

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-image-bridge

文本模型(如 DeepSeek,inputModalities 只有 text)在 DeepSeek Harness 里也能正常粘贴并发送图片

  • 图片落盘到会话工作区的 .attachments/ 目录;
  • 对话区照常显示图片缩略图(可点击放大),不再显示路径文字
  • 模型侧拿到 [图片1]:"<路径>" 的文本,并据此调用已有的视觉/MCP 工具识别图片(例如

vision_glancemcp__mcp-vision__analyze_imagemcp__mcp-vision__ocr_extract);

  • 支持图片的模型不做任何处理,走原生路径。

原理

DeepSeek 等文本模型不支持图片输入,DSH 的 api-proxy 会在发送阶段直接拒绝含图消息 (「当前模型不支持图片」)。本插件做了三件事:

1. 放行预检:包装 llm.resolveModelInfo,对文本模型补上 image 模态,让含图消息进入 agent 流程; 2. 落盘:在 agent/pre-step 里用 attachments.readImage 读出图片字节,写到工作区 .attachments/<sha256>.<ext>; 3. 解耦显示与模型输入:利用 DSH 的 surface replace 机制,在 agent/request-error 里追加一条「仅模型可见」的替换事件,把图片块在模型可见面换成 [图片N]:"<路径>", 而人类 transcript 仍渲染原图。首次调用会因适配器拒绝图片在本地失败(无 API 开销),随后自动重试。

已知限制

  • 命令(/ 开头)与图片不要在同一轮混用:DSH 客户端输入框的「命令路径」提交时

(如 /plan/goal 等)不会携带草稿图片,图片会留在输入框,需要再点一次发送。 这是 DSH 客户端(dsh-client-ui-conversationbeginSubmit)的限制,非本插件问题。 变通:先发命令,再单独发图;或命令与图片分开两条消息。

  • 会话历史中若残留视觉模型产生的图片块(未切换前),切回文本模型后这些历史图片不在本插件

处理范围,可能触发适配器报错;建议切回文本模型前清空或压缩历史。

安装

本包是 profile bundlepackage.json 声明了 dsh.bundle.patch)。

在 DSH 源码 checkout 根目录执行。

GitHub:

pnpm dsh plugin --profile web add 'github:haitang1/dsh-image-bridge#b5c64ea'

<profile> 通常是 web(Web 界面);#b5c64ea 是当前建议锁定的提交,可换成仓库最新 commit。

安装成功后,插件会自动加入该 profile 的 dsh.profile.bundles,下次启动(或长驻 surface 热载后)生效。

手工等价操作

如果 CLI 不可用:

1. 编辑 $DSH_HOME/profiles/<profile>/package.json: - 在 dependencies 加(GitHub / Gitee 二选一): - "dsh-image-bridge": "github:haitang1/dsh-image-bridge#b5c64ea" - 在 dsh.profile.bundles 数组末尾加 "dsh-image-bridge"。 2. 在该 profile 目录执行 pnpm install

本地开发

cd <dsh-source>
pnpm dsh plugin --profile web add 'link:<本仓库绝对路径>'

依赖

  • 运行环境:DeepSeek Harness(宿主组合需提供 attachmentsllmsubprocesssandboxPolicy,标准 profile 均具备)。
  • peer 依赖:@deepseek-ai/cordis(由 DSH 提供)。

许可

MIT