mirror of https://github.com/openclaw/openclaw.git
Add proper `onToolResult` fallback.
This commit is contained in:
parent
a459e237e8
commit
ee1ec3faba
|
|
@ -316,7 +316,16 @@ export async function dispatchReplyFromConfig(params: {
|
||||||
};
|
};
|
||||||
return run();
|
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) => {
|
onBlockReply: (payload: ReplyPayload, context) => {
|
||||||
const run = async () => {
|
const run = async () => {
|
||||||
// Accumulate block text for TTS generation after streaming
|
// Accumulate block text for TTS generation after streaming
|
||||||
|
|
@ -343,16 +352,6 @@ export async function dispatchReplyFromConfig(params: {
|
||||||
};
|
};
|
||||||
return run();
|
return run();
|
||||||
},
|
},
|
||||||
onToolResult: (payload: ReplyPayload) => {
|
|
||||||
const run = async () => {
|
|
||||||
if (shouldRouteToOriginating) {
|
|
||||||
await sendPayloadAsync(payload, undefined, false);
|
|
||||||
} else {
|
|
||||||
dispatcher.sendBlockReply(payload);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return run();
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
cfg,
|
cfg,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue