dsh-bili-scroll
c1overzz
DSH 插件:每天替你刷一轮 B站,读字幕挑出值得的、写一份日报,值得的 @ 你
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:XvBenny/dsh-restart
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DSH desktop plugin: one button in the conversation header restarts the whole app.
The button opens a confirmation dialog first. If any conversation is still working, the dialog lists them by title, together with the working directory and the session id, so you can see what the restart will interrupt before you agree to it.
conversation.session.header.utilities and renders the dialog in its own root
appended to document.body. The working list comes from the client session
list snapshot (sessions.list.getSnapshot()), whose rows carry running —
the same field the sidebar's spinner reads.POST /dsh-restart/api/restart. The process about to die
cannot restart itself, and a plain child process does not survive either: the
desktop app runs in a job object, so a spawned helper is killed together with
it. That is why the helper is started by a one-shot scheduled task
(DSH-Restart-Helper) instead of as a child.wscript.exe //B "launch.vbs", where the VBS calls
sh.Run "<powershell> -File restart.ps1", 0, False. A task that launches
powershell.exe directly still gets a console — Windows Terminal hosts it and
<Hidden>true</Hidden> does not remove it — and the relaunched app inherits
that console as its stdout, so the window outlives everything. wscript.exe is
a GUI-subsystem binary and creates no console at all.%TEMP%\dsh-restart.log, waits four seconds,
kills the app by pid, then by image name, polls until no process is left,
relaunches it through explorer.exe (the same path as double-clicking the
executable, so nothing is inherited), retries once if the image is still
missing after eight seconds, then deletes its scheduled task and its own temp
directory.POST /dsh-restart/api/restart answers only after the helper has written its
first log line. If the helper never starts, the dialog shows the reason
instead of claiming success.GET /dsh-restart/api/info reports the platform and the resolved executable,
useful when the app was launched from an unusual location.Killing by image name rather than by process tree is deliberate: the helper is a task, not part of the app's tree, so every DSH process can go away while it keeps running.
The relaunched app opens its own window, usually on a new port. The old page stays stale and can be closed.
dsh plugin --profile desktop add github:XvBenny/dsh-restart
Local checkout:
dsh plugin --profile desktop add file:C:/path/to/dsh-restart
Then restart DSH once so the plugin loads (the header button only appears after a restart — the plugin cannot restart itself into existence).
schtasks,
wscript and taskkill.process.execPath, and the
plugin refuses to run if that is not an .exe.%TEMP%\dsh-restart.log; it records the kill, the
relaunch and the cleanup, one line at a time.DSH-Restart-Helper may be left behind.
Remove it with schtasks /delete /tn "DSH-Restart-Helper" /f.explorer.exe path is what avoids it.MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。