DeepSeek Harness plugin

dsh-keyboard-shortcuts

DeepSeek Harness plugin: configurable keyboard shortcuts (settings UI + input history + approval/plan hotkeys)

Jump to install

Source facts

Repository
904915452/dsh-keyboard-shortcuts
Latest update
Aug 17, 2026
Category
Memory
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/904915452/dsh-keyboard-shortcuts
Plugin: dsh-keyboard-shortcuts
Author: 904915452

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

@zhangqingyu/dsh-keyboard-shortcuts

DeepSeek Harness 插件:可配置的键盘快捷键管理器

在 Harness 的设置 → 键盘快捷键里,自己给不同事件绑定快捷键,配置持久化(localStorage), 同时内置了输入历史(↑/↓)和审批/计划快捷键。

可配置的事件(默认值)

事件默认快捷键作用
上一条输入ArrowUp回填上一次提交的内容
下一条输入ArrowDown向后翻 / 回到正在编辑的草稿
允许权限升级Mod+Enter审批弹窗「允许一次」
拒绝权限升级Escape审批弹窗「拒绝」
批准计划Mod+Enter计划审批「确认执行」
计划转聊天(取消)Escape计划审批「去聊天里说」

Mod = macOS 的 Cmd,或 Windows/Linux 的 Ctrl。组合键写法:Mod+Shift+PCtrl+EnterAlt+ArrowUp 等;点行尾按钮后按新快捷键即可录制,点「清除」可禁用该事件。

结构

dsh-keyboard-shortcuts/
├── cordis.patch.yml
├── lib/index.js          # host 半部(空插件)
└── lib/client.js         # browser 半部:设置 UI + keydown 绑定 + 动作

工作原理

lib/client.js(纯 client 插件):

  • settings.section 注册「键盘快捷键」页,列出事件并录制绑定,写 localStorage
  • conversation.input.dock 注册一个隐形桥(InputBridge),通过 slot 标准 props 拿

useInput((s) => s) + inputActions + useSession:输入历史直接读会话里已落库的用户消息useSessionchat.order / chat.nodes)重建,回填走 inputActions.setDraft——不再用 「草稿变空即算发送」的启发式推断(那会把「手动清空草稿」也误当成一条历史)。

  • document 挂一个捕获阶段 keydown,按当前绑定匹配事件并分发:

输入历史走 inputActions.setDraft;审批/计划直接点对应弹窗的按钮([data-approval-key] / [data-plan-review-key])。

  • 不拦截 复制/剪切/粘贴:composer 自己的 onCopy/onCut/onPaste 和消息上的「复制」按钮已经

负责剪贴板;全局捕获阶段的 fallback 会 preventDefault() 原生路径反而弄坏它。macOS 壳里的 Cmd+C/V/X/A 走原生 Edit 菜单修复(见 dsh-macos-app)。

安装

# 任选一个镜像仓库克隆
git clone https://gitee.com/zqy-904915452/dsh-keyboard-shortcuts.git
# git clone https://github.com/904915452/dsh-keyboard-shortcuts.git
cd dsh-keyboard-shortcuts
dsh plugin --profile web add "file:$(pwd)"

file: 后要写 clone 下来的绝对路径;如果你用的是自定义 profile,把 web 换成你的 profile 名。 也可以直接用仓库地址装:dsh plugin --profile web add git+https://gitee.com/zqy-904915452/dsh-keyboard-shortcuts.git (或 GitHub 镜像 git+https://github.com/904915452/dsh-keyboard-shortcuts.git)。

安装后重启 app 并刷新页面,进「设置」即可看到「键盘快捷键」页。

> 本插件取代之前的 dsh-input-historydsh-approval-shortcuts(两者已合并进来,且修复了 > useInput 缺少选择器导致方向键失效的 bug)。

边界

  • 审批/计划按钮依赖当前版本弹窗的 DOM 结构(拒绝/讨论在前、允许/确认在后);应用升级若改结构需同步调整。
  • 输入历史只在空闲态(phase === "plain")且光标位于首行(↑)/末行(↓)、且没有打开的

[role="listbox"]/ 候选菜单)时触发,避免抢占多行编辑与 /@ 菜单的方向键。

  • 多个事件可共享同一快捷键(Mod+Enter 同时是「允许权限升级」和「批准计划」;Escape 同理):

匹配到第一个事件但没找到对应弹窗时,会继续尝试下一个,而不是直接放弃。