DSH Markdown Preview: Right Panel Markdown Preview & Single-File HTML Export

Introduction

In DeepSeek Harness (dsh), the session workspace is often cluttered with .md files such as READMEs, design notes, and plugin documentation. While dialogue references and drawer previews handle “quick glances,” reading a document as a standalone draft or exporting a nicely formatted HTML offline often requires opening another editor or running a conversion script yourself.

Below is the community plugin DSH Markdown Preview (maintainer: MrMark019, GitHub: MrMark019/DSH_MarkdownPreviewPulgin). It provides a Markdown workspace accessed via the “Start” page in the right sidebar: browse Markdown in the workspace, preview / source code / side-by-side comparison, and export as a self-contained single-file HTML. Targets dsh 0.2.2-rc.1 (desktop and dsh web supported). Categorized as a client-side plugin; current stars: 0. License: MIT (© 2026 MrMark019). Note that the DeepSeek Harness community plugin directory is an independent site and has no official affiliation with DeepSeek or Quant.

What is this

The plugin registers a “Start” page card in the right sidebar. Upon opening, it presents a Markdown file browser and reading panel within the session workspace. Implemented in pure JavaScript, with no build steps, no node_modules, and no forking of the main app; it includes its own Markdown converter, sharing the same HTML logic for preview and export.

Compared to other Markdown-related community plugins, the entry point and focus differ: some follow conversation references or chat chips, while others reuse the shell’s built-in renderer (including KaTeX, mermaid, etc.). This plugin emphasizes workspace browsing from the sidebar and offline-openable HTML export; it does not handle .md reference clicks inside the chat. .md files opened from “Workspace Files” are still handled by the official document preview; this plugin only adds an Export HTML action to the corresponding toolbar.

Core Features

  • “Start” Page 4th Card: Placed after Workspace Files, New Terminal, Browser, and before “More Tools”. Opens in tabs within the same panel.
  • Workspace Browser: Directory drill-down, breadcrumbs to backtrack, name filtering; lists only .md / .markdown. Bottom path box supports relative or absolute paths to open files directly.
  • Three Views: Preview, Source, Side-by-side; side-by-side automatically degrades to preview on narrow panels (container width < 560px). View selection and recently opened files are remembered per session.
  • Export Single-File HTML: Embedded CSS (including prefers-color-scheme: dark), images converted to base64 where possible; no network or repository dependency. Single image limit: 4 MiB, max 8 images; images unreadable or exceeding limits retain relative paths and will still display if in the same directory as the source.
  • Built-in Preview Integration: When opening a .md via “Workspace Files”, the document toolbar shows Export HTML (not shown for non-Markdown), sharing the same conversion and download logic as the panel.
  • Internationalization and Themes: Chinese / English text; dark and light modes follow --dsw-alias-* theme tokens.

When reading large files: limit approx. 40 pages / 1.5 million characters; exceeding this truncates and prompts in the panel. The panel is read-only and does not write back to the workspace; export relies on browser or desktop shell download capabilities.

Supported Markdown Features

Based on CommonMark block and inline foundations, plus the GFM subset commonly used in docs: headers (ATX / Setext), paragraphs and hard line breaks, horizontal rules, emphasis, fenced and indented code blocks (with language tags), lists and task lists, nested blockquotes, GFM tables, links and images, automatic links, and YAML frontmatter at the beginning of lines (rendered as a metadata block).

Unsupported: Raw HTML (escaped for display, not executed), footnotes, math formulas, MDX, custom containers. If you need KaTeX, mermaid, or session-side drawer previews, you should choose other community plugins listed in the README.

Installation and Usage

Refer to the repository README for installation commands. Common profile names for the desktop version are desktop and web for dsh web; please replace with your actual local profile name:

dsh plugin --profile desktop add github:MrMark019/DSH_MarkdownPreviewPulgin

After installation, refresh the page once so the browser-side bundle loads the new plugin.

Note: Do not install the npm package named dsh-markdown-preview using dsh plugin add dsh-markdown-preview — that is a different plugin targeting dsh 0.1.x. For local development, you can link a checkout into the profile:

dsh plugin --profile desktop add -w /path/to/DSH_MarkdownPreviewPulgin

The plugin accesses workspace files with the current dsh process permissions; you should read the source code and LICENSE before installing to ensure it meets your security and compliance requirements. package.json specifies engines.node as >=20.0.0. Development and self-testing can use:

node --test test/client.test.mjs

Typical Usage

  1. Expand the right sidebar, return to the “Start” page, and click the fourth card Markdown Preview.
  2. Navigate to the target folder in the directory and select a .md file; or type a path in the bottom path box, e.g., D:\path\to\note.md.
  3. Switch at the top between Preview / Source / Side-by-side; when you need a deliverable draft, click Export HTML to get <filename>.html.
  4. If the file is already open via “Workspace Files”, click Export HTML in the document toolbar; the logic is consistent with the panel.

The export result is a <!doctype html> document with no external CSS/JS, suitable for archiving, email attachments, or offline reading.

Use Cases and Limitations

Suitable: Systematically browsing workspace Markdown within a dsh 0.2.x session; comparing source code with rendering; generating single-file HTML that can be double-clicked to open and with images embedded where possible.

Limitations (stated in README): The panel is bound to the session; without a session, there is no workspace to browse. It relies on the Web/Desktop transport layer and will explain the reason for failure rather than failing silently. Only Chinese and English text; no keyboard shortcuts. Editing, renaming, deleting, or file watch auto-reload (manual re-read is possible) are not supported. Footnotes and formula rendering are not implemented.

Conclusion

DSH Markdown Preview completes the path of “reading md in the workspace as a document” and “delivering a shareable HTML” in the right sidebar, complementing preview plugins within the conversation. See the code and documentation in the GitHub repository; community directory page:

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

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

Xiaoye