dsh-plugin-html-report: Render DSH Session Transcripts as Self-Contained HTML Reports

DSH (DeepSeek Harness) records sessions as JSONL sidecar files. These files are compact yet difficult to share or read directly. The dsh-plugin-html-report plugin reads these JSONL files and generates a self-contained HTML report. Recipients don’t need DSH or any tools installed; they can just open it in a browser to view session details.

Core Features

This plugin renders JSONL transcripts into a single-file HTML, featuring:

  • Self-contained Output: Generates a single-file HTML with inline styles and zero external links. The file can be opened by double-clicking, suitable for offline, intranet, or email attachment scenarios.
  • Data Source Integration: Reads JSONL sidecar files produced by dsh-plugin-transcript.
  • Session Selection: Supports filtering by last active time and session ID prefix.
  • Information Compression & Statistics:
    • Displays statistics at the top: message count, user count, assistant count, tool call count, and character count.
    • Tool call results are collapsed into a single-line chip, with body content truncated to 300 characters, preventing long tool outputs from disrupting readability.
  • Security & Escaping: All text content is HTML-escaped to prevent script injection (e.g., <img onerror=...>).

Installation & Configuration

Installation requires pnpm to be in the system PATH. Run the following command to add the plugin to the web profile:

dsh plugin --profile web add github:121212165/dsh-plugin-html-report

After adding, you need to manually configure cordis.patch.yml. Merge the content of the repository’s root cordis.patch.yml into $DSH_HOME/profiles/web/cordis.patch.yml (do not simply append, as this may result in two YAML documents and cause parsing failures).

You must restart DSH after configuration for the changes to take effect.

Usage

Send the following commands in DSH to generate reports:

  • /report: Renders the most recently active session.
  • /report <sessionId prefix>: Renders sessions matching the prefix (the session- prefix is optional).
  • /report all: Renders all sessions, ordered by last active time in descending order.

Technical Details & Notes

  • Filename Rule: Output filenames are generated by taking the first 12 characters of the sessionId after removing the session- prefix.
  • Input File Format: Only reads files named in the format transcript-YYYY-MM.l.
  • Error Handling: Corrupted lines are skipped and counted; source files are not modified.
  • Test Coverage: The plugin includes pure function tests covering escaping, self-containment checks, and session selection logic.
  • Directory Page: https://www.skillhub.cn/plugins/121212165/dsh-plugin-html-report
  • GitHub Repository: https://github.com/121212165/dsh-plugin-html-report
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye