Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
界面增强 #csv#deepseek-harness#dsh-plugin#markdown#preview#syntax-highlighting

jayhe-mdviewer

通用文件预览器:一键在右侧面板渲染 Markdown、高亮代码、CSV/TSV 表格与图片

1149784810 @1149784810 ⬇ 2 ★ 0 main

安装

dsh plugin --profile web add github:1149784810/jayhe-mdviewer
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

通用文件预览器:一键在右侧面板渲染 Markdown、高亮代码、CSV/TSV 表格与图片

该插件未提供要点说明,请参考仓库 README。

csvdeepseek-harnessdsh-pluginmarkdownpreviewsyntax-highlighting
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/1149784810/jayhe-mdviewer
许可证MIT
主要语言main
下载量2
GitHub 星标0
最近推送2026-08-15
收录日期2026-09-19
分类界面增强

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# jayhe-mdviewer

A general file previewer for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh).

When an agent turn produces files, the produced-files row under the closing
assistant message becomes a vertical, expandable list. Clicking any produced
file opens a right-docked panel that renders it in a style matching its type:
markdown with the **official `MarkdownText`** renderer (full GFM, tables,
fenced code, and TeX math — exactly like the chat), syntax-highlighted code
(~70 languages via bundled highlight.js), csv/tsv as HTML tables, images
inline, and text/code logs as monospace plain text.

[中文文档](README.zh.md)

## Features

- **Per-type rendering** — extension-driven recognition routes every file to
  its own renderer: 📄 markdown (official `MarkdownText`, micromark + KaTeX),
  💻 code (highlight.js syntax highlighting with a language badge),
  📊 csv/tsv (quoted-field-aware table, 500-row cap), 🖼 images, 📃 text;
  known binary formats get a specific "open externally" hint.
- **Vertical expandable produced-files row** — collapsed by default
  (`Produced · N files ▸`); one click expands ALL produced files (no chip cap),
  each with its type icon, name, and an ↗ external-open button.
- **One click → preview** — clicking a file opens the right-docked panel with
  ONLY that file rendered; external-open (↗), close, loading / error / retry,
  and a 15 s read watchdog.
- **Same-origin read route** — the host half registers `GET /mdviewer/read`
  and reads through the deployment's own filesystem service, so local,
  sandboxed, and remote (e.g. E2B) backends all work; text is capped at 4 MB,
  images at 4 MB (served as base64 data URLs), directories and binary content
  are rejected.
- **Bilingual** zh/en dictionaries through the locale service; styled with the
  deployment's theme tokens (light and dark).

## Requirements

- dsh with the `web` surface, `@deepseek-ai/dsh-*` packages at `0.1.0-rc.x`
  (developed against `0.1.0-rc.6`).
- The profile keeps the stock `@deepseek-ai/dsh-client-ui-deliverables` row
  mounted (default in `dsh-web-app`) — it is the source of the produced-files
  turn data this plugin reads.

## Install

The web profile lives at `~/.dsh/profiles/web` (adjust for your profile).

```bash
cd ~/.dsh/profiles/web
pnpm add jayhe-mdviewer
```

Then add one row to the profile's own `cordis.patch.yml` (see
[`install/cordis.patch.example.yml`](install/cordis.patch.example.yml)):

```yaml
- insert:
    - id: mdviewer
      name: 'jayhe-mdviewer'
```

Restart the dsh web process — plugin-set changes take effect on restart.

> The row is simultaneously a host row and the browser-roster entry: the
> `dsh.client` declaration in `package.json` makes the client bundle part of
> `window.__DSH_BOOT__` automatically.

### Rollback

```bash
cd ~/.dsh/profiles/web
# remove the `mdviewer` row from cordis.patch.yml, then:
pnpm remove jayhe-mdviewer
```

## Usage

1. Ask the agent to produce files (write/edit tools).
2. When the turn completes, its produced-files row shows `Produced · N files ▸`;
   click to expand the full vertical list.
3. Click a file → the preview panel opens on the right and renders ONLY that
   file.
   - `↗` beside an entry (or in the panel header) opens the file in the
     external editor instead.
   - To preview another file, click its entry in the produced-files list.

## How it works

```
src/index.ts            host half: GET /mdviewer/read route (webServer + fs)
src/client/index.tsx    client apply: locale dicts, styles, two slot entries
src/client/deliverables.ts  turn-data reading (produced paths, .md filter)
src/client/turnTail.tsx     produced-files row (chain entry, priority -1)
src/client/viewer.tsx       overlay panel (fetch + MarkdownText)
```

- The turn-tail entry reads the engine-published `deliverables` turn data
  (populated by `@deepseek-ai/dsh-client-ui-deliverables` from the mutation
  tools' own `locations`), so a produced file is listed even when the model
  forgets to mention it.
- The panel fetches `/mdviewer/read?path=…&cwd=…` and renders the response
  with `MarkdownText`.

## Security notes

- The read route is same-origin and reads only what the deployment's own
  filesystem service can resolve; it rejects directories, non-regular files,
  and files over 4 MB, and only reads UTF-8 text.
- The route is unauthenticated by design (same trust boundary as the stock
  file-open RPCs); keep this in mind for multi-user deployments.

## Development

```bash
npm install
npm run build        # esbuild bundles + tsc declarations → lib/
npm run typecheck    # tsc --noEmit
```

`lib/` is committed output and shipped in the npm package, so end users never
need a build step.

## Publishing checklist

1. Confirm the published package name in `package.json`.
2. `npm publish` (runs `prepublishOnly` → rebuilds `lib/`).
3. Tag the GitHub repo with the `dsh-plugin` topic so the community can find it.
4. Announce the plugin in the [DeepSeek Harness discussions](https://github.com/deepseek-ai/deepseek-harness/discussions).

## License

[MIT](LICENSE)

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。