Skip to content

Commit b46fc73

Browse files
committed
docs(config): synchronize example config descriptions and add inline documentation
Synchronize Edge TTS description with config.ts (Python CLI + npm fallback). Add missing enableContextAwareAI field. Add extensive inline comments covering desktop notifications, AI endpoints, sound themes, webhooks, permission batching, and per-project sound settings.
1 parent 1dcf1a5 commit b46fc73

1 file changed

Lines changed: 117 additions & 9 deletions

File tree

example.config.jsonc

Lines changed: 117 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
// ============================================================
7979
// 'openai' - OpenAI-compatible TTS (Self-hosted/Cloud, e.g. Kokoro, LocalAI)
8080
// 'elevenlabs' - Best quality, anime-like voices (requires API key, free tier: 10k chars/month)
81-
// 'edge' - Good quality neural voices (Free, Native Node.js implementation)
81+
// 'edge' - Good quality neural voices (Python edge-tts CLI RECOMMENDED, with msedge-tts npm fallback)
8282
// 'sapi' - Windows built-in voices (free, offline, robotic)
8383
"ttsEngine": "elevenlabs",
8484

@@ -109,9 +109,10 @@
109109
"elevenLabsStyle": 0.5, // Style exaggeration (higher = more expressive)
110110

111111
// ============================================================
112-
// EDGE TTS SETTINGS (Free Neural Voices - Fallback)
112+
// EDGE TTS SETTINGS (Free Neural Voices)
113113
// ============================================================
114-
// Native Node.js implementation (No external dependencies)
114+
// Uses Python edge-tts CLI (RECOMMENDED, pip install edge-tts) with automatic
115+
// fallback to msedge-tts npm package if Python is not available.
115116

116117
// Voice options (run 'edge-tts --list-voices' to see all):
117118
// 'en-US-AnaNeural' - Young, cute, cartoon-like (RECOMMENDED)
@@ -133,6 +134,11 @@
133134

134135
// Voice (run PowerShell to list all installed voices):
135136
// Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).GetInstalledVoices() | % { $_.VoiceInfo.Name }
137+
//
138+
// Common Windows voices:
139+
// 'Microsoft Zira Desktop' - Female, US English
140+
// 'Microsoft David Desktop' - Male, US English
141+
// 'Microsoft Hazel Desktop' - Female, UK English
136142
"sapiVoice": "Microsoft Zira Desktop",
137143

138144
// Speech rate: -10 (slowest) to +10 (fastest), 0 is normal
@@ -221,13 +227,22 @@
221227
],
222228

223229
// ============================================================
224-
// PERMISSION BATCHING
230+
// PERMISSION BATCHING (Multiple permissions at once)
225231
// ============================================================
232+
// When multiple permissions arrive simultaneously, batch them into one notification
233+
// This prevents overlapping sounds when 5+ permissions come at once
234+
235+
// Batch window (ms) - how long to wait for more permissions before notifying
226236
"permissionBatchWindowMs": 800,
227237

228238
// ============================================================
229-
// QUESTION TOOL MESSAGES (SDK v1.1.7+)
239+
// QUESTION TOOL SETTINGS (SDK v1.1.7+ - Agent asking user questions)
230240
// ============================================================
241+
// The "question" tool allows the LLM to ask users questions during execution.
242+
// This is useful for gathering preferences, clarifying instructions, or getting
243+
// decisions on implementation choices.
244+
245+
// Messages when agent asks user a question
231246
"questionTTSMessages": [
232247
"Hey! I have a question for you. Please check your screen.",
233248
"Attention! I need your input to continue.",
@@ -256,12 +271,19 @@
256271
"Still waiting for your answers on {count} questions! The task is on hold.",
257272
"Your input is needed! {count} questions are pending your response."
258273
],
274+
// Delay (in seconds) before question reminder fires
259275
"questionReminderDelaySeconds": 25,
276+
277+
// Question batch window (ms) - how long to wait for more questions before notifying
260278
"questionBatchWindowMs": 800,
261279

262280
// ============================================================
263-
// ERROR NOTIFICATION SETTINGS
281+
// ERROR NOTIFICATION SETTINGS (Session Errors)
264282
// ============================================================
283+
// Notify users when the agent encounters an error during execution.
284+
// Error notifications use more urgent messaging to get user attention.
285+
286+
// Messages when agent encounters an error
265287
"errorTTSMessages": [
266288
"Oops! Something went wrong. Please check for errors.",
267289
"Alert! The agent encountered an error and needs your attention.",
@@ -290,17 +312,51 @@
290312
"Still waiting! {count} errors need your attention.",
291313
"Don't forget! There are {count} unresolved errors in your session."
292314
],
315+
// Delay (in seconds) before error reminder fires (shorter than idle for urgency)
293316
"errorReminderDelaySeconds": 20,
294317

