Preface¶
After prolonged use of DSH Web, session records can accumulate more and more. The official entry point typically allows for archiving, but archiving primarily hides sessions from the sidebar; if archived sessions lack a recovery entry point, subsequent searching can be troublesome. When exporting sessions, if you can only operate one by one, a large number of historical records can make this very time-consuming.
dsh-session-management is a session management plugin for DeepSeek Harness (DSH) Web, maintained by cokiscarazo-rgb and licensed under MIT. It is primarily designed to fill the gaps in DSH Web’s official session management capabilities, allowing archiving, unarchiving, true deletion of local chat records, and batch export of session data to be centrally managed within the “Settings” panel.
What This Is¶
dsh-session-management is mounted under the web profile through the DSH plugin mechanism. After installation and restarting dsh web, a “Session Management” entry will appear in “Settings”.
It primarily addresses three types of issues:
- Archived sessions can be recovered;
- Local session records can be truly deleted;
- Session data can be exported in batches.
Core Features¶
Archiving and Unarchiving¶
The plugin supports archiving sessions and also one-click archiving of all sessions. After archiving, session records are still retained but are hidden from the sidebar list.
Unlike simple archiving, the plugin also provides unarchiving capabilities, supporting:
- Unarchiving individual sessions;
- Batch unarchiving by workspace;
- Batch unarchiving by month.
True Deletion of Local Chat Records¶
The plugin provides the ability to delete local chat records, which removes the session log files from disk:
session.jsonl
session.jsonl.zstd
Along with their corresponding pair files.
When executing “Delete All Chats”, running sessions are automatically skipped to prevent logs from being rewritten while the session is still active.
Batch Export of Session Data¶
The plugin supports one-click batch export of session data, generating ZIP archives consistent with the official format one by one:
dsh-session-<id>.zip
This is suitable for making backups before deletion and for organizing historical sessions for migration to other locations.
Viewing Archived Chats¶
After opening the management window, you can view archived chats grouped by workspace or by month.
The following operations are supported:
- Sort by creation date, ascending or descending;
- Sort by update date, ascending or descending;
- Collapse or expand all groups;
- Batch unarchive by group;
- Batch delete archived chats within a group.
Interface Language¶
The plugin interface is bilingual in Chinese and English and switches dynamically with DSH’s language settings.
Installation and Activation¶
Prerequisites¶
- Node.js, including npm;
dsh plugindepends on pnpm.
DSH plugins are mounted via profiles, with dsh web corresponding to the web profile. After installation, you need to restart dsh web to see the new entry point.
When dsh is Globally Installed¶
If the dsh command is already directly available on your machine, run:
dsh plugin --profile web add dsh-session-management
When Running dsh via npx¶
If you typically start DSH using npx @deepseek-ai/dsh, run:
npx -y @deepseek-ai/dsh plugin --profile web add dsh-session-management
After installation is complete, restart:
dsh web
Open “Settings” and you will see the “Session Management” entry, indicating the plugin is active.
Version Issues¶
If you still encounter issues related to an older version after installation, such as seeing declares no dsh.bundle, you can first check the latest version number of the package on npm and then explicitly specify the version for reinstallation. When DSH is globally installed, you can use a command like:
dsh plugin --profile web add dsh-session-management@<version>
When running DSH via npx, prefix the command with npx:
npx -y @deepseek-ai/dsh plugin --profile web add dsh-session-management@<version>
Uninstallation¶
Run:
dsh plugin --profile web remove dsh-session-management
Then restart dsh web.
Typical Usage¶
Here is a common sequence of operations.
-
Install the plugin and restart
dsh web. -
Open “Settings” and navigate to “Session Management”.
-
Click “Manage” to open the archived chat management window.
-
Choose a view mode:
- View by workspace, suitable when multiple workspaces coexist;
- View by month, suitable for organizing historical sessions chronologically.
-
If you simply want to hide sessions for now, you can use the one-click archive-all-sessions function. The records are retained but hidden from the sidebar list.
-
If you need to clean up local records, you can first perform “Export Data” to generate ZIP archives in the official format.
-
After confirming the backup is complete, proceed with “Delete All Chats”. Running sessions will be skipped.
-
If you previously archived sessions by mistake, or if you only want to handle a specific group of sessions, you can batch unarchive them or delete the archived chats within that group from the management window.
Applicable Scenarios and Notes¶
This is suitable for the following scenarios:
- Long-term DSH Web users with a large number of sessions;
- Those who need to recover sessions after archiving;
- Those who need to truly delete local chat records;
- Those who need to batch export session data;
- Those who wish to manage historical sessions by workspace or month.
Points to note before use:
- The plugin runs with the current
dshprocess permissions; you should review the source code and license before installation; - Deletion operations will remove local session log files; it is recommended to export data first before proceeding;
- Running sessions will be skipped and cannot be directly deleted;
- Deleting a parent session does not cascade to delete child agent sessions; child agent sessions are independent records and can be deleted separately;
- Image attachments in chats use content-addressed storage and may be shared by multiple sessions; deleting a session will not delete the associated attachments.
Links¶
Community directory:
https://www.skillhub.cn/plugins/cokiscarazo-rgb/dsh-session-management
GitHub: