(messages []map[string]any)
| 325 | } |
| 326 | |
| 327 | func copyMessages(messages []map[string]any) []map[string]any { |
| 328 | out := make([]map[string]any, len(messages)) |
| 329 | for i, msg := range messages { |
| 330 | if msg == nil { |
| 331 | continue |
| 332 | } |
| 333 | cp := copyMap(msg) |
| 334 | if blocks := contentBlocks(msg["content"]); blocks != nil { |
| 335 | cp["content"] = append([]map[string]any{}, blocks...) |
| 336 | } |
| 337 | out[i] = cp |
| 338 | } |
| 339 | return out |
| 340 | } |
| 341 | |
| 342 | func toolUseIDsInMessage(msg map[string]any) []string { |
| 343 | var ids []string |
no test coverage detected