Introduction¶
DSH (DeepSeek Harness) utilizes a plugin architecture. When previewing Markdown reports or documents during a session, switching to an external editor interrupts the context, while displaying them directly in the chat lacks proper typography and interactivity. The dsh-md-overlay plugin solves this pain point by introducing a floating/dockable Markdown preview panel and an md_preview model tool, enabling one-click previews within the session.
Plugin Overview¶
This is a DSH Web client plugin, maintained by 2017java, and is licensed under the MIT License.
The plugin provides two core capabilities:
1. md_preview model tool: Reads .md files within the workspace and triggers the panel preview.
2. Preview panel: Supports floating/dockable dual modes, multi-tab management, drag-to-adjust width, and syntax highlighting for code blocks.
Core Features¶
md_previewmodel tool: This tool is registered as a global tool, visible across all sessions. When invoked, the plugin reads the Markdown file in the workspace, displays a preview card in the chat, and simultaneously opens the right-side preview panel.- Floating / Dockable Modes: By default, the panel floats above the content. Clicking the 📌 icon in the panel header docks it, pushing the page layout to integrate seamlessly; clicking it again restores the floating mode.
- Multi-tab and Dragging: Supports opening multiple documents at once, switching between tabs, and closing them individually. The panel width can be adjusted by dragging the left edge, ranging from 320px to 75% of the screen width.
- Code Block Rendering: Supports syntax highlighting for JS/TS/Python/Bash/YAML/HTML/CSS, displays line numbers and language badges, and provides a one-click copy feature.
- Table of Contents and Lists: Automatically collects document headings to generate a Table of Contents (TOC); clicking an item smoothly scrolls to the corresponding section. Supports task lists (
- [x]) and nested lists. - HTML Handling: Automatically strips HTML comments and unescapes HTML entities to ensure safe rendering.
- Security Boundaries: The plugin only reads files within the workspace, and files larger than 1MB will be rejected from loading.
Installation and Activation¶
Prerequisites: Ensure DSH (dsh web) is running properly.
dsh plugin --profile web add dsh-md-overlay@latest
After installation, please hard refresh the browser (Cmd/Ctrl + Shift + R) to load the new plugin.
Typical Usage¶
- Command Trigger: Enter “preview report.md” in the chat. The Agent will invoke the
md_previewtool, and the right-side panel will automatically open and render the document. - Artifact Click: If a
.mdartifact (such as an output file) appears in the chat, simply click the file name, and the panel will automatically open and display its content.
Notes¶
- Relative Path Images: Parsing relative-path images in Markdown is not currently supported.
- Special Syntax: LaTeX and Mermaid are not currently supported (these are the strengths of better-sidebar and are not included in the current plugin roadmap).
- Trigger Mechanism: The preview card and panel only appear when the
md_previewtool is invoked or a.mdartifact is clicked. Other file types are handled by the system’s default application or the sidebar.
Summary¶
dsh-md-overlay is ideal for users who need to frequently view Markdown documents and code reports during DSH sessions. By providing a floating preview window that can be integrated into the layout, it reduces the overhead of switching applications.
- Plugin Directory: dsh-md-overlay - SkillHub
- Source Code: dsh-md-overlay - GitHub