mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Resolve train of thought component needs unique key id error on web app
This commit is contained in:
parent
ca5a6831b6
commit
cb90abc660
1 changed files with 4 additions and 2 deletions
|
@ -45,7 +45,7 @@ interface TrainOfThoughtComponentProps {
|
|||
trainOfThought: string[];
|
||||
lastMessage: boolean;
|
||||
agentColor: string;
|
||||
key: string;
|
||||
keyId: string;
|
||||
completed?: boolean;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ function TrainOfThoughtComponent(props: TrainOfThoughtComponentProps) {
|
|||
return (
|
||||
<div
|
||||
className={`${!collapsed ? styles.trainOfThought + " shadow-sm" : ""}`}
|
||||
key={props.key}
|
||||
key={props.keyId}
|
||||
>
|
||||
{!props.completed && <InlineLoading className="float-right" />}
|
||||
{props.completed &&
|
||||
|
@ -333,6 +333,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
|||
lastMessage={false}
|
||||
agentColor={data?.agent?.color || "orange"}
|
||||
key={`${index}trainOfThought`}
|
||||
keyId={`${index}trainOfThought`}
|
||||
completed={true}
|
||||
/>
|
||||
)}
|
||||
|
@ -369,6 +370,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
|||
lastMessage={index === incompleteIncomingMessageIndex}
|
||||
agentColor={data?.agent?.color || "orange"}
|
||||
key={`${index}trainOfThought`}
|
||||
keyId={`${index}trainOfThought`}
|
||||
completed={message.completed}
|
||||
/>
|
||||
)}
|
||||
|
|
Loading…
Reference in a new issue