mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +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 &&
|
||||||
data.chat.map((chatMessage, index) => (
|
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
|
<ChatMessage
|
||||||
key={`${index}fullHistory`}
|
key={`${index}fullHistory`}
|
||||||
ref={
|
ref={
|
||||||
|
@ -340,18 +352,6 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
||||||
onDeleteMessage={handleDeleteMessage}
|
onDeleteMessage={handleDeleteMessage}
|
||||||
conversationId={props.conversationId}
|
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 &&
|
{props.incomingMessages &&
|
||||||
|
|
Loading…
Reference in a new issue