@shuning0128/dsh-voice-hotkey 0.0.0-stage → 0.2.1
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/CHANGELOG.md +67 -0
- package/LICENSE +21 -0
- package/README.en.md +110 -0
- package/README.md +109 -2
- package/client.js +2252 -0
- package/cordis.patch.yml +3 -0
- package/docs/images/composer-keyboard-icon.png +0 -0
- package/icon.svg +6 -0
- package/index.js +53 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +61 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# 变更记录
|
|
2
|
+
|
|
3
|
+
## 0.2.1 — 2026-11-29
|
|
4
|
+
|
|
5
|
+
### 自动发送安全
|
|
6
|
+
|
|
7
|
+
- **绑定当前会话**:通过会话输入槽的 `sessionId`、`useInput` 和 `inputActions` 定位及提交,不再查找页面最后一个可编辑区域。
|
|
8
|
+
- **繁忙时的发送行为**:延时设置旁新增下拉框。默认「排队发送」走提交接口(忙碌时进入消息队列);「插队发送」改为模拟按一次回车(与用户按回车同一条路径,繁忙行为跟随 DSH 设置「繁忙时的发送行为」,需设为「插话发送」才真正插队),编辑器不可用时仍回退到提交接口。
|
|
9
|
+
- **无法确认就不发送**:只有观察到转写阶段、草稿版本前进且内容非空后才可能发送;延时期间再次修改草稿或附件、切换会话、编辑器断开均取消。
|
|
10
|
+
- 录音取消或进入错误反馈、开始新录音、关闭自动发送、依赖失效、按 `Esc` 都会撤销待发任务。
|
|
11
|
+
- 修复转写行尚未消失时文字已经插入,轮询却不断提高 `draftRev` 基线并漏掉自动发送的问题。
|
|
12
|
+
- 旧版界面缺少草稿状态或提交接口时,保留快捷键功能,自动发送安全关闭。
|
|
13
|
+
|
|
14
|
+
### 键位、配置与生命周期
|
|
15
|
+
|
|
16
|
+
- **桌面版支持鼠标右键(`mouse3`,含 `right` 别名)单独作为热键**:按下即触发,触发后不会弹出右键菜单;网页版维持「右键需配修饰键」(浏览器要保留菜单)。录制键位时的右键同样不再弹菜单。
|
|
17
|
+
- **键位冲突提示**:桌面版读取官方快捷键目录,保存的键位若与 DSH 内置命令冲突,配置页与工具条图标的悬浮说明会指出被哪个命令占用、两边会同时响应。仅提示、不拦截;官方服务不可用或按键无法映射到物理键(小键盘等)时保持沉默。
|
|
18
|
+
- **键位手动输入与清空**:录制框新增「手动输入」模式,可直接书写键位并实时校验合法性;新增「清空」按钮一键解绑;页面内注明鼠标键使用规则(侧键、桌面版右键可单按)。
|
|
19
|
+
- 支持主键区加号写法 `ctrl++` / `ctrl+plus`,拒绝包含多个非修饰键的歧义组合。
|
|
20
|
+
- 实时配置变成非法键位时立即撤销旧绑定,不再继续响应上一次键位;缺少语音依赖时不拦截键位默认行为。
|
|
21
|
+
- 配置保存失败会显示可读错误,不再产生未处理的 Promise rejection;录制中按 `Esc` 只退出录制。
|
|
22
|
+
- 对话框补焦点进入、Tab 循环和关闭后的焦点恢复;重复 apply 与迟到的旧 cleanup 相互隔离,并完整清理监听器、标题后缀和诊断全局变量。
|
|
23
|
+
|
|
24
|
+
### 测试与文档
|
|
25
|
+
|
|
26
|
+
- 行为测试扩展到 Case 22(共 202 项断言),新增键位冲突提示、手动输入与清空、裸左键提示、发送方式切换与合成回车等回归场景。
|
|
27
|
+
- README 同步键位冲突提示、手动输入、发送方式等新行为,明确自动发送的保守推断边界、旧界面降级行为,以及本地源码目录需要先安装依赖。
|
|
28
|
+
|
|
29
|
+
## 0.2.0 — 2026-11-28
|
|
30
|
+
|
|
31
|
+
首个功能完整版本。`0.1.0` 只是个骨架(Host 端 `apply()` 为空,只有最基础的 Ctrl+F8 触发),此后陆续补齐了下面这些内容。
|
|
32
|
+
|
|
33
|
+
### 键位
|
|
34
|
+
|
|
35
|
+
- **默认不绑定任何键位**(原先所有平台默认 `Ctrl+F8`)。空值 = 不绑定,不响应、不占键。(破坏性变更)
|
|
36
|
+
- **首次启用引导**:键位为空时弹「先设一个快捷键」对话框,录制 / 保存 / 稍后。
|
|
37
|
+
- **设为默认 / 恢复默认**:`defaultHotkey` 记住用户自己的默认键位,`恢复默认` 回到它;没设过就等于清空。新安装仍是未绑定。
|
|
38
|
+
- **配置页录制**:输入框聚焦即录制,直接按组合键,不用背写法;记下合法组合后自动停止录制(否则 Tab/Enter 会被吞掉)。
|
|
39
|
+
- 键位规则收紧:必须带 `Ctrl` / `Alt` / `⌘` 之一(`Shift` 只能叠加);`F1`–`F12`;字母、数字、符号键;方向键 / `Home` / `End` / `PgUp` / `PgDn` / `Ins` / `Del` / `Space` / `Tab` / `Enter`;小键盘 `num1`–`num0`、`num+` `num-` `num*` `num/` `num.`。
|
|
40
|
+
- **鼠标键支持**:`mouse1`–`mouse5`(含 `middle` / `back` / `forward` 别名),侧键 `mouse4` / `mouse5` 可单按,左右中键需配修饰键。
|
|
41
|
+
- **网页版收窄**:拒绝浏览器保留组合(`Ctrl+W` / `Ctrl+T` / `Ctrl+Tab` / `F11` / `F12` / `Alt+F4` 等),并说明原因。
|
|
42
|
+
|
|
43
|
+
### 语音插件依赖
|
|
44
|
+
|
|
45
|
+
- **依赖监测模块** `createDependencyMonitor(ctx)`:以 `ctx.get('remote.speech')` 可选读取,配 `internal/service` 事件 + 1.5 秒轮询兜底 + 3 秒宽限,不形成硬注入,不阻塞插件加载。
|
|
46
|
+
- 语音插件未启用时:快捷键拦键并显示红字提示(带「启用」按钮)、详情页顶部红字、标题旁红标;启用本插件时弹对话框,区分「已安装未启用 / 未安装 / 无法确认」三档,其中「启用」按钮可直接启用语音插件。
|
|
47
|
+
- 语音插件恢复后自动恢复,不需要重装或重启。
|
|
48
|
+
|
|
49
|
+
### 文档
|
|
50
|
+
|
|
51
|
+
- README 改为双语(`README.md` 中文为默认,`README.en.md` 英文),结构对齐官方自带的组合包;插件详情页通过 `locale/*.json` 的 `meta.detail` 指向对应版本。
|
|
52
|
+
- 开发记录移入 `docs/internal/`(不纳入版本库、不进发布包)。
|
|
53
|
+
|
|
54
|
+
### 界面
|
|
55
|
+
|
|
56
|
+
- 输入框工具行右侧的键盘图标(`conversation.input.right`):显示当前键位,点击进设置;未绑定或缺依赖时转红,缺依赖时点击去语音输入插件页。
|
|
57
|
+
- 输入框下方提示条(`conversation.composer.dock`):缺依赖时按快捷键触发,20 秒自动消失。
|
|
58
|
+
- 详情页配置表单:键位录制框 + 保存 / 设为默认 / 恢复默认 + 自动发送选项。
|
|
59
|
+
|
|
60
|
+
### 自动发送(可选,默认关)
|
|
61
|
+
|
|
62
|
+
- 识别完成后自动发送,延时秒数自己填(`0` = 立即,上限 `600` 秒),延时期间按 `Esc` 取消。
|
|
63
|
+
- 只对「用快捷键发起、并且文字真的插进草稿」的那一次生效;手动点麦克风、录音取消、识别为空、草稿冲突都不发送。
|
|
64
|
+
|
|
65
|
+
## 0.1.0 — 2026-11-27
|
|
66
|
+
|
|
67
|
+
初始骨架:Host 端 Config(`hotkey`,默认 `primary+F8`)+ 浏览器端按 `aria-label` 点击语音输入按钮。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 shuning0128
|
|
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.en.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "A dedicated keyboard/mouse trigger for DeepSeek Harness voice input, with an optional send-after-transcription step."
|
|
3
|
+
kind: "package-bundle"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Voice Hotkey
|
|
7
|
+
|
|
8
|
+
English | [中文](README.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
This package provides an independent trigger for the built-in voice input (dictation). Press once to start recording and press again to stop and transcribe, without using the microphone button beside the composer. The trigger is configurable and accepts keyboard combinations as well as mouse side buttons.
|
|
13
|
+
|
|
14
|
+
When the voice input plugin is not enabled, this package does not claim the key, and it reports the state in the interface instead of failing silently.
|
|
15
|
+
|
|
16
|
+
## Table of Contents
|
|
17
|
+
|
|
18
|
+
- [Install](#install)
|
|
19
|
+
- [Usage](#usage)
|
|
20
|
+
- [Key rules](#key-rules)
|
|
21
|
+
- [Send after transcription](#send-after-transcription)
|
|
22
|
+
- [When the voice plugin is unavailable](#when-the-voice-plugin-is-unavailable)
|
|
23
|
+
- [Known limitations](#known-limitations)
|
|
24
|
+
- [Compatibility](#compatibility)
|
|
25
|
+
- [License](#license)
|
|
26
|
+
|
|
27
|
+
-----
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
In Plugins → Add plugin, enter:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
@shuning0128/dsh-voice-hotkey
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
A local directory path is also accepted. After installation, enable the package in the plugin list.
|
|
38
|
+
|
|
39
|
+
A Git checkout does not include `node_modules`. Before enabling a local source directory, run `npm install --ignore-scripts` there to install its declared dependencies; otherwise the missing `@deepseek-ai/schemastery` package can cause `ERR_MODULE_NOT_FOUND`.
|
|
40
|
+
|
|
41
|
+
Once enabled, a keyboard icon appears at the right end of the composer toolbar, indicating that the package is loaded:
|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
A red icon means either no key is configured or voice input is currently unavailable. Clicking the icon opens the configuration page.
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
1. Confirm that both "Voice input" and this package are enabled (see the previous section).
|
|
50
|
+
2. On first activation a setup prompt appears: click the capture field, press the desired combination (mouse side buttons are accepted), then click Save. Choosing Later skips the prompt; the key can be configured on the plugin detail page afterwards.
|
|
51
|
+
3. Use the configured trigger to start and stop recording.
|
|
52
|
+
|
|
53
|
+
The configuration page offers key capture and a manual-input mode, plus Clear, Set as default (used by Restore default), and the auto-send settings. Changes take effect immediately without a restart.
|
|
54
|
+
|
|
55
|
+
## Key rules
|
|
56
|
+
|
|
57
|
+
- A key consists of modifiers plus one key, joined by `+`, case-insensitive, for example `ctrl+F8`, `meta+shift+D`, `ctrl+ArrowUp`.
|
|
58
|
+
- **Every key must include `ctrl`, `alt`, or `⌘` (meta).** `Shift` is an additional modifier only: used alone it conflicts with ordinary typing, and unmodified function or symbol keys conflict with editor and browser behavior.
|
|
59
|
+
- Exception: **mouse side buttons (`mouse4` back, `mouse5` forward) may be used alone**; their default behavior is empty. In the desktop shell **the right mouse button (`mouse3`) may also be used alone** — it fires immediately and the context menu is suppressed. The web build still requires a modifier for `mouse3` so the browser keeps its context menu.
|
|
60
|
+
- Available keys: `F1`–`F12`, letters, digits, symbol keys, arrow keys, `Home`/`End`, `PgUp`/`PgDn`, `Ins`/`Del`, `Space`, `Tab`, `Enter`.
|
|
61
|
+
- The numeric keypad uses distinct names: `num1`–`num0`, `num+` `num-` `num*` `num/` `num.`. Main-row digits and keypad digits are independent; the main-row plus key can be written as `ctrl++` or `ctrl+plus`.
|
|
62
|
+
- Mouse buttons: `mouse1`–`mouse5` (1 left, 2 middle, 3 right, 4 back, 5 forward), also written `middle`/`back`/`forward`.
|
|
63
|
+
- On the web, browser-reserved combinations (`Ctrl+W`, `Ctrl+T`, `Ctrl+Tab`, `F5`, `F11`, `F12`, and similar) are rejected because `preventDefault` cannot take effect there. The desktop app is not affected.
|
|
64
|
+
- **The desktop shell checks the official shortcut catalog for conflicts**: if the saved key collides with a built-in DSH command (such as Open settings), the configuration page and the toolbar icon show which command already occupies the combination. This is advisory only — nothing is blocked, and switching keys stays the user's call. Keypad keys and keys the catalog cannot name are not checked; older shells and the web build stay silent.
|
|
65
|
+
|
|
66
|
+
Keys do not need to be typed: click the capture field and press the combination. While capturing, `Esc` cancels only the recording and leaves the configuration or setup dialog open.
|
|
67
|
+
|
|
68
|
+
## Send after transcription
|
|
69
|
+
|
|
70
|
+
Disabled by default. When enabled, the draft is sent through the **current session's submit API** after the optional delay. A *send mode* option decides what happens while the agent is busy:
|
|
71
|
+
|
|
72
|
+
- **Queue** (default): call the submit API; messages join the queue while the agent is busy.
|
|
73
|
+
- **Steer** (simulated Enter): presses Enter on the editor, the same path a user's Enter takes. For a real steer, also set DSH's own busy-send behaviour to steer; otherwise it degrades to queueing.
|
|
74
|
+
|
|
75
|
+
Send rules:
|
|
76
|
+
|
|
77
|
+
- The delay is user-defined: `0` sends immediately, with a maximum of 600 seconds.
|
|
78
|
+
- Press `Esc` during the delay to cancel. Starting another recording, disabling auto-send, or changing sessions also cancels it.
|
|
79
|
+
- Only recordings started by this package's trigger participate; recordings started with the microphone button do not.
|
|
80
|
+
- A send is considered only after the transcribing phase was observed and the draft revision advanced to non-empty content. Further draft or attachment edits during the delay, a disconnected editor, cancellation, or voice-input feedback prevent the send.
|
|
81
|
+
- On an older shell without session draft state or a submit API, the trigger still works but auto-send stays off.
|
|
82
|
+
|
|
83
|
+
## When the voice plugin is unavailable
|
|
84
|
+
|
|
85
|
+
This package depends on the voice input plugin. While that plugin is not enabled:
|
|
86
|
+
|
|
87
|
+
- The trigger does not respond and does not claim the key.
|
|
88
|
+
- Pressing the trigger shows a red notice below the composer with Enable or Open plugin actions.
|
|
89
|
+
- The plugin detail page shows a red notice at the top, and a badge appears beside the title.
|
|
90
|
+
- Enabling this package from the plugin list opens a dialog explaining the reason.
|
|
91
|
+
- Once voice input is enabled again, everything resumes without reinstalling this package.
|
|
92
|
+
|
|
93
|
+
Not installed and not enabled are distinguished: when the plugin is missing, the dialog shows the package name, which can be clicked to copy for use in Plugins → Add plugin.
|
|
94
|
+
|
|
95
|
+
## Known limitations
|
|
96
|
+
|
|
97
|
+
- Voice input does not yet expose an explicit “text inserted” event. Auto-send therefore remains a conservative inference from the transcribing phase, draft revision, and content changes; it cannot prove with absolute certainty that a particular change was the transcript. When uncertain, it prefers not to send.
|
|
98
|
+
- Auto-send binds only to a session composer slot that provides `useInput` / `inputActions`; it no longer searches for the last editable region on the page. Shell interface changes may make auto-send unavailable.
|
|
99
|
+
- Diagnostic state is written to the window title (`·voice:<state>`); that suffix is overwritten by session navigation and is not a durable status indicator.
|
|
100
|
+
- A disabled plugin runs no code, so "this package is disabled" cannot be reported in the interface; it is visible only in the plugin list.
|
|
101
|
+
|
|
102
|
+
## Compatibility
|
|
103
|
+
|
|
104
|
+
- DeepSeek Harness `>=0.2.1-rc.1 <0.3.0-0`.
|
|
105
|
+
- Version `0.2.1` was reviewed against the `0.2.3-alpha.2` runtime interfaces and upstream source, and passes the behavior regression harness. Interfaces were statically reviewed against `0.2.1-rc.1` and `0.2.2-rc.1`; real UI interaction still needs verification after installation.
|
|
106
|
+
- `0.2.1-rc.1` lacks `pluginNavigation.openList` (introduced in 0.2.2); on that version Open plugin list does not navigate, and everything else works as documented.
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,3 +1,110 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "为 DeepSeek Harness 的语音输入提供独立的键盘/鼠标开关,并可选在识别完成后自动发送。"
|
|
3
|
+
kind: "package-bundle"
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# 语音输入快捷键
|
|
7
|
+
|
|
8
|
+
[English](README.en.md) | 中文
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
本插件为「语音输入」(听写)提供独立的触发方式:按一次开始录音,再次按下停止并识别,无需操作会话输入框旁的麦克风按钮。触发键可自行设定,支持键盘组合与鼠标侧键。
|
|
13
|
+
|
|
14
|
+
当「语音输入」未启用时,本插件不会占用键位,也不会静默失败,而是在界面中说明当前状态。
|
|
15
|
+
|
|
16
|
+
## 目录
|
|
17
|
+
|
|
18
|
+
- [安装](#安装)
|
|
19
|
+
- [使用](#使用)
|
|
20
|
+
- [键位规则](#键位规则)
|
|
21
|
+
- [自动发送](#自动发送)
|
|
22
|
+
- [依赖未启用时的行为](#依赖未启用时的行为)
|
|
23
|
+
- [已知限制](#已知限制)
|
|
24
|
+
- [兼容性](#兼容性)
|
|
25
|
+
- [许可](#许可)
|
|
26
|
+
|
|
27
|
+
-----
|
|
28
|
+
|
|
29
|
+
## 安装
|
|
30
|
+
|
|
31
|
+
在「插件 → 添加插件」中输入:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
@shuning0128/dsh-voice-hotkey
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
亦可填写本地目录路径。安装完成后在插件列表中启用本插件。
|
|
38
|
+
|
|
39
|
+
本地目录不会随 Git 带上 `node_modules`。若直接启用本地源码目录,先在该目录执行 `npm install --ignore-scripts` 安装声明的依赖;否则可能因缺少 `@deepseek-ai/schemastery` 报 `ERR_MODULE_NOT_FOUND`。
|
|
40
|
+
|
|
41
|
+
启用成功后,会话输入框工具栏的右端会出现一个键盘图标,表示本插件已加载:
|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
图标显示为红色时,表示尚未设置键位,或「语音输入」当前不可用。点击图标可进入配置页。
|
|
46
|
+
|
|
47
|
+
## 使用
|
|
48
|
+
|
|
49
|
+
1. 确认「语音输入」与插件均已启用(见上一节)。
|
|
50
|
+
2. 首次启用本插件时会出现快捷键引导:点击录制框,按下所需的组合(支持鼠标侧键),然后点击「保存」。选择「稍后」可跳过,之后在插件详情页中设置。
|
|
51
|
+
3. 之后使用该键位即可开始或停止录音。
|
|
52
|
+
|
|
53
|
+
配置页提供键位录制与「手动输入」两种设置方式,以及「清空」、「设为默认」(供「恢复默认」回退)和自动发送设置。修改后立即生效,无需重启。
|
|
54
|
+
|
|
55
|
+
## 键位规则
|
|
56
|
+
|
|
57
|
+
- 键位由修饰键与一个按键组成,以 `+` 连接,大小写不敏感,例如 `ctrl+F8`、`meta+shift+D`、`ctrl+ArrowUp`。
|
|
58
|
+
- **每个键位必须包含 `ctrl`、`alt` 或 `⌘`(meta)之一。** `Shift` 仅作为附加修饰键:单独使用会与常规输入冲突,无修饰键的功能键或符号键也会与编辑器及浏览器行为冲突。
|
|
59
|
+
- 例外:**鼠标侧键(`mouse4` 后退、`mouse5` 前进)可单独使用**,其默认行为为空;桌面版中**鼠标右键(`mouse3`)也可单独使用**,按下即触发且不会弹出右键菜单(网页版仍需配修饰键,浏览器要保留右键菜单)。
|
|
60
|
+
- 可用按键:`F1`–`F12`、字母、数字、符号键、方向键、`Home`/`End`、`PgUp`/`PgDn`、`Ins`/`Del`、`Space`、`Tab`、`Enter`。
|
|
61
|
+
- 数字小键盘使用独立写法:`num1`–`num0`、`num+` `num-` `num*` `num/` `num.`。主键区数字与小键盘互不影响;主键区加号可写作 `ctrl++` 或 `ctrl+plus`。
|
|
62
|
+
- 鼠标按键:`mouse1`–`mouse5`(1 左、2 中、3 右、4 后退、5 前进),亦可写作 `middle`/`back`/`forward`。
|
|
63
|
+
- 网页版额外拒绝浏览器保留的组合(`Ctrl+W`、`Ctrl+T`、`Ctrl+Tab`、`F5`、`F11`、`F12` 等),在这些组合上 `preventDefault` 无法生效;桌面端不受此限制。
|
|
64
|
+
- **桌面版会读取官方快捷键目录做冲突提示**:保存的键位若与 DSH 内置命令(如「打开设置」)撞车,配置页和工具条图标会提示「已被某命令占用,两边会同时响应」。仅提示、不拦截——换不换键由用户决定。小键盘与官方目录没有的按键不做提示;旧版桌面壳或网页版没有该目录服务时保持沉默。
|
|
65
|
+
|
|
66
|
+
键位无需手动书写:点击输入框后直接按下组合即可录制;录制中按 `Esc` 只取消录制,不会关闭配置或首次设置对话框。
|
|
67
|
+
|
|
68
|
+
## 自动发送
|
|
69
|
+
|
|
70
|
+
默认关闭。启用后,插件在识别完成并经过可选延时后,通过**当前会话的提交接口**发送草稿。「发送方式」决定智能体忙碌时的行为:
|
|
71
|
+
|
|
72
|
+
- **排队发送**(默认):调用会话提交接口,忙碌时消息进入队列。
|
|
73
|
+
- **插队发送**:模拟按一次回车,与用户手动回车走同一条路径;需将 DSH 设置「繁忙时的发送行为」设为「插话发送」方可真正插队,否则等同排队。
|
|
74
|
+
|
|
75
|
+
发送规则:
|
|
76
|
+
|
|
77
|
+
- 延时时间可自行填写:`0` 表示立即发送,上限 600 秒。
|
|
78
|
+
- 延时期间按 `Esc` 可取消本次发送;开始新录音、关闭自动发送或切换会话也会取消。
|
|
79
|
+
- 仅处理由本插件快捷键发起的录音,通过麦克风按钮发起的录音不会触发。
|
|
80
|
+
- 只有观察到转写阶段、且草稿版本前进并出现非空内容后才可能发送。延时期间继续修改草稿或附件、编辑器断开、语音输入被取消或进入错误反馈时,均不发送。
|
|
81
|
+
- 旧版界面若缺少会话草稿状态或提交接口,快捷键仍可使用,但自动发送会保持关闭。
|
|
82
|
+
|
|
83
|
+
## 依赖未启用时的行为
|
|
84
|
+
|
|
85
|
+
本插件依赖「语音输入」插件。当后者未启用时:
|
|
86
|
+
|
|
87
|
+
- 快捷键不响应,且不占用该键位。
|
|
88
|
+
- 按下快捷键时,输入框下方显示红色说明,并提供「启用」或「打开插件」操作。
|
|
89
|
+
- 插件详情页顶部显示红色提示,标题旁显示「语音插件未启用」标记。
|
|
90
|
+
- 从插件列表启用本插件时,弹出对话框说明原因。
|
|
91
|
+
- 「语音输入」重新启用后自动恢复,无需重新安装本插件。
|
|
92
|
+
|
|
93
|
+
「未安装」与「未启用」分别判断:未安装时对话框给出包名,点击即可复制,粘贴至「插件 → 添加插件」完成安装。
|
|
94
|
+
|
|
95
|
+
## 已知限制
|
|
96
|
+
|
|
97
|
+
- 「语音输入」尚未提供明确的“文本已插入”事件,自动发送仍属于保守的状态推断:结合转写阶段、草稿版本和内容变化判断,无法百分之百证明某次变化就是识别结果。无法确认时宁可不发送。
|
|
98
|
+
- 自动发送只绑定提供 `useInput` / `inputActions` 的会话输入槽,不再查找页面中最后一个可编辑区域;界面接口变化时可能无法启用自动发送。
|
|
99
|
+
- 诊断状态写入窗口标题(`·voice:<state>`),该后缀会被会话导航覆盖,不建议作为长期状态显示。
|
|
100
|
+
- 插件停用时其代码不会运行,因此「本插件已停用」无法在界面中提示,仅在插件列表可见。
|
|
101
|
+
|
|
102
|
+
## 兼容性
|
|
103
|
+
|
|
104
|
+
- DeepSeek Harness `>=0.2.1-rc.1 <0.3.0-0`。
|
|
105
|
+
- `0.2.1` 已按 `0.2.3-alpha.2` 的运行时接口与上游源码核对,并通过行为回归测试;`0.2.1-rc.1` 与 `0.2.2-rc.1` 已完成接口静态核对。实际界面交互仍以安装后的验证为准。
|
|
106
|
+
- `0.2.1-rc.1` 缺少 `pluginNavigation.openList`(0.2.2 引入),该版本下「打开插件列表」无跳转,其余功能正常。
|
|
107
|
+
|
|
108
|
+
## 许可
|
|
109
|
+
|
|
110
|
+
MIT
|