mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
fix: convo resets, sets new Convo
This commit is contained in:
parent
918f2fecb6
commit
4e91437049
1 changed files with 2 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ import TextareaAutosize from 'react-textarea-autosize';
|
|||
import createPayload from '~/utils/createPayload';
|
||||
import resetConvo from '~/utils/resetConvo';
|
||||
import { useSelector, useDispatch } from 'react-redux';
|
||||
import { setConversation, setError, refreshConversation } from '~/store/convoSlice';
|
||||
import { setConversation, setNewConvo, setError, refreshConversation } from '~/store/convoSlice';
|
||||
import { setMessages } from '~/store/messageSlice';
|
||||
import { setSubmitState, setSubmission } from '~/store/submitSlice';
|
||||
import { setText } from '~/store/textSlice';
|
||||
|
|
@ -159,6 +159,7 @@ export default function TextChat({ messages }) {
|
|||
let parentMessageId = convo.parentMessageId || '00000000-0000-0000-0000-000000000000';
|
||||
if (resetConvo(messages, sender)) {
|
||||
parentMessageId = '00000000-0000-0000-0000-000000000000';
|
||||
dispatch(setNewConvo());
|
||||
}
|
||||
const currentMsg = { sender: 'User', text: message, current: true, isCreatedByUser: true, parentMessageId , messageId: fakeMessageId };
|
||||
const initialResponse = { sender, text: '', parentMessageId: fakeMessageId, submitting: true };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue