Introduction

In DeepSeek Harness (DSH), images generated by the agent through the read_image tool cannot appear directly in the message stream. These images are usually discarded, leaving only the text description. To fix this issue, a way to preview these images in the chat interface is needed.

Plugin Overview

dsh-image-preview is a plugin for previewing images that the agent has already generated in the message stream. It supports multiple image formats (native and transcoded) and renders them through the official UI. The plugin is maintained by tianxia–.

Core Features

  1. Inline Preview: Displays images generated by the agent in the message stream.
  2. Multi-Format Support: Supports multiple image formats (native formats and transcoded formats).
  3. Official UI Rendering: Renders images via the official UI attachment gallery and lightbox.
  4. Path Handling: Handles file paths in read_image attachments and text.

Installation and Enablement

Install the plugin in the DSH Web profile:

dsh plugin --profile web add github:tianxia--/Dsh-ImageProview

Typical Usage

  1. Use read_image to generate an agent image attachment.
  2. Enter the file path in the message to render the agent-image-path node.
  3. Configure maxBytes and allowRoots to control file size and root directory access.

Notes

  1. Text lines are preserved, and image lines are added beside them.
  2. Paths in tool results are not scanned.
  3. The lightbox is official and does not support zooming or panning.
  4. Transcoding depends on tools on the host machine (such as sips, magick, and ffmpeg).

Short Conclusion

By providing inline previews for agent-generated images, dsh-image-preview solves the issue of images being lost in the message stream. After installation, it becomes effective through configuration and tool usage.

Catalog Page
GitHub Repository