In the DSH (DeepSeek Harness) plugin ecosystem, Agents often need to display files or images to users. The common approach is for the Agent to describe image content in a conversation or provide users with an image URL to open in a browser, which fragments the conversational experience. The dsh-show-picture plugin addresses this problem by providing a tool named show_picture that can render image cards directly in the chat flow.

Plugin Introduction

This is a DSH Cordis plugin by Yaing-Yan. Its core purpose is to display images in DSH conversations, supporting local files and remote URLs.

Core Features

  • New Tool: Provides a tool named show_picture to the model.
  • Direct Rendering: The result returned by the tool is displayed directly as an image card rather than a plain-text description.
  • Local File Support: Supports reading local files (up to 10 MiB) and transmitting them using base64 data URLs, without requiring an additional file server.
  • Remote URL Support: Supports loading online images directly through <img> tags.
  • Architectural separation: The Host side registers the tool and HTTP routes, while the Client side registers the card for rendering.

Installation and Activation

It is recommended to install the plugin as a global static plugin. This ensures that every session automatically has access to the tool, and the configuration persists after restarts.

  1. Go to the DSH web configuration directory (default: ~/.dsh/profiles/web):
    cd "$DSH_HOME/profiles/web"
  1. Use pnpm to load the local plugin package:
    pnpm add file:/path/to/dsh-show-picture
  1. Modify the package.json in that directory and add "dsh-show-picture" to the dsh.profile.bundles array.
  2. Restart the DSH application to apply the changes:
    dsh --profile web

Typical Usage

When handling user requests, the Agent calls the show_picture tool. The call takes the following parameters:

Parameter Type Required Description
path string One of two Local image file path (absolute path or workspace-relative path). Supports png, jpg, gif, webp, svg, bmp, ico, avif, tif/tiff.
url string One of two HTTP(S) URL of the image.
alt string No A short caption below the image.

Call examples:

// 展示本地图表
show_picture({ path: "/workspace/chart.png" })

// 展示远程照片
show_picture({ url: "https://example.com/photo.webp", alt: "a photo" })

The JSON structure returned by the tool is usually:

{ "ok": true, "kind": "path", "path": "...", "size": 1234, "mime": "image/png", "alt": "..." }

or

{ "ok": false, "error": "..." }

Limitations and Notes

  • File size limit: Local files larger than 10 MiB return the error FS_TOO_LARGE. It is recommended to compress or resize the image before displaying it.
  • MIME type detection: MIME type detection is based only on file extensions; content sniffing is not supported.
  • Network limitations: Remote URL images must be loadable normally in a browser; otherwise they cannot be displayed (this may be affected by CSP, network availability, or authentication).
  • Client liveness: Image cards are rendered only when the Client is active and the model tool-call loop is running normally.

Summary

dsh-show-picture integrates image rendering into DSH’s tool-call flow, eliminating the need for users to leave the conversation to view images. If you need to build an Agent that can intuitively display visual information, refer to its GitHub repository for installation and configuration.