2023-02-21 21:31:36 -05:00
|
|
|
import React from 'react';
|
2023-02-06 13:27:28 -05:00
|
|
|
import Conversation from './Conversation';
|
|
|
|
|
|
2023-03-18 14:28:10 -04:00
|
|
|
export default function Conversations({ conversations, conversationId, moveToTop }) {
|
2023-02-11 11:37:20 -05:00
|
|
|
|
2023-02-06 13:27:28 -05:00
|
|
|
return (
|
2023-02-14 16:15:45 -05:00
|
|
|
<>
|
|
|
|
|
{conversations &&
|
|
|
|
|
conversations.length > 0 &&
|
2023-02-21 21:31:36 -05:00
|
|
|
conversations.map((convo) => {
|
2023-02-20 21:16:40 -05:00
|
|
|
const bingData = convo.conversationSignature
|
|
|
|
|
? {
|
2023-03-08 19:47:23 -05:00
|
|
|
jailbreakConversationId: convo.jailbreakConversationId,
|
2023-02-20 21:16:40 -05:00
|
|
|
conversationSignature: convo.conversationSignature,
|
2023-03-08 22:30:29 -05:00
|
|
|
parentMessageId: convo.parentMessageId || null,
|
2023-02-20 21:16:40 -05:00
|
|
|
clientId: convo.clientId,
|
|
|
|
|
invocationId: convo.invocationId
|
|
|
|
|
}
|
|
|
|
|
: null;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Conversation
|
|
|
|
|
key={convo.conversationId}
|
|
|
|
|
id={convo.conversationId}
|
2023-03-13 13:11:53 +08:00
|
|
|
model={convo.model}
|
2023-02-20 21:16:40 -05:00
|
|
|
parentMessageId={convo.parentMessageId}
|
|
|
|
|
title={convo.title}
|
|
|
|
|
conversationId={conversationId}
|
2023-03-04 17:39:06 -05:00
|
|
|
chatGptLabel={convo.chatGptLabel}
|
|
|
|
|
promptPrefix={convo.promptPrefix}
|
2023-02-20 21:16:40 -05:00
|
|
|
bingData={bingData}
|
2023-03-15 04:05:14 +08:00
|
|
|
retainView={moveToTop}
|
2023-02-20 21:16:40 -05:00
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2023-02-14 16:15:45 -05:00
|
|
|
</>
|
2023-02-06 13:27:28 -05:00
|
|
|
);
|
|
|
|
|
}
|