dsh-plan-switch
其他 活跃维护

dsh-plan-switch

a903067276-rgb/dsh-plan-switch

轻量浏览器扩展工具,为DSH网页端输入框提供一键触发计划模式的能力,无需手动输入/plan指令,点击即可快速进入或退出对应模式,操作简单直接,降低频繁使用计划功能的操作成本。

3
Stars 标星
0
Forks 分支
3
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
124 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:a903067276-rgb/dsh-plan-switch
git clone https://github.com/a903067276-rgb/dsh-plan-switch.git
git clone git@github.com:a903067276-rgb/dsh-plan-switch.git
README.md main

dsh-plan-switch 📋

English | 简体中文

License: MIT

Awesome DSH Plugin

A one-click enter/exit Plan mode button for the DSH web input bar (a quick-click shortcut for /plan) — a plugin for DeepSeek Harness (dsh) web.

Unofficial project: independently developed and maintained by a community member, not an official DeepSeek product.

Screenshot

dsh-plan-switch plan button in the input bar

The checklist icon button at the left end of the input tool row (official DSH design tokens, follows dark/light theme).

Features

  • One-click enter/exit Plan mode: a checklist icon button at the left end of the input tool row; clicking it runs the official /plan toggle command.
  • Hides while Plan mode is active: the button hides itself and the official plan card takes over the status display — there is never a duplicated indicator.
  • Pending-switch guard: while a /plan toggle is queued, the button is disabled (the same "switching" semantics as the official plan chip), so a stray click can't reverse the switch.
  • Live state: the button follows the plan state through the official projection, so changes from any entry point (/plan command, official chip, agent switching mid-run) are reflected in real time.

Install

Official bundle install (one line):

dsh plugin --profile web add "github:a903067276-rgb/dsh-plan-switch#main"

Restart dsh web after installing (bundle layers are composed at startup). Requires pnpm on PATH (dsh plugin forwards to pnpm).

Manual mount (fallback): see docs/install.md — symlink into ~/.dsh/profiles/web/node_modules/ plus a single entry in ~/.dsh/cordis.patch.yml, then restart.

Usage

A checklist icon button appears at the left end of the input tool row (official DSH design tokens, follows dark/light theme). Click it to enter plan mode — the same as typing /plan. While plan mode is active the button hides itself: the official plan card takes over the status display, so there is never a duplicated indicator; while a /plan toggle is pending the button is disabled, so a second click can't reverse the switch.

Platform support

Platform Status
macOS ✅ fully tested (development environment)
Linux ⚠️ expected to work (pure frontend button, no platform dependency), untested
Windows ⚠️ expected to work (pure frontend button, no platform dependency), untested

Requirements

  • DSH web >= 0.1.0-rc.7 (run with dsh web)
  • No host-side setup: the host half is a no-op — the whole plugin is a client-side button that runs the official /plan command, so nothing extra is required on any platform.

How it works

  • Host (lib/index.js): no behavior — this is a pure UI plugin; the client half is discovered through the dsh.client declaration in package.json (exports["./client"]).
  • Client (lib/client.js): registers the checklist icon button in the conversation.input.left seat using official DSW design tokens (follows dark/light theme); reads plan state live through useProjection("plan"); clicking executes the official /plan command via ctx.remote.commands.execute(sessionId, "/plan") — the whole flow stays on the official command chain.
  • State handling: the effective plan state mirrors the official PlanChip algorithm (pending ? !active : active). While plan mode is active the button returns null (hidden — the official plan card owns the indicator, no duplicate); while a toggle is pending the button is disabled so a second click can't reverse the switch; command failures turn the button error-colored with the message in its tooltip.

Notes

  • Pure client-side: no host routes, no file writes, no stored data.
  • Restart dsh web after installing or updating (bundle layers are composed at startup); client-side edits apply on a page refresh.

Development

  • Source: lib/index.js (host side, no-op), lib/client.js (web injection)
  • Workflow: edit locally → push to main → pnpm update to verify the install

License

MIT