(messages []map[string]any)
| 48 | } |
| 49 | cleaned[key] = value |
| 50 | } |
| 51 | out = append(out, cleaned) |
| 52 | } |
| 53 | return out |
| 54 | } |
| 55 | |
| 56 | func isSystemHintBlock(block map[string]any) bool { |
| 57 | if stringFromAny(block["type"]) != "text" { |
| 58 | return false |
| 59 | } |
| 60 | return strings.Contains(stringFromAny(block["text"]), "<system_hint>") |
| 61 | } |
| 62 | |
| 63 | func isToolResultCarrierMessage(message map[string]any) bool { |
| 64 | if stringFromAny(message["role"]) != "user" { |
| 65 | return false |
| 66 | } |
no outgoing calls