DeepSeek Harness: Press Enter to Approve Authorization Requests

Introduction

When using agents in DeepSeek Harness (DSH), authorization card pop-ups are a common scenario. The default behavior is to click the “Allow Once” button to approve a single request. However, after you type in the input box and send a message, the keyboard focus remains on the input box. At that point, pressing Enter will send a message instead of approving the request, requiring you to click the button again. This experience can easily lead to accidental actions.

The dsh-approval-enter plugin solves this problem: when an authorization card is visible and the input box is empty or unfocused, pressing Enter will automatically approve the request. When you are actively typing in the input box, Enter still sends the message as normal.

What is This

dsh-approval-enter is a DSH client plugin, version 1.0.0, maintained by lxj5820. It listens to window-level keyboard events, and when it detects that an authorization card is visible and the input box is empty, it moves focus to the card and simulates an Enter keypress, triggering the card’s “Allow Once” logic. The plugin does not grant any permissions that the card itself would not grant; the semantics remain consistent with the built-in behavior.

The plugin relies on DSH’s DOM structure, locating the approval panel via the [data-approval-key] and [data-approval-scroll] selectors.

Core Features

  • Approve pending authorization requests with Enter, no mouse click needed
  • When actively typing in the input box, Enter still sends the message normally without accidentally approving
  • Supports IME input methods (e.g., Chinese input), in which case Enter is ignored
  • When the input box focus is on interactive elements such as buttons, links, or menu items, the original behavior is preserved
  • Safety net mechanism: if the panel is still pending after 60 ms, directly click the card’s second button (Deny, Allow Once, Always Allow)

Installation & Activation

The plugin supports two installation methods.

  1. Copy the plugin folder to a permanent storage location, e.g., D:\plugins\dsh-approval-enter.
  2. In DSH, open “Plugins → Install Local Plugin” and select the folder.
  3. Refresh the page (or restart DSH). Since this is a client-side module, a refresh is sufficient to take effect.

Manual Installation

Add dsh-approval-enter to the dsh.profile.bundles field in %USERPROFILE%\.dsh\profiles\desktop\package.json, create a junction to node_modules, then restart DSH.

Typical Usage

When an authorization card pops up, simply press Enter to approve it. If the input box is empty or unfocused, Enter triggers approval; if you are actively typing in the input box, Enter triggers sending the message. When an IME input method is active, Enter does not trigger approval.

Use Cases & Notes

Ideal for developers who need to handle authorization requests frequently. The plugin runs with client-side permissions; review the source code and license before installing. The plugin depends on DSH’s DOM structure—if DSH is refactored and the selectors stop working, the plugin needs to be updated or the issue reported.

Summary

dsh-approval-enter binds the Enter key to authorization approval via window-level keyboard event listening, reducing mouse operations while preserving the original semantics. For batch “Always Allow” operations, you still need to click the button to avoid accidental actions.

Directory: https://www.skillhub.cn/plugins/jklin6632-dot/dsh-approval-enter
GitHub: https://github.com/jklin6632-dot/dsh-approval-enter

羽毛球分组比赛记分
小程序二维码

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

Xiaoye