WeKnora
Tencent
Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
loyalchiiina/dsh-chat-image-lightbox
DSH plugin: full-screen chat image lightbox (zoom/pan/download/page), conversation-wide thumbnail grid with adjustable columns, hide/show, jump-to-image, lossless native-resolution TIFF/HEIC display, copy local path & show in folder. 对话图片灯箱+缩略图网格+隐藏/跳图+TIFF原像素无损显示+复制路径/打开文件夹的 DSH 插件。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:loyalchiiina/dsh-chat-image-lightbox
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
对话里的图,值得被认真看。
Images in chat deserve a proper look.
📦 npm 包名 / npm package name:
@loyalchiiina/dsh-chat-image-lightboxGitHub 仓库名是dsh-chat-image-lightbox,但 npm 上带 scope 前缀,安装时请用完整名。 The GitHub repo isdsh-chat-image-lightbox; the npm package is scoped — use the full name when installing.
dsh plugin --profile desktop add @loyalchiiina/dsh-chat-image-lightbox

灯箱全屏态:原图完整显示(自动适配屏幕高度),右上角是「⬇ 下载」与「✕ 关闭」按钮;同一条消息里的其他图片可用方向键连续浏览。 Full-screen lightbox: the image auto-fits the viewport, with ⬇ download and ✕ close in the top-right; arrow keys page through the other images in the same message.
| 中文 | English |
|---|---|
| 点击任意对话图片进入全屏灯箱 | Click any chat image for a full-screen lightbox |
| 滚轮缩放、拖拽平移 | Wheel zoom, drag to pan |
| 工具栏缩放按钮 ⊕ ⊖ 与 1× 复位 | Toolbar ⊕ / ⊖ zoom buttons with 1× reset |
| 方向键平移视角(按住连续移动) | D-pad moves the view (press-and-hold repeats) |
| 左右翻页:按钮 / 键盘 / 触屏滑动 | Prev/next via toolbar, keyboard or swipe |
| 下载原图(自动识别扩展名) | Download original (extension auto-detected) |
| 复制图片文件绝对路径 | Copy the image's absolute local path |
| 在文件夹中显示(资源管理器定位) | Reveal in folder (file manager locates the file) |
| 中文 | English |
|---|---|
| 一键把整个会话图片收成缩略图网格 | Collapse every image in the conversation into a thumbnail grid |
| 网格列数可调(1–12,设置被记住) | Configurable columns per row (1–12, remembered) |
| 一键隐藏 / 展开所有图片 | Hide / restore all images at once |
| 跳图定位:左键上一张、右键下一张、三连最远/最近 | Jump: left = prev, right = next, triple = farthest / nearest |
| 落点闪一下高亮 | Landing block flashes briefly |
| 中文 | English |
|---|---|
| TIFF/TIF、HEIC 自动转换显示 | TIFF/TIF, HEIC auto-transcode for display |
| TIFF/PNG/BMP 无损原像素(逐像素零误差) | TIFF/PNG/BMP lossless, native pixels (bit-exact) |
| 2 亿像素大图流畅显示 | 200-megapixel images display smoothly |
| 11 种格式实测支持(JPG/PNG/WebP/GIF/AVIF/SVG/BMP…) | 11 formats verified (JPG/PNG/WebP/GIF/AVIF/SVG/BMP…) |
display_image)| 中文 | English |
|---|---|
| 关键词搜网图(花瓣/Bing/搜狗 3 源回退) | Keyword image search (Huaban / Bing / Sogou fallback) |
| 搜图自动过滤广告与他人面孔 | Auto-filters adverts & other celebrities |
| 本地文件/目录直读(TIFF/HEIC 转码) | Read local files/dirs (TIFF/HEIC transcoded) |
| 网图落地保存到本地目录 | Save remote images to a local folder |
| 代理自动探活(无需手配) | Auto proxy discovery (TCP probe) |
| 中文 | English |
|---|---|
| 一切本地服务仅回环(loopback-only) | All local services are loopback-only |
| 打开文件夹用参数化调用,绝不拼接 shell 命令 | "Show in folder" spawns argv, never a shell string |
| 保存说明不回显本机路径 | No local paths echoed in confirmations |
A DeepSeek Harness plugin that displays images inline in the chat with a lightbox overlay — zoom, download (save-as dialog), and prev/next navigation.
Pictures from your agent sit tiny inside a bubble — to see detail you have to save them and open elsewhere. With this plugin, one click opens any chat image full-screen: zoom, drag-pan, download, and flip through the others in the same message.
)role="dialog" with aria-modal, button aria-labels, and focus management (focus returns to the trigger on close)removeChild errors)min(460px, 64vh) height (the ZCode look); charts and diagrams stay fully readable⊖ ⊕ 1× for zoom with a live percentage readout, and a d-pad for moving the view (press and hold to keep moving). Wheel, drag and +/-/Shift+arrow all still workdisplay_image tool, host side): one tool takes a local path (file or directory — TIFF/HEIC transcoded, optional downscale), a remote url, or a query (keyword image search: Huaban first, Bing as fallback) and returns ready-to-paste Markdown. Any file on this machine can be served in place via /images/?abs=<path> (loopback-only), no copying into the gallery root requireddsh plugin --profile desktop add @loyalchiiina/dsh-chat-image-lightbox
lib/ folder and cordis.patch.yml to your DSH profile's node_modules/@loyalchiiina/dsh-chat-image-lightbox/@loyalchiiina/dsh-chat-image-lightbox to your profile's package.json → dsh.profile.bundles array~/.dsh/uploads/ (or any directory served by your DSH instance)
Note: For the download button to trigger a save-as dialog, the image must be served from the same origin as your DSH instance (e.g., via the /images/ route). Cross-origin images will open in a new tab instead.
When an image shows as blank, a blob of text, or the lightbox opens empty, check in this order:
DSH renders images into <img> only from http(s) URLs. It does not render data:image/png;base64,... inline, nor "file-delivery/attachment" messages (those appear as tool-call text, not an image).



