dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Codex-style global Enter to approve a pending DeepSeek Harness authorization request.
English | 中文
Approval prompts in DeepSeek Harness already answer Enter — but only once the focus is already inside the prompt. This plugin closes that last gap so Enter approves from anywhere, the way Codex behaves.
@deepseek-ai/dsh-client-ui-approval renders the pending request as a composer
takeover and handles the key itself:
if (event.defaultPrevented || !event.currentTarget.contains(document.activeElement) || …) return;
React dispatches synthetic key events along the React tree, so that guard only
lets the handler run when the key event originated inside the panel. The panel
takes over the composer, focus normally falls back to document.body, and
Enter does nothing until you click the card or Tab into it.
A capture-phase keydown listener on document, which runs before the shell's
own root handler, and then:
Ctrl/Alt/Shift/Meta,
not inside input/textarea/select/contenteditable, not an IME composition,
not an auto-repeat.document.activeElement, the plugin returns immediately and the shipped
handler does its job. Behaviour only changes in the case that was broken.Nothing in DSH is patched: the plugin uses the documented window.__ModuleLoader__
client contract and a dsh.bundle.patch row like any other community plugin.
| Situation | Result |
|---|---|
| Pending prompt, focus anywhere outside it | Enter approves |
| Pending prompt, focus already inside it | Shipped handler wins; unchanged |
| Typing in a text field | Untouched |
| IME composition in progress | Untouched |
| Enter with any modifier | Untouched |
Prompt already answering (aria-busy) | Ignored |
| Hidden prompt from another session | Ignored |
| Esc | Never intercepted |
dsh plugin --profile web add dsh-enter-approve
Restart the host, then confirm the row appears in Settings → Plugins.
client/client.js is the
whole implementation, about 90 lines.dsh plugin --profile web remove dsh-enter-approve
MIT