dsh-del-chat: Permanently Delete Archived Conversations in DSH

Preface

In DeepSeek Harness (DSH), sidebar session archiving only hides the entries; Session logs, projection cache, and Workspace records on disk are still retained. After using plugins for a long time, forking sessions, or repeatedly archiving, $DSH_HOME/sessions accumulates many files like session.v4.jsonl.zstd that are archived but not deleted. If you need to truly clear a specific archived session from the local machine instead of letting it continue taking up space, an “deletable after archive” entry must be provided in the client, and the Host must execute a controlled cleanup after confirmation. dsh-del-chat is maintained by SLZ2025 and classified as a client plugin. It adds a “Delete Archive” item to the Sidebar Session context menu, removing corresponding data via the flow: Archive → View Info → Permanently Delete.

What is this

dsh-del-chat is a bundle plugin for DSH: In the Sidebar Session right-click menu (which shares the menu with Rename, Fork Session, Copy Session ID, Unarchive), “Delete Archive / Delete archive” is inserted below the separator in a danger style. This menu item is only displayed for archived Sessions—unarchived sessions can still be written to and are not allowed to be purged; archived sessions can no longer be opened, and even the top bar “…” menu cannot reach the delete option, so the delete entry is placed on the sidebar archived row.

The plugin is split into Client and Host halves: The Client registers menus and confirmation dialogs; the Host provides status queries and purge routes, and validates guards such as “must be archived first” (unarchived requests return 409). Star count is 0 (referencing the community directory page); the current npm package version in the documentation is 0.2.9, license MIT.

Core Features

The following introduces the specific behavior of the plugin on the interface and disk.

Right-click on an archived sidebar row to select Delete Archive. Upon clicking, a confirmation dialog appears displaying the Session ID, log size, and whether a projection cache exists. After confirmation, the Host executes the deletion.

Actual Deletion and Retention Scope

According to the README, purge deletes:

$DSH_HOME/sessions/<workspace-key>/session-<id>/session.v4.jsonl.zstd   # Delete
$DSH_HOME/storages/session_projcache/sessions/session-<id>.json        # Delete

The following is retained:

$DSH_HOME/attachments/v1/objects/<2hex>/<sha256>                       # Content-addressed, shareable
$DSH_HOME/storages/cost-meter/ledger.json                              # Third-party ledger

Workspace records and archive markers are removed via the registry’s write chain, not by directly modifying workspace.json. After deleting the session-<id>/ directory, the plugin instructs the Client to re-fetch the Host-side Session directory, so the sidebar row disappears without a full page refresh.

Host-side Guards and Edge Cases

Only archived Sessions can be permanently deleted. If a Session is still resident in the Host memory (the plugin cannot forcibly discard the entry), the deletion process retains the archive marker and settles the workspace record when session/disposed occurs, preventing the ghost row from returning to Ungrouped. When logs are occupied by other processes, log-locked (423) may be returned; DSH must be restarted and retried.

Requirements

  • DeepSeek Harness includes a Web client (desktop version is included) and has workspaceRegistry and sessionPersistence services (built into the desktop profile).
  • Host side Node 22 and above (routes use Request/Response).

Installation and Enabling

You can let DSH install the bundle first, or operate on the Plugins page. The bundle inserts a plugin declaration line via patch, for example:

- insert:
    - id: dsh-del-chat
      name: dsh-del-chat

Install from npm (commands from official README):

dsh plugin add dsh-del-chat

Install from repository and pin revision:

dsh plugin add git+https://github.com/SLZ2025/dsh-del-chat.git#<commit>

Local directories can also be installed by pointing dsh plugin add to the path.

After installation, you must completely exit DSH and restart it. Only refreshing the page will only load half of the Client: the menu may appear, but the Host route is not registered, and the dialog will prompt that the Host half is not loaded.

Typical Usage

Follow the reproducible steps in the README:

  1. Archive the target session: Right-click the sidebar row Archive / Archive, or use Ctrl+Shift+A on an open Session.
  2. Right-click the now-grayed-out archived row and select Delete Archive / Delete archive.
  3. In the dialog, verify the ID, log size, etc., and click Delete Permanently / Delete permanently.

If the menu item is not visible: Archive first, refresh the page if necessary to ensure the Client half is loaded, then right-click the archived row.

Scenarios and Notes

Suitable for: Users who need to thoroughly clean up archived Sessions locally to free up sessions and session_projcache space; users who are accustomed to “archive then delete” to avoid accidentally deleting active sessions.

Notes:

  • Deletion is irreversible; numbers in the confirmation dialog should match expectations before clicking Delete Permanently.
  • The plugin accesses $DSH_HOME with the permissions of the current DSH process; it is recommended to read the source code and MIT license on the GitHub repository before installation and understand the guards and known costs in docs/DETAIL.md.
  • Attachment objects and cost-meter ledger are not deleted together with the Session, in line with the design of content-addressed storage and third-party ledgers.
  • The community directory skillhub.cn plugin page is an independent site with no official affiliation to DeepSeek / Hypersphere; the ecosystem philosophy is “Everything is a plugin,” and this plugin is a community-contributed client capability extension.

Troubleshooting Summary

Symptom Resolution
No “Delete Archive” Only archived sessions are visible; archive first with Ctrl+Shift+A
Host half not loaded Completely exit and restart DSH, do not just refresh the page
Only archived Sessions… Must be archived first
log-locked (423) Retry after restarting DSH
Sidebar row still present Distinguish between still grayed out in the archived group (Host still holds memory) and falling into Ungrouped (logs may still be there)

Host logs and %TEMP%\dsh-del-chat.log (Windows example path from README) can be used to confirm [apply] and delete-failed information.

Conclusion

dsh-del-chat fills the gap between DSH archiving and actual deletion: archiving hides, deletion writes to disk. Installation commands follow the README, and enabling requires a full DSH restart. For further details on implementation, see the repository docs/DETAIL.md.

  • Directory page: https://www.skillhub.cn/plugins/SLZ2025/dsh-del-chat
  • GitHub: https://github.com/SLZ2025/dsh-del-chat
羽毛球分组比赛记分
小程序二维码

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

Xiaoye