diff --git a/src/bot/orchestrator.ts b/src/bot/orchestrator.ts index f2a1b43..44c93a2 100644 --- a/src/bot/orchestrator.ts +++ b/src/bot/orchestrator.ts @@ -1376,9 +1376,22 @@ export class BotOrchestrator { continue; } try { - await this._chatProcedure.sendChatMessage(text); + const sent = await this._chatProcedure.sendChatMessage(text); + if (!sent) { + this._logger.warn('Chat message not sent - chat input not found (panel may be closed)'); + this._sendToGateway({ + type: 'chatSendFailed', + sessionId: this._sessionId, + error: { reason: 'chat_input_not_found', text: text.substring(0, 200) }, + }); + } } catch (chatErr) { this._logger.error(`Failed to send chat message to meeting: ${chatErr}`); + this._sendToGateway({ + type: 'chatSendFailed', + sessionId: this._sessionId, + error: { reason: 'exception', message: String(chatErr).substring(0, 200), text: text.substring(0, 200) }, + }); } } this._chatQueueProcessing = false;