DeepSeek Harness Plugin: Session Recycle Bin

Introduction

In the default operation of the DeepSeek Harness desktop version, archiving only moves sessions into the archive list, while the session itself remains. To completely delete a session, manual file cleanup is usually required. This plugin adds a true “Delete Session” function to the desktop version of DeepSeek Harness, utilizing a recycle bin mechanism (default 15 days) to manage sessions, providing reversible deletion operations and batch management capabilities.

Plugin Overview

Name: cckbc/dsh-session-recycle-bin
Maintainer: cckbc
Category: Memory
License: MIT

This is a plugin customized for the DeepSeek Harness desktop application (desktop profile). It modifies the application’s internal state to convert the standard “Delete” operation into “Move to Recycle Bin,” supports retention period settings of 7/15/30 days, and provides a visual interface for restoration or permanent deletion in the settings page.

Core Features

  1. Reversible Deletion: The deletion operation actually moves session logs and caches to a recycle bin directory. During restoration, files are returned one by one, including titles and working directories.
  2. Instant Feedback: The session row in the sidebar is removed immediately after deletion, without requiring an application restart. If the currently viewed session is deleted, the main view automatically switches to a new session rather than displaying an empty page.
  3. Multi-entry Operations:
    * Row Menu: A “Delete Session” option is added at the end of the ... menu for the session row.
    * Hover Button: A trash bin icon appears when the mouse hovers over a session row.
    * Batch Button: A batch delete button located above the workspace list at the top of the sidebar.
  4. Batch Processing: Batch deletion opens a selector. After selecting sessions in the “Settings -> Recycle Bin” table, you can use the buttons in the table header to perform batch restoration or permanent deletion.
  5. Unified Retention Period: The retention period for the recycle bin (default 15 days) is a global setting applicable to all entries and can be adjusted to 7, 15, or 30 days.

Installation and Activation

This plugin only supports the DeepSeek Harness desktop application (desktop profile).

Install via Command Line (Web Configuration Example)

dsh plugin --profile web add github:cckbc/dsh-session-recycle-bin

Install via Plugin Page (Desktop Application)

  1. Open the “Plugins” page in the DSH sidebar and click “Add Plugin”.
  2. Enter the Git address github:cckbc/dsh-session-recycle-bin.
  3. Click “Install” and enable the plugin.
  4. You must completely exit and reopen the application for the plugin to take effect.

Install via Local Directory

git clone https://github.com/cckbc/dsh-session-recycle-bin.git

Add the cloned directory to plugin management using an absolute path. After installation, the directory must remain unchanged, or dependencies will become invalid.

Typical Usage

  1. Single Deletion: Select “Delete Session” from the menu or hover button of the session row in the sidebar. After confirmation, the session moves to the recycle bin.
  2. Batch Deletion: Click the batch button next to the workspace list at the top of the sidebar, check multiple sessions, and confirm.
  3. View Recycle Bin: Go to “Settings” -> “Recycle Bin”, where all deleted sessions are listed in a table format.
  4. Restore or Clear: Check sessions in the recycle bin table and use the “Restore” or “Delete” buttons appearing in the table header to operate. If “Don’t ask again” is checked, subsequent deletions will not prompt a confirmation box.

Use Cases and Notes

  • Use Cases: Scenes requiring regular cleanup of large numbers of sessions while retaining a “safety net” for potential restoration.
  • Version and System Limitations: Currently only verified to work on Windows + 0.2.0-rc.2. macOS/Linux and other Harness versions have not been tested.
  • Non-native Functionality: This is not an officially built-in feature of DSH but is “grafted” onto the application via patching. Application updates may cause the plugin to fail, manifesting as errors or invalidity during deletion or restoration.
  • Data Safety:
    • There is no operating system recycle bin, nor is there an “Undo” button. Files are directly removed after permanent deletion or expiration.
    • No cascading cleanup: Derivative data such as session attachments (<DSH_HOME>/attachments) and AgentTeams working directories are not protected by the recycle bin and will not be automatically cleaned up.
    • Restoration operations do not restore the “pinned” or “archived” status of the session.
  • Duplicate ID Handling: If the same ID exists in multiple workspace directories, the deletion operation only moves the first matching instance.
  • Memory Cache: The session list maintained in the application’s memory is only rebuilt upon the next startup.

Conclusion

This plugin provides practical session lifecycle management capabilities for the DeepSeek Harness desktop version, balancing convenient deletion with data safety through a recycle bin mechanism. To view the source code or directory details, please refer to the links below.

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

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

Xiaoye