In DeepSeek Harness, when developing tools, if you use read_image to read local files, the generated tool card usually shows the file name and size, but provides no visual feedback. This requires manually opening the image. The plugin introduced below renders these images directly in the tool card on the Web interface.

Plugin Positioning

This is a pure client-side plugin for inlining images generated by read_image in the DSH Web chat interface, with thumbnail and Lightbox support. It is maintained by dblate and released under the MIT License.

Core Features

  • Inline Thumbnails: The tool card displays an inline image thumbnail (long edge 240px, aspect-ratio clamped, no upscaling), along with a summary line showing format, dimensions, and file size.
  • Lightbox Viewing: Click a thumbnail to open a full-screen Lightbox. It can be closed with the Esc key, by clicking the overlay, or using the close button.
  • Error Handling: If loading fails, display a retryable error line. If the tool fails, display an error summary.
  • Pure Client-Side Implementation: It does not modify host code, does not add conversation events, and does not affect model context. Rendering is entirely based on recorded tool/result events, so images remain visible after session resume / fork.
  • Format Support: Supports only PNG / JPEG / WebP / GIF (SVG is rejected).
  • Tool Card Takeover: The tool card is a keyed read_image takeover registration. If the official implementation later includes a built-in read_image image card, the two are mutually replaceable (the one loaded last takes effect).

Installation and Activation

Use the official command to install:

dsh plugin --profile web add github:dblate/dsh-read-image-view

Restart dsh web after installation to take effect. Only the patch layer supports hot reload.

Development and Hot Reload

When building from source, install dependencies and run the build script first:

pnpm install
pnpm run build

If installing from source, pnpm refuses to run build scripts by default. You need to allow build scripts in the profile’s pnpm-workspace.yaml:

# $DSH_HOME/profiles/web/pnpm-workspace.yaml
allowBuilds:
  dsh-read-image-view: true

Note: Different pnpm versions use different key formats. pnpm 10 uses the bare package name, while pnpm 11 uses the full key with a codeload URL.

No-install mounting approach (the web profile supports patch hot reload):

# 追加到 $DSH_HOME/profiles/web/cordis.patch.yml
- insert:
    - id: read-image-view
      name: /absolute/path/to/dsh-read-image-view/lib/index.js

Usage Boundaries

  • Routing Model Requirement: The current conversation’s routing model must declare support for image input. This is an existing gate of the read_image tool itself (under pure-text model routing, the tool refuses to execute, and this plugin cannot override that).
  • Format Limits: Supports only PNG / JPEG / WebP / GIF (the attachment pipeline accepts only raster images; SVG is rejected).
  • Size Limits: Image size / dimension / pixel limits follow the deployed attachment imageLimits configuration.
  • Log Privacy: Image bytes do not enter conversation logs (events contain only attachment references); the browser reads them through the session-authorized channel.

Compatibility Notes

DeepSeek Harness is currently in the developer preview stage, and breaking changes occur frequently. This plugin depends on the following upstream extension surfaces:

  • tool.call.toolview keyed slot (registers tool cards by wire tool name)
  • ctx.uiConversation.imageUrl / peekImageUrl (session-authorized attachment image URL service)
  • @deepseek-ai/dsh-client-ui-primitives baseline shared modules (Modal / StateDot / icons)

If upstream introduces incompatible changes to these extension surfaces, this plugin requires follow-up adaptation.