DeepSHPlugins
dsh-session-move 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-session-move

會話與訊息JavaScriptMIT

在 Web 側邊欄把會話移動到別的資料夾(拖拽或選單選擇),帶風險確認地永久刪除會話,以及 AI 重新命名會話(總結整個對話並自動糾正錯別字);每個操作都提供 agent 工具。

6 Starsreinocheong 更新時間 2026-08-18
訪問 GitHub 倉庫
dsh-session-move 專案預覽

專案介紹

中文

在 Web 側邊欄把會話移動到別的資料夾(拖拽或選單選擇),帶風險確認地永久刪除會話,以及 AI 重新命名會話(總結整個對話並自動糾正錯別字);每個操作都提供 agent 工具。

English

Move a session to another folder from the Web UI via drag & drop or a menu picker, permanently delete a session with a risk-consent dialog, and AI-rename a session by summarizing the whole conversation (typo-aware). Each action also ships as an agent tool.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
reinocheong
倉庫
reinocheong/dsh-session-move
GitHub Stars
6
Forks
1
開發語言
JavaScript
許可證
MIT
最近推送
2026-08-18
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

74/ 100
維護活躍
84
文件與實用資訊
100
生態關注度
28
安裝便捷訊號
100
專案宣告訊號
100

README 含完整安裝與使用說明;關注度尚低(6);標準命令一鍵安裝。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add github:reinocheong/dsh-session-move

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

dsh-session-move

GitHub stars License: MIT Awesome DSH Plugin

Manage DeepSeek Harness sessions from the Web UI — move, delete, and AI-rename, with drag & drop.

A dual-face (host + browser) plugin for DeepSeek Harness (dsh). It fills the gaps the official UI leaves open:

FeatureOfficial dshWith this plugin
Move a session to another folder (workspace)❌ sessions are locked to the folder they were created in✅ drag & drop or menu → picker dialog
Permanently delete a session❌ archive only (hidden, never really gone)✅ menu → risk-consent dialog → full removal
AI-rename a session⚠️ auto-titles exist, but only from the *first* message✅ one-click: LLM summarizes the whole conversation

Each feature also ships as an agent tool (workbench_session_move, workbench_session_delete, workbench_session_rename_ai), so your agents can organize sessions too.


Install

# from GitHub (recommended until published to npm)
dsh plugin --profile web add https://github.com/reinocheong/dsh-session-move/archive/refs/tags/v0.1.2.tar.gz

Restart the profile for the plugin to load:

# systemd-managed installs
sudo systemctl restart dsh
Note for manual installs (copying the package into ~/.dsh/profiles/node_modules/ yourself): you must also register it in the profile's cordis.patch.yml:
- insert:
    - id: session-move
      name: dsh-session-move
dsh plugin add does this automatically.

Usage

🗂 Move a session to another folder

Drag & drop — grab any session row in the sidebar and drop it onto the title of another folder. The target folder highlights while you hover; release to move.

Menu — open a session's ... menu → Move to folder… → pick the target folder → confirm.

Moving a session relocates its working directory: the session header's cwd is rewritten, the persisted log is moved to the target folder's storage slug, and the workspace accounting is updated — history travels with it, and the session keeps working in the new directory afterwards.

🗑 Delete a session

Open a session's ... menu → Delete session → tick *"I understand the consequences"* → confirm.

Deletion is complete and permanent: running agents are stopped first, then the log directory, projection-cache row, and workspace accounting are removed. Nothing lingers in "Ungrouped".

✨ AI rename

Open a session's ... menu → AI Rename — the LLM reads a representative sample across the whole conversation (evenly sampled to fit the token budget), fixes any typos, and writes a concise title in the conversation's language.

By default it uses the session's own model route. To pin a different provider/model, configure the plugin row:

- id: session-move
  name: dsh-session-move
  config:
    renameAi:
      provider: deepseek-official
      model: deepseek-v4-flash
      targetWords: 6
      targetCjkCharacters: 14
      maxInputBytes: 8192
      maxOutputTokens: 96
      timeoutMs: 60000

Agent tools

ToolDescription
workbench_session_moveMove a session to another workspace (by session id + workspace id).
workbench_session_deletePermanently delete a session.
workbench_session_rename_aiAI-rename a session.

