Introduction¶
When running sessions in DeepSeek Harness (DSH), the “…” menu on the session row in the Web sidebar is the entry point for daily operations. However, the actions provided by the official menu are limited: after a session finishes and you want to look at it later, there is no “Mark as Unread”; to paste the Session ID into a script, you have to find it yourself on the interface; archiving happens with one click, and accidental touches have no buffer. When there are many sessions, these small things require a detour every time.
DSH’s philosophy is “everything is a plugin,” and filling these gaps in the interface layer is exactly what plugins are for. dsh-more-session-operations is such a plugin: it adds three operations—“Mark as Unread,” “Copy Session ID,” and “Delete Session”—to the session row’s “…” menu, and adds a secondary confirmation for the official archive. Below is an introduction in the order of features, installation, and typical usage.
What is this¶
dsh-more-session-operations is a DSH client plugin maintained by Ruiming-cn, licensed under MIT, with the current version being 0.3.1. One-sentence positioning: A DeepSeek Harness Web sidebar session row “…” menu enhancement plugin.
The plugin consists of two sides:
- The host side registers a deletion endpoint
POST /__dsh-more-session-operations/delete, responsible for session deletion; - The client side is responsible for DOM injection of menu items, intercepting archive operations, and popping up confirmation dialogs.
Runtime environment requirements: The client targets the web platform (dsh.client.platform: web) and injects dependency @deepseek-ai/dsh-client-runtime; the host side requires Node >= 20, with peerDependencies being cordis >=4.0.0-rc <5.
Core Features¶
Mark as Unread¶
A “Mark as Unread” operation is added above “Copy Session ID”. Upon clicking, it reuses the official green indicator dot for “Completed but not opened”; it automatically clears after entering or selecting the session, so manual marking as read is no longer needed. The unread marker is like the official completion indicator and is a session runtime state, not persisted to disk.
Copy Session ID¶
Upon clicking, it writes the Session ID to the clipboard and briefly displays “Copied” on the menu item.
Delete Session¶
Upon clicking, a secondary confirmation dialog pops up first; after confirmation, the session is physically deleted via the host side POST /__dsh-more-session-operations/delete. The deletion chain includes:
- Stopping the running agent;
- Refreshing/separating the session;
- Deleting the log directory and projection/workspace accounting.
At the same time, all descendant sub-agent sessions are recursively and synchronously deleted; normal forked sessions are preserved.
Same-Origin Protection¶
The deletion endpoint validates Origin / Sec-Fetch-Site and rejects cross-origin browser requests.
Secondary Confirmation for Archiving Session¶
Intercepts the official “Archive session” menu item: upon clicking, a confirmation dialog pops up first; after confirmation, it calls the official __workspacesSvc.archiveSession(sessionId) to complete the archiving, and does nothing if cancelled.
Installation and Enablement¶
First, package in the plugin repository directory:
npm pack # prepack 会自动构建 lib/
npm pack generates a tgz package, which is then installed into the web profile using the official plugin installation command:
dsh plugin --profile web add <生成的 tgz>
Typical Usage: Local Development and Runtime Injection¶
If you are modifying this plugin or writing your own plugin based on it, you can build first, then inject the local repository into a web session that has already loaded dsh-super-injector, saving you from packaging and installing every time:
npm run build # 把 src/ 同步到 lib/
Then, execute in the web session:
dev_inject_plugin {"dir": "<本仓库绝对路径>"}
Applicable Scenarios and Notes¶
Suitable for developers who run multiple sessions simultaneously in the DSH Web interface for a long time and need to quickly organize sessions in the sidebar.
Notes before use:
- The plugin runs with the permissions of the current DSH process; “Delete Session” performs a physical deletion and will recursively delete all descendant sub-agent sessions, so it is recommended to check the source code and license (MIT) before installing;
- The plugin only targets the web platform and does not apply to other platforms;
- The host side deletion logic is reused/cut from
lsz-asd/dsh-plugin-session-delete, retaining only the HTTP endpoint and not registering model tools.
Summary¶
This plugin does something not complicated: filling in a few high-frequency operations missing from the session menu and adding a confirmation layer for dangerous operations. If you often organize sessions in the Web sidebar, you can install and try it following the steps above.
- GitHub: https://github.com/Ruiming-cn/dsh-more-session-operations
- Community Plugin Directory: https://www.skillhub.cn/plugins/Ruiming-cn/dsh-more-session-operations (Independent community site, no official affiliation with DeepSeek / Huafan)