dsh-if

为 DSH 增加 /if 斜杠命令:第一行是条件,其余行是指令。由继承当前会话工具、system prompt 与消息历史的 fork 子代理判断条件并回答 YES 或 NO,只有 YES 才把指令作为一条普通用户消息发给主 agent,NO 则什么都不发送;条件、判断用的 prompt 与判断结果都不会写进主会话。模型工作时命令与普通消息一起排队,可在队列面板里编辑、删除、插话,设置里可切回 0.2.x 的后台模式。判断以只读方式运行,宿主没有可继承上下文的 fork provider 时回退为一次性模型调用加纯文本记录。适配 DSH 0.2.1-rc.5 及以上(已在 0.2.1-rc.5 与 0.2.2-rc.1 验证),需 Node.js 20.3 或更新版本。

插件介绍

为 DSH 增加 /if 斜杠命令:第一行是条件,其余行是指令。由继承当前会话工具、system prompt 与消息历史的 fork 子代理判断条件并回答 YES 或 NO,只有 YES 才把指令作为一条普通用户消息发给主 agent,NO 则什么都不发送;条件、判断用的 prompt 与判断结果都不会写进主会话。模型工作时命令与普通消息一起排队,可在队列面板里编辑、删除、插话,设置里可切回 0.2.x 的后台模式。判断以只读方式运行,宿主没有可继承上下文的 fork provider 时回退为一次性模型调用加纯文本记录。适配 DSH 0.2.1-rc.5 及以上(已在 0.2.1-rc.5 与 0.2.2-rc.1 验证),需 Node.js 20.3 或更新版本。

安装方式

通过 npm 安装

dsh plugin --profile web add dsh-if

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

从 GitHub 安装

dsh plugin --profile web add github:TLEWA/dsh-if

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

版本兼容情况

兼容性待确认。可前往项目文档查看支持版本。