During the usage workflow of DeepSeek Harness (DSH), writing Markdown content directly in the input box often lacks immediate feedback. This blind-input experience is especially poor when dealing with mathematical formulas or complex typography. The dsh-markdown-preview plugin uses the officially provided conversation.input.dock slot to add a separate preview panel above the input box, solving this problem.

This is a DSH Web plugin. It leverages official Slot injection to provide real-time Markdown rendering and KaTeX formula display above the chat input box. The plugin is maintained by thomasly, released under the MIT license, and does not modify DSH core code.

Core Features

  1. Real-time Markdown Preview: Supports immediate rendering of bold, italic, inline code/code blocks, strikethrough, blockquotes, lists, tables, and other syntax.
  2. KaTeX Formula Support: Through a renderer built inline, it supports real-time display of inline formulas such as $x+y$ and block-level formulas using $$...$$.
  3. Sticky Layout: The preview panel is attached to the top edge of the input card. The input box itself remains fixed in position and will not jump as preview content increases or decreases.
  4. Interactive Controls: Provides one-click collapse/expand functionality, with the state saved in local storage.
  5. Safe and Lightweight: Raw HTML in drafts is escaped to prevent execution of malicious tags; when the draft is empty, no rendering occurs, avoiding layout jitter.

Installation and Activation

There are two installation methods. Choose one based on your situation. Do not mix them.

This method installs the plugin through the DSH release channel.

dsh plugin --profile web add github:thomasly/dsh-markdown-preview

After running the command, you need to restart dsh web for the plugin to take effect.

Method 2: Manual Local Mounting

This method requires manually editing configuration files.

  1. Clone the plugin into the profile’s plugin directory:
    mkdir -p ~/.dsh/profiles/web/plugins
    git clone https://github.com/thomasly/dsh-markdown-preview.git ~/.dsh/profiles/web/plugins/dsh-markdown-preview
  1. Link it into the profile dependencies:
    cd ~/.dsh/profiles/web
    pnpm add --save-exact file:./plugins/dsh-markdown-preview
  1. Append a registration entry in ~/.dsh/profiles/web/cordis.patch.yml:
    # Add under insert
    - id: markdown-preview
      name: dsh-markdown-preview
  1. Restart dsh web to activate it.

Usage

Open any session and type Markdown directly in the input box to see the changes above. The following are some typical use cases:

  • This is **bold** text: The text is immediately bolded in the preview.
  • Inline formula $x+y$: Mathematical symbols are displayed in the preview.
  • Block-level formula: Use $$ at the beginning and end; it is rendered centered in the preview.
  • Clear the input box: The preview panel automatically disappears.

Note: The preview is only auxiliary display. The content that is sent is always the original Markdown text and is processed by DSH’s built-in renderer. The two do not affect each other.

Caveats

  • Security: The plugin escapes HTML in the draft and only renders Markdown structure. Pasted malicious tags will not be executed.
  • Permissions: As a DSH plugin, its runtime permissions are consistent with the current DSH process. Please check the source code and license before installation.
  • Compatibility: The plugin registers an official Slot and is naturally compatible with existing input box features (such as / trigger, attachments, plan mode, etc.).

Summary

dsh-markdown-preview is a lightweight auxiliary tool. Without modifying DSH core code, it provides a WYSIWYG Markdown preview experience for the Web client. For more details, refer to the project directory or the GitHub repository.