diff --git a/apps/ui/src/services/chat/useCreateChatMessageService.ts b/apps/ui/src/services/chat/useCreateChatMessageService.ts index 4c1b556b..2f186b43 100644 --- a/apps/ui/src/services/chat/useCreateChatMessageService.ts +++ b/apps/ui/src/services/chat/useCreateChatMessageService.ts @@ -95,6 +95,7 @@ export const useCreateChatMessageService = ({ const token = new TextDecoder('utf-8').decode(value) aiMessage.message.data.content += token + aiMessage.message.data.content = aiMessage.message.data.content.replace(/\\n/g, '\n') upsertChatMessageInCache(aiMessage, { agentId, diff --git a/apps/ui/src/services/chat/useCreateClientChatMessage.tsx b/apps/ui/src/services/chat/useCreateClientChatMessage.tsx index fd28e387..0eb8e493 100644 --- a/apps/ui/src/services/chat/useCreateClientChatMessage.tsx +++ b/apps/ui/src/services/chat/useCreateClientChatMessage.tsx @@ -91,6 +91,7 @@ export const useCreateClientChatMessageService = ({ const token = new TextDecoder('utf-8').decode(value) aiMessage.message.data.content += token + aiMessage.message.data.content = aiMessage.message.data.content.replace(/\\n/g, '\n') upsertChatMessageInCache(aiMessage, { chatId: chat_id,