dsh-refresh: Restore F5 and Hard Refresh Shortcuts in DeepSeek Harness

Introduction

DeepSeek Harness (DSH) is designed for agent and plugin development, and its interface lacks a dedicated “Refresh” button. In some scenarios, the browser’s native reload shortcuts may be intercepted or ineffective. Consequently, after modifying plugins or local configurations, users are forced to close and reopen pages or find workarounds to refresh, which disrupts the debugging workflow.

Below is an introduction to the community plugin dsh-refresh (maintainer: spidu-lee). It listens for keyboard input on the page side, ensuring that F5, Ctrl+F5 (or Cmd combinations on macOS), and Ctrl+Shift+R / Cmd+Shift+R reliably trigger location.reload(), performing a hard refresh (bypassing cache) when necessary.

What is this?

dsh-refresh is a client-side-only DSH plugin. Its npm package name is dsh-refresh, the version in current documentation is 1.0.2, and it is licensed under MIT. It does not modify the server side or provide additional UI; it does exactly one thing: takes over the aforementioned refresh-related keys within the Harness page and calls the browser’s refresh API.

The DSH ecosystem emphasizes “everything is a plugin.” Note that plugin directory sites (such as SkillHub) have no official affiliation with DeepSeek or High-Flyer. Please review the source code and license before installing.

Core Features

The plugin registers a capture-phase keydown listener via ctx.effect within apply(ctx). The listener is automatically removed when the plugin is uninstalled. The behavior is consistent with the upstream README:

  1. F5: Standard refresh, calls location.reload().
  2. Ctrl+F5 (Windows/Linux) or F5 combined with Ctrl/Cmd, as well as Ctrl+Shift+R / Cmd+Shift+R: Hard refresh, calls location.reload(true) (bypasses cache).
  3. When the above keys are matched, preventDefault() and stopPropagation() are called to prevent the event from being swallowed by other page logic.

Ctrl+R / Cmd+R are not supported. Harness binds page.refresh to Ctrl+R at the Electron before-input-event layer. Since the event does not reach the keydown listener in the page, the plugin cannot “fix” this from the page level. If you are accustomed to using Ctrl+R, you need to rebind page.refresh to a different key in the DSH shortcut settings to allow Ctrl+R to fall through to the page. For daily refreshing, please use F5, Ctrl+F5, or Ctrl+Shift+R.

Regarding implementation, the plugin exports name, inject, and apply(ctx). The logic is equivalent to listening during the capture phase and branching to call either location.reload() or location.reload(true) (see the example code in the GitHub repository README for details).

Installation and Activation

Installation via npm is recommended:

dsh plugin add dsh-refresh

You can also specify the GitHub repository:

dsh plugin add spidu-lee/dsh-refresh

Please refer to the upstream README for installation commands. The plugin runs with the permissions of the current DSH process. Before installing, it is recommended to read index.js and the client entry point in the GitHub repository to ensure the behavior meets your expectations.

Typical Usage

No additional configuration is required. Assuming dsh.client.platform in package.json is set to web, once installed and enabled, when the focus is within the Harness page document:

  1. For a standard reload: Press F5.
  2. For a cache-clearing reload: Press Ctrl+F5 (Cmd+F5 on macOS) or Ctrl+Shift+R / Cmd+Shift+R.

This is applicable for scenarios where you have modified plugin code, Cordis patches, or local injection scripts and wish to see the new behavior immediately using standard desktop browser shortcuts, without relying on the built-in Harness refresh entry points.

Use Cases and Notes

  • Suitable for: Users who debug plugins in DSH long-term, frequently modify front-end injection logic, and desire F5 / hard refresh shortcut behavior consistent with standard browsers.
  • Not suitable for: Scenarios where users expect to refresh using Ctrl+R and are unwilling to change Harness shortcut bindings—these users must either change system shortcuts or accept the F5 key combinations.
  • Security: Although the plugin code is minimal, it is still a third-party extension. Install only if you trust the maintainer and the MIT license, and stay alert for subsequent version changes.

Conclusion

dsh-refresh uses a minimal client-side plugin to bridge the gap in Harness’s refresh shortcut experience. It clearly distinguishes between standard refresh and hard refresh, and explains why Ctrl+R cannot be restored at the page plugin level. Directory and source code:

  • Directory Page: https://www.skillhub.cn/plugins/spidu-lee/dsh-refresh
  • GitHub: https://github.com/spidu-lee/dsh-refresh
羽毛球分组比赛记分
小程序二维码

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

Xiaoye