Refactored, added comprehensive testing.
All checks were successful
Release / release (push) Successful in 3m17s

This commit is contained in:
Jay
2025-10-26 23:23:43 -04:00
parent ec32b75267
commit 1936f055e2
61 changed files with 4678 additions and 769 deletions

17
config/validate.go Normal file
View File

@@ -0,0 +1,17 @@
package config
import (
"fmt"
)
func validateConfig(cfg ConfigData) error {
if cfg.APIKey == "" {
return fmt.Errorf("API key required: use --key, --key-file, AICLI_API_KEY, AICLI_API_KEY_FILE, or key_file in config")
}
if cfg.Protocol != ProtocolOpenAI && cfg.Protocol != ProtocolOllama {
return fmt.Errorf("invalid protocol: must be openai or ollama")
}
return nil
}