dsh-session-eraser: DeepSeek Harness Sidebar Session Deletion Plugin

One of the core design principles of DeepSeek Harness (DSH) is “everything is a plugin.” In the process of agent development and debugging, the conversation list displayed in the sidebar often requires maintenance. When it is necessary to clean up historical conversations, manually deleting log files and cleaning up workspace accounting records is not only tedious but also prone to omissions.

dsh-session-eraser is a plugin designed for DSH. It provides a deletion entry directly in the sidebar session rows and implements the logic for thoroughly cleaning up backend sessions.

Plugin Positioning

This is a DeepSeek Harness (DSH) plugin maintained by developer Gty2408 and licensed under the MIT license. It does not rely on complex configuration files; instead, it automatically injects functionality into the system through DSH’s packaging mechanism.

Core Features

The plugin primarily implements the following capabilities:

  • Sidebar Deletion Entry: Adds a “Delete Session” option to the sidebar session rows. This option appears in both the row’s ... menu and on the trash can button displayed upon mouse hover.
  • Permanent Cleanup: Upon confirmation of deletion, it permanently removes the session’s stored log files and their corresponding workspace accounting records.
  • Current Session Protection: Provides an “Open Session Protection” mechanism that rejects the deletion of the session currently open in the main panel.
  • API Interface: Provides the POST /api/session.delete endpoint, allowing session deletion via API calls.
  • Cleanup of Associated Indexes: After a session is deleted, it automatically clears the session archive and pinned index entries to prevent dangling references.

Installation and Activation

It is recommended to use the official DSH CLI for installation. After installation, the DSH application must be restarted to apply the changes.

  1. Execute the installation command:
    dsh plugin --profile desktop add dsh-session-eraser
  1. Restart the DeepSeek Harness application.

Note: If the dsh CLI environment is not available, you need to manually place the plugin package into node_modules and add configuration to cordis.patch.yml. The plugin will automatically apply cordis.patch.yml and add the package to the bundle list.

Use Cases and Notes

  • Attachment Retention: The deletion operation only cleans up log files and workspace accounting records. External files (attachments) referenced by the session are not automatically deleted; only the file references are removed.
  • Client-Side Protection: The current “Open Session Protection” mechanism is implemented purely on the client side. The Host side does not have a concept of view state, so theoretically, the currently open session could be deleted by directly calling the POST /api/session.delete endpoint. However, this endpoint is located behind the same authentication gateway as /api, and the official DSH UI does not provide an entry point for this call. Therefore, the primary risk lies in users writing their own scripts to call it.
  • License: The plugin follows the MIT license and can be used freely.

Summary

dsh-session-eraser provides standardized session cleanup capabilities for DSH. By combining sidebar interaction with backend logic, it solves the problem of fragment cleanup in session management. This is a practical tool for developers or teams that need to maintain long-term session records.

  • GitHub Repository: https://github.com/Gty2408/dsh-session-eraser
  • Community Directory: https://www.skillhub.cn/plugins/Gty2408/dsh-session-eraser
羽毛球分组比赛记分
小程序二维码

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

Xiaoye