mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-14 06:28:52 +01:00
fix: reset submission when convo clears
This commit is contained in:
parent
23de688bf3
commit
f1aabfa543
8 changed files with 13 additions and 3 deletions
|
|
@ -13,6 +13,7 @@ export default function ClearConvos() {
|
|||
const { trigger } = manualSWR(`/api/convos/clear`, 'post', () => {
|
||||
dispatch(setMessages([]));
|
||||
dispatch(setNewConvo());
|
||||
dispatch(setSubmission({}));
|
||||
mutate(`/api/convos`);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export default function MobileNav({ setNavVisible }) {
|
|||
dispatch(setText(''));
|
||||
dispatch(setMessages([]));
|
||||
dispatch(setNewConvo());
|
||||
dispatch(setSubmission({}));
|
||||
}
|
||||
|
||||
const title = convos?.find(element => element?.conversationId == conversationId)?.title || 'New Chat';
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
|||
import { useDispatch } from 'react-redux';
|
||||
import { setNewConvo } from '~/store/convoSlice';
|
||||
import { setMessages } from '~/store/messageSlice';
|
||||
import { setSubmission } from '~/store/submitSlice';
|
||||
import { setText } from '~/store/textSlice';
|
||||
|
||||
export default function NewChat() {
|
||||
|
|
@ -11,6 +12,7 @@ export default function NewChat() {
|
|||
dispatch(setText(''));
|
||||
dispatch(setMessages([]));
|
||||
dispatch(setNewConvo());
|
||||
dispatch(setSubmission({}));
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue