add GeneralConfig with Language field to config types
This commit is contained in:
@@ -7,7 +7,13 @@ import (
|
|||||||
"github.com/leonardotrapani/hyprvoice/internal/notify"
|
"github.com/leonardotrapani/hyprvoice/internal/notify"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GeneralConfig holds global settings that apply across the application
|
||||||
|
type GeneralConfig struct {
|
||||||
|
Language string `toml:"language"` // ISO 639-1 code (e.g., en, es, de). Empty for auto-detect.
|
||||||
|
}
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
General GeneralConfig `toml:"general"`
|
||||||
Recording RecordingConfig `toml:"recording"`
|
Recording RecordingConfig `toml:"recording"`
|
||||||
Transcription TranscriptionConfig `toml:"transcription"`
|
Transcription TranscriptionConfig `toml:"transcription"`
|
||||||
Injection InjectionConfig `toml:"injection"`
|
Injection InjectionConfig `toml:"injection"`
|
||||||
|
|||||||
+8
-1
@@ -505,4 +505,11 @@ Started: Sun Feb 1 12:22:47 AM CET 2026
|
|||||||
- Added Language-Model Compatibility section with English-only models table
|
- Added Language-Model Compatibility section with English-only models table
|
||||||
- Documented validation behavior: config-time hard error + runtime fallback with notification
|
- Documented validation behavior: config-time hard error + runtime fallback with notification
|
||||||
- Added example configurations: Local Transcription, Deepgram Streaming, Ultra-Low Latency Streaming
|
- Added example configurations: Local Transcription, Deepgram Streaming, Ultra-Low Latency Streaming
|
||||||
- Typecheck passes
|
- Typecheck passes
|
||||||
|
|
||||||
|
### Task 47: Add GeneralConfig with Language field to config types
|
||||||
|
- Added `GeneralConfig` struct to internal/config/types.go with Language string field
|
||||||
|
- Added `General GeneralConfig` field to Config struct with toml tag 'general'
|
||||||
|
- Language field has ISO 639-1 code comment, empty for auto-detect
|
||||||
|
- TranscriptionConfig.Language kept for backwards compat (will be used as override)
|
||||||
|
- All tests passing, typecheck passes
|
||||||
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
"GeneralConfig has Language string field with toml:'language' tag",
|
"GeneralConfig has Language string field with toml:'language' tag",
|
||||||
"Typecheck passes"
|
"Typecheck passes"
|
||||||
],
|
],
|
||||||
"passes": false
|
"passes": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Update config loading to handle general language",
|
"title": "Update config loading to handle general language",
|
||||||
|
|||||||
Reference in New Issue
Block a user