From 4133e788dff5fc136950924ce2154e9c464a8045 Mon Sep 17 00:00:00 2001 From: Harish Mohan Raj Date: Fri, 12 Jul 2024 10:07:22 +0530 Subject: [PATCH] Preserve formatting in user chat message --- app/src/client/components/ConversationList.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/src/client/components/ConversationList.tsx b/app/src/client/components/ConversationList.tsx index 9d3f176..661adef 100644 --- a/app/src/client/components/ConversationList.tsx +++ b/app/src/client/components/ConversationList.tsx @@ -148,11 +148,24 @@ export default function ConversationsList({ )} - {(idx !== lastConversationIdx || (idx === lastConversationIdx && isUserConversation)) && ( + {idx !== lastConversationIdx && !isUserConversation && (
{conversation.message === '' ? 'Auto reply' : conversation.message}
)} + + {isUserConversation && ( +
+ + {conversation.message === '' + ? 'Auto reply' + : `

${conversation.message.replaceAll( + '\n', + '
' + )}

`} +
+
+ )} )}