notifyMaxIterations fires both notification(level=warning) and on_max_iterations. Same rationale as [notifyError]: the two are always emitted together when the iteration limit is reached.
(ctx context.Context, a *agent.Agent, sessionID, message string)
| 257 | // on_max_iterations. Same rationale as [notifyError]: the two are |
| 258 | // always emitted together when the iteration limit is reached. |
| 259 | func (r *LocalRuntime) notifyMaxIterations(ctx context.Context, a *agent.Agent, sessionID, message string) { |
| 260 | r.notify(ctx, a, hooks.EventNotification, sessionID, "warning", message) |
| 261 | r.notify(ctx, a, hooks.EventOnMaxIterations, sessionID, "warning", message) |
| 262 | } |
| 263 | |
| 264 | // notify is the shared dispatch path for the (level, message)-shaped |
| 265 | // hook events: notification, on_error, on_max_iterations. They all |
no test coverage detected