fix: send empty init message on WS open to trigger start.bas and load suggestions

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-03-17 15:14:53 -03:00
parent d27e6d6b76
commit ec83d2c149

View file

@ -951,6 +951,16 @@
console.log("WebSocket connected to:", url); console.log("WebSocket connected to:", url);
disconnectNotified = false; disconnectNotified = false;
updateConnectionStatus("connected"); updateConnectionStatus("connected");
// Send empty message to trigger start.bas and load suggestions
ws.send(JSON.stringify({
bot_id: currentBotId,
user_id: currentUserId,
session_id: currentSessionId,
channel: "web",
content: "",
message_type: MessageType.USER,
timestamp: new Date().toISOString(),
}));
}; };
ws.onmessage = function (event) { ws.onmessage = function (event) {