鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

dsh-session-mgr

在 DeepSeek Harness 网页界面中跨工作区移动、归档、恢复、可携式备份/导出与导入会话。

会话消息
访问 GitHub
文档README

dsh-session-mgr

Session Manager for the DeepSeek Harness Web UI

Move, archive, restore, backup and delete conversations — including archived ones — across workspaces, right from the Settings page.

简体中文 · ·


Table of Contents

  • Features
  • Screenshots
  • Requirements
  • Installation
  • Usage
  • HTTP API
  • How It Works
  • Safety
  • Development
  • License

Features

FeatureDescription
MoveRelocate any conversation (including archived ones) to any workspace.
ArchiveHide a conversation from the sidebar; its workspace position and order are kept.
RestoreUn-archive a conversation back to its original place.
Backup / ExportProduce a portable package — a <sessionId> folder with a manifest.json and the full session log. Transfer it to another machine and Import there to resume the conversation seamlessly.
ImportInstall a portable package on this machine, rewriting the session cwd to a workspace/folder that exists here — so a conversation started on another machine continues here.
DeletePermanently erase a conversation from disk, behind a red double-confirm dialog.
Trilingual UIEnglish / 简体中文 / 繁體中文 — follows the harness language setting; the 简体/繁體 switch lives inside the plugin page.
Header quick action"Move to Workspace" for the currently open conversation.

Both per-row and batch operations are supported (move / archive / restore / backup / delete selected).

Cross-machine portability

A session belongs to a workspace through its header cwd — an absolute path that is machine-specific. So a plain folder copy would break on another machine (the path no longer exists). Instead:

  1. On machine A: Backup a session → you get a portable package.
  2. Copy that package to machine B.
  3. On machine B: Import the package and pick the workspace/folder where the session should live → the import rewrites the cwd to B's path (the conversation content is untouched), and the session resumes seamlessly on B.

Cross-machine note: a workspace is a folder, and a session is tied to it through the header's cwd — an absolute path that is specific to each machine. So to continue a conversation that was backed up on machine A, use Import on machine B to rewrite the cwd to a path that exists there.

Screenshots

Session Manager page

Session Manager

Dialogs

Move to WorkspaceBackup / ExportImportDelete (double-confirm)
MoveBackupImportDelete

Requirements

  • DeepSeek Harness with the web profile (dsh web)
  • Node.js ^22.19.0 || >=24.0.0 (the harness runtime)

Installation

Method 1 — install into the web profile (recommended)

▼
sh
复制代码
# 1. Clone / download this repo, then install it into your web profile. # Replace <path> with the absolute path of the dsh-session-mgr folder. dsh plugin --profile web add "file:<path>\dsh-session-mgr" # 2. Add the bundle to your web profile's package.json # (the `dsh.profile.bundles` array, alongside the other plugin entries): # "dsh-session-mgr" # 3. Restart the web server for the plugin to load. dsh web

Method 2 — manual

Put the package into your profile's node_modules (e.g. pnpm add file:... or a symlink), then add "dsh-session-mgr" to the dsh.profile.bundles list in the profile's package.json, and restart.

Usage

  1. Open Settings → Session Manager.

  2. All conversations are grouped by their current workspace; archived ones carry a badge.

  3. Use the per-row buttons, or tick the checkboxes and use the batch toolbar:

    • Move selected… → pick a destination workspace (or type any existing folder to make it "Ungrouped").
    • Archive selected… → hide them from the sidebar (position kept).
    • Restore selected… → un-archive them back to their place.
    • Backup selected… → export each session as a portable package (an <id> folder with manifest.json and the full log) to a folder you choose.
    • Import… → install a portable package from another machine into a chosen workspace/folder (safe to run on machine B).
    • Delete selected… (red) → a red warning dialog asks you to confirm again before anything is erased.
  4. While a conversation is open, the header also shows Move to Workspace to relocate it in one click.

  5. Use the 简体/繁體 switch in the toolbar (shown when the harness language is Chinese) to toggle the Chinese script.

HTTP API

