安装 DSH Purge

Web 和官方桌面 EXE 是两个维护中的宿主。两个都装,并各自 Apply。

环境要求

Node.js ≥18(Windows 无闪烁需 Node ≥22)。本版本针对 dsh 0.2(官方桌面 0.2.0-rc.2 / 官方 dsh web)。更旧的 dsh 版本需要从 Releases 获取对应的更旧插件。

1. 把插件加入某个 profile

Web 安装不会触及桌面应用,桌面安装也不会触及 Web。两个都装;各自 Apply。

Web(官方 dsh web)

shell
dsh plugin --profile web add dsh-purge

桌面版(官方 EXE)

shell
dsh plugin --profile desktop add dsh-purge

如果该目录已经是一个克隆,使用 add . 代替包名。如果 npm 注册表被屏蔽,用相同的 --profile 添加归档 URL:

shell
# 注册表被屏蔽——从归档安装
dsh plugin --profile web add \
  https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz

2. Apply —— 三步

把插件加入 profile 本身并不会修补 @deepseek-ai。

  1. 退出并重开宿主

    停止并重启 dsh web,或退出桌面托盘再重开应用。

  2. 打开侧栏并 Apply

    在该宿主上,点击会话标题旁的 dsh-purge,然后在 Clean 页面点击 Apply。它不在宿主的设置页里。

  3. 让它重启

    一次成功的 Apply 会重启一次以加载补丁。然后开一个新对话——注入就在那时进入会话。

⚠ 宿主彼此独立

Web 的控制只影响 Web;桌面的控制只影响桌面应用。不要从一个宿主去 Apply 另一个。

3. 确认安装成功

  • 会话标题旁出现 dsh-purge,其 Clean 页面上有 Apply。
  • 在聊天里输入 /purge status 会打印 DSH_HOME 和补丁列表;该路径应当是你实际运行的 home。
  • 未安装的可选包显示为 skipped,不会阻碍 Apply。
chat
/purge status
DSH_HOME  ~/.dsh
✓ patches applied   21 / 21

手动安装(当命令失败时)

当命令失败、或 dsh 不在 PATH 时使用。只编辑你运行的那个宿主的 profile。

  1. 找到正确的 $DSH_HOME

    真正的 home 名为 .dsh,包含 profiles,且 profiles/<name>/package.json 里有 "name": "dsh-profile-web"(或 -desktop)。

  2. 放置插件

    把完整目录树放到 $DSH_HOME/plugins/dsh-purge(文件夹名 dsh-purge,package.json 的 name 为 dsh-purge)。

    shell
    git clone https://github.com/YuJunZhiXue/dsh-purge.git \
      "$DSH_HOME/plugins/dsh-purge"
  3. 只编辑那个 profile 的 package.json

    先备份。在 dependencies 加入 "dsh-purge": "file:../../plugins/dsh-purge",并把 "dsh-purge" 追加到 dsh.profile.bundles 末尾。保留所有已有的依赖和 bundle。

  4. 只在那个 profile 里安装

    shell
    cd "$DSH_HOME/profiles/web"   # 或 profiles/desktop
    pnpm install
  5. 退出、重开,然后 Apply

    和上面相同的三步。如果卡片缺失,很可能你编辑的是另一个 .dsh——请重新检查第 1 步。

卸载

打开会话标题旁的 dsh-purge → Clean → Uninstall。它会回滚已应用的补丁、还原原始 Harness,并重启宿主。或在终端 / 聊天里:

shell
dsh-purge --uninstall
# 或在聊天里: /purge uninstall
安装之后

装好了?接下来做什么

在 Clean 页面跑过 Apply 之后,CLI 和聊天命令就是你驱动其余一切的方式。