Resolve an Approve/Edit/Reject tap on a presented artifact card.
(t: Transport, chatId: string, key: string, data: string)
| 190 | artifact: card => { turnCard = card; }, // held until the stream finishes, then rendered below |
| 191 | }; |
| 192 | |
| 193 | try { |
| 194 | if (t.typing) await t.typing(chatId).catch(() => {}); |
| 195 | await this.opts.agent.runTurn(key, text, sink, ac.signal); |
| 196 | } catch (e: any) { |
| 197 | const msg = ac.signal.aborted ? '🛑 Stopped.' : `⚠️ ${e?.message ?? String(e)}`; |
| 198 | await pump.finish().catch(() => {}); |
| 199 | await t.send(chatId, msg).catch(() => {}); |
| 200 | clearInterval(drainTimer); |