We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b879679 commit 19aa42eCopy full SHA for 19aa42e
1 file changed
discord-server/bot.js
@@ -328,11 +328,12 @@ client.on('messageCreate', async (message) => {
328
progressReporter.stop();
329
tracer.endPhase();
330
331
- // If stream was interrupted, don't send any response
+ // If stream was interrupted or response is empty, don't send
332
// The /stop command already sent a reply
333
- if (wasInterrupted) {
334
- console.log('🛑 Stream interrupted, skipping response');
335
- tracer.addMetadata('interrupted', true);
+ if (wasInterrupted || !fullResponse || fullResponse.trim() === '') {
+ console.log('🛑 Stream interrupted or empty response, skipping send');
+ tracer.addMetadata('interrupted', wasInterrupted);
336
+ tracer.addMetadata('emptyResponse', !fullResponse || fullResponse.trim() === '');
337
return;
338
}
339
0 commit comments