From d27e6d6b7659df64c9ba30f4681c5fab48b0b4eb Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Mon, 16 Mar 2026 13:29:14 -0300 Subject: [PATCH] fix: use __INITIAL_BOT_NAME__ for WS reconnection bot name --- ui/suite/chat/chat.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/suite/chat/chat.html b/ui/suite/chat/chat.html index e73c8f0..9834a00 100644 --- a/ui/suite/chat/chat.html +++ b/ui/suite/chat/chat.html @@ -923,6 +923,9 @@ updateConnectionStatus("connecting"); + // Always get the bot name from window.__INITIAL_BOT_NAME__ to ensure it's correct on reconnection + var botNameForWs = window.__INITIAL_BOT_NAME__ || currentBotName || "default"; + var url = WS_URL + "?session_id=" + @@ -930,7 +933,7 @@ "&user_id=" + currentUserId + "&bot_name=" + - currentBotName; + botNameForWs; console.log("Connecting WebSocket to:", url); ws = new WebSocket(url);