dsh-mermaid: Rendering Mermaid Diagrams in DSH Markdown

Introduction

When writing documentation, design docs, or conversation records in DeepSeek Harness (DSH), flowcharts and sequence diagrams are often written in Mermaid inside Markdown code blocks. By default, rendering only shows the source code, and you have to mentally “compile” it when reading. If you want to see the diagram directly in the interface, you need a layer of rendering logic on the client side. dsh-mermaid is a DSH client plugin for exactly this purpose: it hands fenced code blocks with the mermaid language tag in Markdown to the Mermaid engine to draw diagrams.

What Is This

dsh-mermaid is published by maintainer bosenok and categorized as a client plugin. In one sentence: it renders Mermaid fenced code blocks into readable diagrams within DSH’s Markdown view.

In implementation, it is a standard DSH bundle: package.json declares dsh.bundle.patch, and cordis.patch.yml inserts mermaid-related configuration into the currently active profile; the web client logic is provided by lib/client.js (dsh.client.platform: web). The package version is 0.1.0, license MIT, requiring DSH version >=0.2.1-rc.2 and <0.3.0 (see engines.dsh in package.json).

Core Features

Below are the capabilities that can currently be verified from the repository documentation; configuration items not appearing in the materials are not expanded upon.

  1. Recognize Mermaid fenced blocks: Process fenced code blocks with the language mermaid in DSH Markdown and render them as diagrams (consistent with the README introduction).
  2. Client web mounting: Access the running DSH application through bundle patch; once enabled, client scripts handle rendering (lib/client.js).
  3. Alignment with DSH plugin mechanism: Supports desktop plugin pages, CLI installation, and local path installation; in development mode, HMR can apply to the running application.

Build-side notes: distributable artifacts are in lib/; source code is in src/, and the client needs to be built with Vite (npx vite build) and then build/wrapper.js generates lib/client.js. Third-party dependencies and licenses are listed in THIRD_PARTY_NOTICES.md in the repository (dev dependencies include mermaid ^12.2.0).

Installation and Activation

Installation commands follow the GitHub README; do not modify repository paths on your own.

Desktop application

  1. Open Plugins and install github:bosenok/dsh-mermaid.
  2. If the repository is private, ensure your machine has git access permissions first.
  3. After installation, enable the bundle in the interface.

Command line

dsh plugin --profile <profile> add github:bosenok/dsh-mermaid

Replace <profile> with the profile name you actually use.

Local directory (development or custom versions)

dsh plugin --profile <profile> add file:/path/to/dsh-mermaid

Replace /path/to/dsh-mermaid with your local checkout path.

After enabling the bundle, the plugin mounts onto DSH; hot module replacement (HMR) can apply to the running application. If the client portion is not updated, the README recommends restarting the application so the client rebuilds and loads.

desktop profile note

For the application-hosted desktop profile, dsh plugin --profile desktop add only installs dependencies and copies the package; it does not automatically enable the bundle like a normal profile. You need to choose one of the following:

  • Add the package name to dsh.profile.bundles in ~/.dsh/profiles/desktop/package.json; or
  • Enable it on the desktop Plugins page.

Other profiles generally automatically enable installed bundles after installation.

Typical Usage

The materials do not provide a separate configuration file example; the usage is simply: write standard Mermaid fenced blocks with the language tag mermaid in Markdown that DSH will display. The plugin recognizes and renders them on the client side.

Write a fenced code block in the Markdown body, with the first-line language tag mermaid, for example:

```mermaid
flowchart LR
  A[Markdown] --> B[dsh-mermaid]
  B --> C[Diagram]
```

In conversations, notes, or the plugin’s built-in Markdown preview, if the bundle is enabled and the DSH version satisfies the engines requirement, the corresponding block should display as a diagram rather than plain text.

Use Cases and Notes

Who it’s for

  • Developers who frequently write architecture descriptions, flows, and state machines in DSH and are already accustomed to using Mermaid to express structure.
  • People who want to view diagrams directly within the Harness interface, reducing the need to copy to external Mermaid editors.

Suggestions before use

  1. Permissions and trust: The plugin runs locally with the current DSH process and participates in client-side Markdown rendering. Before installation, it is advisable to browse the source code and MIT license of the GitHub repository and be aware of the third-party components bundled in lib/ (see THIRD_PARTY_NOTICES.md).
  2. Version matching: engines.dsh is limited to above the 0.2.x RC segment and below 0.3.0; before upgrading the DSH major version, confirm whether the plugin has caught up.
  3. Private repositories: When installing via github:bosenok/dsh-mermaid, private repositories require local git credentials to be available.
  4. Ecosystem notes: The DSH community plugin catalog (such as the entry on SkillHub) is maintained by the community and has no official affiliation with DeepSeek / High-Flyer; installation sources should be based on the catalog page or GitHub that you trust.

Conclusion

dsh-mermaid connects “writing Mermaid in Markdown” with “viewing diagrams directly in Harness.” The changes are concentrated in the client bundle, and the installation and activation methods are consistent with other DSH plugins. To learn more or submit an issue, you can visit:

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye