Introduction

As DeepSeek Harness usage increases over time, a large number of chat sessions accumulate in the sidebar. Manual archiving is time-consuming and prone to oversights. The @ohmejj/dsh-chat-archive plugin automatically archives inactive sessions to the archive area by configuring an idle threshold, hiding them from the sidebar while retaining the data, helping keep the workspace tidy.

Features

The plugin mainly provides the following capabilities:
1. Automatic archiving of idle sessions
2. Flexible idle threshold configuration (minutes/hours/days)
3. A dedicated settings interface
4. Configuration persistence to $DSH_HOME/settings.yaml
5. Takes effect in real time
6. Preview feature

Installation and Enabling

Prerequisites:
- Node.js >= 22.18.0
- DeepSeek Harness >= 0.1.5-rc.1

Use DSH commands to install to different profiles:

dsh plugin --profile default add @ohmejj/dsh-chat-archive
dsh plugin --profile web add @ohmejj/dsh-chat-archive
dsh plugin --profile tui add @ohmejj/dsh-chat-archive

After installation, restart DSH for the changes to take effect.

Usage

  1. Start the DSH Web GUI and click the settings icon at the bottom of the sidebar.
  2. Find “Automatic Chat Archiving” in the left-side menu of the settings dialog.
  3. Configure the idle threshold (default: 72 hours) and scan interval (default: 30 minutes).
  4. Click Save. The configuration will be persisted to $DSH_HOME/settings.yaml.

The archiving rule is based on the last modified time (mtime) of the session persistence log file (session.jsonl or session.jsonl.v3). To prevent accidental archiving, a session must be continuously idle beyond the configured threshold.

Preview Feature

Before enabling archiving, you can use the preview script to view the effect:

# 使用默认配置预览
node scripts/preview-archive.mjs

# 自定义阈值和间隔
node scripts/preview-archive.mjs 10 minutes 5
node scripts/preview-archive.mjs 7 days

Uninstall

dsh plugin --profile web remove @ohmejj/dsh-chat-archive

Notes

  • Archiving does not delete data; it only hides sessions from the sidebar.
  • The plugin runs with the current DSH process permissions. Please review the source code and license.
  • Archived sessions can be restored through native DSH features.

Conclusion

This plugin helps developers manage long-term chat history through an automated archiving strategy. See the GitHub repository for more details.