Add proper `onToolResult` fallback.

main
cpojer 2026-02-06 09:42:10 +09:00
parent a459e237e8
commit ee1ec3faba
No known key found for this signature in database
GPG Key ID: C29F94A3201118AF
1 changed files with 10 additions and 11 deletions

View File

@ -316,7 +316,16 @@ export async function dispatchReplyFromConfig(params: {
};
return run();
}
: undefined,
: (payload: ReplyPayload) => {
const run = async () => {
if (shouldRouteToOriginating) {
await sendPayloadAsync(payload, undefined, false);
} else {
dispatcher.sendBlockReply(payload);
}
};
return run();
},
onBlockReply: (payload: ReplyPayload, context) => {
const run = async () => {
// Accumulate block text for TTS generation after streaming
@ -343,16 +352,6 @@ 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,
);