HTTP endpoints

These power the UI; they are also usable directly:

EndpointMethodBodyReturns
/__sessionmove/infoGET—all workspaces + the session's current workspace
/__sessionmove/movePOST{ sessionId, workspaceId }move result (old/new cwd, workspace ids, agentReleased)
/__sessionmove/deletePOST{ sessionId }what was removed
/__sessionmove/rename-aiPOST{ sessionId }the new title

How it works (the short version)

dsh folders ("workspaces") are not free-form containers. A session belongs to the workspace whose path equals the session's working directory (cwd), which is frozen in the header line of the session's zstd-compressed log. Moving a session therefore means:

  1. stop/flush any live agent,
  2. rewrite the header line's cwd to the target folder's path (decompress the first zstd frame, patch the JSON, recompress, keep the trailing frames byte-for-byte),
  3. physically move the log directory to the target folder's storage slug,
  4. detach from the old workspace and attach to the new one through the workspace registry (which also refreshes the in-memory index, so the UI updates instantly — no restart needed).

All storage mutation goes through dsh's own storageDomain, keeping memory and disk consistent; nothing is left half-accounted.

Reliability (v0.1.2)

The move keeps every place a session's location is recorded in sync — not just the header and the log directory:

  • Projection cache — the session's identity.cwd in the projection cache (session_projcache) follows the move, so the web session list resolves the correct storage slug immediately (no ENOENT on cold sessions and no "Ungrouped" residue after a move).
  • Boot reconciliation — on startup the plugin audits every stored projection-cache record against its on-disk header and repairs stale identity.cwd entries left behind by earlier half-applied moves or manual reorgs, so the list shows real session titles from the first render instead of the folder placeholder.
  • Live sessions — a session that is loaded in memory when moved has a frozen header snapshot; the plugin detaches it from the live agents store before re-attaching it to the target workspace, so the attach validation never sees a stale cwd (this was the cause of moves silently landing in "Ungrouped" while the physical move succeeded).
  • Running sessions (fixed in v0.1.2) — when the moved session is actively executing a task, the plugin now also releases the agent from the agents registry (emits agent/disposed), not just cancels its current turn. This is the load-bearing part: dsh's agent factory waits for BOTH the session and the agent to leave their registries (waitForDrainingConfiguredIdentity listens for session/disposed and agent/disposed) before rebuilding a live session; cancelling the turn alone leaves the agent registered, so the wait never resolves and the moved session can never be re-opened or resumed (symptom: you can type and hear the notification sound, but the agent never replies). The client also seamlessly reloads the moved session's view after a successful move — the host flags the resident conversation instance as removed ("session unavailable" input) and that flag cannot be reset in place, so the plugin switches to another listed session first (while the moved session is still unlisted, sweepDeferred genuinely drops its stale scope), refreshes the list, then switches back — the session re-opens cold from its new location with history intact in a few hundred milliseconds and no page reload. Any step that fails falls back to an automatic full page reload, so the view can never stay stuck on "session unavailable".

Each fix is fail-soft: if a repair can't run, the plugin logs a warning and leaves the state untouched rather than corrupting it.


Performance & footprint

The plugin is designed to be lightweight:

  • Zero runtime dependencies — it only uses Node built-ins plus packages dsh already ships (dsh-tools, dsh-llm, dsh-session-title, dsh-session-title-llm). Nothing new is installed.
  • No background work — no timers, polling, or resident connections. Move/delete/rename are purely request-driven: work happens while the request runs, then the plugin goes idle.
  • Tiny footprint — the whole plugin is ~100 KB of source; its resident memory is negligible against a running dsh process.
  • Fast operations — the stateless endpoints answer in ~1 ms (e.g. /__sessionmove/info); the only potentially slow step is AI rename, which calls the LLM once on demand (a few seconds, timeout-configurable) and never runs otherwise.
  • Cheap client side — one DOM observer plus three dialogs that render only when opened; nothing runs in the browser while idle.

Requirements

  • Node.js >=22.19.0 (same as dsh)
  • dsh 0.1.0-rc.6 or newer
  • AI rename additionally needs the official @deepseek-ai/dsh-session-title / @deepseek-ai/dsh-session-title-llm packages (bundled with dsh)

License

MIT

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案