dsh-voice-mode 0.7.37 → 0.7.38
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/README.en.md +3 -3
- package/README.md +3 -3
- package/lib/client.js +55 -7
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -16,9 +16,9 @@ interrupts playback and the running turn. No additional speech-service API key i
|
|
|
16
16
|
|
|
17
17
|

|
|
18
18
|
|
|
19
|
-
> **Current status (2026-11-
|
|
19
|
+
> **Current status (2026-11-13):** v0.7.37 stop-on-focus-switch, once-interrupt resume, no-split decimals, mic release on early stop. Check npm and Releases for availability.
|
|
20
20
|
|
|
21
|
-
Host compatibility check: anchors, types and isolated runtime checks passed for dsh 0.2.2-rc.
|
|
21
|
+
Host compatibility check: anchors, types and isolated runtime checks passed for dsh 0.2.2-rc.3 (including the client side). See the [compatibility record](../../docs/compat-contract.md) for evidence and unverified layers; this does not establish microphone or cross-platform acceptance.
|
|
22
22
|
>
|
|
23
23
|
> CI results do not establish real-device audio quality or compatibility with every host version. See the [changelog](https://github.com/qishuilalala/dsh-voice-mode/blob/main/CHANGELOG.md), [compatibility evidence](https://github.com/qishuilalala/dsh-voice-mode/blob/main/docs/compat-contract.md), and [roadmap](https://github.com/qishuilalala/dsh-voice-mode/blob/main/docs/plan/roadmap-2026-10.md). The declared dsh range is `>=0.1.1-rc.2 <0.3.0-0`; untested versions are not guaranteed.
|
|
24
24
|
|
|
@@ -325,7 +325,7 @@ Also: the on-device recording fixture used for debugging is **off by default**;
|
|
|
325
325
|
|
|
326
326
|
### Compatibility declaration (what the plugin market's version filter reads)
|
|
327
327
|
|
|
328
|
-
`package.json` declares `engines.dsh = ">=0.1.1-rc.2 <0.3.0-0"`. This is an eligibility range, not evidence that every version in it has passed tests. The compatibility record lists tested releases through 0.2.2-rc.
|
|
328
|
+
`package.json` declares `engines.dsh = ">=0.1.1-rc.2 <0.3.0-0"`. This is an eligibility range, not evidence that every version in it has passed tests. The compatibility record lists tested releases through 0.2.2-rc.3 and the forms actually exercised. The default set deduplicates the support endpoints, the latest verified release on each version line, and upstream latest/next: currently 9 versions for anchors and host/client typechecks, with 8 runtime cores. Historical evidence remains available; use `verify-dual.sh --full` or explicit versions to rerun it. Compatibility-only verification does not trigger a release. The daily workflow compares upstream tags and opens an issue for uncovered versions; it does not automatically rerun the full matrix. `peerDependencies` lists `@deepseek-ai/cordis` and `react` supplied by the host.
|
|
329
329
|
|
|
330
330
|
## 🚧 Known limitations
|
|
331
331
|
|
package/README.md
CHANGED
|
@@ -29,9 +29,9 @@ dsh ≥0.1.7 上按钮挂在发送键左侧(`conversation.input.activity`)
|
|
|
29
29
|
- 状态条与字幕默认开启;两项都关掉即上图的「全部收进按钮」形态,此时录音计时显示在按钮下方、提示文字显示在按钮旁
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
> **当前状态(2026-11-
|
|
32
|
+
> **当前状态(2026-11-13)**:v0.7.37 切会话停朗读、once 打断续说、小数点不拆句、启动窗口释放麦克风;可安装版本以 npm 徽章与 Releases 为准。
|
|
33
33
|
|
|
34
|
-
兼容跟进:最新 dsh 0.2.2-rc.
|
|
34
|
+
兼容跟进:最新 dsh 0.2.2-rc.3 的锚点、类型与隔离运行时复核通过(含客户端侧);完整证据和未验收层见[兼容契约](../../docs/compat-contract.md)。
|
|
35
35
|
>
|
|
36
36
|
> CI 通过不代表真实听感、所有硬件或所有宿主版本均已验证。详见 [CHANGELOG](https://github.com/qishuilalala/dsh-voice-mode/blob/main/CHANGELOG.md)、[兼容证据](https://github.com/qishuilalala/dsh-voice-mode/blob/main/docs/compat-contract.md)和[后续路线图](https://github.com/qishuilalala/dsh-voice-mode/blob/main/docs/plan/roadmap-2026-10.md)。包声明范围为 `>=0.1.1-rc.2 <0.3.0-0`,未测版本不保证。
|
|
37
37
|
|
|
@@ -312,7 +312,7 @@ flowchart LR
|
|
|
312
312
|
|
|
313
313
|
### 兼容声明(插件市场的版本筛选依据)
|
|
314
314
|
|
|
315
|
-
`package.json` 声明 `engines.dsh = ">=0.1.1-rc.2 <0.3.0-0"`。这是版本准入范围,不代表区间内每个版本都已实测。兼容记录列出了截至 0.2.2-rc.
|
|
315
|
+
`package.json` 声明 `engines.dsh = ">=0.1.1-rc.2 <0.3.0-0"`。这是版本准入范围,不代表区间内每个版本都已实测。兼容记录列出了截至 0.2.2-rc.3 的已测版本及实际测试形态。默认验证集按“支持区间两端 + 每条小版本线最新已验证版 + latest/next”去重,当前为 9 版锚点/双类型检查、8 核心冒烟。历史实证保留,可用 `verify-dual.sh --full` 或显式版本复验;纯补验不发版。每日工作流比对上游标签并为未覆盖版本开 issue,不会自动跑完整矩阵。`peerDependencies` 声明宿主提供的 `@deepseek-ai/cordis` 与 `react`。
|
|
316
316
|
|
|
317
317
|
## 🚧 已知限制
|
|
318
318
|
|
package/lib/client.js
CHANGED
|
@@ -2547,6 +2547,24 @@ function idleAction(input) {
|
|
|
2547
2547
|
if (input.busy && input.sinceUserActivityMs <= IDLE_USER_ACTIVITY_CAP_MS) return "renew";
|
|
2548
2548
|
return input.warn ? "warn" : "exit";
|
|
2549
2549
|
}
|
|
2550
|
+
function clampMenuRect(input) {
|
|
2551
|
+
const { menuW, menuH, left, top, right, bottom, vw, vh } = input;
|
|
2552
|
+
if (!(menuW > 0)) return { dx: 0, dy: 0, w: 0 };
|
|
2553
|
+
let dx = 0;
|
|
2554
|
+
let dy = 0;
|
|
2555
|
+
let w = 0;
|
|
2556
|
+
if (right > vw - 8) dx = vw - 8 - right;
|
|
2557
|
+
if (left + dx < 8) dx = 8 - left;
|
|
2558
|
+
if (vw < menuW + 16) w = Math.max(120, vw - 16);
|
|
2559
|
+
if (menuH > 0) {
|
|
2560
|
+
if (bottom > vh - 8) dy = vh - 8 - bottom;
|
|
2561
|
+
if (top + dy < 8) dy = 8 - top;
|
|
2562
|
+
}
|
|
2563
|
+
return { dx, dy, w };
|
|
2564
|
+
}
|
|
2565
|
+
function shouldSkipDraftWriteback(quoteCount, attachCount) {
|
|
2566
|
+
return quoteCount > 0 || attachCount > 0;
|
|
2567
|
+
}
|
|
2550
2568
|
|
|
2551
2569
|
// src/runtime-boot.ts
|
|
2552
2570
|
var runtimeBoot = null;
|
|
@@ -3993,7 +4011,7 @@ function telemetryDeltas(tel) {
|
|
|
3993
4011
|
}
|
|
3994
4012
|
return out;
|
|
3995
4013
|
}
|
|
3996
|
-
var BUILD_TAG = "
|
|
4014
|
+
var BUILD_TAG = "c8eed54";
|
|
3997
4015
|
var TELEMETRY_FLAG = "dsh-voice-mode.telemetry";
|
|
3998
4016
|
var telemetryEnabled = typeof localStorage !== "undefined" && localStorage.getItem(TELEMETRY_FLAG) === "1";
|
|
3999
4017
|
console.log("[dsh-voice] build=" + BUILD_TAG);
|
|
@@ -5205,6 +5223,26 @@ function MicMenu({ scope, anchor, onClose }) {
|
|
|
5205
5223
|
const [snap, setSnap] = (0, import_react3.useState)(() => scope.getSnapshot());
|
|
5206
5224
|
(0, import_react3.useEffect)(() => scope.subscribe(() => setSnap({ ...scope.getSnapshot() })), [scope]);
|
|
5207
5225
|
const menuRef = (0, import_react3.useRef)(null);
|
|
5226
|
+
const [adj, setAdj] = (0, import_react3.useState)(null);
|
|
5227
|
+
(0, import_react3.useEffect)(() => {
|
|
5228
|
+
const id = requestAnimationFrame(() => {
|
|
5229
|
+
const el = menuRef.current;
|
|
5230
|
+
if (!el) return;
|
|
5231
|
+
const rect = el.getBoundingClientRect();
|
|
5232
|
+
const next = clampMenuRect({
|
|
5233
|
+
menuW: el.offsetWidth || 208,
|
|
5234
|
+
menuH: el.offsetHeight || 0,
|
|
5235
|
+
left: rect.left,
|
|
5236
|
+
top: rect.top,
|
|
5237
|
+
right: rect.right,
|
|
5238
|
+
bottom: rect.bottom,
|
|
5239
|
+
vw: window.innerWidth,
|
|
5240
|
+
vh: window.innerHeight
|
|
5241
|
+
});
|
|
5242
|
+
if (next.dx !== 0 || next.dy !== 0 || next.w !== 0) setAdj(next);
|
|
5243
|
+
});
|
|
5244
|
+
return () => cancelAnimationFrame(id);
|
|
5245
|
+
}, []);
|
|
5208
5246
|
(0, import_react3.useEffect)(() => {
|
|
5209
5247
|
menuRef.current?.querySelector("button")?.focus();
|
|
5210
5248
|
const onDown = (e) => {
|
|
@@ -5238,9 +5276,10 @@ function MicMenu({ scope, anchor, onClose }) {
|
|
|
5238
5276
|
const pos = {
|
|
5239
5277
|
position: "fixed",
|
|
5240
5278
|
zIndex: 9999,
|
|
5241
|
-
width,
|
|
5279
|
+
width: adj?.w || width,
|
|
5242
5280
|
left: r ? Math.max(8, Math.min(window.innerWidth - width - 8, Math.round(r.right - width))) : 8,
|
|
5243
|
-
...below ? { top: r ? Math.round(r.bottom + 8) : 96 } : { bottom: Math.round(window.innerHeight - r.top + 8) }
|
|
5281
|
+
...below ? { top: r ? Math.round(r.bottom + 8) : 96 } : { bottom: Math.round(window.innerHeight - r.top + 8) },
|
|
5282
|
+
...adj && (adj.dx !== 0 || adj.dy !== 0) ? { transform: `translate(${adj.dx}px, ${adj.dy}px)` } : null
|
|
5244
5283
|
};
|
|
5245
5284
|
const item = (role, checked, label, onPick) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", { type: "button", role, "aria-checked": checked, className: "dshvm-menu-item", onClick: onPick, children: [
|
|
5246
5285
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: label }),
|
|
@@ -5989,6 +6028,7 @@ function MicButton({
|
|
|
5989
6028
|
const composed = composeDraft(draftRef.current, lastPartialRef.current, text);
|
|
5990
6029
|
if (!composed) return;
|
|
5991
6030
|
lastPartialRef.current = text.trim();
|
|
6031
|
+
if (shouldSkipDraftWriteback(quoteRef.current, attachRef.current)) return;
|
|
5992
6032
|
try {
|
|
5993
6033
|
partialActions.setDraft(composed);
|
|
5994
6034
|
} catch {
|
|
@@ -6014,12 +6054,14 @@ function MicButton({
|
|
|
6014
6054
|
if (!trimmed) return;
|
|
6015
6055
|
let nextDraft = composeDraft(draftRef.current, lastPartialRef.current, trimmed);
|
|
6016
6056
|
lastPartialRef.current = "";
|
|
6017
|
-
|
|
6018
|
-
if (typeof actions?.setDraft === "function") actions.setDraft(nextDraft);
|
|
6019
|
-
} catch {
|
|
6057
|
+
if (!shouldSkipDraftWriteback(quoteRef.current, attachRef.current)) {
|
|
6020
6058
|
try {
|
|
6021
|
-
actions?.setDraft
|
|
6059
|
+
if (typeof actions?.setDraft === "function") actions.setDraft(nextDraft);
|
|
6022
6060
|
} catch {
|
|
6061
|
+
try {
|
|
6062
|
+
actions?.setDraft?.(trimmed);
|
|
6063
|
+
} catch {
|
|
6064
|
+
}
|
|
6023
6065
|
}
|
|
6024
6066
|
}
|
|
6025
6067
|
if (meta?.force) {
|
|
@@ -6365,6 +6407,12 @@ function MicButton({
|
|
|
6365
6407
|
const liveDraft = useInput ? useInput((s) => s?.draft ?? "") : "";
|
|
6366
6408
|
const draftRef = (0, import_react3.useRef)("");
|
|
6367
6409
|
draftRef.current = liveDraft;
|
|
6410
|
+
const liveQuoteCount = useInput ? useInput((s) => s?.quotes?.length ?? 0) : 0;
|
|
6411
|
+
const liveAttachCount = useInput ? useInput((s) => s?.attachmentIds?.length ?? 0) : 0;
|
|
6412
|
+
const quoteRef = (0, import_react3.useRef)(0);
|
|
6413
|
+
quoteRef.current = liveQuoteCount;
|
|
6414
|
+
const attachRef = (0, import_react3.useRef)(0);
|
|
6415
|
+
attachRef.current = liveAttachCount;
|
|
6368
6416
|
const lastPartialRef = (0, import_react3.useRef)("");
|
|
6369
6417
|
const submitInFlightRef = (0, import_react3.useRef)(false);
|
|
6370
6418
|
const correctCycleRef = (0, import_react3.useRef)(0);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-voice-mode",
|
|
3
3
|
"description": "Voice plugin for DeepSeek Harness: local streaming speech recognition into editable drafts, sentence-by-sentence read-aloud with captions, and voice interruption. Edge online or local VITS/Kokoro TTS; host compatibility is bounded by engines.dsh.",
|
|
4
4
|
"icon": "./icon.svg",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.38",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"repository": {
|