dsh-plugin-session-trash: Session Trash Plugin for DeepSeek Harness

DeepSeek Harness (DSH) currently only provides an “Archive” function. After a session is moved to the archive, it only turns gray and cannot be completely cleaned up. For users who need to organize their session list, the lack of a true deletion entry point is a pain point. The dsh-plugin-session-trash plugin solves this problem by adding a trash mechanism to DSH, allowing users to move sessions to the trash for management and restore or permanently delete them when needed.

Plugin Overview

  • Name: dsh-plugin-session-trash
  • Description: DSH session trash plugin
  • Owner: DelayNooMore
  • Category: Memory
  • License: MIT

Core Features

This plugin adds full session lifecycle management on top of DSH’s existing archive feature:
- Move to Trash: Adds a “Move to Trash” option to the session row menu (located after “Archive”). After the action, the sidebar entry disappears in place.
- Restore Session: Restore sessions in “Settings → Trash”; if the original workspace no longer exists, it will automatically rebuild the attachment.
- Permanent Delete: Permanently delete sessions in “Settings → Trash”, or empty the trash.
- Settings Page Management: Provides a trash-icon section and supports opening the trash folder.
- Deletion Protection: Refuses to delete in-progress sessions; only idle sessions between turns can be deleted.
- Automatic Cleanup: On deletion, it automatically unarchives, unpins, and detaches the session.

Installation and Enablement

Install it in the DSH desktop profile (DSH ships with pnpm, so no global installation is required):

cd ~/.dsh/profiles/desktop
node ~/.dsh/dsh-runtimes/dsh-primary-runtime/dependencies/pnpm/bin/pnpm.cjs add github:<你的用户名>/dsh-plugin-session-trash

After installation, add "dsh-plugin-session-trash" to the dsh.profile.bundles array in the profile package.json, then restart DSH.

It can also be installed through the plugin manager in DSH settings (pointing to the git URL of this repository).

To uninstall, run pnpm remove dsh-plugin-session-trash, remove it from dsh.profile.bundles, and restart. Both ~/.dsh/trash and ~/.dsh/sessions are unaffected by uninstallation, and the data in the trash remains unchanged.

Typical Usage

  1. Select “Move to Trash” in the session row menu.
  2. Restore or permanently delete sessions in “Settings → Trash”.
  3. Open the trash folder in “Settings → Trash”.
  4. Idle sessions between turns can be deleted.

How It Works and Notes

  • Data Storage: Deleted session directories are moved as a whole to ~/.dsh/trash/sessions/<sessionId>/, and registration information is written to ~/.dsh/trash/manifest.json.
  • Immediate Update: After deletion, the sidebar entry disappears in place without requiring a restart.
  • Attachment Logic: When restoring, if the original workspace no longer exists, the attachment is automatically rebuilt; if the workspace directory is gone, the session files are restored but remain detached.
  • Title Handling: Untitled sessions will attempt to read the title from session_projcache.

Compatibility

Developed and verified on DSH 0.2.0-rc.2 (Electron 44, darwin arm64). Main interfaces used: the cordis plugin system, workspaceRegistry service, sessions service (including best-effort eviction of the internal live table, with feature detection + fallback), Typert remote, sidebar.workspaces.session.menu.item / settings.section / shell.overlay slots, and Toast/Modal/MenuItemButton primitives. Other versions have not been tested; if interfaces change, fallback behavior serves as a safety net.

Conclusion

This plugin provides true session deletion capability and is suitable for developers who need to manage a large number of sessions. Please review the source code and license before installation.

  • Directory Page: https://www.skillhub.cn/plugins/DelayNooMore/dsh-plugin-session-trash
  • GitHub: https://github.com/DelayNooMore/dsh-plugin-session-trash
羽毛球分组比赛记分
小程序二维码

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

Xiaoye