Skip to content

dsh-long-archive

Verified

dsh-long-archive · v2.0.0 · MIT · Web UI

Archived-session manager for DSH Web: sidebar footer entry, grouped archive panel, restore/delete with full agent teardown (DSH 0.1.5-rc.2 适配版)

Install

dsh plugin add dsh-long-archive

Confirm the layer applied with dsh --profile default --dump-config — see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Tags

Readme

dsh-long-archive

中文 | English

An archived-session manager for DeepSeek Harness WebUI: an "Archived" entry at the sidebar footer opens a grouped archive panel — open a session to continue it, unarchive, or delete it (full live-agent teardown + physical log removal).

Native DSH only has the "archive" action (hides the session from the sidebar); there is no way to view, restore, or delete archived sessions. This plugin fills that gap.

Features

  • Archive list — an "Archived" entry at the sidebar footer opens a panel grouping sessions by workspace, visually matching the official sidebar
  • Continue a session — click an archived session to open it and keep chatting; its archived state is untouched
  • Unarchive — put a session back into its workspace with one click, original position preserved
  • Delete for good — safely stops the session first, then removes its complete on-disk record; a confirmation dialog guards the action
  • Search — instant filtering by title or workspace, plus message search (your prompts and the assistant's replies); behaves like the official search
  • View sync — grouping (by workspace / one list), ordering (manual / recently updated), and drag-to-reorder all stay in real-time two-way sync with the official sidebar
  • Bilingual UI — English and Chinese, following the system language automatically
  • Session status at a glance: running / completed / waiting for you — same as the official sidebar

Compatibility

Developed against @deepseek-ai/dsh 0.1.0-rc.6. Relies on official internal shapes (workspaceRegistry.enqueueOperation, AgentHandle.dispose, the client-runtime service shapes); a dsh upgrade may require adaptation — if something misbehaves after upgrading, check whether this repo has caught up with the new version.

Install

From npm (one command):

npx @deepseek-ai/dsh plugin --profile web add dsh-archive-manager

Or from a git checkout:

# 1. Clone the repo — any location works; this is just an example
git clone https://github.com/Jasonrale/dsh-archive-manager.git ~/dsh-archive-manager

# 2. Register it (the profile is created automatically if missing;
#    replace the path with the one YOU cloned to)
npx @deepseek-ai/dsh plugin --profile web add ~/dsh-archive-manager

# 3. Restart dsh web

Updating

A local install is a snapshot, not a live link — after changing the plugin sources, re-register:

npx @deepseek-ai/dsh plugin --profile web remove dsh-archive-manager
npx @deepseek-ai/dsh plugin --profile web add ~/dsh-archive-manager

Uninstall

npx @deepseek-ai/dsh plugin --profile web remove dsh-archive-manager

Then restart dsh web (the source directory can be kept or deleted).

Known limitations

  • Sessions that were running while the plugin itself was hot-reloaded cannot be deleted afterwards — the plugin will refuse with a clear message asking you to restart dsh first. (Normal use is unaffected: install once, and everything — including sessions archived before the plugin existed — stays manageable.)

License

MIT


本仓库说明(fork 适配版 2.0.0)

上游 dsh-long-archive(基于上游 [email protected] 已停更(2026-08-17 后无提交),无法在 DSH 0.1.5-rc.2 上工作。 本仓库从 1.1.1 起适配,当前版本 2.0.0,累计 8 处兼容补丁,未改动任何功能语义,仅修兼容性。

补丁清单

# 位置 问题 修复
1 cordis.patch.yml 服务端 inject 缺 webServer 补上(connection.rpc 内部要用)
2 lib/index.js 用了 0.1.5 已不可用的 connection.rpc.handle('/arcv')(内部 owner.webServer 拿不到注入)→ DSH 启动即崩 改为直挂 HTTP 路由 ctx.webServer.register({kind:'exact', path:'/api/dsh-archive-rpc'})
3 lib/client.js connection.rpc.call('/arcv') 改为 fetch('/api/dsh-archive-rpc')
4 lib/client.js 客户端 inject 只声明 ['slots'],但代码用了 sessions/workspaces/locale/layout → 全是 undefined(标题显示成文件夹名、点不开) 补全声明
5 lib/client.js 调用了 0.1.2+ 已移除的 workspaces.project() typeof 保护
6 package.json dsh.clientinject 列表 → 客户端模块根本不加载(侧栏入口不出现) 补 7 项核心包
7 lib/index.js + lib/client.js 加载期异常会冒泡 → DSH 起不来 apply 整体包 try/catch 防崩:失败只记日志,最坏"入口消失",绝不拖垮 DSH
8 lib/client.js 客户端注册 window.__ModuleLoader__.load({ id: "dsh-archive-manager" }) 用的是旧包名 → 加载器找不到注册,报 loaded without registering "dsh-long-archive"(页面提示 Failed to load plugins) 改为 id: "dsh-long-archive"

行为说明

  • 入口:侧栏底部sidebar.footer.action)→ 分组归档面板(按工作区分组、可搜索)。
  • 点会话行不预览,只提示「先恢复再预览」(归档会话被核心的投影缓存排除,直接打开是空壳)。
  • 恢复:点「恢复」才真正恢复到原工作区。
  • 删除:二次确认后永久删除。

兼容性

  • 不替换核心插件(不碰 workspace/session-projection-cache/ui-workspace),所以它失效时不会拖垮会话列表/侧栏。
  • ⚠️ 依赖 DSH 内部服务(agents/sessionPersistence/workspaceRegistry/storageDomain/sessions)与 workspaces.archivedSessionIds 字段;这些变了它会静默失效(入口/列表不显示),届时重新打补丁即可。
  • 已验证:DSH 0.1.5-rc.2