@goodandready/dsh-voice 0.8.29 → 0.8.31
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/lib/client.js +31 -7
- package/lib/index.js +2 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -26,6 +26,10 @@ window.__ModuleLoader__.load({
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const NS = 'dsh-voice'
|
|
29
|
+
// Plugins page row seat (DSH 0.1.6-alpha.2): key = '<package name>#<row id>'.
|
|
30
|
+
const PKG = '@goodandready/dsh-voice'
|
|
31
|
+
const ROW_ID = 'dsh-voice'
|
|
32
|
+
const ROW_CONFIG_KEY = PKG + '#' + ROW_ID
|
|
29
33
|
|
|
30
34
|
// UI strings live in the locale registry so a separate package can
|
|
31
35
|
// translate them without touching this plugin. English is the source
|
|
@@ -1703,12 +1707,15 @@ window.__ModuleLoader__.load({
|
|
|
1703
1707
|
}
|
|
1704
1708
|
}, 'dsh-voice: hold hotkey')
|
|
1705
1709
|
|
|
1710
|
+
// locale: NS is required — the core resolves `label` through the inject face,
|
|
1711
|
+
// and without it the label throws "cannot get property t without inject" while
|
|
1712
|
+
// the slot snapshot is built, breaking the whole client batch.
|
|
1706
1713
|
ctx.slots.inject('conversation.input.right', () => ctx.slots.register(
|
|
1707
|
-
{ name: 'conversation.input.right', id: '@goodandready/dsh-voice', order: 6, label: () => t('title') },
|
|
1714
|
+
{ name: 'conversation.input.right', id: '@goodandready/dsh-voice', order: 6, locale: NS, label: () => t('title') },
|
|
1708
1715
|
(props) => React.createElement(VoiceButtons, { input: props.input, inputActions: props.inputActions }),
|
|
1709
1716
|
))
|
|
1710
1717
|
ctx.slots.inject('conversation.input.dock', () => ctx.slots.register(
|
|
1711
|
-
{ name: 'conversation.input.dock', id: 'dsh-voice-rec', order: 0, label: () => t('recordSlot') },
|
|
1718
|
+
{ name: 'conversation.input.dock', id: 'dsh-voice-rec', order: 0, locale: NS, label: () => t('recordSlot') },
|
|
1712
1719
|
(props) => React.createElement(RecordPill, { input: props.input, inputActions: props.inputActions, ctx: ctx }),
|
|
1713
1720
|
))
|
|
1714
1721
|
}
|
|
@@ -2647,16 +2654,23 @@ window.__ModuleLoader__.load({
|
|
|
2647
2654
|
}
|
|
2648
2655
|
// Card in Settings → Plugins → Plugin settings (#18)
|
|
2649
2656
|
function PluginCard(props) {
|
|
2650
|
-
const
|
|
2657
|
+
const page = !!(props && props.view === 'page')
|
|
2658
|
+
const [open, setOpen] = React.useState(!!page)
|
|
2651
2659
|
const tt = (props && props.t) || t
|
|
2652
2660
|
const title = tt('title')
|
|
2661
|
+
// Row seat (plugins.row.config): the host page draws title/icon/crumb and the
|
|
2662
|
+
// padding, so the summary is a one-liner and the page drops our card chrome.
|
|
2663
|
+
if (props && props.view === 'summary') {
|
|
2664
|
+
return React.createElement('span', { className: 'dvo-pdesc' }, tt('cardHint'))
|
|
2665
|
+
}
|
|
2653
2666
|
return React.createElement(ErrorBoundary, null,
|
|
2654
|
-
React.createElement('li',
|
|
2655
|
-
{ className: open ? 'dvo-pcard dvo-pcardOpen' : 'dvo-pcard' },
|
|
2667
|
+
React.createElement(page ? 'div' : 'li',
|
|
2668
|
+
{ className: page ? 'dvo-ppage' : (open ? 'dvo-pcard dvo-pcardOpen' : 'dvo-pcard') },
|
|
2656
2669
|
React.createElement('button',
|
|
2657
2670
|
{
|
|
2658
2671
|
type: 'button', className: 'dvo-phead',
|
|
2659
|
-
|
|
2672
|
+
style: page ? { display: 'none' } : undefined,
|
|
2673
|
+
'aria-expanded': page ? 'true' : (open ? 'true' : 'false'),
|
|
2660
2674
|
'aria-label': (open ? tt('collapse') : tt('expand')) + ': ' + title,
|
|
2661
2675
|
onClick: () => setOpen((v) => !v),
|
|
2662
2676
|
},
|
|
@@ -2666,12 +2680,22 @@ window.__ModuleLoader__.load({
|
|
|
2666
2680
|
),
|
|
2667
2681
|
React.createElement('span', { className: 'dvo-pchev' }, chevronIcon()),
|
|
2668
2682
|
),
|
|
2669
|
-
open ? React.createElement('div', { className: 'dvo-pbody' }, React.createElement(VoiceSection, props)) : null,
|
|
2683
|
+
(page || open) ? React.createElement('div', { className: 'dvo-pbody' }, React.createElement(VoiceSection, props)) : null,
|
|
2670
2684
|
),
|
|
2671
2685
|
)
|
|
2672
2686
|
}
|
|
2673
2687
|
|
|
2674
2688
|
function registerSettings(ctx) {
|
|
2689
|
+
// Row seat first (the seat the current core renders), legacy card after it.
|
|
2690
|
+
ctx.slots.inject('plugins.row.config', () => ctx.slots.register(
|
|
2691
|
+
{
|
|
2692
|
+
name: 'plugins.row.config',
|
|
2693
|
+
key: ROW_CONFIG_KEY,
|
|
2694
|
+
locale: NS,
|
|
2695
|
+
inject: () => ({ ctx: ctx }),
|
|
2696
|
+
},
|
|
2697
|
+
PluginCard,
|
|
2698
|
+
))
|
|
2675
2699
|
ctx.slots.inject('settings.plugin.item', () => ctx.slots.register(
|
|
2676
2700
|
{
|
|
2677
2701
|
name: 'settings.plugin.item',
|
package/lib/index.js
CHANGED
|
@@ -33,6 +33,7 @@ function isAutoLang(lang) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export const name = '@goodandready/dsh-voice'
|
|
36
|
+
export const NS = 'dsh-voice'
|
|
36
37
|
export const inject = ['tools', 'credentials', 'webServer', 'shell', 'settings', 'llm']
|
|
37
38
|
|
|
38
39
|
const ChainEntry = z.object({
|
|
@@ -182,7 +183,7 @@ export function apply(ctx, baseConfig) {
|
|
|
182
183
|
const live = () => Config(structuredClone(getConfig() ?? {})) ?? baseConfig
|
|
183
184
|
|
|
184
185
|
ctx.inject(['settings'], (sctx) => {
|
|
185
|
-
const scope = sctx.settings.register(
|
|
186
|
+
const scope = sctx.settings.register(NS, Config, { base: baseConfig })
|
|
186
187
|
getConfig = () => scope.get() ?? baseConfig
|
|
187
188
|
sctx.effect(() => () => { getConfig = () => baseConfig })
|
|
188
189
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-voice",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.31",
|
|
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",
|