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:
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user