From 0c9e4f06580adf8f577b8db4fb3b802a9e60ef13 Mon Sep 17 00:00:00 2001 From: Cytown Date: Fri, 27 Mar 2026 20:49:51 +0800 Subject: [PATCH] fix for FlexibleStringSlice cause picoclaw start crash issue (#2078) --- pkg/config/config.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 2780fb401..d2ff000a8 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -53,7 +53,13 @@ func (f *FlexibleStringSlice) UnmarshalJSON(data []byte) error { // Try []interface{} to handle mixed types var raw []any if err := json.Unmarshal(data, &raw); err != nil { - return err + var s string + // fail over to compatible to old format string + if err = json.Unmarshal(data, &s); err != nil { + return err + } + *f = []string{s} + return nil } result := make([]string, 0, len(raw))