()
| 226 | defer e.mu.Unlock() |
| 227 | var results []map[string]any |
| 228 | for _, tid := range e.toolOrder { |
| 229 | slot := e.slots[tid] |
| 230 | if slot == nil || slot.State == ToolStateYielded { |
| 231 | continue |
| 232 | } |
| 233 | if slot.Result != nil { |
| 234 | results = append(results, slot.Result) |
| 235 | } |
| 236 | } |
| 237 | if len(results) > 1 && totalToolResultContentChars(results) > e.Config.MaxMessageToolResultsChars { |
| 238 | return coretools.ApplyAggregateResultBudget(results, e.Config.MaxMessageToolResultsChars) |
| 239 | } |
| 240 | return results |
no outgoing calls
no test coverage detected