The host half exposes a small JSON API under /dsh-session-mgr/* (all POST):

EndpointRequestResponse
/dsh-session-mgr/list{}{ workspaces, sessions, archivedSessionIds, backupDefaultDir }
/dsh-session-mgr/move{ sessionId, targetPath }{ ok, sessionId, archived, from, to }
/dsh-session-mgr/archive{ sessionId }{ ok, archived, sessionId, archivedSessionIds }
/dsh-session-mgr/unarchive{ sessionId }{ ok, archived, sessionId, changed, archivedSessionIds }
/dsh-session-mgr/backup{ sessionId, targetDir, format }{ ok, sessionId, cwd, archived, backupPath, sizeBytes, format, manifest }
/dsh-session-mgr/import{ sourcePath, targetPath }{ ok, sessionId, importPath, cwd, workspaceId?, workspaceTitle? }
/dsh-session-mgr/delete{ sessionId }{ ok, sessionId, deleted, reason?, path, sizeBytes?, cwd? }

targetPath accepts either a real directory path or a registered workspace id. backup (format: "zip" for Windows or "targz" for Linux) produces a portable archive file (<sessionId>.zip / <sessionId>.tar.gz) that import reads back on this machine (remapping cwd to targetPath).

How It Works

In DeepSeek Harness a workspace is a folder: a session belongs to a workspace through its session header cwd. "Moving" a session therefore:

  1. moves the session artifact folder from <sessions>/<encoded-old-cwd>/<id> to <sessions>/<encoded-new-cwd>/<id>;
  2. rewrites the cwd field of the JSONL log header (the first zstd frame);
  3. updates the in-memory workspace registry so the sidebar regroups immediately — no restart needed.

Archive/unarchive uses the registry-global archive set; an archived session keeps its sessionIds slot, so restoring puts it back exactly where it was.

Safety

  • Running sessions cannot be moved / archived / backed up / deleted (checked via the agents service).
  • Idle live sessions are evicted from memory before a move/delete so the next open reads the new header.
  • Existing files/folders with the same name at the destination are refused (no silent overwrite).
  • Cross-volume (EXDEV) moves fall back to copy + delete source.
  • Delete requires a double confirmation and is irreversible — a backup is recommended.

Development

The pure helpers in lib/host.js (path encoding, zstd frame scan, header rewrite, folder move) are unit-testable:

▼
sh
复制代码
node scripts/test-move.mjs # synthetic-data tests node scripts/test-real.mjs # tests against a COPY of a real session

test-real.mjs needs a real session dir as its argument (or DSH_REAL_SAMPLE):

▼
sh
复制代码
node scripts/test-real.mjs "C:\path\to\<session-id>\"

Contributing

Found a bug or want a feature? Open an issue or a pull request. Please keep the code style (plain ESM, no build step) and add/run tests for any change to lib/host.js.

License

MIT

会话消息

快捷安装

复制到终端去安装插件

dshplugin--profilewebaddgithub:mienfong/dsh-session-mgr

温馨提示

装插件等于在本机跑第三方代码,权限与你相同,能读文件、用凭据、访问网络,工具审批管不到。请只装可信来源,并尽量锁定 commit。

站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
dsh 插件推荐
dsh-btw
提供 /btw 一次性上下文旁问,不执行工具;回答显示在可复制、折叠或关闭的独立气泡中,不写入主对话。
billion-context
billion-context官方版:上下文压缩插件,兼顾小窗口(100k上下文足矣)省token(省5倍token)和超长会话(数月级别几十亿token单会话)。
dsh-conversation-archive
在 Windows 上管理 DSH 已归档会话,支持搜索、批量取消归档与删除、AI 辅助文件保留,以及经过校验的本地或网络目录备份。
dsh-auto-continue
回答因达到单次输出 token 上限被截断时自动发送"继续"续写,无需手动操作;面向自部署 Ollama 等小输出上限场景。
dsh-branchmark#dsh-branchmark
Vibe Coding 时,如果突然想到另一个问题,或者看到一段以后还会用到的回答,可以先保存下来、在 Side Chat 里快速问清楚,或另开一个相关会话继续研究,不打断当前任务的开发思路和注意力。