mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 13:22:12 +00:00
Resolve train of thought component needs unique key id error on web app
This commit is contained in:
@@ -45,7 +45,7 @@ interface TrainOfThoughtComponentProps {
|
|||||||
trainOfThought: string[];
|
trainOfThought: string[];
|
||||||
lastMessage: boolean;
|
lastMessage: boolean;
|
||||||
agentColor: string;
|
agentColor: string;
|
||||||
key: string;
|
keyId: string;
|
||||||
completed?: boolean;
|
completed?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ function TrainOfThoughtComponent(props: TrainOfThoughtComponentProps) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`${!collapsed ? styles.trainOfThought + " shadow-sm" : ""}`}
|
className={`${!collapsed ? styles.trainOfThought + " shadow-sm" : ""}`}
|
||||||
key={props.key}
|
key={props.keyId}
|
||||||
>
|
>
|
||||||
{!props.completed && <InlineLoading className="float-right" />}
|
{!props.completed && <InlineLoading className="float-right" />}
|
||||||
{props.completed &&
|
{props.completed &&
|
||||||
@@ -333,6 +333,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
|||||||
lastMessage={false}
|
lastMessage={false}
|
||||||
agentColor={data?.agent?.color || "orange"}
|
agentColor={data?.agent?.color || "orange"}
|
||||||
key={`${index}trainOfThought`}
|
key={`${index}trainOfThought`}
|
||||||
|
keyId={`${index}trainOfThought`}
|
||||||
completed={true}
|
completed={true}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -369,6 +370,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
|||||||
lastMessage={index === incompleteIncomingMessageIndex}
|
lastMessage={index === incompleteIncomingMessageIndex}
|
||||||
agentColor={data?.agent?.color || "orange"}
|
agentColor={data?.agent?.color || "orange"}
|
||||||
key={`${index}trainOfThought`}
|
key={`${index}trainOfThought`}
|
||||||
|
keyId={`${index}trainOfThought`}
|
||||||
completed={message.completed}
|
completed={message.completed}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user