DeepSeek Harness 插件

Phoeky/dsh-refresh-plugin

Star 数 ★ 0 下载量(近 30 天) 1,089 分类 UI 增强 收录于 2026-10-19 npm dsh-refresh-plugin

为 DeepSeek Harness 桌面 Web UI 补上 F5 / Ctrl+R 页面刷新功能(生产版默认没有刷新菜单项与裸 F5 快捷键)。通过客户端捕获阶段按键监听绑定软刷新(F5、Ctrl+R)与防缓存硬刷新(F5 加修饰键、Ctrl+Shift+R,附加 _dsh_refresh 时间戳)。

安装

# npm 包(预构建)

dsh plugin --profile web add dsh-refresh-plugin

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:Phoeky/dsh-refresh-plugin

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

DSH desktop 刷新插件 —— 为 DeepSeek Harness Desktop 增加页面刷新功能。

DSH desktop refresh plugin — adds a page-refresh (reload) feature to the DeepSeek Harness Desktop web UI.

背景 / Background

生产版 DeepSeek Harness Desktop 的窗口菜单里没有 "Reload Page" 项(该菜单项仅在 development 构建启用),而应用自带的快捷键系统又拒绝"无修饰键"的绑定,因此 F5 在默认情况下完全不可用(Ctrl+R 同样没有绑定)。

In production builds of DeepSeek Harness Desktop, the window menu ships no "Reload Page" item (it is development-gated), and the built-in shortcut system rejects bindings without modifiers — so F5 does nothing by default (Ctrl+R is unbound too).

本插件在页面(client 端)注册捕获阶段按键监听,补上刷新快捷键。

This plugin registers a capture-phase key listener on the client side to restore refresh shortcuts.

快捷键 / Shortcuts

按键 行为
F5 软刷新(reload)
F5 + 任意修饰键(Ctrl / Shift / Alt) 硬刷新(加 _dsh_refresh 时间戳参数绕过缓存)
Ctrl+R 软刷新
Ctrl+Shift+R 硬刷新(cache-busted)

安装 / Install

npm 包名:dsh-refresh-plugin(GitHub 仓库同名;npm 上的 dsh-refresh 已被其他用户占用)。

方式一:从 npm registry 安装(推荐)

dsh plugin --profile desktop add dsh-refresh-plugin

方式二:本地路径安装(开发调试时)

dsh plugin --profile desktop add F:\code\dsh-desktop-refresh\dsh-refresh

安装后完全退出并重新打开应用,按 F5 即可刷新(应用运行时会监听 profile 的 bundles 列表变化并自动重组 loader,但当前已加载的页面不会包含新监听器)。

卸载 / Uninstall

在应用内"插件"页面移除 dsh-refresh。

工作原理 / How it works

  • 插件是一个标准 DSH bundle(dsh.bundle.patch 声明 loader 挂载行,dsh.client 声明 client 端),通过官方 dsh plugin CLI 安装进 profile。
  • Host 端(lib/index.js)是一个空 apply —— 功能全部在 client 端(lib/client.js)。
  • client 端使用捕获阶段 keydown 监听:原生快捷键系统会先消费它认领的键,未认领的键才到达 DOM,因此不会与现有快捷键冲突(裸 F5 也无法通过快捷键系统注册)。

License

MIT

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。