From 9ab5ead3ca4e756b16e35f5df21d53a272ea6639 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Wed, 9 Apr 2025 09:01:55 +0530 Subject: [PATCH] Set key for chatMessage parent to get UX efficiently updated by react By fixing the no key prop in ChatHistory error on web app --- .../web/app/components/chatHistory/chatHistory.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/interface/web/app/components/chatHistory/chatHistory.tsx b/src/interface/web/app/components/chatHistory/chatHistory.tsx index c1cd923e..41989eb9 100644 --- a/src/interface/web/app/components/chatHistory/chatHistory.tsx +++ b/src/interface/web/app/components/chatHistory/chatHistory.tsx @@ -28,10 +28,6 @@ interface ChatResponse { response: ChatHistoryData; } -interface ChatHistory { - [key: string]: string; -} - interface ChatHistoryProps { conversationId: string; setTitle: (title: string) => void; @@ -368,7 +364,7 @@ export default function ChatHistory(props: ChatHistoryProps) { {data && data.chat && data.chat.map((chatMessage, index) => ( - <> + {chatMessage.trainOfThought && chatMessage.by === "khoj" && ( - + ))} {props.incomingMessages && props.incomingMessages.map((message, index) => {