dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
审批卡片的键盘确认:卡片出现时自动聚焦,按 Enter 允许一次、按 Esc 拒绝;焦点离开卡片后这两个键仍会转交给卡片处理。不会自动批准,也不会抢输入框的焦点。
Press Enter to approve a pending permission request in DeepSeek Harness (DSH). Press Esc to reject. No mouse needed.
DSH's approval card already answers to Enter and Escape — but only while keyboard focus is inside the card. The card replaces the composer when a request arrives, so focus falls back to body, and Enter does nothing. The only way through is to click the card first (or click a button), which defeats the point of a keyboard-driven workflow.
Enter = Allow once / Esc = Reject handler takes effect immediately.Tab moved away), a capture-phase listener forwards Enter / Esc through the card's own handler.From npm (once published), through the DSH plugin manager:
dsh plugin --profile <profile> add dsh-approval-enter
From a local checkout (development):
dsh plugin --profile <profile> add link:/absolute/path/to/dsh-approval-enter
Or drop the package into <DSH_HOME>/profiles/<profile>/plugins/, link it into that
profile's node_modules, and add dsh-approval-enter to dsh.profile.bundles in the
profile's package.json.
Restart DeepSeek Harness afterwards. The Host composes the profile at startup; reloading the page is not enough.
Enter. The request should be allowed immediately.Esc. It should be rejected.Approval prompts only exist in permission modes that ask. In full access mode DSH never asks, so there is no card to confirm — that is expected, not a failure.
Built and tested against DSH 0.2.1-rc.2 (desktop, Web UI). The plugin hooks two structural
attributes published by @deepseek-ai/dsh-client-ui-approval:
[data-approval-key] — the card root;[data-approval-scroll] — the card's tabindex=0 region.If a future release renames those attributes, client.js needs the matching selectors updated.
Nothing else in the product is patched: no app.asar changes, no product source edits.
client.js registers a lazy Client module (dsh.client, immediately: true). On mount it:
MutationObserver that scans at most once per animation frame for an approval card;[data-approval-scroll] when a new card appears (skipped while a text control has focus);keydown in the capture phase: if a card exists, focus is outside it, and the
event does not target a text control, it focuses the card and replays the key there.The replay matters: the shipped handler checks currentTarget.contains(document.activeElement),
so replaying after focusing is what makes it answer — and it keeps the answer inside the
product's own logic instead of duplicating it.
index.js is an empty Host half; the package exists so the bundle has a row to mount.
Remove the plugin row through the plugin manager, or delete the package and its
dsh.profile.bundles entry, then restart. Approval cards go back to pointer-only.
MIT