dsh-restart
开发工具 活跃维护

dsh-restart

zhouchengke2046/dsh-restart

独立的浏览器插件,无需依赖主程序即可运行,点击就能一键重启对应网页端设置页,功能稳定无冗余依赖,交互简洁无学习成本,即装即用。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
7 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:zhouchengke2046/dsh-restart
git clone https://github.com/zhouchengke2046/dsh-restart.git
git clone git@github.com:zhouchengke2046/dsh-restart.git
README.md main

dsh-restart

独立的 DeepSeek Harness Web 一键重启插件——与任何余额/用量功能无关,单独负责在设置页提供一个"重启 dsh"入口。

初衷:装插件 / 改插件之后总要重启 dsh web 才生效。这个小插件把重启做进界面:设置页点一下 → 确认 → 自动重启、服务恢复后自动刷新页面,不再需要命令行。

特性 / Features

  • 独立:零依赖、零耦合,可单独安装/卸载;不读取任何密钥
  • 原生适配:设置页独立分区,使用 DSH 设计令牌(--dsw-alias-*),深浅主题自适应
  • 可靠重启:先 launchctl kickstart -k,2 秒后兜底 SIGTERM 自身进程,launchd KeepAlive 保证拉起新进程(双保险)
  • 自动恢复:确认后轮询服务,恢复即自动刷新页面
  • 可观测:执行痕迹记录在 /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