MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / handleCardAction

Method handleCardAction

src/bot/gateway.ts:192–197  ·  view source on GitHub ↗

Resolve an Approve/Edit/Reject tap on a presented artifact card.

(t: Transport, chatId: string, key: string, data: string)

Source from the content-addressed store, hash-verified

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);

Callers 1

onMessageMethod · 0.95

Calls 3

deleteMethod · 0.80
sendMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected