3403473060/dsh-inline-images

插件Plugin 原生Native ⭐ 3 MIT 视觉Visual

让 DeepSeek Harness 的对话直接显示本地图片:LLM 回复中输出的本地图片路径(截图、生成图等)会在消息正文里自动渲染成图片 —— 不再只是一串看不到的路径文本。

catalog 简介 / catalog descriptioncatalog description:—

项目介绍Project Overview

dsh-inline-images 是 DeepSeek Harness 的视觉类插件,把助手回复中的本地图片路径(Windows、UNC、POSIX 以及 Markdown 图片语法)改写为同源回环 URL,直接在消息正文中渲染为图片,无需手动打开。支持 png、jpg、jpeg、webp、gif、svg、avif、bmp、ico 共 9 种格式,提供点击放大灯箱和可调尺寸(默认 640×420,范围 64–2400 px),并持久化到凭证存储。当模型回复中含截图或生成图时使用。注意:文件不存在、占位路径或纯文本模型场景会安静降级,不会影响对话。

dsh-inline-images is a visual plugin for DeepSeek Harness that rewrites local image paths in assistant replies—including Windows, UNC, POSIX paths, and Markdown image syntax—into same-origin loopback URLs so images render directly inline in the message body. It supports nine formats: png, jpg, jpeg, webp, gif, svg, avif, bmp, and ico. A click-to-zoom lightbox and adjustable size settings (default 640×420, range 64–2400 px) are included and persisted in credential storage. Use it when LLM replies reference screenshots or generated images. Note: missing files and placeholder paths are silently skipped, and pure-text model adapters remain unaffected.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:3403473060/dsh-inline-images

3403473060/dsh-inline-images 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-inline-images 对话内联图片

让 DeepSeek Harness 的对话直接显示本地图片:LLM 回复中输出的本地图片路径(截图、生成图等)会在消息正文里自动渲染成图片 —— 不再只是一串看不到的路径文本。

示例

功能

  • 消息正文内联渲染:扫描助手回复文本中的本地图片路径(C:\... 盘符、UNC、POSIX、![](https://github.com/3403473060/dsh-inline-images/blob/HEAD/本地路径)、反引号包裹),把真实存在的图片改写成同源回环 URL,产品 MarkdownText 直接在正文渲染。
  • 支持 9 种格式:png / jpg / jpeg / webp / gif / svg / avif / bmp / ico。
  • 点击放大灯箱:点击正文图片 → 全屏大图;点背景或按 Esc 关闭。
  • 可调尺寸:设置 → 内联图片,调整正文图片最大宽/高(64–2400 px,默认 640×420),持久化到凭证存储(INLINE_IMAGE_MAX_WIDTH / INLINE_IMAGE_MAX_HEIGHT)。
  • 安静降级:不存在的路径、示例/占位路径(路径、xx、... 等)静默跳过,不影响对话;消息内容仍是纯文本 URL,纯文本模型适配器不会拒绝。

构建与安装

pnpm install
pnpm run build
dsh plugin --profile web add ./dsh-inline-images

工作原理

  1. llm/stream 包装器扫描文本块,fs.stat 确认文件存在。
  2. 按原始区间把路径替换为 ![](http://127.0.0.1:<port>/plugins/dsh-inline-images/image?t=<token>&p=<path>)
  3. webServer 路由实时读取文件字节返回(与页面同源,无 CSP/混合内容问题);token 每次激活随机生成。

许可证

MIT

上一个 Prev dsh-token-billing 下一个 Next chicheng-gate