Session Recycle Bin (dsh-session-recycle): Adding Reversible Session Deletion to DSH

Introduction

When organizing the workspace in DeepSeek Harness (DSH), sidebar sessions can accumulate over time. DSH’s built-in archive still retains session logs on disk; if you only want to “move them out of the list first and free up space after confirmation,” relying on archiving alone is insufficient, and there is no unified “undoable-deletion” path. The community plugin dsh-session-recycle (directory name daimingxing/dsh-session-recycle, npm package name dsh-session-recycle), published by maintainer daimingxing, provides a session recycle bin on top of DSH: deletions from the sidebar go into the recycle bin first, where you can preview, restore, or permanently delete logs after confirmation.

What This Is

The session recycle bin is a plugin targeting DSH 0.2.x, categorized as an extension of “memory”-related capabilities. It does not alter the DSH core; instead, it hooks into the sidebar and session settings via the plugin mechanism: a regular deletion only updates the recycle bin index and workspace records, while logs remain in their original paths; only a “permanent delete” physically removes the logs according to validation rules and frees up space. The runtime code consists solely of index.js and client.js, with no additional npm dependencies.

Core Features

The following summarizes the capabilities documented in the README. All of them are available from the UI or the recycle bin settings after installation.

Deletion with Undo

When you delete a session from its “⋯” menu, the session and its subagent child sessions enter the recycle bin together. After an accidental deletion, you can undo it in one click via the toast within approximately 3 seconds. Running sessions are refused for deletion; sessions that are open but idle can be processed directly.

Preview and Restore

Under Settings → Session Recycle Bin, you can preview recent entries and restore them to the workspace; the title and the original archive status are restored as well. Restored sessions appear at the top of the workspace list.

Safe Cleanup and Ghost Scan

Before a permanent deletion, the log directory is validated; unknown files cause the operation to be refused, reducing the risk of accidental deletion. Permanent deletion is irreversible. The recycle bin also provides a ghost session scan, used to centrally handle blank sessions, child sessions that have lost their parent session, and residual registrations, making it easier to clean up unwanted records after review.

Relationship with Archiving and Uninstallation

The plugin index maintains the recycle bin state. If the plugin is uninstalled or the index is lost, sessions that remain in their original locations on disk may reappear in the list. Global attachment storage and the SQLite full-text index are not within this plugin’s cleanup scope. The protection scope is limited to the current DSH process; it is not recommended to perform cleanup operations on the same sessions from another DSH instance at the same time.

Installation and Activation

Applies to DSH 0.2.1-rc.1 and above, below 0.3.0 within the 0.2.x range (engines.dsh in package.json is >=0.2.1-rc.1 <0.3.0-0). Installation commands must use the official documentation format, replacing desktop, web, or headless according to the profile you actually use.

Install from npm (after the package is published, DSH will install and register the plugin):

dsh plugin --profile desktop add dsh-session-recycle@latest

Install from a local tgz (replace the example path with the actual file):

dsh plugin --profile desktop add "D:/Downloads/dsh-session-recycle-0.2.0.tgz"

Uninstall:

dsh plugin --profile desktop remove dsh-session-recycle

For development, you can mount a local directory via link (replace the path with the local absolute path):

dsh plugin --profile desktop add link:/absolute-path/dsh-session-recycle

The plugin runs with the permissions of the current DSH process; before installation, you can view the source code and the MIT License on GitHub.

Typical Usage

The README suggests getting started in three steps, consistent with the documentation below.

  1. Tidy up the sidebar — Open the “⋯” menu of the target session and click the delete item; if deleted by mistake, undo it from the toast.
  2. Manage the recycle bin — Go to “Settings → Session Recycle Bin” to view contents, restore sessions, or permanently delete after confirmation.
  3. Clean up hidden residue — Run a ghost session scan in the recycle bin and clean up records that are no longer needed based on the results.

Remember the principle stated in the documentation: collect first, then purge. Only a permanent deletion removes session logs from disk.

Use Cases and Notes

This is suitable for developers who maintain a large number of sessions over the long term in the DSH desktop, Web (dsh web), or headless (dsh headless) environments and need to “move sessions out of the list while keeping an undo window.” It is not suitable for treating the recycle bin as a cross-instance or cross-machine synchronized deletion solution: the index and in-process protection are both bound to the current DSH runtime environment.

Before use, please confirm that your DSH version falls between 0.2.1-rc.1 and 0.3.0; the community directory SkillHub plugin page and the GitHub repository are independent sources of information and are not officially affiliated with DeepSeek / 幻方 (High-Flyer). For installation details and behavioral descriptions, it is still recommended to refer to the repository’s README.

Conclusion

dsh-session-recycle complements the DSH sidebar deletion pipeline with a recycle bin: soft deletions are undoable, hard deletions are validated, and it also includes child-session organization and ghost residue scanning. For further details on installation and behavior, refer to GitHub: daimingxing/dsh-session-recycle and the SkillHub directory page.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye