Skip to content

Releases

v0.1.0 · profile 间插件迁移

Choose a tag to compare

@wbb316 wbb316 released this 30 Sep 15:17

v0.1.0

在 dsh 的各个 profile 之间安全迁移插件,默认方向是 网页版 web → 桌面版 desktop。

它的形状是刻意的:插件自己不改任何 profile。只做四件事 —— 算差异、预检、
写一个「退出后执行的脚本」、重启后核对是否真的落地。

为什么不能真的「一键粘贴」

三个硬事实:

  1. 桌面端 profile 禁止用 dsh CLI 修改 —— @deepseek-ai/dsh/lib/bin.js 里按名字拦死一切 CLI 调用
    (profile "desktop" is managed exclusively by the Electron application)。
    桌面端唯一的写入器是应用内的官方插件管理器(「设置 → 插件」那个)。
  2. 实例配置不能跟着搬 —— 端口 / 坐标 / 地址是这台机器的事,抄过去只会互相打架。
    本插件只搬「装了哪些插件」,配置层分叉只报告、不自动同步。
  3. 最坏的失败模式是"桌面端打不开" —— bundle 写进 dsh.profile.bundles 却加载不起来,
    profile 组装就会失败,而那时你已经在应用外面了,只能用文本编辑器救。
    所以装前自检不通过就拒绝安装(退出码 1)。

两条应用路径

目标 profile 走哪条 应用时机
desktop(App 自有) 应用内官方管理器 installBundle 当场生效,无需退出
web / headless(CLI 拥有) dsh plugin 或生成的离线脚本 目标端退出后

安装

dsh plugin --profile web add github:wbb316/dsh-profile-sync

需要 DSH 0.2.0-rc.1 或更高。装完在左栏找到「插件迁移」:
选来源 profile → 选目标 → 算差异 → 应用。

测试

6 个测试文件全绿:不启动 DSH、不占端口、不跑 pnpm,合成 profile 带 synctest- 前缀,
不碰你真实的 web / desktop。