Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture, allowing users to extend functionality according to their actual needs. Inserting Mermaid diagrams into conversations is a common requirement, but browser-native rendering often lacks interactivity, making it difficult to zoom or view specific parts. The dsh-chat-enhancer plugin focuses on solving this issue by using a dedicated preview window to improve diagram readability and operational experience.

Plugin Overview

This is a plugin maintained by Tieboyh, designed to provide focused conversation enhancement for DeepSeek Harness Web. It starts with visual interaction for Mermaid diagrams, improving diagram presentation during development and discussions through centered preview, zooming, and panning.

Core Features

The core capabilities of the current version 0.2 of this plugin focus on handling Mermaid code blocks:

  • Multi-format rendering: Supports rendering mermaid, mermaidjs, and mmd fenced blocks in conversations directly into SVG.
  • Centered preview window: Diagrams no longer occupy the full browser window; they are displayed in a centered preview window while preserving context.
  • Smooth zooming: Provides pointer-centered mouse-wheel zooming with a smooth feel.
  • Panning and controls: Supports click-and-drag panning, and provides “Fit to Window”, “100% Zoom”, and view control via keyboard shortcuts.
  • Theme responsiveness: When DSH switches between light and dark themes, diagrams automatically re-render to match the current color scheme.
  • Safety and fault tolerance: Uses Mermaid’s securityLevel: strict, and falls back to displaying the source code if rendering fails.

Installation and Activation

Run the following command in the terminal to install the plugin:

dsh plugin --profile web add dsh-chat-enhancer

After installing, upgrading, or removing the plugin, you must restart DSH Web for changes to take effect.

Typical Usage

Ask the model in a conversation to return a Mermaid code block, for example:

```mermaid
flowchart LR
  A[开始] --> B[完成]

```

Click the “Open” button on the rendered result to enter the preview window. Inside the preview window:

  • Zoom: Scroll the mouse wheel to zoom around the pointer, or use the +/- keys.
  • Pan: Hold the left mouse button and drag.
  • View control: Press 0 to fit to window, or press Esc to close the preview.

Notes

This plugin uses Mermaid’s strict security level and falls back to displaying the source code if rendering errors occur. After installation, be sure to restart the DSH Web process.

Summary

dsh-chat-enhancer introduces a dedicated preview interaction layer, solving the problem of precise inspection of Mermaid diagrams in plain-text conversations. For technical scenarios that frequently discuss architecture, processes, or data flows, the plugin provides clearer visual feedback.

Directory Page | GitHub Repository