Khellendros97/dsh-better-plan-reviewer ↗★ 0
dsh-better-plan-reviewer
DSH web plugin: takes over the plan review card and adds an execution-model selector at its bottom — pick which model will carry out the plan; on approve the plugin switches the session model first, then answers the review so execution runs on the chosen model.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Khellendros97/dsh-better-plan-reviewer说明文档
阅读完整 README ↗dsh-better-plan-reviewer
改装 DSH 的 plan 审查界面:把贴在底部的黄色审查卡片换成悬浮对话框(居中 + 遮罩),标题用蓝色,并在底部提供执行模型 + 思考强度选择;点「确认执行」时插件先切换模型、再批准计划,然后自动发送「开始执行」让计划用新模型跑起来。还提供「暂存计划」按钮,把计划存档到 项目/.dsh/plans/ 方便开新会话执行。
功能
- 悬浮对话框:
position:fixed居中遮罩,不再贴着底部;标题条为蓝色(--dsw-static-deepseek-500),不再是黄色 warn 风格。 - 执行模型选择器:卡片底部,样式复用 dsh-better-model-selector 的下拉样式(搜索 + 分组列表),默认当前会话模型。
- 思考强度选择器:当前选中的模型公布推理等级(reasoning efforts)时显示滑动条(复用 dms 样式),切换模型时随模型默认等级重置。
- 先切换后执行:点「确认执行」→ 若模型/强度有变化,先
await模型切换 RPC(失败则不执行、显示错误)→ 再批准计划 → 自动发送一条「开始执行」消息继续对话(仅在有切换时发送)。 - 暂存计划:把计划 markdown 写入
/.dsh/plans/plan-.md(走插件 host 半的/plan-reviewer/save-plan路由,带 Host 头信任围栏),成功后显示落盘路径。
原理
DSH 的 plan 审查走 conversation.composer 这个 chain slot:内置 @deepseek-ai/dsh-client-ui-user-questions 在优先级 0 注册 QuestionComposer,plan-review 意图的问题渲染成审查卡片。本插件以优先级 -1 注册到同一条链,select 只认领 plan-review 形状的请求(与内置收窄规则逐条一致),普通问题流程仍落回内置组件。
- 模型/强度切换经
ctx.modelDirectories(@deepseek-ai/dsh-client-ui-model-selection的会话级ModelDirectory)读写,与 composer 模型选择器、/model弹窗共享同一份状态。 - 「开始执行」经
sessions.binding(sessionId).session.prompt([{type:'text',text}], 'queue')发送,等价于用户在输入框提交。 - 「暂存计划」经
fetch('/plan-reviewer/save-plan')打到 host 半路由,host 侧用ctx.sessions.get(id).header.cwd取会话权威工作目录(不信任客户端路径),写入/.dsh/plans/。
安装
前置:DSH 已初始化 web profile(dsh web 能正常运行),Node.js ≥ 20。
⚠️ 依赖 DSH 的
next通道:peerDependencies 指向@deepseek-ai/*^0.1.0-rc.6。若你的 DSH 走latest(),可能缺少 等服务。