dsh-bili-scroll
c1overzz
DSH 插件:每天替你刷一轮 B站,读字幕挑出值得的、写一份日报,值得的 @ 你
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:hadesybil-hub/dsh-restart-button
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A small DeepSeek Harness (DSH) plugin that adds a floating restart button to the bottom-right corner of the Web GUI. One click restarts the application; the next window is a cold start.
| Floating button | Pinned to the bottom-right corner, refresh glyph, tints on hover |
| Confirm gate | One click → themed "重启 DeepSeek Harness?" card → restarts only if confirmed |
| Desktop app | Restarts the whole application: the Electron shell closes (its own quit path disposes the Host and flushes sessions) and the same executable is launched again |
CLI dsh web |
Refuses with 501 desktop-only: there is no shell to restart, and this plugin will not spawn a competing server |
| Route | POST /api/dsh-restart/restart (loopback-only) |
| Result | In a browser tab the page watches the server leave and return, then reloads itself |
dsh plugin --profile desktop add @darkthee/dsh-restart-button
Restart the application once: the Host reads bundle manifests at startup.
The Desktop shell spawns the Host as a child process (<exe> --expose-internals .../dsh-desktop-host/lib/index.js) and exposes no restart seam to plugins — ctx.appExit only stops the Host, which leaves the shell showing its recovery dialog. So the restart is owned by a process that can outlive both:
lib/index.js): registers the loopback-only route. On POST it starts lib/restart-helper.mjs as a detached, unref'd child, then answers 202. It reads the two facts the helper needs from its own process: process.ppid (the shell) and process.execPath (the executable).lib/restart-helper.mjs): waits for the response to reach the page, asks the shell to close (taskkill <pid> without /F, i.e. WM_CLOSE; SIGTERM elsewhere), then waits for the pid to actually disappear and launches the same executable. Launching only after the pid is gone matters: the shell holds a single-instance lock, so an early second instance would just hand its arguments to the dying first one.lib/client.js): plain DOM, no React, no build step. Loaded through window.__ModuleLoader__; the module id equals the package name, which is how the Host maps a browser bundle to its entry.Host header, and same-origin fence. The Desktop shell forwards dsh-app://app/* to the Host after stripping origin/host/cookie, so a Desktop request arrives origin-less and passes the fence; a cross-site browser request cannot.~/.dsh/dsh-restart-button.log (or $DSH_HOME/dsh-restart-button.log) records each step: the requested restart, the graceful close, the wait, the relaunch, or the reason it gave up.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。