## Что сделано - Обновлён массив COMPOSER_SELECTORS в src/ui.ts: добавлены новые селекторы [data-component="prompt-input-v2"] и [data-component="session-prompt-dock"] как primary для OpenCode v1.18.x - Старые селекторы session-new-composer/session-composer сохранены как fallback для обратной совместимости - README обновлён с указанием совместимой версии OpenCode v1.18.x (русский и английский блоки) - Добавлен handoff-документ и ADR 0001 с обоснованием порядка fallback-селекторов ## Почему В OpenCode v1.18.x селекторы session-composer/session-new-composer удалены из исходников, из-за чего findComposer() возвращал null и кнопка 🎤 не появлялась в чате. Порядок массива обновлён как primary (v1.18.x) → fallback (pre-1.18), чтобы сохранить совместимость с OpenCode <1.18 до oldInterfaceSunset (2026-09-14). Closes #28 --------- Co-authored-by: opencode-agent <agent@opencode.local>
5.7 KiB
OpenCode Voice Dictation / Голосовая диктовка для OpenCode
Русский
Голосовая диктовка для OpenCode web через Whisper (Groq API). Работает на ПК и телефоне.
⚠️ Требуется OpenCode web v1.18.x. В настройках OpenCode web включите «New UI» — в старом интерфейсе скрипт не работает. Совместимо с OpenCode v1.18.x; старые версии поддерживаются через fallback-селекторы.
Установка
Установить скрипт — открой ссылку в браузере с Violentmonkey/Tampermonkey и подтверди установку.
Или скачай с Releases и импортируй вручную.
Совместимость
| Платформа | Браузер | Менеджер скриптов | Статус |
|---|---|---|---|
| ПК | Vivaldi | Violentmonkey | ✅ |
| ПК | Chrome | Tampermonkey | ✅ |
| ПК | Firefox | Tampermonkey | ✅ |
| Android | Firefox | Tampermonkey | ✅ |
| Android | Vivaldi | — | ❌ Нет расширений |
| Android | Chrome | — | ❌ Нет расширений |
Настройка
- Получи бесплатный ключ на console.groq.com/keys
- Открой OpenCode web
- Меню Violentmonkey/Tampermonkey → Set Groq API Key → вставь
gsk_...
Использование
- Нажми кнопку микрофона 🎤 в правом верхнем углу поля ввода
- Говори — виден таймер записи и кнопка отмены
- Нажми ⏹ — запись остановится, текст вставится в поле ввода
- Или нажми ✕ — запись отменится, текст не вставляется
- На ПК: Ctrl+Space — горячая клавиша
Микрофон также доступен в поле ответа на вопросы OpenCode (когда выбираешь "ввести свой ответ").
Автообновление
Скрипт обновляется сам. При пуше в main CI собирает новую версию и публикует в ветку dist. Пользователи получают обновление автоматически.
Настройки
| Пункт меню | Описание |
|---|---|
| Set Groq API Key | Ключ gsk_... |
| Toggle Auto-Submit | Отправлять после транскрипции |
| Set Whisper Model | whisper-large-v3 или whisper-large-v3-turbo |
| Set Language | ru, en или пусто (авто) |
| Set Whisper Prompt | Контекст для точности |
English
Voice dictation for OpenCode web via Whisper (Groq API). Works on desktop and mobile.
⚠️ Requires OpenCode web v1.18.x. In OpenCode web settings, enable "New UI" — the script does not work in the old interface. Compatible with OpenCode v1.18.x; older versions are supported via fallback selectors.
Install
Install Script — open this link in a browser with Violentmonkey/Tampermonkey and confirm installation.
Or download from Releases and import manually.
Compatibility
| Platform | Browser | Userscript Manager | Status |
|---|---|---|---|
| Desktop | Vivaldi | Violentmonkey | ✅ |
| Desktop | Chrome | Tampermonkey | ✅ |
| Desktop | Firefox | Tampermonkey | ✅ |
| Android | Firefox | Tampermonkey | ✅ |
| Android | Vivaldi | — | ❌ No extensions |
| Android | Chrome | — | ❌ No extensions |
Setup
- Get a free API key at console.groq.com/keys
- Open OpenCode web
- Violentmonkey/Tampermonkey menu → Set Groq API Key → paste
gsk_...
Usage
- Click the mic button 🎤 in the top-right corner of the input area
- Speak — recording timer and cancel button are displayed
- Click ⏹ — recording stops, transcribed text is inserted into the input
- Or click ✕ — recording is cancelled, no text inserted
- Desktop: Ctrl+Space shortcut
The mic button is also available in OpenCode question prompt answer fields (when choosing "type your own answer").
Auto-Update
The script updates automatically. When code is pushed to main, CI builds and publishes to the dist branch. Users receive updates automatically.
Settings
| Menu Item | Description |
|---|---|
| Set Groq API Key | API key gsk_... |
| Toggle Auto-Submit | Auto-send after transcription |
| Set Whisper Model | whisper-large-v3 or whisper-large-v3-turbo |
| Set Language | ru, en, or empty (auto-detect) |
| Set Whisper Prompt | Context for accuracy |
License
MIT — see LICENSE