READMESource: main@e1108cda
dsh-restart
独立的 DeepSeek Harness Web 一键重启插件——与任何余额/用量功能无关,单独负责在设置页提供一个"重启 dsh"入口。
初衷:装插件 / 改插件之后总要重启 dsh web 才生效。这个小插件把重启做进界面:设置页点一下 → 确认 → 自动重启、服务恢复后自动刷新页面,不再需要命令行。
特性 / Features
- 独立:零依赖、零耦合,可单独安装/卸载;不读取任何密钥
- 原生适配:设置页独立分区,使用 DSH 设计令牌(
--dsw-alias-*),深浅主题自适应 - 可靠重启:先
launchctl kickstart -k,2 秒后兜底 SIGTERM 自身进程,launchdKeepAlive保证拉起新进程(双保险) - 自动恢复:确认后轮询服务,恢复即自动刷新页面
- 可观测:执行痕迹记录在
/tmp/dsh-restart.log
安装 / Install
dsh plugin --profile web add github:zhouchengke2046/dsh-restart
# 或本地路径
dsh plugin --profile web add /path/to/dsh-restart
重启 dsh web(或直接用本插件)后,打开 设置 → 重启 dsh。
配置 / Configuration
| 键 | 默认 | 说明 |
|---|---|---|
restartEnabled |
true |
是否注册重启路由 |
restartCommand |
"" |
覆盖重启命令;留空则 macOS 自动用 launchctl kickstart -k gui/<uid>/<label> |
restartLabel |
com.dsh.web |
launchd agent 标签 |
restartDelayMs |
600 |
响应发出后延迟执行重启的毫秒数 |
覆盖方式(profile 的 cordis.patch.yml):
- insert:
- id: dsh-restart
name: dsh-restart
config:
restartEnabled: true
restartLabel: com.dsh.web
卸载 / Uninstall
dsh plugin --profile web remove dsh-restart
License
MIT
No comments yet. Be the first to write one.