@ohmejj/dsh-chat-archive:DeepSeek Harness 對話自動歸檔插件

前言

隨着 DeepSeek Harness 使用時間的增加,側邊欄中積累了大量對話會話。手動歸檔既耗時又容易遺漏。@ohmejj/dsh-chat-archive 插件通過配置閒置閾值,自動將不再活躍的會話歸檔至歸檔區,從側邊欄隱藏但保留數據,幫助保持工作區整潔。

功能

該插件主要提供以下能力:
1. 自動歸檔閒置會話
2. 靈活配置閒置閾值(支持分鐘/小時/天)
3. 獨立設置界面
4. 配置持久化到 $DSH_HOME/settings.yaml
5. 實時生效
6. 預覽功能

安裝與啓用

前置要求:
- Node.js >= 22.18.0
- DeepSeek Harness >= 0.1.5-rc.1

使用 DSH 命令安裝到不同 profile:

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

安裝後重啓 DSH 即可生效。

使用方法

  1. 啓動 DSH Web GUI,點擊側邊欄底部的設置圖標。
  2. 在設置彈窗的左側菜單找到“對話自動歸檔”。
  3. 配置閒置閾值(默認 72 小時)和掃描間隔(默認 30 分鐘)。
  4. 點擊保存,配置會持久化到 $DSH_HOME/settings.yaml。

歸檔規則基於會話持久化日誌文件(session.jsonl 或 session.jsonl.v3)的最後修改時間(mtime)。爲防誤歸檔,會話須連續閒置超過設定閾值。

預覽功能

在啓用歸檔前,可使用預覽腳本查看效果:

# 使用默認配置預覽
node scripts/preview-archive.mjs

# 自定義閾值和間隔
node scripts/preview-archive.mjs 10 minutes 5
node scripts/preview-archive.mjs 7 days

卸載

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

注意事項

  • 歸檔操作不刪除數據,僅從側邊欄隱藏。
  • 插件以當前 DSH 進程權限運行,請確認源碼與許可證。
  • 歸檔的會話可通過 DSH 原生功能恢復。

結尾

該插件通過自動化歸檔策略,幫助開發者管理長期對話歷史。更多詳情見 GitHub 倉庫。

羽毛球分组比赛记分
小程序二维码

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

小夜