Back to home@joao-paulo-santos

dsh-md-view

Markdown view: a safe markdown-to-React renderer for DSH client plugins — GitHub-subset markdown, shared stylesheet, no HTML injection.

Stars
0
Language
JavaScript
Created
Aug 29, 2026
Updated
Aug 29, 2026
GitHub repo

Introduction

dsh-md-view

A DeepSeek Harness (DSH) plugin: a safe markdown-to-React renderer for client plugins, so every surface that shows markdown (READMEs, journals, pads) renders it the same way through one service and one stylesheet.

There is no UI of its own to visit. Plugins inject the client service mdView:

// consumer client half — inject: ['mdView', …]

// 1. Parse + render yourself (you keep the layout):
const blocks = ctx.mdView.blocksOf(markdownText)
return React.createElement('div', { className: 'mine' },
  ctx.mdView.renderBlocks(blocks, { links: { repo: 'owner/name' } }, 'key'))

// 2. One self-contained document:
const Doc = ctx.mdView.component({ text: markdownText })
return React.createElement(Doc, {})

Supported markdown

Headings (#..######), thematic breaks, fenced code blocks, blockquotes, GFM tables, unordered/ordered lists with one nesting level and [x] task items, paragraphs, and inline code, bold, em, em, strike, [links](url), ![images](url) — plus raw <img> tags (badges, screenshots) in paragraphs.

Contract

  • Rendered output is React elements with plain text nodes only; markdown can never inject HTML (<script> stays visible text).
  • links.repo (optional) absolutizes document-relative hrefs and image srcs against https://github.com/{repo}/blob/HEAD/... and raw.githubusercontent.com/{repo}/HEAD/...; without it relative links stay as written.
  • The mdv-* stylesheet is installed once by this plugin; consumers add no CSS of their own for markdown.
  • No persistence; the host half is a stub.

How to install

Requires a DeepSeek Harness checkout and a profile, here web. The plugin has no dependencies:

mkdir -p ~/dsh-plugins && cd ~/dsh-plugins
git clone https://github.com/joao-paulo-santos/dsh-md-view.git

# from the harness checkout
pnpm dsh plugin --profile web add ~/dsh-plugins/dsh-md-view

# verify the profile still composes
pnpm dsh --profile web --dump-config

Restart the harness. Plugins that inject the mdView service can now render markdown.

Dependencies

(none)

Plugins dependent on this

  • dsh-workspace-history renders compaction journal bodies with it (optional; degrades to plain text)
  • dsh-wo-github renders repository READMEs with it (optional; degrades to plain text)