295318
// ============================================================
296-
// AI MESSAGE GENERATION
319+
// AI MESSAGE GENERATION (OpenAI-Compatible Endpoints)
297320
// ============================================================
321+
// Use a local/self-hosted AI to generate dynamic notification messages
322+
// instead of using preset static messages. The AI generates the text,
323+
// which is then spoken by your configured TTS engine (ElevenLabs, Edge, etc.)
324+
//
325+
// Supports: Ollama, LM Studio, LocalAI, vLLM, llama.cpp, Jan.ai, and any
326+
// OpenAI-compatible endpoint. You provide your own endpoint URL and API key.
327+
298328
"enableAIMessages": false,
329+
330+
// Your AI server endpoint URL (e.g., Ollama: http://localhost:11434/v1)
331+
// Common endpoints:
332+
// Ollama: http://localhost:11434/v1
333+
// LM Studio: http://localhost:1234/v1
334+
// LocalAI: http://localhost:8080/v1
335+
// vLLM: http://localhost:8000/v1
336+
// Jan.ai: http://localhost:1337/v1
299337
"aiEndpoint": "http://localhost:11434/v1",
338+
339+
// Model name to use (depends on what's loaded in your AI server)
340+
// Examples: "llama3", "mistral", "phi3", "gemma2", "qwen2"
300341
"aiModel": "llama3",
342+
343+
// API key for your AI server (leave empty for Ollama/LM Studio/LocalAI)
344+
// Only needed if your server requires authentication
301345
"aiApiKey": "",
346+
347+
// Request timeout in milliseconds (local AI can be slow on first request)
302348
"aiTimeout": 15000,
349+
350+
// Fallback to static preset messages if AI generation fails
303351
"aiFallbackToStatic": true,
352+
353+
// Enable context-aware AI messages (includes project name, task title, and change summary)
354+
// When enabled, AI-generated notifications will include relevant context like:
355+
// - Project name (e.g., "Your work on MyProject is complete!")
356+
// - Task/session title if available
357+
// - Change summary (files modified, lines added/deleted)
358+
// Disabled by default - enable this for more personalized notifications
359+
"enableContextAwareAI": false,
304360
"aiPrompts": {
305361
"idle": "Generate a single brief, friendly notification sentence (max 15 words) saying a coding task is complete. Be encouraging and warm. Output only the message, no quotes.",
306362
"permission": "Generate a single brief, urgent but friendly notification sentence (max 15 words) asking the user to approve a permission request. Output only the message, no quotes.",
@@ -332,8 +388,23 @@
332388
// ============================================================
333389
// DESKTOP NOTIFICATION SETTINGS
334390
// ============================================================
391+
// Native desktop notifications (Windows Toast, macOS Notification Center, Linux notify-send)
392+
// These appear as system notifications alongside sound and TTS.
393+
//
394+
// Note: On Linux, you may need to install libnotify-bin:
395+
// Ubuntu/Debian: sudo apt install libnotify-bin
396+
// Fedora: sudo dnf install libnotify
397+
// Arch: sudo pacman -S libnotify
398+
399+
// Enable native desktop notifications
335400
"enableDesktopNotification": true,
401+
402+
// How long the notification stays on screen (in seconds)
403+
// Note: Some platforms may ignore this (especially Windows 10+)
336404
"desktopNotificationTimeout": 5,
405+
406+
// Include the project name in notification titles for easier identification
407+
// Example: "OpenCode - MyProject" instead of just "OpenCode"
337408
"showProjectInNotification": true,
338409

339410
// ============================================================
@@ -347,24 +418,61 @@
347418
"alwaysNotify": false,
348419

349420
// ============================================================
350-
// WEBHOOK NOTIFICATION SETTINGS
421+
// WEBHOOK NOTIFICATION SETTINGS (Discord/Generic)
351422
// ============================================================
423+
// Send notifications to a Discord webhook or any compatible endpoint.
424+
// This allows you to receive notifications on your phone or other devices.
425+
426+
// Enable webhook notifications
352427
"enableWebhook": false,
428+
429+
// Webhook URL (e.g., https://discord.com/api/webhooks/...)
353430
"webhookUrl": "",
431+
432+
// Username to show in the webhook message
354433
"webhookUsername": "OpenCode Notify",
434+
435+
// Events that should trigger a webhook notification
436+
// Options: "idle", "permission", "error", "question"
355437
"webhookEvents": ["idle", "permission", "error", "question"],
438+
439+
// Mention @everyone on permission requests (Discord only)
356440
"webhookMentionOnPermission": false,
357441

358442
// ============================================================
359-
// SOUND THEME SETTINGS
443+
// SOUND THEME SETTINGS (Themed Sound Packs)
360444
// ============================================================
445+
// Configure a directory containing custom sound files for notifications.
446+
// This allows you to use themed sound packs (e.g., Warcraft, StarCraft, etc.)
447+
//
448+
// Directory structure should contain:
449+
// /path/to/theme/idle/ - Sounds for task completion
450+
// /path/to/theme/permission/ - Sounds for permission requests
451+
// /path/to/theme/error/ - Sounds for agent errors
452+
// /path/to/theme/question/ - Sounds for agent questions
453+
//
454+
// If a specific event folder is missing, it falls back to default sounds.
455+
456+
// Path to your custom sound theme directory (absolute path recommended)
361457
"soundThemeDir": "",
458+
459+
// Pick a random sound from the appropriate theme folder for each notification
362460
"randomizeSoundFromTheme": true,
363461

364462
// ============================================================
365463
// PER-PROJECT SOUND SETTINGS
366464
// ============================================================
465+
// Assign a unique notification sound to each project based on its path.
466+
// This helps you distinguish which project is notifying you when working
467+
// on multiple tasks simultaneously.
468+
//
469+
// Note: Requires sounds named 'ding1.mp3' through 'ding6.mp3' in your
470+
// assets/ folder. If disabled, default sound files are used.
471+
472+
// Enable unique sounds per project
367473
"perProjectSounds": false,
474+
475+
// Seed value to change sound assignments (0-999)
368476
"projectSoundSeed": 0,
369477

370478
// General options

0 commit comments

Comments
 (0)