LibreChat/client/src/components/Conversations/index.jsx

39 lines
1.2 KiB
React
Raw Normal View History

import React from 'react';
2023-02-06 13:27:28 -05:00
import Conversation from './Conversation';
export default function Conversations({ conversations, conversationId, moveToTop }) {
2023-02-06 13:27:28 -05:00
return (
<>
{conversations &&
conversations.length > 0 &&
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,
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}
model={convo.model}
2023-02-20 21:16:40 -05:00
parentMessageId={convo.parentMessageId}
title={convo.title}
conversationId={conversationId}
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-06 13:27:28 -05:00
);
}