dsh-shortcut-extensions 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +67 -0
- package/README.zh.md +67 -0
- package/client.js +2332 -0
- package/cordis.patch.yml +4 -0
- package/icon.svg +6 -0
- package/index.js +14 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 BenHanks303
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# dsh-shortcut-extensions · 快捷键拓展
|
|
2
|
+
|
|
3
|
+
[](LICENSE)
|
|
4
|
+
[](https://github.com/BenHanks303/dsh-shortcut-extensions/releases)
|
|
5
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
6
|
+
|
|
7
|
+
A [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness) plugin that adds a keyboard-driven quick-switching layer to the DSH web/desktop UI: a model palette, a session palette with prompt preview, session cycling, find-next-answered, composer focus, and configurable permission cycling — all manageable from a sidebar control panel.
|
|
8
|
+
|
|
9
|
+
中文说明见 [README.zh.md](README.zh.md)。
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Model palette** (`Cmd/Ctrl+Shift+M`) — fuzzy search; AntD-style colored provider tags (click a tag to filter that provider); name-suffix tags (e.g. `routing group`); reasoning badges; pin favorites to the top.
|
|
14
|
+
- **Session palette** (`Cmd/Ctrl+Shift+S`) — two-column layout: sessions on the left, your own prompts preview on the right (follows the highlighted row, debounced + cached). Includes archived sessions with badges; Enter opens and auto-restores archived ones.
|
|
15
|
+
- **Session cycling** (`Ctrl+Tab` / `Ctrl+Shift+Tab`, desktop) — cycle in the sidebar's recency order.
|
|
16
|
+
- **Find next answered session** (`Cmd/Ctrl+G`, web `Cmd/Ctrl+Shift+G`) — jumps to the most recently answered not-yet-viewed session; falls back to sessions that are still running.
|
|
17
|
+
- **Focus composer** (`Cmd/Ctrl+I`) — restores caret position via the host composer facade.
|
|
18
|
+
- **Permission cycling** (`Cmd/Ctrl+Shift+P`) — cycles through the presets you configure (any 2+ of Read Only / Workspace Write / Full access, plus any deployment-specific presets), expandable in the panel.
|
|
19
|
+
- **Sidebar control panel** — every command with live keycaps and an on/off switch; a **shortcut reference tab** listing every host command, with device-local rebind/reset; transient hint banner so no command fails silently.
|
|
20
|
+
- **IME-safe** — key handling ignores IME composition state (pressing Enter to commit candidates never accidentally selects an item).
|
|
21
|
+
- Theme-aware (light/dark), fixed-height palettes (no jumping while searching).
|
|
22
|
+
|
|
23
|
+
## Default shortcuts (macOS desktop; Ctrl on Windows/Linux)
|
|
24
|
+
|
|
25
|
+
| Command | Keys |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Model palette | ⌘⇧M |
|
|
28
|
+
| Session palette | ⌘⇧S |
|
|
29
|
+
| Permission cycle | ⌘⇧P |
|
|
30
|
+
| Find next answered session | ⌘G (web: ⌘⇧G) |
|
|
31
|
+
| Focus composer | ⌘I (web: ⌘⌥I) |
|
|
32
|
+
| Next / previous session | ⌃Tab / ⌃⇧Tab |
|
|
33
|
+
|
|
34
|
+
Every command can be rebound in **DSH Settings → Shortcuts** or in the panel's reference tab; overrides are device-local.
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
1. Clone this repository.
|
|
39
|
+
2. In DSH, open **插件 (Plugins)** and install the plugin from the cloned directory.
|
|
40
|
+
3. Reload the window (Cmd+R).
|
|
41
|
+
|
|
42
|
+
Requires a standard DSH web composition. Optional host capabilities degrade gracefully: without permission presets the permission surfaces hide; without the turn-outline projection the prompt preview shows a notice.
|
|
43
|
+
|
|
44
|
+
## Notes & limitations
|
|
45
|
+
|
|
46
|
+
- Browsers reserve some keys: single-modifier bindings like `Cmd+G` are desktop-only, and `Cmd+Shift+P` is taken by Firefox (private window).
|
|
47
|
+
- In the desktop app, `Cmd+W` belongs to the native "close window" menu item and cannot be taken over by plugins.
|
|
48
|
+
- Keybinding overrides are stored per device (desktop: `userData/keybindings.json`; web: origin-local storage).
|
|
49
|
+
|
|
50
|
+
## Development
|
|
51
|
+
|
|
52
|
+
Plain JavaScript, no build step, no npm dependencies (React is provided by the host module table):
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
dsh-shortcut-extensions/
|
|
56
|
+
├── package.json # manifest: bundle patch + dsh.client declaration
|
|
57
|
+
├── cordis.patch.yml # loader patch: one insert row
|
|
58
|
+
├── index.js # host half (empty apply; all features use host services)
|
|
59
|
+
├── client.js # all UI/logic (client half, registered via ModuleLoader)
|
|
60
|
+
├── locale/zh.json # display metadata + dictionaries (zh/en)
|
|
61
|
+
├── locale/en.json
|
|
62
|
+
└── icon.svg
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
[MIT](LICENSE)
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# dsh-shortcut-extensions · 快捷键拓展
|
|
2
|
+
|
|
3
|
+
[](LICENSE)
|
|
4
|
+
[](https://github.com/BenHanks303/dsh-shortcut-extensions/releases)
|
|
5
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
6
|
+
|
|
7
|
+
一个 [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness) 插件,为 DSH 网页/桌面界面增加一层**键盘驱动的快速切换**:模型面板、带提问预览的会话面板、会话循环、查找下一个已回答会话、聚焦输入框、可配置的权限循环——全部可以在侧栏控制面板里管理。
|
|
8
|
+
|
|
9
|
+
English documentation: [README.md](README.md)。
|
|
10
|
+
|
|
11
|
+
## 功能
|
|
12
|
+
|
|
13
|
+
- **模型面板**(`Cmd/Ctrl+Shift+M`)— 模糊搜索;AntD 风格的彩色提供方标签(点标签过滤该提供方);名字后缀标签(如 `routing group`);推理能力徽标;常用模型置顶。
|
|
14
|
+
- **会话面板**(`Cmd/Ctrl+Shift+S`)— 左右两栏:左侧会话列表,右侧**你的提问预览**(跟随高亮行,防抖 + 缓存)。包含已归档会话(带徽标),Enter 打开时自动恢复归档。
|
|
15
|
+
- **会话循环**(`Ctrl+Tab` / `Ctrl+Shift+Tab`,桌面端)— 按侧栏活动时间顺序循环切换。
|
|
16
|
+
- **查找下一个已回答的会话**(`Cmd/Ctrl+G`,网页端 `Cmd/Ctrl+Shift+G`)— 跳到最近回答完、你还没看过的会话;没有则跳到正在回答的会话。
|
|
17
|
+
- **聚焦输入框**(`Cmd/Ctrl+I`)— 通过宿主 composer 门面恢复光标位置。
|
|
18
|
+
- **权限循环**(`Cmd/Ctrl+Shift+P`)— 在你配置的预设档位间循环(仅可查看 / 工作区内修改 / 完全权限中任选 2 个以上,支持部署自定义预设),面板内展开配置。
|
|
19
|
+
- **侧栏控制面板** — 每条指令带实时键帽显示和独立开关;**快捷键速查 tab** 列出宿主全部命令,可本机改键/恢复默认;所有失败都有浮层提示,绝不静默。
|
|
20
|
+
- **输入法安全** — 按键处理忽略 IME 合成态(按 Enter 上屏候选字绝不会误选条目)。
|
|
21
|
+
- 跟随宿主明暗主题;弹层固定高度,搜索时不跳动。
|
|
22
|
+
|
|
23
|
+
## 默认快捷键(macOS 桌面;Windows/Linux 用 Ctrl)
|
|
24
|
+
|
|
25
|
+
| 指令 | 键位 |
|
|
26
|
+
|---|---|
|
|
27
|
+
| 模型面板 | ⌘⇧M |
|
|
28
|
+
| 会话面板 | ⌘⇧S |
|
|
29
|
+
| 权限循环 | ⌘⇧P |
|
|
30
|
+
| 查找下一个已回答的会话 | ⌘G(网页端 ⌘⇧G) |
|
|
31
|
+
| 聚焦输入框 | ⌘I(网页端 ⌘⌥I) |
|
|
32
|
+
| 下一个 / 上一个会话 | ⌃Tab / ⌃⇧Tab |
|
|
33
|
+
|
|
34
|
+
所有指令都可以在 **DSH 设置 → 快捷键** 或面板的「快捷键速查」tab 中改键;改键仅作用于本机。
|
|
35
|
+
|
|
36
|
+
## 安装
|
|
37
|
+
|
|
38
|
+
1. 克隆本仓库。
|
|
39
|
+
2. 在 DSH 中打开 **插件** 页面,从克隆的目录安装本插件。
|
|
40
|
+
3. 重载窗口(Cmd+R)。
|
|
41
|
+
|
|
42
|
+
需要标准 DSH web 组合。可选的宿主能力会优雅降级:没有权限预设时相关界面自动隐藏;没有会话大纲投影时提问预览显示提示。
|
|
43
|
+
|
|
44
|
+
## 说明与限制
|
|
45
|
+
|
|
46
|
+
- 浏览器会保留部分按键:`Cmd+G` 这类单修饰键绑定仅桌面端可用;`Cmd+Shift+P` 被 Firefox(隐私窗口)占用。
|
|
47
|
+
- 桌面应用中 `Cmd+W` 属于原生"关闭窗口"菜单,插件无法接管。
|
|
48
|
+
- 改键记录按设备存储(桌面:`userData/keybindings.json`;网页:站点本地存储)。
|
|
49
|
+
|
|
50
|
+
## 开发
|
|
51
|
+
|
|
52
|
+
纯 JavaScript,无构建步骤,无 npm 依赖(React 由宿主模块表提供):
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
dsh-shortcut-extensions/
|
|
56
|
+
├── package.json # 清单:bundle patch + dsh.client 声明
|
|
57
|
+
├── cordis.patch.yml # Loader 补丁:一行 insert
|
|
58
|
+
├── index.js # Host 半(空 apply;全部能力使用宿主服务)
|
|
59
|
+
├── client.js # 全部 UI/逻辑(Client 半,经 ModuleLoader 注册)
|
|
60
|
+
├── locale/zh.json # 展示元数据 + 词典(中/英)
|
|
61
|
+
├── locale/en.json
|
|
62
|
+
└── icon.svg
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 许可证
|
|
66
|
+
|
|
67
|
+
[MIT](LICENSE)
|