dsh-notify-say 0.4.86 → 0.4.87

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-notify-say",
3
- "version": "0.4.86",
3
+ "version": "0.4.87",
4
4
  "description": "Desktop notifications for DSH Desktop that actually speak: Windows TTS out of the box (zero download), VOICEVOX voice packs optional, a selectable system-sound fallback, and an idle gate that waits for running subagents before saying the turn is done. Includes a settings-page GUI (sound source, per-event overrides, jump-back-to-session, cooldowns) and a self hot-reload for development.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -66,6 +66,28 @@ test('P4: 试听应用 voiceGain(调增益后能听出差别)', () => {
66
66
  assert.match(seg, /voiceGain/, '应从配置读 voiceGain');
67
67
  });
68
68
 
69
+ // ── P4b: 试听必须带上「当前选中的音色」(v0.4.87 修复)────────────────────
70
+ //
71
+ // 为什么单列一条:P4 只保住了 -Gain,于是「试听放的不是我选的音色」
72
+ // 这个 bug 在 8 条断言全绿的情况下溜到了实拍现场(2026-10-20)。
73
+ //
74
+ // 现象:用户在界面选「九州そら」,点试听,ps1 日志是
75
+ // [preview] -Voice pick=manbetsu-hanamaru-genki-extra-2.wav
76
+ // —— -Voice 后面是空的,ps1 于是按随机池挑曲。根因是试听走
77
+ // baseNotifyArgs(),而音色参数当时只在 notifyArgs() 里加。
78
+ test('P4b: 试听把当前音色传给 ps1(-Voice / -Mode)', () => {
79
+ const start = HOST.indexOf("head === 'preview'");
80
+ const seg = HOST.slice(start, start + 6000);
81
+ // 必须真的把 voiceName / voiceMode 读出来并用上
82
+ assert.match(seg, /kindVoiceName/, '试听应从配置读音色名(含按事件覆盖)');
83
+ assert.match(seg, /kindVoiceMode/, '试听应从配置读音色模式(fixed/random)');
84
+ assert.match(seg, /'-Voice'/, "试听必须向 ps1 传 -Voice,否则放的是随机曲");
85
+ assert.match(seg, /'-Mode'/, "试听必须向 ps1 传 -Mode(random 模式用)");
86
+ // 反向断言:不能「读了配置却没传给 ps1」
87
+ const bundledSeg = seg.slice(seg.indexOf("src === 'bundled'"));
88
+ assert.match(bundledSeg, /'-Voice'/, 'bundled 试听分支必须传 -Voice');
89
+ });
90
+
69
91
  // ── P5: client 必须有试听按钮 ───────────────────────────────────────────
70
92
  test('P5: GUI 提供试听按钮', () => {
71
93
  assert.match(CLIENT, /function previewSound\(/, 'client 应有 previewSound 函数');