mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-25 03:36:12 +01:00
clear all convos in progress, async code refactored in debugging warning
This commit is contained in:
parent
053368646d
commit
511ac948b4
10 changed files with 84 additions and 65 deletions
|
|
@ -11,17 +11,14 @@ export default function Conversation({ id, parentMessageId, title = 'New convers
|
|||
const conversationId = useSelector((state) => state.convo.conversationId);
|
||||
const { trigger, isMutating } = manualSWR(
|
||||
`http://localhost:3050/messages/${id}`,
|
||||
'get',
|
||||
(res) => dispatch(setMessages(res))
|
||||
'get'
|
||||
);
|
||||
|
||||
const clickHandler = () => {
|
||||
if (conversationId === id) {
|
||||
return;
|
||||
}
|
||||
const clickHandler = async () => {
|
||||
|
||||
dispatch(setConversation({ conversationId: id, parentMessageId }));
|
||||
trigger();
|
||||
const data = await trigger();
|
||||
dispatch(setMessages(data));
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue