Save current BZZZ config-ui state before CHORUS branding update
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -550,4 +550,36 @@ func fileExists(filePath string) bool {
|
||||
func GenerateDefaultConfigFile(filePath string) error {
|
||||
config := getDefaultConfig()
|
||||
return SaveConfig(config, filePath)
|
||||
}
|
||||
|
||||
// IsSetupRequired checks if BZZZ needs to be set up (no valid configuration exists)
|
||||
func IsSetupRequired(configPath string) bool {
|
||||
// Check if config file exists
|
||||
if !fileExists(configPath) {
|
||||
return true
|
||||
}
|
||||
|
||||
// Try to load the configuration
|
||||
_, err := LoadConfig(configPath)
|
||||
if err != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
// Configuration exists and is valid
|
||||
return false
|
||||
}
|
||||
|
||||
// IsValidConfiguration checks if a configuration is valid for production use
|
||||
func IsValidConfiguration(config *Config) bool {
|
||||
// Check essential configuration elements
|
||||
if config.Agent.ID == "" {
|
||||
return false
|
||||
}
|
||||
|
||||
if len(config.Agent.Capabilities) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
// Configuration appears valid
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user