Foreword¶
When running agents in DeepSeek Harness (DSH) for long periods, the sidebar can accumulate a growing list of sessions. The official “Archive” feature merely hides sessions from the list, while the records remain on disk. To completely wipe a conversation or give a session a more recognizable name, users often have to dig through menus, and the operation paths are not intuitive.
The community plugin dsh-session-tool (maintainer immortal-akx) targets this session management gap: it provides a configurable “Delete Session” option in the sidebar “⋯” menu, a one-click rename feature in the conversation header, and optionally hides the official archive and pin buttons in the hover area. The following instructions cover installation, features, configuration, and caveats. For facts, please refer to the GitHub Repository README.
What is this¶
dsh-session-tool is a Cordis plugin for DSH (npm package name dsh-session-tool, version 0.12.6 in current materials, MIT license). It does not alter DSH’s session storage model; instead, it injects menus and header tools into the Web client and registers HTTP routes on the host side to perform “permanent disk directory deletion + cleanup of bookkeeping” and renaming via the official sessions service.
Plugin directory page: skillhub.cn/plugins/immortal-akx/dsh-session-tool. The community directory is an independent site with no official affiliation with DeepSeek or Hithink RoyalFlush. Before installation, it is recommended to review the source code and license yourself, as the plugin runs with the current DSH process privileges.
Core Features¶
Sidebar “⋯” Delete Session¶
- Adds “Delete Session” to the session row “⋯” menu (default text; label, order, visibility, red danger styling, and disabled state are configurable).
- Requires checking “I understand the consequences” before deletion; the delete button is disabled if unchecked.
- Deletion is permanent and irreversible (this plugin has no trash bin). Deleting a running session will stop the session first, then delete it.
- When deleting a running session, the dialog will additionally warn that the session is running, and the button text becomes “Stop and Delete”.
Conversation Header Rename¶
- Provides ✏️ “Rename Session” at the far left of the header toolbar. It utilizes the official
sessionsservice; the sidebar and header title update immediately after the change. - The input box is prefilled with the current name and auto-focused; “Confirm” is disabled if the name is empty; Enter submits, Esc cancels; failures display the reason within the dialog.
Configurability of Official Menus and Hover Buttons¶
MenuItems.officialcan be used to adjust the text, order, or visibility of the four official items (Pin, Rename, Fork, Archive). The Rename item only supportshidden.ButtonItems.officialcan be used to hide the official Archive and Pin icon buttons on hover over a session row (only supportshidden). This plugin does not provide its own hover buttons.
Audit Log¶
Configuration issues and every deletion are written to ~/.dsh/logs/dsh-session-tool.log (rotates to .log.1 when exceeding 1 MB). Typos in configuration keys will not interrupt DSH startup; they are logged and ignored.
Installation and Activation¶
Replace <profile> with your profile name (e.g., web, desktop). Installation commands from the repository README:
# npm
dsh plugin --profile <profile> add dsh-session-tool
# Local directory
dsh plugin --profile <profile> add file:C:/path/to/dsh-session-tool
# GitHub
dsh plugin --profile <profile> add github:<owner>/dsh-session-tool
Restart DSH to apply changes after installation.
Uninstall:
dsh plugin --profile <profile> remove dsh-session-tool
Runtime environment requirements (package.json): Node >=22.19, peer dependency @deepseek-ai/cordis ~4.0.4.
Typical Usage and Configuration¶
Configuration is written in the profile’s patch file ~/.dsh/profiles/<profile>/cordis.patch.yml. Key names are case-sensitive (e.g., mistakenly writing menuItems will be ignored and log a warning). Restart DSH after changes. Only write fields you need to override; defaults are used for the rest.
Default Delete Item and Order Reference¶
order is an ascending number; lower values appear first. Unwritten equals 0. Official menu item references: Pin 100, Rename 200, Fork 300, Archive 400; this plugin’s “Delete Session” defaults to 500.
The maintainer provides a practical configuration example in the README: retain the delete menu item and hide the hover area’s archive and pin buttons:
# order reference: official pin 100 / rename 200 / fork 300 / archive 400; this plugin delete default 500
- id: dsh-session-tool
name: dsh-session-tool
config:
MenuItems:
official:
pin: {}
rename: {}
fork: {}
archive: {}
plugin:
delete:
label: "删除会话"
order: 500
hidden: false
danger: true
disabled: false
ButtonItems:
official:
archive:
hidden: true
pin:
hidden: true
plugin: {}
For the complete schema (including registered but unimplemented fields like shortcut, separatorBefore), see the GitHub README Configuration section.
What Deletion Does in the Backend¶
The README summarizes the deletion chain into six steps to help understand “why stop before delete”:
- Interface validation: Loopback address and same-origin requests (otherwise 403/405).
- Running session:
canceland wait for silence (up to 15 seconds). flushto disk anddetachfrom the in-memory session table to prevent the log directory from being recreated during the finalization phase.- Delete disk directory (permanent deletion, does not go to a recycle directory).
- Cleanup bookkeeping: projection cache, workspace
sessionIds, archive sets, etc. - Write audit log.
During client loading, apply must complete synchronously; configuration is read in the background (3-second timeout, 5 retries × 2 seconds on failure); defaults are used if unreadable. Host-side HTTP routes such as /list, /config, /diag, /delete are registered as process-level singletons to avoid route collisions on repeated loading.
Use Cases and Notes¶
Who it is for: DSH users who need to periodically clean up experimental sessions, want deletion to truly free up disk space, or prefer renaming at the conversation header. Those who want to unify menu order or hide official hover archive/pin buttons via configuration can also use this.
Important Notes:
- Deletion is irreversible. Confirm that session content is backed up or no longer needed before proceeding.
- The plugin deletes directories and modifies bookkeeping with DSH process privileges. Review
lib/and the license before installation. - Hiding official hover buttons relies on DOM/CSS and the official buttons’
aria-labeltext. If DSH updates change the text, you need to maintain it inARCHIVE_LABELS/PIN_LABELSinlib/client.js. ThecssRules=in the loading log can be used to verify the number of rules.
Conclusion¶
The DSH ecosystem emphasizes “Everything is a plugin.” dsh-session-tool, without significantly altering the official model, places “Clean Deletion” and “Renaming” into the sidebar menu and conversation header, and hands over menu order and visibility to the user via cordis.patch.yml. If you wish to try it or contribute issues, you can start from the directory page and the repository:
- Directory Page: https://www.skillhub.cn/plugins/immortal-akx/dsh-session-tool
- GitHub: https://github.com/immortal-akx/dsh-session-tool