Some hosts (e.g. Sina Weibo sinaimg, some CDNs) enforce Referer-checking: a request without the expected Referer returns 403, so the image frame renders but no pixels load (clicking still opens the lightbox, but there is no image).
~/.dsh/uploads/ (fetch with a proper Referer, or just save it from the browser), then serve it via /images/.Example — fetching a hotlink-protected image (Windows):
curl -e "https://weibo.com" -o image.jpg "https://wx1.sinaimg.cn/.../xxx.jpg"
| Format | Displayed | Notes |
|---|---|---|
| jpg / jpeg / png / gif / webp / bmp / svg / ico / avif | ✅ Directly | Mainstream formats — display + lightbox work, bytes untouched |
| tiff / tif | ✅ Via server conversion | Browsers can't render TIFF; the plugin server converts it to WebP at full original resolution (bundled sharp) — HD display, and download keeps the original .tif |
| heic | ✅ Via server conversion | Same as TIFF — displayed as WebP, downloaded as the original .heic |
Files go in ~/.dsh/uploads/ and display via /images/ — no manual conversion needed.
After installing or editing plugin files, fully quit all DSH Desktop processes (Task Manager → end every DSH Desktop.exe) and reopen. Closing just the window does not quit (background processes stay). Old/unloaded code keeps the plugin inactive otherwise.
/images/-served upload — if it displays and lightboxes, the plugin is fine.https://picsum.photos/800/600) — if that works, the plugin is generic.| Action | Input |
|---|---|
| Open lightbox | Click an image |
| Zoom in / out | Click image, or mouse wheel when zoomed |
| Pan | Drag the image while zoomed |
| Prev / next | ← / → keys, on-screen arrows, or swipe |
| Close | Esc, click backdrop, or ✕ |
| Endpoint | Method | Description |
|---|---|---|
/images/<path> |
GET | Serve an uploaded image (loopback-only, with extension/security guards) |
/api/image-gallery/list |
GET | List images under the gallery root; supports ?limit=N |
/api/image-gallery/root |
GET | Return the configured gallery root path |
| Component | Description |
|---|---|
Host (lib/index.js) |
Registers /images/ file-serving route and /api/image-gallery/list + /api/image-gallery/root APIs on ctx.webServer |
Client (lib/client.js) |
Uses MutationObserver to watch for <img> elements in the chat, adds a display class + click handlers that open a lightbox overlay (class-only enhancement, no DOM restructuring) |
webServer service)MIT
DeepSeek Harness 插件:在对话框中直接显示图片,支持放大、下载(弹出另存为)、左右切换。
)role="dialog"(含 aria-modal、按钮 aria-label 与焦点管理,关闭后焦点回到触发元素)removeChild 报错)min(460px, 64vh)(ZCode 的观感);图表、流程图不再被裁得没法看.tif/.heic 文件display:contents),不搬任何节点⊖ ⊕ 1× 缩放(带实时百分比),加一组方向键移动视角(按住可连续移动);滚轮、拖拽、+/-/Shift+方向键 全部保留display_image 工具):一个工具吃三种输入——本地 path(文件或目录,TIFF/HEIC 自动转码、可缩放)、网络 url 直链、query 关键词搜图(花瓣优先,Bing 回退),返回可直接粘贴的 Markdown。本机任意文件可通过 /images/?abs=<路径> 原地直读(仅限本机回环),无需先复制进图库目录dsh plugin --profile desktop add @loyalchiiina/dsh-chat-image-lightbox
lib/ 文件夹和 cordis.patch.yml 复制到 DSH profile 的 node_modules/@loyalchiiina/dsh-chat-image-lightbox/package.json → dsh.profile.bundles 数组中添加 @loyalchiiina/dsh-chat-image-lightbox~/.dsh/uploads/ 目录(或 DSH 实例提供的任意目录)
注意:下载按钮要弹出"另存为"对话框,图片必须从 DSH 同源路由提供(如 /images/ 路由)。跨域图片会在新标签页打开。
遇到"图片显示不出来 / 点开是空白 / 只看到一串文字"时,按以下顺序排查:
DSH 对话只对http(s) 图片 URL渲染成 <img>,不支持 data:image/png;base64,... 内嵌,也不支持以"附件/文件交付"方式直接显示(那只会显示成工具调用文字)。


