mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
add new reducer to ensure conversations are renewed on model change
This commit is contained in:
parent
30936573ac
commit
0ba92c4c03
7 changed files with 53 additions and 24 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import { useSelector, useDispatch } from 'react-redux';
|
||||
import { setModel, setDisabled, setCustomGpt, setCustomModel } from '~/store/submitSlice';
|
||||
import { setConversation } from '~/store/convoSlice';
|
||||
import { setNewConvo } from '~/store/convoSlice';
|
||||
import ModelDialog from './ModelDialog';
|
||||
import MenuItems from './MenuItems';
|
||||
import manualSWR from '~/utils/fetchers';
|
||||
|
|
@ -76,14 +76,15 @@ export default function ModelMenu() {
|
|||
}
|
||||
|
||||
// Set new conversation
|
||||
dispatch(
|
||||
setConversation({
|
||||
title: 'New Chat',
|
||||
error: false,
|
||||
conversationId: null,
|
||||
parentMessageId: null
|
||||
})
|
||||
);
|
||||
dispatch(setNewConvo());
|
||||
// dispatch(
|
||||
// setConversation({
|
||||
// title: 'New Chat',
|
||||
// error: false,
|
||||
// conversationId: null,
|
||||
// parentMessageId: null
|
||||
// })
|
||||
// );
|
||||
};
|
||||
|
||||
const onOpenChange = (open) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue