mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Put train of thought ui before Khoj response on web app
This commit is contained in:
@@ -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 &&
|
||||||
|
|||||||
Reference in New Issue
Block a user