iVBORw0...) ← 不会显示
部分图床(如新浪微博 sinaimg、部分 CDN)强制 Referer 校验:请求不带特定 Referer 就返回 403,导致图片加载不出(有 <img> 框但内容空白,点击能弹灯箱但没图)。
~/.dsh/uploads/(可用带 Referer 的脚本抓取,或直接用浏览器保存),再通过 /images/ 路由显示。示例:抓取带防盗链的图(Windows 下用带 Referer 的 curl 或脚本下载后放入 uploads):
curl -e "https://weibo.com" -o 图.jpg "https://wx1.sinaimg.cn/.../xxx.jpg"
| 格式 | 显示 | 说明 |
|---|---|---|
| jpg / jpeg / png / gif / webp / bmp / svg / ico / avif | ✅ 直接显示 | 主流格式,直接显示 + 灯箱,字节原样不动 |
| tiff / tif | ✅ 服务端转码显示 | 浏览器不能渲染 TIFF,插件服务端用内置 sharp 按原始分辨率转 WebP 显示——高清直显,下载仍是原始 .tif 文件 |
| heic | ✅ 服务端转码显示 | 同 TIFF——显示为 WebP,下载保存原始 .heic |
图片放到 ~/.dsh/uploads/,用 /images/ 显示——无需手工转码。
改过插件文件或刚安装后,必须彻底退出 DSH 进程再重开(任务管理器结束所有 DSH Desktop.exe 进程),否则旧代码/未加载状态不生效。仅"关闭窗口"不算退出(后台进程残留)。
/images/ 上传图测:如果上传图正常显示 + 灯箱,说明插件正常| 操作 | 输入 |
|---|---|
| 打开 lightbox | 点击图片 |
| 放大 / 缩小 | 点击图片,或放大后滚动滚轮 |
| 平移 | 放大后按住拖拽 |
| 上一张 / 下一张 | ← / → 方向键、屏幕箭头、或滑动 |
| 关闭 | Esc、点击遮罩层、或 ✕ |
| 接口 | 方法 | 说明 |
|---|---|---|
/images/<path> |
GET | 提供上传图片(仅本机回环,带扩展名/安全校验) |
/api/image-gallery/list |
GET | 列出图库根目录下图片,支持 ?limit=N |
/api/image-gallery/root |
GET | 返回配置的图库根目录路径 |
| 组件 | 说明 |
|---|---|
Host (lib/index.js) |
在 ctx.webServer 上注册 /images/ 文件服务路由和 /api/image-gallery/list + /api/image-gallery/root 接口 |
Client (lib/client.js) |
用 MutationObserver 监听对话中的 <img> 元素,添加展示样式与点击处理器打开 lightbox(只加 class,不改 DOM 结构) |
webServer 服务)MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: chat-image、image、image-lightbox。