fix: wire onToolResult callback for verbose tool summaries (#2022)

HOTFIX: Tool summaries were not being sent to chat channels when verbose mode
was enabled. The onToolResult callback was defined in the types but never
wired up in dispatch-from-config.ts.

This adds the missing callback alongside onBlockReply, using the same
dispatcher.sendBlockReply() path to deliver tool summaries to WhatsApp,
Telegram, and other chat channels.

Fixes verbose tool summaries not appearing in WhatsApp despite /verbose on.
This commit is contained in:
adam91holt
2026-02-06 13:37:30 +13:00
committed by GitHub
parent 0a48592475
commit 05b28c147d

View File

@@ -343,6 +343,16 @@ export async function dispatchReplyFromConfig(params: {
};
return run();
},
onToolResult: (payload: ReplyPayload) => {
const run = async () => {
if (shouldRouteToOriginating) {
await sendPayloadAsync(payload, undefined, false);
} else {
dispatcher.sendBlockReply(payload);
}
};
return run();
},
},
cfg,
);