Documentation
¶
Overview ¶
Package config provides configuration management for the noidea tool. It handles loading, saving, and validating user configuration settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFloat ¶
ParseFloat parses a string to a float64 with a default value if parsing fails
func SaveConfig ¶
SaveConfig saves the configuration to the default location
func ValidateConfig ¶
ValidateConfig checks the configuration for errors or inconsistencies Returns a list of issues or an empty slice if the config is valid
Types ¶
type Config ¶
type Config struct {
// LLM contains settings for the AI language model integration
LLM struct {
Enabled bool `json:"enabled"`
Provider string `json:"provider"` // "xai", "openai", "deepseek"
APIKey string `json:"api_key"` // API key for the language model provider
Model string `json:"model"` // Model name to use
Temperature float64 `json:"temperature"` // Temperature for AI responses (0.0-1.0)
} `json:"llm"`
// Moai contains settings for the Moai feedback system
Moai struct {
UseLint bool `json:"use_lint"` // Include linting feedback
FacesMode string `json:"faces_mode"` // "random", "sequential", "mood"
Personality string `json:"personality"` // Selected personality
PersonalityFile string `json:"personality_file"` // Custom personality definitions
} `json:"moai"`
}
Config represents the application configuration
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a configuration with default values
func LoadConfig ¶
func LoadConfig() Config
LoadConfig loads the configuration from the default location or environment variables If the config file doesn't exist, it returns the default config