dsh-power-menu
给 DSH 桌面版加一个右上角电源按钮。点开是 Windows 电源菜单风格的小卡片,只有「关闭DSH」和「重启DSH」:关闭结束整个应用,重启会自动把窗口拉回来。纯本地,只监听回环地址。
What it is
给 DSH 桌面版加一个右上角电源按钮。点开是 Windows 电源菜单风格的小卡片,只有「关闭DSH」和「重启DSH」:关闭结束整个应用,重启会自动把窗口拉回来。纯本地,只监听回环地址。
How to install
Run this in the DSH web profile, then refresh the page.
$ dsh plugin --profile web add 'git+https://github.com/xichen-62/dsh-power-menu.git#425a44e5d4c6cd3972b384b7ebcc3c3fad709aea'
DSH versions accepted
>=0.2.0-rc.1
Author and traction
xichen-62 · ★ 17 · Updated 2026-10-20
About this plugin
dsh-power-menu
给 DeepSeek Harness 桌面版加一个右上角电源按钮:点开只有 关闭DSH 和 重启DSH 两项,省得每次改完插件/配置还要去系统托盘里翻「退出」。
> Windows 专用 · 只支持 DSH Desktop · 纯本地 · 无外部依赖 · MIT
>
> ⭐ 如果这个小工具帮你省了点时间,欢迎点个 Star 支持一下,感谢~
为什么做这个
DSH Desktop 关窗口只是收进托盘,真正退出或重启要走托盘菜单;而改插件、改配置之后又经常需要重启一次。这个插件把这两步搬到会话标题栏右上角:一个电源键,两项操作,点完就走。
功能
- 右上角电源按钮:位于会话标题栏图标行最右侧,顺序为「布局 / 侧栏 / 电源」。
- 空会话也显示:欢迎页和对话内使用同一个挂载位置,透明无底色,不会破坏主题,也不会出现两个按钮。
- Windows 电源菜单风格:白色圆角卡片、悬浮阴影、左侧线性图标 + 右侧文本,只有两项,不塞多余入口。
- 关闭DSH:结束整个 DeepSeek Harness 桌面应用(Electron 主进程 + Host),不重新启动。
- 重启DSH:结束整个应用,等旧端口释放后用原可执行文件重新拉起,窗口自动回来。
- 键盘可用:
↑/↓/Home/End在两项间移动,Enter/ 空格执行,Esc关闭,点菜单外部也能关。 - 执行反馈:点击后整页盖一层半透明遮罩,显示「正在关闭DSH…」/「正在重启DSH…」。
- 纯本地:没有外部依赖、没有遥测;接口只监听本机回环地址,并做同源校验。
安装
> 重要:装完插件后,必须再运行一次 enable.ps1(或直接用下面的 install.ps1),把 dsh-power-menu 补进 profile 的 dsh.profile.bundles,然后重启 DSH。少了这一步,按钮会 404——这是 DSH 插件管理器只写 dependencies、不写 bundles 的已知行为,不是插件本身的问题。
方式 A:一键脚本(推荐)
从仓库下载 ZIP 或 git clone 后,在目录里运行:
powershell -ExecutionPolicy Bypass -File .\install.ps1
脚本会:清理旧的 link/junction 残留(避免 pnpm 的 ERR_PNPM_EPERM,界面上表现为「没有写入权限」)→ 用 DSH 自带 CLI 安装 → 补齐 dsh.profile.bundles → 提示重启。
GitHub 直连慢或不通时,改用镜像:
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Mirror
> 机器上没有 git 也能装:install.ps1 会先检查 git;没有就自动从 GitHub Release 下载 dsh-power-menu-0.1.17.tgz,再用本地文件安装,全程不调用 git(这正是 ERR_PNPM_GIT_RESOLVE_FAILED 的解法)。直连下不动会自动改走 gh-proxy 镜像;也可以用 -TgzPath 指定已经拷到本机的安装包,完全离线安装。
>
> 脚本默认不改用户 PATH;需要让插件管理器以后也能解析便携 git 时,加 -Github -WritePath。下载 tgz 会优先用 Release 的 SHA256SUMS.txt 校验,离线包可用 -Sha256 手动校验。
方式 B:通过 DSH 插件管理器
1. 打开 DSH Desktop 的 插件 / 插件市场。
2. 选择 添加插件,输入:
github:xichen-62/dsh-power-menu
3. 安装完成后,下载/克隆本仓库,运行 enable.ps1 补一次 bundles(这一步不能省):
powershell -ExecutionPolicy Bypass -File .\enable.ps1
4. 重启 DSH,并在 插件市场 → 已安装 里确认 dsh-power-menu 处于「启用中」。
> 如果装完点按钮报 HTTP 404,说明插件只进了 dependencies、没进 dsh.profile.bundles,宿主半没加载。运行仓库里的 enable.ps1(右键使用 PowerShell 运行),它会先备份 profile,再把 dsh-power-menu 补进 dsh.profile.bundles;然后重启 DSH。
方式 C:命令行安装
dsh plugin --profile desktop add github:xichen-62/dsh-power-menu powershell -ExecutionPolicy Bypass -File .\enable.ps1
> dsh 是 DSH 自带的 CLI;如果 PATH 里没有,请用 DSH 安装目录里的 dsh / dsh.cmd。
方式 D:本地开发安装
git clone https://github.com/xichen-62/dsh-power-menu.git
把插件链接进 desktop profile:
# Windows PowerShell $profileDir = "$env:USERPROFILE\.dsh\profiles\desktop" New-Item -ItemType Junction ` -Path "$profileDir\node_modules\dsh-power-menu" ` -Target "<你 clone 下来的目录>"
然后在 $profileDir\package.json 里:
dependencies增加"dsh-power-menu": "link:<你 clone 下来的目录>"dsh.profile.bundles增加"dsh-power-menu"
重启 DSH 生效。这个插件没有构建步骤,改完 lib/ 里的文件重启即可。
> 注意:link: 安装会在 node_modules 里创建 junction。之后如果改用插件管理器(github: 安装)升级同一个包,pnpm 的临时目录 rename 会撞上这个 junction,报 ERR_PNPM_EPERM,界面上显示「没有写入权限」。遇到时先删链接再重装:cmd /c rmdir "$profileDir\node_modules\dsh-power-menu"(只删链接,不动 clone 的源码)。
使用
1. 在会话标题栏右上角点电源图标。
Compare in this category
The five most-starred plugins in the same category.
| Plugin | Author | Stars | Version | Updated |
|---|---|---|---|---|
| Mole | tw93 | 74.5K | 0.0.0 | 2026-11-10 |
| DeepSeek-Reasonix | esengine | 36.1K | 0.0.0 | 2026-11-10 |
| dsh-desktop | anywhere-labs | 35.6K | 0.4.1 | 2026-11-06 |
| awesome-dsh-plugin | awesome-dsh-plugin | 24.1K | 0.1.0 | 2026-11-10 |
| dsh-market | dsh-market | 11.8K | 1.73.17 | 2026-11-09 |