dsh-restart-button:DeepSeek Harness 的一键整页刷新按钮

前言

DeepSeek Harness 的桌面版没有地址栏,重载页面往往要找快捷键或关闭重开。当前端插件失效、界面卡住或刚装完新插件想立即生效时,最直接的办法就是整页重载。本文介绍 xing2yu4/dsh-restart-button:一个给 Web UI 加「一键整页刷新」的插件,点击后触发 location.reload(),让前端插件重新挂载。

插件定位与维护

插件名称为 dsh-restart-button,维护者为 xing2yu4,分类为客户端。它是一个模块化、零依赖的小插件,只做一件事:在对话头部的最左侧(会话标题左侧一格)渲染一个 ⟳ 图标按钮,点击后整页重载。

核心功能

  • 在对话头部 conversation.header.leading 插槽渲染 28×28 图标按钮,图标色使用主题变量 --dsw-alias-label-primary,自动适配深色/浅色主题。
  • 悬停显示浅色背景,按下有轻微缩放,键盘聚焦时显示主题色描边。
  • 点击后先转半圈(160 ms),然后调用 location.reload()。
  • 文案跟随 Client locale:中文「刷新界面」,英文 “Reload interface”。
  • 只对 Web 平台生效(dsh.client.platform: "web")。

安装与启用

安装有两种方式:

A. 通过 DSH 助手(推荐)

让助手使用 plugin_manager 的 install_bundle,target 填:

github:xing2yu4/dsh-restart-button

B. 通过 CLI 安装

dsh plugin --profile <profile> add github:xing2yu4/dsh-restart-button

然后在该 profile 的 package.json 中将 dsh-restart-button 加入 bundles 数组:

{
  "dsh": { "profile": { "bundles": [ "...", "dsh-restart-button" ] } }
}

最后重启 DSH。首次安装必须重启一次:bundle 的 patch 层是在启动时组合的,装完立刻不会出现。

卸载

dsh plugin --profile <profile> remove dsh-restart-button

并在 bundles 列表中删除对应条目,重启 DSH。

适用场景与注意

  • 适合需要在桌面版 DSH 中快速重载页面、重新挂载前端插件的开发者。
  • 插件以当前 DSH 进程权限运行,安装前应检查源码与许可证。
  • 仅在 Web 平台生效,非 Web 平台不会渲染。

小结

dsh-restart-button 用最小的改动,把「整页刷新」这个高频需求放在对话头部,让重载操作触手可及。它不改变 DSH 的核心行为,只是提供一条更快的恢复路径。

  • 目录页:https://www.skillhub.cn/plugins/xing2yu4/dsh-restart-button
  • GitHub:https://github.com/xing2yu4/dsh-restart-button
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye