fix(config): stabilize YAML sequence merges by reordering items

This commit is contained in:
hkfires
2025-10-31 15:21:58 +08:00
parent 16be3f0a12
commit 5c65938113
2 changed files with 148 additions and 1 deletions

View File

@@ -116,7 +116,7 @@ func sanitizeStringSlice(in []string) []string {
func geminiKeyStringsFromConfig(cfg *config.Config) []string {
if cfg == nil || len(cfg.GeminiKey) == 0 {
return nil
return []string{}
}
out := make([]string, 0, len(cfg.GeminiKey))
for i := range cfg.GeminiKey {