From bc35122c9b7e6a8e2c086bef6b1df4b415daea9e Mon Sep 17 00:00:00 2001 From: Cytown Date: Fri, 27 Mar 2026 11:59:22 +0800 Subject: [PATCH] fix for FlexibleStringSlice cause picoclaw start crash issue --- 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))