emitAgentWarnings drains and emits any pending toolset warnings as persistent TUI notifications. Failures ("start failed", "list failed") are surfaced so the user can act on them; recoveries are intentionally not emitted — "X is now available" reads as a spurious warning right after the user complet
(a *agent.Agent, events EventSink)
| 1186 | // after the user completes an OAuth dance, and adds no signal for other |
| 1187 | // recoveries either. |
| 1188 | func (r *LocalRuntime) emitAgentWarnings(a *agent.Agent, events EventSink) { |
| 1189 | warnings := a.DrainWarnings() |
| 1190 | if len(warnings) == 0 { |
| 1191 | return |
| 1192 | } |
| 1193 | slog.Warn("Tool setup partially failed; continuing", "agent", a.Name(), "warnings", warnings) |
| 1194 | events.Emit(Warning(formatToolWarning(a, warnings), a.Name())) |
| 1195 | } |
| 1196 | |
| 1197 | func formatToolWarning(a *agent.Agent, warnings []string) string { |
| 1198 | var builder strings.Builder |