DeepSeek Harness 插件

dsh-composer-enter-invert

DSH Web Composer Enter/Shift+Enter keybinding switcher.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
XiaoYuOvO/dsh-composer-enter-invert
最近更新
2026年8月18日
分类
工具与能力
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/XiaoYuOvO/dsh-composer-enter-invert
插件名:dsh-composer-enter-invert
作者:XiaoYuOvO

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器2 个文件
README.md来源说明 · 只读预览

dsh-composer-enter-invert

A DSH Web bundle plugin that changes Composer keyboard semantics only while the focused element is the conversation textarea.

Behavior

  • default (the durable default): Enter sends; Shift+Enter inserts a newline.
  • inverted: Enter inserts a newline; Shift+Enter sends.
  • IME composition (isComposing or key code 229) is never intercepted.
  • Other inputs, command controls, approval controls, and global shortcuts are not intercepted.

Open Settings -> General -> Composer send keys and choose the desired mode. Changes take effect immediately in the current Web page.

Design

The plugin does not replace the Composer or call the conversation transport itself.

In inverted mode, it installs one native capture-phase keydown listener and limits it to an enabled, writable textarea inside [data-composer-card] that is the active element.

  • Plain Enter is prevented and inserts text with document.execCommand("insertText", false, "\n"). A setRangeText plus bubbling input fallback is used only when the browser rejects execCommand, so React's existing onChange continues to update the official draft machine and undo stack.
  • Shift+Enter is prevented, then replayed to the textarea as an Enter event with only shiftKey removed. The replay is guarded with a WeakSet, letting the shipped Composer onKeyDown execute unchanged. That path still calls its keyboard.arbitrate("enter", composing) and keyboard.submit(resolveSubmitMode(...)) logic.

Consequently, command-menu Enter arbitration, empty-draft protection, attachment-only sends, draft commit/restore, busy queue/steer policy, accelerated Ctrl/Cmd behavior, and image attachment handling stay in the shipped state machine. ui-conversation.busyEnter remains the authority for Queue versus Steer whenever a send is accepted during a running conversation.

If the setting is default, or this Client half is stopped/uninstalled, no event is intercepted and the shipped key behavior is untouched.

Persistence and portability

The selected mode is stored in browser localStorage under dsh-composer-enter-invert.v1. This keeps the setting self-contained, so a GitHub install does not require a matching Host settings namespace or a patch to dsh-host-apiproxy. The setting is browser-local rather than shared through settings.yaml; each browser profile can choose its own mode.

Build

The browser loader artifact is intentionally committed in lib/client.js; Git/local installs do not need a bundler during installation.

pnpm run build
pnpm run check
pnpm run test

Install into the web profile

The package includes the generated lib/ artifacts and can be installed directly from a public Git repository. Replace <owner>/<repo> with the repository containing this directory:

node "G:\Deepseek Harness Desktop\dependencies\dsh\node_modules\@deepseek-ai\dsh\lib\bin.js" plugin --profile web add "https://github.com/<owner>/<repo>.git"
node "G:\Deepseek Harness Desktop\dependencies\dsh\node_modules\@deepseek-ai\dsh\lib\bin.js" --profile web --dump-config

A tagged or commit-pinned source is preferable for repeatable installs, for example https://github.com/<owner>/<repo>.git#v0.2.0. The install command writes only to the selected web profile. Restart the existing DSH Web process after installation, then refresh http://127.0.0.1:3080. No global npm install, Host whitelist edit, or extra dependency installation is required.

Manual verification

1. Select Inverted under Settings -> General -> Composer send keys. 2. In the focused Composer, press Enter and verify a newline appears. 3. Type non-empty text and press Shift+Enter; verify the existing Composer sends it. 4. With an empty Composer and no attachments, press Shift+Enter; verify no empty message is sent. 5. While a primary agent is running, verify Shift+Enter follows the existing busyEnter Queue/Steer choice. 6. Switch back to Default and verify shipped Enter/Shift+Enter behavior resumes immediately.