mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20:15 +01:00
trying different markdown library for proper list styling
This commit is contained in:
parent
34ebd97c9d
commit
78c9f3dc74
8 changed files with 4352 additions and 132 deletions
|
|
@ -36,34 +36,63 @@ export default function TextChat({ messages }) {
|
|||
const messageHandler = (data) => {
|
||||
dispatch(setMessages([...messages, currentMsg, { sender: model, text: data }]));
|
||||
};
|
||||
const convoHandler = (data) => {
|
||||
console.log('in convo handler');
|
||||
if (model !== 'bingai' && convo.conversationId === null && convo.parentMessageId === null) {
|
||||
const { title, conversationId, id } = data;
|
||||
dispatch(
|
||||
setConversation({
|
||||
title,
|
||||
conversationId,
|
||||
parentMessageId: id,
|
||||
conversationSignature: null,
|
||||
clientId: null,
|
||||
invocationId: null
|
||||
})
|
||||
);
|
||||
} else if (model === 'bingai' && convo.conversationId === null && convo.invocationId === null) {
|
||||
const { title, conversationSignature, clientId, conversationId, invocationId } = data;
|
||||
dispatch(
|
||||
setConversation({
|
||||
title,
|
||||
conversationSignature,
|
||||
clientId,
|
||||
conversationId,
|
||||
invocationId,
|
||||
parentMessageId: null
|
||||
})
|
||||
);
|
||||
}
|
||||
// const convoHandler = (data) => {
|
||||
// dispatch(
|
||||
// setMessages([...messages, { sender: model, text: data.text || data.response }])
|
||||
// );
|
||||
|
||||
// if (
|
||||
// model !== 'bingai' &&
|
||||
// convo.conversationId === null &&
|
||||
// convo.parentMessageId === null
|
||||
// ) {
|
||||
// const { title, conversationId, id } = data;
|
||||
// dispatch(
|
||||
// setConversation({
|
||||
// title,
|
||||
// conversationId,
|
||||
// parentMessageId: id,
|
||||
// conversationSignature: null,
|
||||
// clientId: null,
|
||||
// invocationId: null
|
||||
// })
|
||||
// );
|
||||
// } else if (
|
||||
// model === 'bingai' &&
|
||||
// convo.conversationId === null &&
|
||||
// convo.invocationId === null
|
||||
// ) {
|
||||
// const { title, conversationSignature, clientId, conversationId, invocationId } = data;
|
||||
// dispatch(
|
||||
// setConversation({
|
||||
// title,
|
||||
// conversationSignature,
|
||||
// clientId,
|
||||
// conversationId,
|
||||
// invocationId,
|
||||
// parentMessageId: null
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
|
||||
// dispatch(setSubmitState(false));
|
||||
// };
|
||||
|
||||
const convoHandler = (data) => {
|
||||
const { conversationId, id, invocationId, text } = data;
|
||||
const conversationData = {
|
||||
title: data.title,
|
||||
conversationId,
|
||||
parentMessageId:
|
||||
model !== 'bingai' && !convo.conversationId && !convo.parentMessageId ? id : null,
|
||||
conversationSignature:
|
||||
model === 'bingai' && !convo.conversationId ? data.conversationSignature : null,
|
||||
clientId: model === 'bingai' && !convo.conversationId ? data.clientId : null,
|
||||
// invocationId: model === 'bingai' && !convo.conversationId ? data.invocationId : null
|
||||
invocationId: invocationId ? invocationId : null
|
||||
};
|
||||
dispatch(setMessages([...messages, currentMsg, { sender: model, text: text || data.response }]));
|
||||
dispatch(setConversation(conversationData));
|
||||
dispatch(setSubmitState(false));
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue