fix: persist stripped openclaw artifact maps

This commit is contained in:
Haitao Pan 2026-05-06 13:29:53 +08:00
parent 25934c7d74
commit 3f19c38f36

View File

@ -182,9 +182,14 @@ func stripOpenClawArtifactInlineContent(result map[string]any) {
for _, key := range []string{"artifacts", "files", "attachments"} {
switch items := result[key].(type) {
case []any:
for _, item := range items {
stripOpenClawArtifactMapInlineContent(shared.AsMap(item))
for index, item := range items {
mapped := shared.AsMap(item)
stripOpenClawArtifactMapInlineContent(mapped)
if mapped != nil {
items[index] = mapped
}
}
result[key] = items
case []map[string]any:
for _, item := range items {
stripOpenClawArtifactMapInlineContent(item)