From fc162ab23698c47958f00694f24b8ebb39f67a05 Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com> Date: Tue, 11 Nov 2025 09:49:01 -0800 Subject: [PATCH] fix(deployed-chat): fix page crash on chat stream completion (#1892) --- .../app/chat/components/message/message.tsx | 107 +++++++++--------- 1 file changed, 52 insertions(+), 55 deletions(-) diff --git a/apps/sim/app/chat/components/message/message.tsx b/apps/sim/app/chat/components/message/message.tsx index cbe1a7792b..7147688205 100644 --- a/apps/sim/app/chat/components/message/message.tsx +++ b/apps/sim/app/chat/components/message/message.tsx @@ -39,9 +39,8 @@ export const ClientChatMessage = memo( // we can use the content directly without parsing const cleanTextContent = message.content - // For user messages (on the right) - if (message.type === 'user') { - return ( + const content = + message.type === 'user' ? (
- {JSON.stringify(cleanTextContent, null, 2)}
-
- ) : (
-
+ {JSON.stringify(cleanTextContent, null, 2)}
+
+ ) : (
+