dsh-approval-enter: Approval panel auto-focus, Enter to approve, Esc to reject

Introduction

When running agents in DeepSeek Harness (DSH), tool calls often require you to click “Approve” or “Reject” on the approval panel. While the official panel has Enter/Esc shortcuts bound, it does not automatically steal focus from the input box when inserted into the interface: focus remains in the Composer, where Enter means “send message.” Consequently, shortcuts cannot reach the panel, requiring you to click the card with a mouse or use Tab to switch. For keyboard-centric workflows, this breaks the flow. This article introduces the community client plugin dsh-approval-enter, published by maintainer Girmmy3321. Categorized as a client plugin, its goal is to move focus to the approval panel when appropriate.

What is This

dsh-approval-enter is a plugin with a straightforward positioning: when the DSH approval panel pops up, it automatically moves focus into the panel, provided the Composer has no draft. This enables Enter to Approve, Esc to Reject, eliminating the need to reach for the mouse. It does not modify official source code; it runs on the browser side via the DSH client plugin’s ./client export. It requires no API Key, login, or additional runtime dependencies. The license is MIT (see GitHub repository details).

Official Behavior and the Gap the Plugin Fills

The keyboard logic for the approval panel includes a guard in the official client: Enter/Esc are only processed by the panel when focus is already inside it. The relevant condition in the @deepseek-ai/dsh-client-ui-approval client implementation manifests as a check ensuring “current focus must be within the panel DOM.” When the panel renders, focus remains in the Composer, so Enter continues to mean “send,” rendering the shortcuts effectively disabled. This plugin works by using a MutationObserver to monitor for the panel’s appearance. When conditions are met, it moves focus to the panel detail area (the region with data-approval-scroll and tabIndex: 0), allowing the official keydown logic to take effect as usual without patching other behaviors.

Core Features

The plugin distinguishes between the Composer and panel states. The behavior described in the README can be summarized as follows:

Composer State Behavior
Empty Focus moves to the approval panel → Enter approves, Esc rejects
Has Draft Does not steal focus, Enter still means send; use Tab to enter the panel
Same Request Decision made only once; does not fight the user for focus repeatedly
Panel Closed Focus returns to the original position

“Not stealing focus when there is a draft” is a deliberate design choice: stealing focus mid-typing can cause input loss, and a reflexive press of Enter immediately after might accidentally approve a dangerous command.

If a future DSH build changes panel markers like data-approval-key / data-approval-scroll and the plugin cannot find the ideal focus target, it falls back to the panel root node and assigns it a programmatic Tab stop. If the panel cannot receive focus at all, the plugin takes no action, performing exactly as if it were not installed. The README states that verification has been done against the panel markers corresponding to dsh 0.2.0-rc.2.

Installation and Activation

Please review the GitHub source code and MIT license before installing. The plugin executes within the client environment of the current DSH desktop or Web process, possessing the same permissions as the host.

Install from GitHub (replace YOUR-USER with the repository owner; for this plugin, it is Girmmy3321):

dsh plugin --profile desktop add github:YOUR-USER/dsh-approval-enter

For example:

dsh plugin --profile desktop add github:Girmmy3321/dsh-approval-enter

If you have cloned the repository locally and want code changes to take effect immediately, you can use the link method (adjust the README example path as needed):

git clone https://github.com/YOUR-USER/dsh-approval-enter ~/dsh-plugins/dsh-approval-enter
dsh plugin --profile desktop add "link:$HOME/dsh-plugins/dsh-approval-enter"

Restart DeepSeek Harness after installation is complete. To uninstall:

dsh plugin --profile desktop remove dsh-approval-enter

Typical Usage

  1. Install the plugin in the desktop profile using the command above and restart DSH.
  2. Trigger a tool call that requires approval and wait for the panel to pop up while the Composer is empty.
  3. Focus should have entered the panel detail area: press Enter directly to approve or Esc to reject.
  4. If you are editing a draft in the Composer, continue to use Enter to send; when approval is needed, use Tab to enter the panel before using shortcuts.

There are no additional configuration options. The version in package.json is 1.0.0, the client platform is web, and it applies to the DSH desktop application or dsh web.

Use Cases and Notes

This is suitable for developers who frequently run the Harness and want a keyboard-driven closed loop for the approval process. It is not suitable for scenarios expecting “Enter approves at any time”: the plugin deliberately does not steal focus when there is a draft, which is a trade-off between safety and input experience.

The DSH ecosystem emphasizes “Everything is a plugin.” Community directory sites (such as SkillHub) have no official affiliation with DeepSeek or High-Flyer. This article only introduces the capabilities described publicly in the repository and does not cite user cases or data not appearing in the materials. The repository currently has 0 GitHub stars; refer to the directory page and repository page for the latest status.

Conclusion

dsh-approval-enter solves the specific friction where the approval panel’s “shortcuts exist but focus is not in the panel”: it automatically focuses when the Composer is empty, allowing approval via Enter and Esc, while respecting the send semantics when there is a draft. For installation commands and principle details, please consult the community directory page and the GitHub repository.

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

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

Xiaoye