opencode-groq-dictate 1.1.9 → 1.1.11
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.md +3 -3
- package/package.json +1 -1
- package/tui.tsx +16 -15
package/README.md
CHANGED
|
@@ -68,17 +68,17 @@ clone out of `~/.config/opencode/plugins/` before installing from npm.
|
|
|
68
68
|
|-----|--------|
|
|
69
69
|
| `alt+v` | start recording, press again to stop and transcribe |
|
|
70
70
|
| `ctrl+alt+v` | same, but the prompt is submitted as soon as the text lands |
|
|
71
|
-
| click on
|
|
71
|
+
| click on `Groq Dictate` or on the `state` row | same as `alt+v` |
|
|
72
72
|
| `ctrl+click` on the same two | same as `ctrl+alt+v` |
|
|
73
73
|
| `esc` | cancel the take: no upload, no request, no cost |
|
|
74
74
|
| `/dictate` | same as `alt+v`, from the command palette |
|
|
75
|
-
|
|
|
75
|
+
| `settings` next to the title | open the settings panel |
|
|
76
76
|
|
|
77
77
|
A take stops on its own after 60 seconds. Everything else is in the palette under
|
|
78
78
|
**Voice**: `Dictate (Groq) and submit`, `Dictation model`, `Dictation language`,
|
|
79
79
|
`Dictation quota`, `Dictation settings`.
|
|
80
80
|
|
|
81
|
-
The
|
|
81
|
+
The `settings` panel (or `Dictation settings` in the palette) holds the four things worth
|
|
82
82
|
changing: the two shortcuts, the model and the language. Click a row, write the new
|
|
83
83
|
value, and it applies at once — the keymap layer reads the stored config, so a new
|
|
84
84
|
combination works without restarting OpenCode. A blank shortcut disables the key but
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-groq-dictate",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "Groq dictation in the OpenCode v2 TUI: alt+v records, transcribes with whisper-large-v3-turbo, and pastes the text into the prompt.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
package/tui.tsx
CHANGED
|
@@ -456,21 +456,23 @@ export default Plugin.define({
|
|
|
456
456
|
],
|
|
457
457
|
}))
|
|
458
458
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
const
|
|
459
|
+
// Theme colours are shade maps ({100..600}): passing the map itself as `fg`
|
|
460
|
+
// crashes the slot renderer (e.length), so every helper resolves one shade.
|
|
461
|
+
const shade = (value: unknown, key = "400"): string | undefined =>
|
|
462
|
+
typeof value === "string" ? value : (value as Record<string, string> | undefined)?.[key]
|
|
463
|
+
const red = () => shade(context.theme?.hue?.red) ?? "#ff5555"
|
|
464
|
+
const amber = () => shade(context.theme?.hue?.orange) ?? "#FF9654"
|
|
465
|
+
const green = () => shade(context.theme?.hue?.green) ?? "#7fbf7f"
|
|
462
466
|
const muted = () => context.theme?.text?.muted ?? context.theme?.text?.subdued ?? "#808080"
|
|
463
467
|
// The brand accent, the same one the go-meter panel uses for its figures.
|
|
464
|
-
const accent = () =>
|
|
465
|
-
context.theme?.hue?.accent?.["500"] ?? context.theme?.hue?.interactive?.["300"] ?? "#FF9654"
|
|
468
|
+
const accent = () => shade(context.theme?.hue?.accent, "500") ?? shade(context.theme?.hue?.interactive, "300") ?? "#FF9654"
|
|
466
469
|
|
|
467
470
|
// The footer row already carries the model and the other status items, so the
|
|
468
471
|
// dot sits next to them and disappears when there is nothing to report.
|
|
469
472
|
context.ui.slot({
|
|
470
473
|
append: "prompt.footer.status",
|
|
471
|
-
// Always return an element
|
|
472
|
-
//
|
|
473
|
-
// which crashes the slot ("evaluating 'e.length'") on v2.1.0.
|
|
474
|
+
// Always return an element, never a <Show> that resolves to nothing: the
|
|
475
|
+
// host reads .length on the render result, so undefined crashes the slot.
|
|
474
476
|
render: () => (
|
|
475
477
|
<text fg={recording() ? red() : amber()}>
|
|
476
478
|
{recording() ? `● REC ${elapsed()}s` : busy() ? "● …" : ""}
|
|
@@ -512,16 +514,15 @@ export default Plugin.define({
|
|
|
512
514
|
return (
|
|
513
515
|
<box flexDirection="column">
|
|
514
516
|
<box flexDirection="row" gap={1}>
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
</text>
|
|
518
|
-
<text fg={muted()} onMouseUp={() => openSettings()}>
|
|
519
|
-
{"⚙"}
|
|
520
|
-
</text>
|
|
517
|
+
{/* Plain glyphs: the emoji did not render in every terminal font. */}
|
|
518
|
+
<text fg={muted()}>{"Groq Dictate"}</text>
|
|
519
|
+
<text fg={muted()} onMouseUp={() => openSettings()}>{"settings"}</text>
|
|
521
520
|
</box>
|
|
522
521
|
{row(
|
|
523
522
|
"state",
|
|
524
|
-
|
|
523
|
+
// The square is the record button: it sits next to the state word,
|
|
524
|
+
// click starts, ctrl+click starts and sends.
|
|
525
|
+
recording() ? `■ rec ${elapsed()}s` : busy() ? "■ transcribing…" : "■ idle",
|
|
525
526
|
state,
|
|
526
527
|
(event) => toggle(wantsSubmit(event)),
|
|
527
528
|
)}
|