Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

Update message handling in chatUtils to append final response below previous message

Salman-Ahamed414e5931032f
diff --git a/packages/app/src/react/features/ai-chat/utils/index.ts b/packages/app/src/react/features/ai-chat/utils/index.ts
index cb24418f..25397731 100644
--- a/packages/app/src/react/features/ai-chat/utils/index.ts
+++ b/packages/app/src/react/features/ai-chat/utils/index.ts
@@ -379,7 +379,7 @@ export const chatUtils = {
// Handle final content transition - only when we're actually getting content
if (messageState === ('debug' as MessageState)) {
handleMessageTransition('final');
- message = ''; // Start fresh for final content
+ message += message.length > 0 ? '\n' + jsonObject.content : jsonObject.content; // Final response will begin below previous message
}
// Stop all thinking messages when content starts arriving