dsh-reset-button
Manifest validAdds a Restart button beside the permission control in the composer toolbar that relaunches DSH in one click, so freshly installed plugins apply without closing and reopening the app.
dsh-reset-button
给 DSH(DeepSeek Harness) 的对话框工具栏加一个「重启」按钮 —— 就在「完全权限」所在那一行的右侧。 点一下,DSH 自己重启完毕;装完插件再也不用自己关掉窗口、再手动打开。
按钮落在 composer 工具行的右侧,紧挨着权限控件的右边(真实界面如下):

工具行从左到右:+ · ⚠ 完全权限 ∨ …… ↻ 重启(本插件) · ↩ 回退 · DeepSeek-V4.1-Flash 开启 ∨
| 位置(工具行内,从左到右) | 内容 | 说明 |
|---|---|---|
| 最左 | + · ⚠ 完全权限 ∨ | 宿主自带 |
| 右侧紧凑控件区 | ↻ 重启 | 本插件,槽位 conversation.input.right,order: 10 |
| 再往右 | ↩ 回退 | 同样占用该槽位的插件(dsh-purge 的 rewind,order: 20) |
| 最右 | 模型选择器 | 宿主自带 |
MIT 开源。
它解决什么
在 DSH 里装/改插件、改 profile patch、换 MCP 之后,宿主都要重启一次才生效。 以前必须:关掉 DSH Desktop → 重新打开 → 找回刚才那个会话。
现在:点「重启」→ 等几秒 → 页面自己回来,接着干活。
工作原理(两条通道,按顺序尝试)
-
桌面端原生桥(首选) DSH Desktop 的 preload 已经暴露了原生重启:
globalThis.dshDesktop.restartHarness()→ipcRenderer.invoke('harness:restart')。 按钮直接调它,重启过程由 Desktop 主进程负责,最干净。 -
Host 兜底(浏览器打开 DSH Web 时走这条)
POST /dsh-reset-button/restart(只接受回环地址),Host half 写一个一次性.cmd到临时目录, 用 detached 的cmd.exe执行:等 1s → taskkill /IM "DSH Desktop.exe" /T /F → 等 1s → start "" "<同一个 exe>"。 必须 detached,否则脚本会跟着它要杀的应用一起死。 -
两条都不通:按钮只上报错误(红色),不做任何破坏性动作。
安全阀:Host 兜底只有在 process.execPath 确实是 DSH 桌面应用(DSH Desktop.exe)时才动手;
node/electron 开发运行时下直接返回 501 not-a-dsh-desktop-runtime,绝不误杀别的进程。
安装
方式 A:本地插件目录(DSH Desktop,推荐)
$plugins = "$env:APPDATA\dsh-desktop\harness\plugins"
$profile = "$env:APPDATA\dsh-desktop\harness\profiles\web"
# 1) 放包(这里用 junction 指到源码仓库,改完即生效)
New-Item -ItemType Directory -Force -Path "$plugins\dsh-reset-button" | Out-Null
Copy-Item -Recurse -Force .\* "$plugins\dsh-reset-button\"
# 2) 接到 profile 的 node_modules
New-Item -ItemType Junction -Force -Path "$profile\node_modules\dsh-reset-button" `
-Target "$plugins\dsh-reset-button" | Out-Null
- 在
$profile\cordis.patch.yml末尾加:
# dsh-reset-button: 一键重启
- insert:
- id: dsh-reset-button
name: 'dsh-reset-button'
- 重启一次 DSH(这次还没按钮,手动重启;之后就一直有按钮了)。
方式 B:从 GitHub
git clone https://github.com/IDKURLOVE/dsh-reset-button.git
cd dsh-reset-button
# 然后照方式 A 的第 1~4 步;或把它作为 bundle 装进 profile
卸载
# 1) 从 cordis.patch.yml 里删掉 dsh-reset-button 的 insert 段
# 2) 断开连接并删包
Remove-Item "$profile\node_modules\dsh-reset-button" -Force
Remove-Item "$plugins\dsh-reset-button" -Recurse -Force
# 3) 重启 DSH
配置
无需配置。想挪位置就改 client.js 里的两个常量:
| 常量 | 默认 | 含义 |
|---|---|---|
SLOT | conversation.input.right | 挂载槽位(工具栏右侧、发送按钮前的紧凑控件区) |
order | 10 | 同槽位内的排序(dsh-purge 的 rewind 是 20,所以本按钮排在它左边) |
想放到别的槽位(例如 conversation.input.left、conversation.dock、sidebar.footer.action)只需改 SLOT。
自测
node selftest.mjs # 校验 package.json / client.js / lib/index.js 的结构契约
兼容性
| 项 | 要求 |
|---|---|
| DSH Desktop | 任意近期版本(dshDesktop.restartHarness 为 Desktop 内建桥) |
| Node | ≥ 18 |
| 平台 | Windows 用原生桥 + Host 兜底;macOS / Linux 走原生桥(Host 兜底不适用,会返回 unsupported) |
License
MIT © 2026 IDKURLOVE
Comments
Loading…
Similar plugins
Adds a refresh button to the sidebar footer that reloads the plugin list and the page so newly installed plugins take effect without restarting the desktop app.
★ 0
dsh plugin --profile web add dsh-refreshby StabCut
DSH Desktop sidebar restart button: orderly relaunch of DSH Desktop from the sidebar settings row (based on desktopActions.requestRestart).
★ 0
MIT
JavaScript
Aug 21, 2026
dsh plugin --profile web add dsh-plugin-restart-desktopby FuriousKinght
A button at the foot of the sidebar that restarts the DSH desktop app and reloads the page when it comes back.
★ 0
MIT
JavaScript
Oct 15, 2026
dsh plugin --profile web add dsh-restart-buttonby hadesybil-hub
Adds a restart button next to the shutdown button in the bottom-right of the DSH Web GUI; the server comes back up and the browser reopens.
★ 0
MIT
JavaScript
Sep 28, 2026
dsh plugin --profile web add dsh-restart-buttonA small self-contained power control for DSH: sidebar power button with an upward restart/shutdown menu and a Windows-shutdown-style overlay. Own restart & shutdown engine (no dependency on other plug
★ 0
dsh plugin --profile web add dsh-power-buttonby xindady
Adds a prompt enhancement button to the composer toolbar that rewrites the draft through a model call, keeps @file references verbatim, and offers one-click undo.
★ 0
MIT
JavaScript
Oct 17, 2026
dsh plugin --profile web add dsh-prompt-enhancer