Preface¶
The archive operation in DSH only hides sessions from the regular list, not terminating them. To search, filter, restore, or clean up archived sessions in the DSH Web GUI, a more explicit management entry point is needed.
Here we introduce dsh-better-archive.
What is this¶
dsh-better-archive is a client plugin for the DSH Web GUI, maintained by huahai0202, under the MIT license.
It adds an “Archived” entry in the DSH sidebar’s settings area and provides a dedicated page for querying, filtering, restoring, and deleting archived sessions.
Core Features¶
- Adds an “Archived” entry in the DSH sidebar’s settings area.
- Provides a dedicated “Archived” page in the DSH settings area.
- View archived sessions by project.
- Supports keyword search.
- Supports project filtering.
- Supports sorting by update time or name.
- One-click unarchive; sessions return to DSH’s regular session list immediately after restoration.
- Supports deleting a single session.
- Supports deleting all archived sessions under a project.
- Supports clearing all archived sessions.
- Sessions still in use will be automatically deleted after restarting DSH.
- Page text follows DSH’s language settings; switching between Chinese and English does not require a page refresh.
Installation and Enabling¶
First, verify the environment:
- Node.js
22.19+ - pnpm
Installation command:
dsh plugin --profile web add github:huahai0202/dsh-better-archive
After installation, restart dsh web. The plugin will automatically be added to the profile’s dsh.profile.bundles; if not, please add dsh-better-archive to the dsh.profile.bundles array and restart DSH Web.
Updating¶
For plugins installed via the GitHub method above, use the following command to update:
dsh plugin --profile web update dsh-better-archive
After the update, restart dsh web to load the new version in the running Host and client.
Local Development¶
Install by local checkout:
dsh plugin --profile web add link:<path-to-this-checkout>
After local modifications, restart dsh web to load the latest plugin code.
Before committing, run the following checks:
node --check lib/index.js
node --check lib/client.js
npm pack --dry-run
Deletion Behavior¶
Permanent deletion only affects archived sessions and requires confirmation before proceeding.
The archive operation in DSH only hides sessions from the regular list, not terminating them. Deletion behavior depends on whether the session is still active:
- Cold sessions: Clicking delete immediately and permanently deletes the session directory and synchronously removes the workspace and archive records.
- Sessions currently still active: Clicking delete writes a pending deletion marker, which is automatically completed during the next DSH startup.
Clicking “Unarchive” before restarting DSH will also cancel the pending deletion marker, preventing the session from being deleted on the next startup.
Batch deletion can handle both cold and active sessions simultaneously; if a failure occurs midway, the interface will report sessions that have been immediately deleted and those scheduled for deletion upon restart, and refresh the page state.
DSH’s content-addressed attachments are managed independently by DSH, so they are not deleted along with session records.
Development Interface¶
| Route | Method | Purpose |
|---|---|---|
/archived/pending |
GET |
Query sessions marked for deletion upon restart |
/archived/unarchive |
POST |
Unarchive a session |
/archived/delete |
POST |
Immediately delete or schedule deletion of an archived session upon restart |
/archived/delete-project |
POST |
Delete or schedule deletion of all archived sessions under a project |
/archived/delete-all |
POST |
Delete or schedule deletion of all archived sessions |
Dependencies and Runtime Requirements¶
engines:node >=22.19peerDependencies:@deepseek-ai/dsh-client-locale:^0.1.1-rc.2 || ^0.1.2-alpha.1@deepseek-ai/dsh-client-runtime:^0.1.1-rc.2 || ^0.1.2-alpha.1@deepseek-ai/dsh-client-ui-slots:^0.1.1-rc.2 || ^0.1.2-alpha.1@deepseek-ai/cordis:^4.0.1
Use Cases and Considerations¶
Suitable for developers who use the DSH Web GUI and need centralized management of archived sessions.
Since the plugin executes while DSH is running, it is recommended to review the source code and MIT license before installation. DSH’s plugin ecosystem is community-driven, so installation sources should be verified independently.
Conclusion¶
dsh-better-archive brings DSH’s archived sessions from a hidden state into a manageable scope where they can be searched, restored, and deleted.
Project address: https://github.com/huahai0202/dsh-better-archive.git