@eslaykey/dsh-breeze-tts 1.0.4 → 1.0.5

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 CHANGED
@@ -5,6 +5,14 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), version
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.0.5] - 2026-10-31
9
+
10
+ ### Fixed
11
+ - After a client remount (or a fresh session) the "already spoken" marker could prime on an empty message list, so the previous reply was spoken again
12
+ - Auto-speak now reads only the message's own text blocks instead of the broad fallback walk, which could pick up unrelated text
13
+ - Added a one-line diagnostic to ~/.dsh/breeze-tts/autospeak.log recording what was spoken
14
+
15
+
8
16
  ## [1.0.4] - 2026-10-31
9
17
 
10
18
  ### Fixed
package/client.js CHANGED
@@ -640,6 +640,7 @@ function cleanForSpeech(text, keepTags) {
640
640
  if (!snapshot) return
641
641
 
642
642
  if (!primed.current) {
643
+ if (!nodes.length) return
643
644
  primed.current = true
644
645
  for (const node of nodes) {
645
646
  const id = node && (node.id || node.messageId || (node.message && node.message.id))
@@ -663,9 +664,14 @@ function cleanForSpeech(text, keepTags) {
663
664
  const candidateId = node.id || node.messageId || (node.message && node.message.id) || ''
664
665
  if (!candidateId || played.current.ids.has(candidateId)) continue
665
666
  let raw = ''
667
+ let source = 'content'
666
668
  try {
667
- raw = collectText(node, [], 0).join(' ')
668
- if (!raw) raw = collectAnyText(node, [], 0).join(' ')
669
+ const message = node.message && typeof node.message === 'object' ? node.message : node
670
+ raw = textBlocks(message.content, []).join(' ')
671
+ if (!raw) {
672
+ raw = collectText(node, [], 0).join(' ')
673
+ source = 'collect'
674
+ }
669
675
  } catch {
670
676
  raw = ''
671
677
  }
@@ -693,6 +699,18 @@ function cleanForSpeech(text, keepTags) {
693
699
  text = spokenText
694
700
  measure = plain
695
701
  id = candidateId
702
+ try {
703
+ const node2 = node
704
+ const blocks = node2 && node2.message && Array.isArray(node2.message.content) ? node2.message.content : (Array.isArray(node2.blocks) ? node2.blocks : [])
705
+ const kinds = blocks.slice(0, 6).map((b) => String((b && (b.type || b.kind)) || '?')).join(',')
706
+ fetch('/breeze-tts/log', {
707
+ method: 'POST',
708
+ headers: { 'content-type': 'application/json' },
709
+ body: JSON.stringify({ msg: 'speak src=' + source + ' id=' + candidateId.slice(0, 18) + ' len=' + plain.length + ' kinds=' + kinds }),
710
+ }).catch(() => {})
711
+ } catch {
712
+ /* logging must never break playback */
713
+ }
696
714
  break
697
715
  }
698
716
  if (!id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslaykey/dsh-breeze-tts",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Breeze Blue text-to-speech for DeepSeek Harness: agent tools, reply playback, voice design and a settings page.",
5
5
  "author": "eslaykey",
6
6
  "license": "MIT",