fix(config): correct chat model config key

Update the Viper default key for the chat command from "commands.chat" to "commands.chat.model" to match expected structure.

Remove redundant comment in GetTimeout function for cleaner code.
This commit is contained in:
Gregory Gauthier 2026-03-04 11:09:34 +00:00
parent 6eeb919013
commit af7270967c

View File

@ -36,7 +36,7 @@ func Load() {
viper.SetDefault("commands.prdescribe.model", "grok-4") viper.SetDefault("commands.prdescribe.model", "grok-4")
viper.SetDefault("commands.review.model", "grok-4") viper.SetDefault("commands.review.model", "grok-4")
viper.SetDefault("commands.docs.model", "grok-4") viper.SetDefault("commands.docs.model", "grok-4")
viper.SetDefault("commands.chat", "grok-4-1") viper.SetDefault("commands.chat.model", "grok-4-1")
viper.SetDefault("commands.chat-agent.model", "grok-4-1-fast-non-reasoning") viper.SetDefault("commands.chat-agent.model", "grok-4-1-fast-non-reasoning")
// Config file is optional, so we ignore read errors // Config file is optional, so we ignore read errors
_ = viper.ReadInConfig() _ = viper.ReadInConfig()
@ -62,7 +62,7 @@ func GetTemperature() float64 {
func GetTimeout() int { func GetTimeout() int {
timeout := viper.GetInt("timeout") timeout := viper.GetInt("timeout")
if timeout <= 0 { if timeout <= 0 {
return 60 // Default 60 seconds return 60
} }
return timeout return timeout
} }