Vai al contenuto principale
I

dsh-conversation-folder-sync

icekiing/dsh-conversation-folder-sync

Sync conversations and installed-plugin lists across devices through a shared folder, and import another device's conversation as a local session.

Installazione

dsh plugin --profile web add github:icekiing/dsh-conversation-folder-sync

README

Conversation Sync

Sync DSH conversation transcripts across devices through a shared folder. The plugin deliberately never reads or requires a workspace path, so a conversation stays readable on another device even when the original project directory does not exist there.

中文说明见下方「快速开始」。

Install

dsh plugin --profile <your-profile> add dsh-conversation-folder-sync

Or install this checkout directly: Plugins → Add plugin and pick the directory.

What is synced

For every local, non-subagent conversation the Host half writes one portable JSON document:

  • conversation title, device name, timestamps, and message count;
  • user-authored text and assistant text, in order.

It does not sync workspace paths, files, attachments, file references, tool calls/results, secrets, or session event metadata. Harness-injected runtime context, system reminders, time context, and approval notices are excluded, even though they are stored as user/message events.

Synced documents are read-only. You can import one as a new local Session to continue it. Deleting a local Session does not remove its already-exported document from the shared folder.

Default shared folder

The folder is resolved for you; nothing has to be chosen.

  1. The stable account ID of the signed-in DeepSeek account is read from the Host account service.
  2. The folder becomes %USERPROFILE%\OneDrive\DSH Sync\<accountId> when OneDrive is present, otherwise %USERPROFILE%\DSH Sync\<accountId>.
  3. A missing folder is created on the first sync. Two devices signed into the same account and the same OneDrive resolve the same path and join up without any setup.

A device that has not finished reading its account profile yet uses <accountId> = default; once the account ID becomes available the plugin moves the documents it already exported into the account folder and continues there. An explicit folder is still available: choose Custom in Settings, or call configure with syncDir. Switching back to automatic carries every exported document into the new folder.

Import as a new local Session

Open a conversation from another device and press Import as local conversation. The Host reconstructs the text history as a fresh local Session with turn/step boundaries, no workspace path, and the original title. The panel then opens that Session.

  • Repeated imports of the same document return the same local Session.
  • The imported history is text-only: tool calls, attachments, and reasoning are not reconstructed.
  • The imported Session is not re-exported while it is unchanged, so importing alone does not create a duplicate conversation document.
  • If you continue an imported Session with a new user message, its full branch is exported as a new local conversation on subsequent syncs; the original device's document is never overwritten.

Cross-device transport

Every device points at the same folder, for example:

  • a OneDrive / iCloud Drive / Dropbox folder;
  • a Syncthing or network-share folder;
  • a folder on removable storage moved between machines.

The default folder is ~/DSH Sync. The device id and settings live in ~/.dsh-conversation-sync/state.json, outside the shared folder.

Installed plugins

Each device writes its installed-plugin list to <shared folder>\devices\<deviceId>.json: package name, installed version, the saved source spec, and whether the bundle is selected. The panel's Plugins tab lists every device's list and marks what this device already runs.

  • Install on another device's entry installs that plugin here from name@version (registry) or the saved Git spec, through the profile's plugin manager. The result reports the same application states as Plugin Manager.
  • Local link:/file: packages and tarballs cannot be transferred: their bytes are not in the shared folder, so their row says to install them from their own folder.
  • Nothing installs in the background. A plugin that another device runs is only installed when you press Install (or the conversation_sync tool's install action) — third-party code executes in this Host.
  • This plugin still has to be installed once on a new device, because a machine without it runs no code to read the shared folder. After that, its own entry appears in every device's list and the rest can be installed from the panel.

Behavior

  • On startup and every minute (when auto sync is on), the plugin exports local conversations and rescans the folder.
  • After each completed turn, that Session is re-exported after a short debounce.
  • Documents are named by a hash of deviceId + sessionId, so two devices cannot overwrite each other's conversation files.
  • A conversation from another device appears in the list with an Other device badge and can be read or imported immediately.
  • The Host exposes an authenticated conversation_sync tool with status, sync, read, import, and configure actions.

Layout and privacy

Only the shared folder is used for transport. Writes are atomic per conversation document. Both devices must be able to read and write the folder; the plugin has no server component and no network listener beyond the existing authenticated DSH Web route used by the panel.

Because the folder contains plain-text conversation content, use a private folder and the access controls of the chosen cloud or network storage.

快速开始

  1. 插件安装后,点击左侧边栏底部的「对话同步」图标。
  2. 点击「设置」,把「共享文件夹」改为两台设备都能访问的同一个目录,例如 OneDrive 或 Syncthing 同步目录。
  3. 给每台设备设置不同的「本设备名称」,保存并同步。
  4. 另一端稍等自动同步,或点击「立即同步」,即可在列表中看到其他设备的对话。
  5. 打开其他设备的对话,点击「导入为新本地会话」,即可在本机继续对话。

本插件只传输用户和助手的文字内容,不检查工作区是否存在,也不同步文件、附件、工具输出或运行上下文。导入的会话不依赖原工作区;重复导入会复用同一个本地会话。导入后继续对话,会作为新的本地对话再次同步,不会覆盖原设备文件。若共享目录不可写,页面会显示同步错误;请检查目录权限或 OneDrive 的按需下载状态。

验证限制

以下已在 0.2.0 上验证:默认目录按登录账号解析到 OneDrive\DSH Sync\<账号ID> 并自动创建、切换目录时文档随行、插件清单写入 <共享目录>\devices\<deviceId>.json、跨设备差异计算(已装/缺失/仅本地)、install 的三种拒绝路径(已安装、未在任何设备出现、本地包需手动安装)。

未验证:install 的成功路径没有实跑,因为它会真的往配置档装一个包;面板的最终视觉渲染(间距、图标、窄屏布局)没有浏览器可确认,只做了组件树与两种视图的结构渲染检查。面板以实际页面为准。

Plugin correlati