工具与能力
#deepseek-harness#deepseek-harness-plugin#deepseek-harness-plugin-dev#deepseek-harness-plugins#dsh#dsh-plugin
dsh-image-preview
DSH Web 会话图像预览:将 read_image 结果显示为缩略图,点击可全屏查看。
algerkong
@algerkong
⬇ 1
★ 1
main
安装
dsh plugin --profile web add github:algerkong/dsh-image-preview
需要可复现安装时,可在仓库后追加 #commit 固定提交。
DSH Web 会话图像预览:将 read_image 结果显示为缩略图,点击可全屏查看。
该插件未提供要点说明,请参考仓库 README。
deepseek-harnessdeepseek-harness-plugindeepseek-harness-plugin-devdeepseek-harness-pluginsdshdsh-plugin
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/algerkong/dsh-image-preview |
| 许可证 | 未标注(见仓库) |
| 主要语言 | main |
| 下载量 | 1 |
| GitHub 星标 | 1 |
| 最近推送 | 2026-08-27 |
| 收录日期 | 2026-09-19 |
| 分类 | 工具与能力 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-image-preview
> [中文版](./README.zh.md)
**Image preview for the dsh session interface.** When the agent runs the `read_image` tool, the result is rendered as a **small thumbnail** by default instead of raw JSON — click the thumbnail to view the **full-size original** in a lightbox styled exactly like dsh's built-in `ImageLightbox`.
## Features
| | |
| --- | --- |
| 🖼️ **Thumbnail by default** | `read_image` results render as a rounded ~240px thumbnail that never blows up the conversation flow |
| 🔍 **Click for full size** | Click the thumbnail to open the original image in a lightbox — dismiss with `Esc`, clicking the backdrop, or the close button; focus is restored to the trigger on close |
| 🔐 **Reuses the built-in image pipeline** | Image bytes are fetched through the host's `session.attachment` RPC with authorization — the exact same path dsh's own `resolveImage` uses |
| ⏱️ **Complete states** | Running (`row.running`), failed with retry (`image.loadFailed`), and loading (`image.loading`) states are all covered |
| 🌗 **Theme aware** | All colors reference dsh theme tokens (`--dsw-*`), so the preview follows the light/dark theme automatically |
## Preview
**Thumbnails in the session** — each `read_image` tool row renders a small thumbnail by default:

**Full-size lightbox** — click any thumbnail to open the original image. Supports ← → navigation across all images in the conversation (counter shows `3 / 4`):

## How it works
`dsh-image-preview` is a **pure client-side plugin**. It registers a keyed slot on `tool.call.toolview` with key `read_image` and takes over rendering of the `read_image` tool row:
```
agent runs read_image
└─ tool result content: [{ text envelope }, { type: "image", attachment }]
└─ tool-call node → tool.call.toolview (key = read_image)
└─ ReadImageRow: thumbnail + click to open ImageLightbox
```
- `sessionId` is injected by the session-scoped slot's standard kit.
- Attachment metadata (`attachmentId`, `mediaType`, `width`, `height`) comes straight from the tool result block.
- The lightbox (`ImageLightbox`) is a clone of dsh's built-in behavior: portal to `body`, backdrop mask, ESC/backdrop/close dismissal, focus restore.
## Installation
### From GitHub (recommended)
Requires pnpm ≥ 9. Install into your web profile with the official plugin command:
```sh
dsh plugin --profile web add 'github:algerkong/dsh-image-preview'
```
or manually in `~/.dsh/profiles/web/package.json`:
```json
{
"dependencies": {
"@alger-ai/dsh-image-preview": "github:algerkong/dsh-image-preview"
},
"dsh": {
"profile": {
"bundles": [ "@alger-ai/dsh-image-preview" ]
}
}
}
```
Then run `pnpm install` in the profile and **restart `dsh web`**. Refresh the page afterwards.
### Local development
Link the package directly:
```sh
cd ~/.dsh/profiles/web
pnpm add link:/path/to/dsh-image-preview
```
Add `"@alger-ai/dsh-image-preview"` to `dsh.profile.bundles`, restart `dsh web`, and refresh.
## Usage
1. Start a session and let the agent call `read_image` on an image file.
2. The tool row shows a small thumbnail instead of raw JSON.
3. Click the thumbnail to inspect the full-size original in the lightbox.
## Development
```sh
node verify.mjs # self-check: bundle shape, slot registration, block parsing
```
## Files
```
dsh-image-preview/
├── package.json # bundle metadata (dsh.bundle.patch / dsh.client platform=web)
├── cordis.patch.yml # registers the client entry (id: ui-image-preview)
├── lib/
│ ├── index.js # host-side entry (empty — browser-only plugin)
│ └── client.js # browser: read_image toolview + thumbnail + lightbox
└── verify.mjs # self-check script
```
## License
MIT
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。