mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Put train of thought ui before Khoj response on web app
This commit is contained in:
parent
e8e6ead39f
commit
e17dc9f7b5
1 changed files with 12 additions and 12 deletions
|
@ -318,6 +318,18 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
|||
data.chat &&
|
||||
data.chat.map((chatMessage, index) => (
|
||||
<>
|
||||
{chatMessage.trainOfThought && chatMessage.by === "khoj" && (
|
||||
<TrainOfThoughtComponent
|
||||
trainOfThought={chatMessage.trainOfThought?.map(
|
||||
(train) => train.data,
|
||||
)}
|
||||
lastMessage={false}
|
||||
agentColor={data?.agent?.color || "orange"}
|
||||
key={`${index}trainOfThought`}
|
||||
keyId={`${index}trainOfThought`}
|
||||
completed={true}
|
||||
/>
|
||||
)}
|
||||
<ChatMessage
|
||||
key={`${index}fullHistory`}
|
||||
ref={
|
||||
|
@ -340,18 +352,6 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
|||
onDeleteMessage={handleDeleteMessage}
|
||||
conversationId={props.conversationId}
|
||||
/>
|
||||
{chatMessage.trainOfThought && chatMessage.by === "khoj" && (
|
||||
<TrainOfThoughtComponent
|
||||
trainOfThought={chatMessage.trainOfThought?.map(
|
||||
(train) => train.data,
|
||||
)}
|
||||
lastMessage={false}
|
||||
agentColor={data?.agent?.color || "orange"}
|
||||
key={`${index}trainOfThought`}
|
||||
keyId={`${index}trainOfThought`}
|
||||
completed={true}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
))}
|
||||
{props.incomingMessages &&
|
||||
|
|
Loading…
Reference in a new issue