kexin8/dsh-composer-keys0

dsh-composer-keys

DSH 聊天输入框快捷键插件:上下方向键循环历史消息,Ctrl+C 清空输入

AI 分析

核心用途是为 DSH 聊天输入框提供键盘快捷键。适合希望通过纯键盘操作快速切换历史输入或清空输入框的用户,无需鼠标即可提升输入效率。

包名
dsh-composer-keys
版本
0.1.0
许可证
MIT
最近更新
2026年8月19日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:kexin8/dsh-composer-keys

dsh-composer-keys ⌨️

Keyboard shortcuts for the DeepSeek Harness (DSH) Web chat composer.

中文文档:简体中文

License Version Platform PRs Welcome

Type faster, navigate history with pure keyboard. No mouse needed.


✨ Features

ShortcutAction
Arrow UpFill the composer with the previous user message from history
Arrow DownMove to the next user message; at the end, restore your original input
Ctrl+CClear the composer when no text is selected (avoids conflict with Copy)

Behavior details

  • History cycling follows shell-style semantics: press ↑ to walk backwards through your previously sent messages; press ↓ to walk forward again; at the newest end it restores whatever you had typed before you started navigating.
  • Ctrl+C only clears when the composer has content and no text is selected — if you have selected text, the browser's native Copy takes precedence.
  • Works on both Ctrl (Windows/Linux) and ⌘ Command (macOS).

📦 Install

From GitHub

dsh plugin --profile web add https://github.com/kexin8/dsh-composer-keys.git

From a local checkout

git clone https://github.com/kexin8/dsh-composer-keys.git
dsh plugin --profile web add link:~/dsh-composer-keys

Via npm (when published)

npm i dsh-composer-keys
dsh plugin --profile web add dsh-composer-keys

After installing, restart the DSH Web GUI and reload the page.


🧩 How it works

A client-only plugin. It registers an invisible component in the conversation.composer.dock slot (the additive, non-destructive input-region seat), which attaches a keydown listener on document and intercepts shortcuts only while the composer textarea is focused:

  • Arrow Up/Down — reads historical user messages from the live ConversationSnapshot and fills the composer via inputActions.setDraft().
  • Ctrl+C — calls setDraft('') when the input is non-empty and nothing is selected.

No host process code, no persistence, no settings — pure client-side, stops cleanly on plugin stop/update.


🗂 Project structure

dsh-composer-keys/
├── lib/
│   ├── index.js        # host stub (client-only plugin)
│   └── client.js       # client module (__ModuleLoader__ format)
├── cordis.patch.yml    # cordis composition patch (inserts the plugin row)
├── package.json        # dsh plugin manifest
└── README.md

🤝 Contributing

PRs are welcome! Please make sure the plugin still works in the DSH Web GUI after your change. Keep the client code plain-JavaScript (no TypeScript/JSX in the shipped lib/ output) and never add host-side logic unless the feature truly needs it.

📄 License

MIT