opencode-voice-dictation/vite.config.ts
opencode-agent 3bd443dde3 feat: initial implementation of OpenCode Voice Dictation
- TypeScript + Vite (vite-plugin-monkey) userscript
- Groq API integration with whisper-large-v3
- Tap-to-toggle recording with noise suppression
- Contenteditable text insertion for OpenCode web
- Ctrl+Space keyboard shortcut (desktop)
- Custom Whisper prompt for software development context
- Recording timer, toast notifications, auto-submit option
- 44 unit tests, 100% line coverage
- Biome linter, Knip, Vitest, CI/CD pipeline
- Bilingual README (EN/RU) with compatibility table
2026-07-08 05:37:17 +00:00

31 lines
1.2 KiB
TypeScript

import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
export default defineConfig({
plugins: [
monkey({
entry: "src/index.ts",
userscript: {
name: "OpenCode Voice Dictation",
namespace: "https://github.com/slaid098/opencode-voice-dictation",
version: "1.0.0",
description:
"Voice dictation for OpenCode web using Whisper (Groq API) - works on PC and mobile",
author: "slaid098",
match: ["*://*/*"],
grant: ["GM_xmlhttpRequest", "GM_getValue", "GM_setValue", "GM_registerMenuCommand"],
connect: ["api.groq.com"],
"run-at": "document-idle",
icon: "https://raw.githubusercontent.com/slaid098/opencode-voice-dictation/main/assets/icon.png",
updateURL:
"https://raw.githubusercontent.com/slaid098/opencode-voice-dictation/main/dist/opencode-voice-dictation.user.js",
downloadURL:
"https://raw.githubusercontent.com/slaid098/opencode-voice-dictation/main/dist/opencode-voice-dictation.user.js",
},
build: {
fileName: "opencode-voice-dictation.user.js",
metaFileName: true,
},
}),
],
});