Introduction¶
DeepSeek Harness (DSH) adopts a “everything is a plugin” architecture, and plugins run under the current DSH process permissions. Developers often need to see the final rendered result of Markdown in both the input area and conversations more intuitively, so they can quickly fine-tune formatting and layout. This article introduces a client-side plugin that renders your outgoing messages directly as Markdown.
What Is This¶
- Name: dsh-composer-md-preview
- Maintainer: wangjiaxi
- Category: Client-side
- Purpose: Provides real-time preview in the composer and Markdown rendering for sent messages in DSH, so that Markdown syntax appears as formatted content in both the input box and the conversation.
Core Features¶
1. Direct Rendering in the Composer¶
When Markdown syntax is present in the input box and the toggle is on, the rendered result replaces the raw text in the input box: same card, same padding and border radius, with the send toolbar directly below the card—no extra secondary panel.
- Pressing any key immediately reverts to plain-text editing (cursor stays in place)
- Rendering resumes after 0.7 seconds of inactivity
- Clicking the rendered result also returns to editing
- Plain text or the toggle being off leaves the input box unchanged
2. Rendered Sent Messages¶
Sent messages are rendered as Markdown in the conversation, with the same placement and bubble style as assistant messages.
3. Auto-Wrapping Pasted Code in Code Blocks¶
When you paste code into the input box, the plugin automatically wraps it in a fenced code block and attempts to detect the language (JavaScript, TypeScript, Python, C, C++, Go, Rust, Java, SQL, HTML, JSON, YAML, CSS, Shell script, diff).
- Plain text, lists, single words, links, etc. are left untouched
- Pasting with Shift held (Ctrl+Shift+V or ⇧⌘V) preserves the original text
- Can be disabled via Settings → General → Auto-wrap pasted code in code blocks
- Text already wrapped in fences will not be wrapped again
4. Master Toggle & State Persistence¶
The MD button in the composer toolbar is the master toggle, controlling both composer rendering and Markdown display of sent messages. Turning it off removes the rendered card and reverts messages to raw text. The toggle state is stored in localStorage(dsh-composer-md-preview/v1) and persists across page reloads.
Installation & Activation¶
dsh plugin --profile web add github:wangjiaxi/dsh-composer-md-preview
After installation, refresh the page once:
- It appears as “Markdown Preview” under Settings → Plugins
- The
MDbutton shows up in the composer toolbar - Requires DSH version
0.2.2-rc.3or later (0.2.x line)
Typical Usage¶
-
Enter Markdown syntax
Type headings, lists, bold, blockquotes, tables, etc. in the input box, and observe the toggle between rendered and raw text. -
Paste code
Copy a snippet of code and paste it into the input box; the plugin automatically adds fences and a language tag. Pasting with Shift held preserves the original text. -
Toggle on/off
Click theMDbutton in the toolbar to enable or disable rendering. The toggle state is preserved after a page refresh.
Use Cases & Notes¶
- Ideal for developers who want to see the final Markdown rendering while typing and need sent messages to share the same style as assistant messages.
- The plugin runs under the current DSH process permissions. Review the source code and license before installing.
Closing¶
This plugin provides a unified Markdown rendering experience in both the composer and the conversation, allowing quick format adjustments without any extra tools. For more details and source code, visit:
- SkillHub catalog page
- GitHub repository