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:
anthonyrawlins
2025-08-19 00:19:00 +10:00
parent 6a6a49b7b1
commit c177363a19
16410 changed files with 1789161 additions and 230 deletions

View File

@@ -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
}