Overview

In the DSH (DeepSeek Harness) environment, file-domain operations require dedicated components to handle different types of file presentation. For image files, generic components often struggle to balance performance and security. dock-images aims to address this pain point by providing a dedicated image viewing solution.

What It Is

dock-images is a client plugin maintained by AKS1st. It registers an image viewer for the dock-files file domain, taking over presentation for files with raster and image extensions and reading image content via the /dock-images route.

Core Features

  • Multi-format support: Supports eight common image formats: PNG, JPEG, GIF, WebP, BMP, SVG, ICO, and AVIF.
  • Whole-file reading: The plugin reads the entire file at once and converts it to a base64 data URL for rendering. If the file size exceeds 20 MiB, the read operation is rejected upfront and returns a 413 status code.
  • SVG safety: SVG files are rendered only through an <img src="data:..."> tag, without executing innerHTML injection, to prevent potential security risks.
  • Memory and paths: Because it reads whole files, very large images may consume significant memory (there is currently no pixel-level limit). The read path is not restricted to the session workspace, so it can open images referenced in the conversation context that are located outside the workspace.

Installation and Enablement

This plugin must be installed together with dock-base and dock-files. Run the following commands in order:

dsh plugin --profile web add dock-base
dsh plugin --profile web add dock-files
dsh plugin --profile web add dock-images

Typical Usage

  • Coexistence: It coexists with viewers such as dock-editor and dock-markdown; the system automatically assigns the appropriate viewer based on the file extension.
  • Dispatched opening: dock-images is opened as the image viewer for displaying image content in the DSH environment.

Notes

  • Dependencies:
  • Required dependencies: dock >= 0.1.0, dock-files >= 0.1.0, a DSH Web environment, and cordis ^4.0.0-rc.7.
  • Optional dependency: react ^18.2.0 (required for client rendering; if not provided, the viewer UI will not activate).
  • Route security: The /dock-images route only accepts POST requests from trusted sources (loopback addresses / trustedHosts + same-origin checks).
  • File size limit: File reads are limited to 20 MiB; larger files will be rejected.

Conclusion

dock-images provides the underlying capability for viewing images in a DSH environment, especially secure SVG handling and cross-workspace file reading. Refer to the links below for its source code and plugin catalog information.