({ event })
| 494 | |
| 495 | // ── 4. Errors ───────────────────────────────────────────────────── |
| 496 | async onRunErrorEvent({ event }) { |
| 497 | // Don't post a warning if we're the ones aborting the run; the |
| 498 | // `_(interrupted)_` marker on the partial reply is the user-visible |
| 499 | // signal in that case. |
| 500 | if (statusMode) await clearStatus(); |
| 501 | // Close any open native turn stream so the partial reply is committed. |
| 502 | await finalizeTurnStream(); |
| 503 | if (aborted) return; |
| 504 | try { |
| 505 | await client.chat.postMessage({ |
| 506 | channel: target.channel, |
| 507 | thread_ts: target.threadTs, |
| 508 | text: `:warning: Agent error: ${event.message ?? "unknown error"}`, |
| 509 | }); |
| 510 | } catch (err) { |
| 511 | console.error("[slack-renderer] error notice failed:", err); |
| 512 | } |
| 513 | }, |
| 514 | }; |
| 515 | |
| 516 | /** Finalize the native turn stream once (idempotent), attaching feedback if any. */ |
nothing calls this directly
no test coverage detected
searching dependent graphs…