Merge pull request #25 from kujtimiihoxha/cleanup-logs-status

Cleanup Logs and Status
This commit is contained in:
Kujtim Hoxha 2025-04-09 19:19:45 +02:00 committed by GitHub
commit 2af1bbb828
25 changed files with 616 additions and 333 deletions

View file

@ -70,6 +70,8 @@ type Config struct {
LSP map[string]LSPConfig `json:"lsp,omitempty"`
Model *Model `json:"model,omitempty"`
Debug bool `json:"debug,omitempty"`
}
var cfg *Config
@ -95,8 +97,10 @@ func Load(debug bool) error {
// Add defaults
viper.SetDefault("data.directory", defaultDataDirectory)
if debug {
viper.SetDefault("debug", true)
viper.Set("log.level", "debug")
} else {
viper.SetDefault("debug", false)
viper.SetDefault("log.level", defaultLogLevel)
}