@goodandready/dsh-voice 0.4.1 → 0.4.2

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.
Files changed (2) hide show
  1. package/lib/client.js +8 -2
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -528,7 +528,13 @@ window.__ModuleLoader__.load({
528
528
 
529
529
  function VoiceSection(props) {
530
530
  const ctx = props.ctx
531
- const scope = ctx.settingsScope.bind({ namespace: NS })
531
+ // На странице, открытой не с localhost, ядро отключает настройки целиком:
532
+ // общий вид документа не читается, каждый раздел получает "unavailable",
533
+ // запись выбрасывается. Сервер это ограничение не разделяет, и плагин
534
+ // dsh-lanmode поднимает ту же механику поверх тех же вызовов. Если он
535
+ // установлен — берём его службу, иначе ядровую: на loopback-странице она
536
+ // работает штатно.
537
+ const scope = ((ctx.get && ctx.get('lanSettings')) || ctx.settingsScope).bind({ namespace: NS })
532
538
  const [snap, setSnap] = React.useState(null)
533
539
  const [draft, setDraft] = React.useState(null)
534
540
  const [saved, setSaved] = React.useState(false)
@@ -565,7 +571,7 @@ window.__ModuleLoader__.load({
565
571
  const timer = setInterval(() => {
566
572
  if (tries >= 15) { clearInterval(timer); return }
567
573
  tries += 1
568
- try { ctx.settingsScope.describe().load() } catch (e) { /* сервис ещё не поднялся */ }
574
+ try { ((ctx.get && ctx.get('lanSettings')) || ctx.settingsScope).describe().load() } catch (e) { /* сервис ещё не поднялся */ }
569
575
  }, 1000)
570
576
  return () => clearInterval(timer)
571
577
  }, [ready])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-voice",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Voice input for DeepSeek Harness: dictation chunked by pauses and voice messages, each with its own provider fallback chain (Deepgram, Groq, HuggingFace, local whisper.cpp, plus any OpenAI-compatible API of your own).",
5
5
  "license": "MIT",
6
6
  "type": "module",