Introduction¶
In the DeepSeek Harness (DSH) plugin ecosystem, session content is often presented as raw text or streaming data. If you need to archive conversation records as readable files, manual copying and pasting is usually required. This article introduces dsh-save-session, a plugin that can export session content to Markdown or rendered HTML with one click from the session title bar.
Overview¶
dsh-save-session is a client-side plugin maintained by user jh1016248 under the MIT license. Its core value lies in simplifying the session export workflow: through UI buttons or conversation commands, it automatically filters out noise such as reasoning traces and tool call records, retains only the main content from the user and assistant, and generates clean Markdown or rendered HTML files.
Core Features¶
Export Formats¶
The plugin provides two export modes:
- Save MD: Downloads a
session-<timestamp>.mdfile. The content is pure Markdown, suitable for direct editing or document storage. - Save HTML: Downloads a
session-<timestamp>.htmlfile. This file includes Markdown rendering effects and supports headings, code blocks, lists, quotes, links, tables, and other formats. A table of contents panel is placed on the left side of the file, with one line per message (role + single-line preview); clicking a line jumps to it. It is automatically hidden on narrow screens.
Content Filtering¶
Exported files contain only user messages and assistant main content. The following content is always filtered:
- Model reasoning process
- Tool calls and tool results
- Injected context / sub-agent reports
Tool Integration¶
The plugin registers a tool save_session_md on the model side. Developers can invoke this tool through natural language instructions in the conversation, for example by saying “save the current session as md”. The tool supports an optional path parameter and writes to the session working directory by default.
Installation and Setup¶
Before installation, ensure your environment meets the dependency requirements.
- Install the plugin
Use the following command to install:
dsh plugin --profile web add dsh-save-session
-
Environment dependencies
* Node.js version must be >= 20.
*@deepseek-ai/dsh-toolsversion >= 0.1.0-rc.8 must be installed.
* The client slot must inject@deepseek-ai/dsh-client-runtimeand@deepseek-ai/dsh-client-ui-slots. -
Restart Profile
After installation, the profile must be restarted to take effect. Rundsh webto restart the service.
Typical Usage¶
After installation and restart, you can use it in the following two ways:
- UI operation: In the action row on the right side of the session title bar, click the “Save MD” or “Save HTML” button. The browser will automatically download the corresponding file.
- Conversation command: In the conversation, directly send text containing tool intent (such as “save the current session as md”), and the system will automatically invoke the
save_session_mdtool to perform the export.
Notes¶
- Activation mechanism: The plugin implements its functionality by registering UI slots and the tool registry. Be sure to restart the profile after installation.
- Source code inspection: As a plugin, it is recommended to inspect its source code and license before installation to ensure compliance with your local environment’s security policies.