In daily use of DeepSeek Harness (DSH), conversation records continuously accumulate over time. Manually sorting and archiving outdated conversations is not only time-consuming, but can also easily lead to a cluttered and disorganized history. This plugin provides an automated archiving solution based on an age threshold, allowing the entire process to be completed through a Web interface.

What Is This

dsh-one-click-archive is a DeepSeek Harness Web GUI plugin maintained by user sujiu222. It addresses the core question of “how to quickly and safely archive old conversations that meet an age-based condition.” By setting an age threshold, it lets users preview candidate sessions before archiving and complete the archive operation with a single click.

Core Features

The plugin has the following key capabilities:

  1. Flexible age threshold: Supports multiple time ranges from 1 hour to 90 days, including 1/6/12 hours and 1/3/7/14/30/90 days.
  2. Preview and confirmation: Before executing the archive operation, the plugin calculates the exact number of candidate sessions and displays a sample list so the action can be confirmed before proceeding.
  3. Blank session option: Users can choose whether to include sessions with empty content.
  4. Smart filtering: Automatically skips sessions that are currently running, recently active, or already archived, preventing duplicate operations.
  5. Real-time recalculation: Immediately recalculates candidate sessions before executing the archive action, preventing mismatches between preview and actual results caused by caching.
  6. Non-destructive archiving: Uses the official DSH workspaceRegistry.archiveSession() API. Archiving only adds the session ID to a global archive set; it does not delete original conversation logs or affect workspace statistics.
  7. Safety mechanisms: Uses Loopback-only host routing and displays a confirmation dialog before making changes.

Installation and Enablement

Installing this plugin requires the DSH command-line tool. First, run the install command:

dsh plugin --profile <your-web-profile> add github:sujiu222/dsh-one-click-archive

After installation, restart the corresponding DSH Web profile, refresh the browser, then locate the One-click archive option in the settings menu.

For a local development environment, follow these steps:

npm install
npm run check
dsh plugin --profile <your-web-profile> add /absolute/path/to/dsh-one-click-archive

Note: Hot reload for client-side plugin updates is only supported when the DSH checkout is running the pnpm run dev:web watcher. Otherwise, you need to rebuild/reinstall the plugin, restart the host plugin, and refresh the page.

Typical Usage

After installing and enabling the plugin, open the One-click archive tab on the settings page. Set the age threshold for archiving in the interface and choose whether to include blank sessions. Before clicking the archive button, the system will display preview information.

You can also perform automated operations through the plugin’s exposed API. The request body format is as follows:

{ "ageMs": 86400000, "includeBlank": false }

Here, ageMs is the age duration in milliseconds, and includeBlank controls whether blank sessions are included.

Use Cases and Notes

This plugin is suitable for users who need to regularly clean up historical conversations and keep their workspace tidy. Before use, make sure you understand its non-destructive behavior: archiving only adds session IDs, while logs and accounting information remain preserved. To restore archived sessions, use the DSH archive UI or another archive management plugin.

Additionally, the plugin uses Loopback-only host routing, so all API calls must be made from the same origin. Before performing any mutating action, always review the preview and confirm the contents of the confirmation dialog.

Summary

dsh-one-click-archive provides a time-based conversation archiving solution. Through previewing, smart filtering, and a non-destructive API design, it lowers the barrier to manually managing historical records.

  • GitHub repository: https://github.com/sujiu222/dsh-one-click-archive
  • Plugin directory: https://www.skillhub.cn/plugins/sujiu222/dsh-one-click-archive