Skip to content

condaThinker/dsh-image-inline

30Last commit Aug 14, 2026

dsh-image-inline DSH plugin

This plugin adds a show_image tool that models can call to display images directly in the chat flow. Images are stored as content-addressed attachments and rendered using the official MessageImage component. The image data never enters the model context, keeping text-only routing unaffected.

How to install the dsh-image-inline DSH plugin

dsh plugin --profile web add github:condaThinker/dsh-image-inline

Copying does not run this command. Review the repository and version before installing the dsh-image-inline DSH plugin.

dsh-image-inline DSH plugin data source

dsh-image-inline DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-image-inline DSH plugin can do

  • Models can invoke the show_image tool to display an image at a given disk path
  • Images are stored as content-addressed attachments (sha256) and served via a plugin-specific HTTP endpoint
  • Configurable limits: max image bytes (default 25 MiB), max pixels (default 40MP), and allowed media types (png, jpeg, webp, gif)
  • Client-side rendering with thumbnail, click-to-view-full, and retry on failure
  • Pure text result for tool calls; image payload is delivered through meta and a separate HTTP channel, not the model context
  • Registry persistence at $DSH_HOME/plugins/dsh-image-inline/registry.json

Where the dsh-image-inline DSH plugin fits

  • Display a local chart or screenshot in a conversation for user review
  • Show a generated image file (e.g., from a previous tool call) to the user without polluting the model context
  • Present evidence images (e.g., diagrams, photos) that the model can reference via tool call, allowing users to browse history

Who the dsh-image-inline DSH plugin is for

  • DSH Web UI users who want models to show images inline in conversations
  • Developers and researchers running DSH with models that support tool calling

dsh-image-inline DSH plugin limitations

  • Pixel limit check occurs after saveImage, leaving an orphan attachment if the plugin's maxImagePixels is stricter than the deployment default
  • Registry grows monotonically; each displayed image adds ~200 bytes to $DSH_HOME/plugins/dsh-image-inline/registry.json
  • No build step; changes to bundle require a profile restart (HMR does not cover bundle changes)
  • Only works with DSH Web profile; requires a model that supports tool calling (show_image)

dsh-image-inline DSH plugin: from the repository README

Quoted from the condaThinker/dsh-image-inline README, the upstream source of the dsh-image-inline DSH plugin. Copyright remains with the original authors.

让 DeepSeek Harness (DSH) 的 Web UI 支持**模型主动把一张图片渲染进对话流**(QQ/微信聊天式:图片显示在会话里、可上翻、和对话同步)。 对话流消息内容里**只保留路径文本**,图片本身**不进入模型上下文**(模型上下文保持干净,纯文本模型路由不受影响)。 ## 工作方式 模型调用新增的 `show_image` 工具(传入磁盘图片路径)时: 1. **host**(`dsh/index.js`):校验路径/格式/大小 → 读取字节 → 通过附件服务 `saveImage` 存成内容寻址附件 → 返回**纯文本**结果(路径 + 元数据摘要)。图片的展示载荷(attachmentId/宽高/字节数)通过工具的 `presentationMeta` 放进 `tool/result` 事件的 `meta` 字段——**不进模型上下文、不进会话日志的 image 块**。 2. **client**(`dsh/client.js`):注册 `tool.call.toolview` 键控槽位(key = `show_image`),在对话流中该工具调用的位置渲染图片卡片(复用官方 `MessageImage` 组件:缩略图、点击看原图、加载失败可重试)。图片 URL 走插件自己的内容寻址 HTTP 端点。 ``` 模型 → show_image(path) → 附件服务存图 → 纯文本结果(路径+摘要) │ ├─ tool/result meta ─→ client toolview 渲染图片卡片 └─ 注册表($DSH_HOME/plugins/dsh-image-inline/registry.json) └─ GET /plugin/show-image/<attachmentId> → 图片字节 ``` ### 为什么需要插件自己的 HTTP 端点? DSH 内置的 `conversation.resolveImage` → `session.attachment` RPC 只服务"会话日志的 image 块里被引用的附件"(`api-proxy` 的 `referencedImage` 授权)。本插件的结果**故意不包含 image 块**(否则图片会进入模型上下文),因此附件永远不会被日志引用,必须由插件自己提供读取通道。 安全性:attachmentId 是 `sha256:<hex>` 内容哈希——**内容寻址 c

Read the full READMEThe repository declares no license. Check with the authors before using it.

dsh-image-inline DSH plugin questions

How do I install dsh-image-inline?

Run the command `npx -p @deepseek-ai/dsh dsh plugin --profile web add github:condaThinker/dsh-image-inline`, then restart your DSH Web profile (e.g., `sudo systemctl restart dsh`). No build step is required; the plugin is pure JavaScript.

How do I use the plugin to show an image?

In a conversation, ask the model to call the `show_image` tool with the path to an image file on disk. For example: 'Use show_image to display /path/to/your/image.png'. The image will appear as a card in the chat flow, with a thumbnail. Click to view the full image.

What image formats and size limits are supported?

By default, the plugin accepts png, jpeg, webp, and gif. The maximum image bytes is 25 MiB (configurable via `maxImageBytes`), and the maximum pixel count is 40 million pixels (configurable via `maxImagePixels`). You can adjust these in `cordis.patch.yml` under the plugin's config section.

Does the image data enter the model context?

No. The plugin is designed to keep the model context clean. The image is stored as a content-addressed attachment, and only the file path and metadata summary are returned as text to the model. The image payload is delivered to the browser via an HTTP endpoint and rendered separately.

How do I uninstall the plugin?

Run `npx -p @deepseek-ai/dsh dsh plugin --profile web remove dsh-image-inline` and then restart your DSH Web profile. This will remove the plugin's registry and stop serving images.