dsh-plugin-workspace-archive: One-click archive entire workspace

Introduction

When developing with DeepSeek Harness (DSH), workspaces tend to pile up: those used for temporary verification, those abandoned halfway through, or those delivered but not deleted. The official tool only provides “Archive Session” for a single session. When multiple sessions are distributed across a workspace, you can only operate on them one by one. To clear the sidebar as a whole, you often have to click one by one. This plugin solves the problem of “archiving and recovering a batch of sessions together.”

Below is an introduction to the chineseryan/dsh-plugin-workspace-archive plugin. Maintained by ChineseRyan, it hooks into DSH plugins and adds an “Archive Workspace” entry in the “…” menu of the workspace row. It archives all sessions under that workspace and hides them from the sidebar, allowing recovery from the bottom of the sidebar when needed.

Core Features

The scope of a single operation is the entire workspace, not a single session:

  • Archive: Calls the official archive command for all sessions under the workspace one by one. After all succeed, it writes to the archive ledger and hides that workspace row from the sidebar.
  • Recover: Restores sessions one by one according to the list in the ledger. Only deletes the record after all succeed.
  • The sidebar bottom provides an “Archived Workspaces” panel with a count badge, allowing viewing and recovery.
  • Badge display modes: three levels: Always Show, Show on First, Never Show. Switched via three icons on the right side of the panel title.
  • Archiving does not delete files, sessions, or history. Running sessions cannot be archived; the menu will prompt to stop first.
  • Only writes data to a local location: $DSH_HOME/storages/dsh-workspace-archive.json. Uses atomic rename plus cross-process file lock to prevent data loss in concurrent multi-window operations. No internet, no reading of session content, only recording ID names.

Milestone behavioral differences (recorded in README):

  • Starting from 0.1.5, after archiving an empty workspace, it disappears from the workspace list and only appears in the “Archived Workspaces” panel; in 0.1.4 and earlier, such workspaces appeared in both places (fixed bug).
  • Starting from 0.1.6, badge preferences are saved in the host state file, so restarting dsh won’t revert to the default “Always Show”.

Installation and Usage

Installation commands are taken from the plugin README. Replace <profile> and username according to your profile:

Install from GitHub:

dsh plugin --profile <profile> add "git+https://github.com/<你的用户名>/dsh-plugin-workspace-archive.git"

Install for local development:

git clone https://github.com/<你的用户名>/dsh-plugin-workspace-archive.git
dsh plugin --profile <profile> add "link:/path/to/dsh-plugin-workspace-archive"

After installation, you need to restart the dsh host once. The host-side JS does not support hot reload; a browser-side refresh is sufficient. If the profile is exclusively managed by the desktop app, install in “Settings → Plugins”, or use the CLI built into the desktop version.

Uninstall:

dsh plugin --profile <profile> remove dsh-plugin-workspace-archive

Dependencies: No runtime third-party dependencies; Requires dsh 0.2.1-rc.2 or higher.

Typical Usage

  1. Archive a workspace: Find the workspace row in the sidebar, click the “…” on the right, and select “Archive Workspace”. The plugin will first archive all sessions under it one by one. After all succeed, the workspace row disappears from the sidebar.

  2. View Archived Workspaces: Click the “Archived Workspaces” panel at the bottom of the sidebar. The right side shows an overview with a count badge. This panel can be closed directly with Esc or the “Close” button in the bottom bar.

  3. Recover: Select the workspace to recover in the panel and click “Recover”. The plugin restores sessions one by one according to the ledger list; it only deletes the record after all succeed; the panel automatically closes after recovering the last one.

Plugin behavior during archiving (original README text): Only adds a hidden marker to the workspace row via DOM, does not read or write to any official view data. Sessions being viewed are hidden together with the workspace only after switching focus.

Applicability and Notes

Suitable for DSH users with a cluttered sidebar workspace count who want to archive workspaces as a whole. It does not offer finer operations for individual sessions; if you need to archive a single session, use the built-in “Archive Session” from the official tool.

Before using, check the source code and license (MIT) as a matter of course to see if they meet your needs. The plugin runs with the permissions of the current dsh process. Badge preferences and archive ledgers are written to state files under $DSH_HOME. Deleting that file means abandoning the recovery entry (archived sessions remain in the official archive and can be recovered from the official entry). Remember to restart the host after installation, otherwise the entry won’t take effect.

Summary

This plugin has a narrow positioning: executing the official “Archive Session” capability in bulk by workspace, and achieving one-click recovery via a ledger record list, without modifying historical data or introducing extra runtime dependencies. If your pain point is too many sidebar workspaces, it is worth installing and trying.

  • Directory page: https://www.skillhub.cn/plugins/ChineseRyan/dsh-plugin-workspace-archive
  • GitHub: https://github.com/ChineseRyan/dsh-plugin-workspace-archive
羽毛球分组比赛记分
小程序二维码

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

Xiaoye