前言¶
DeepSeek Harness supports archiving sessions, but this typically only hides them and does not truly clear the logs. As the number of sessions increases, disk usage continues to grow. The dsh-session-delete plugin adds the verb “delete” to DSH. It allows for the deletion of sessions via the sidebar menu or agent tools, moving session logs to a local trash bin to achieve recoverable deletion.
插件介绍¶
Maintained by hakulat2023, this is an open-source plugin under the MIT license. It addresses the issue in DeepSeek Harness where sessions cannot be completely removed, providing a comprehensive session lifecycle management capability, including UI menus, remote calling interfaces, and Agent tools.
安装与启用¶
Before installation, ensure your environment meets the following requirements:
* DeepSeek Harness version: 0.2.x (Verified with 0.2.0-rc.2)
* Node.js version: >= 20
Run the following command to install:
dsh plugin --profile desktop add github:hakulat2023/dsh-session-delete#v0.1.0
After installation, you must restart the application for the plugin to take effect.
核心功能¶
- UI Access: Click the “…” menu in the session list row to reveal the “Delete Session” option.
- Agent Tools: Provides
session_deleteandsession_restoretools. - Remote Calls: Provides the
remote.sessionDeletenamespace. - Recoverable Deletion: Logs are moved to the system trash bin by default instead of being permanently deleted.
- Force Deletion: Supports the
purgeoption to skip the trash bin and delete files permanently.
使用方法¶
Via UI Operation¶
Click “…” on the session row, select “Delete Session”, and confirm.
Via Agent Tools¶
Call the session_delete function:
session_delete(session_id, stop_activity?, force?, purge?)
Call the session_restore function to restore a session:
session_restore(session_id)
Via Remote Namespace¶
remote.sessionDelete.delete({ sessionId, stopActivity?, force?, purge? })
remote.sessionDelete.restore({ sessionId })
平台限制与注意事项¶
- Restart Required: The plugin modifies the host-side module loading mechanism, so the application must be restarted after installation.
- macOS Limitation: Due to macOS TCC restrictions, the plugin cannot list the
~/.Trashdirectory. The restore function relies on metadata records rather than scanning the trash bin. - Windows Limitation: The plugin cannot read Windows Recycle Bin contents; restoration requires manual intervention.
- No Build Dependencies: This plugin has no npm dependencies or build steps.
总结¶
dsh-session-delete adds session cleanup capabilities to DeepSeek Harness. By moving logs to the trash bin, it balances the needs of data safety and storage cleanup. For more details, please refer to GitHub or the SkillHub Directory.