DSH Session Markdown Export Plugin

Introduction

After finishing a session in DeepSeek Harness (DSH), you often need to preserve it: take notes, convert it into documentation, or reproduce it for a client. DSH currently has no built-in feature to export sessions—you can only manually copy and paste, which is tedious and prone to losing information. The dsh-session-markdown-export plugin adds an “Export as Markdown” option to the sidebar session menu, allowing you to export any session as a self-contained, collapsible Markdown document. It’s ideal for developers who need to persist session content.

What Is This

dsh-session-markdown-export is a DSH plugin maintained by user Hzl0929. It leverages DSH’s sessionQuery interface to read session logs, registers a download route /api/session.markdown-export on the Host side, and adds an entry point to the session menu on the Client side. Upon export, it generates a standalone Markdown file for each session, including front matter, a summary, and turn-by-turn sections in the body. It supports collapsing thinking traces and tool calls into <details> blocks, and also supports exporting plain text.

Core Features

  • One session, one document: The exported file includes front matter (session, title, created, exported, cwd, preset, models) + a summary + turn-by-turn sections in the body.
  • Collapsible: Thinking traces, tool calls, and results are wrapped in <details> blocks to keep the body clean; you can also disable folding to output plain text.
  • Cold/hot consistency: By reading logs directly via sessionQuery, the export result is consistent whether the session is running, finished, or archived.
  • Context-aware: Exports based on the current model surface; events that were compressed or replaced won’t reappear.
  • Local timezone: Timestamps are rendered in the browser’s timezone, overridable via tz.
  • Bilingual: UI text follows the DSH language setting, while the document language can be specified independently.

Installation & Enablement

Run the following command in your terminal to install the plugin:

dsh plugin --profile <profile> add dsh-session-markdown-export

Or install from source:

dsh plugin --profile <profile> add "git+https://github.com/Hzl0929/dsh-session-markdown-export.git#<commit>"

After installation, restart the profile (or refresh the Web page), and you’ll see the “Export as Markdown” option in the sidebar session menu.

Typical Usage

  1. In the DSH sidebar, find the target session and click the “⋯” menu next to the session title.
  2. Select Export as Markdown.
  3. The browser will download a file with the name format <title>_<timestamp>_<short session id>.md.

The exported file structure looks like this:

---
session: session-...
title: 会话标题
created: 2026-11-19T07:30:00+08:00
exported: 2026-11-19T08:12:00+08:00
cwd: C:\...
preset: standard
models: deepseek-flash
---
# 会话标题
> 12 轮对话 · 34 条消息 · 57 次工具调用 ...
## 第 1 轮
**用户** ...
**助手** ...
<details><summary>思考</summary> ... </details>
<details><summary>工具调用 read_file</summary> ... </details>

Optional Parameters

The download route accepts query parameters for scripted exports:

Parameter Values Default
lang zh / en zh
tz IANA timezone Browser timezone
tools names / details / off names
tool Max characters for tool results 1500
args Max characters for tool arguments 1200
folding details / plain details
system 1 / 0 — include system prompt 0
usage 1 / 0 — include usage stats 1
fm 1 / 0 — include front matter 1

Use Cases & Notes

This plugin is suitable for developers, researchers, or technical writers who need to convert DSH sessions into documents. If you only occasionally need to copy a few exchanges, you can use the DSH UI directly. But if you need to batch-export, archive, or convert sessions into shareable Markdown, this plugin saves a lot of effort.

At runtime, the plugin accesses local session logs with the permissions of the current DSH process. It does not make network calls, has no telemetry, and makes no external requests. Before installing, it’s recommended to review the source code (GitHub) to confirm there are no privacy concerns.

In Short

dsh-session-markdown-export turns DSH sessions into persistent, shareable Markdown documents. It doesn’t alter DSH’s core behavior—it simply exports information that already exists in a more structured format. If you’re using DSH for long-term projects or need to keep records of your sessions, this plugin can save you a lot of manual organization work.

  • Catalog page: https://www.skillhub.cn/plugins/Hzl0929/dsh-session-markdown-export
  • GitHub: https://github.com/Hzl0929/dsh-session-markdown-export
羽毛球分组比赛记分
小程序二维码

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

Xiaoye