- 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
31 lines
1.2 KiB
TypeScript
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,
|
|
},
|
|
}),
|
|
],
|
|
});
|