mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
model menu won't close on model deletion
This commit is contained in:
parent
0ba92c4c03
commit
a286f027c8
4 changed files with 4 additions and 29 deletions
|
|
@ -39,15 +39,6 @@ export default function ModelDialog({ mutate, setModelSave, handleSaveState }) {
|
||||||
handleSaveState(chatGptLabel.toLowerCase());
|
handleSaveState(chatGptLabel.toLowerCase());
|
||||||
// Set new conversation
|
// Set new conversation
|
||||||
dispatch(setNewConvo());
|
dispatch(setNewConvo());
|
||||||
// dispatch(
|
|
||||||
// setConversation({
|
|
||||||
// title: 'New Chat',
|
|
||||||
// error: false,
|
|
||||||
// conversationId: null,
|
|
||||||
// parentMessageId: null
|
|
||||||
// })
|
|
||||||
// );
|
|
||||||
// dispatch(setDisabled(false));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveHandler = (e) => {
|
const saveHandler = (e) => {
|
||||||
|
|
|
||||||
|
|
@ -68,23 +68,15 @@ export default function ModelMenu() {
|
||||||
dispatch(setCustomGpt({ chatGptLabel, promptPrefix }));
|
dispatch(setCustomGpt({ chatGptLabel, promptPrefix }));
|
||||||
dispatch(setModel('chatgptCustom'));
|
dispatch(setModel('chatgptCustom'));
|
||||||
dispatch(setCustomModel(value));
|
dispatch(setCustomModel(value));
|
||||||
if (custom) {
|
// if (custom) {
|
||||||
setMenuOpen((prevOpen) => !prevOpen);
|
// setMenuOpen((prevOpen) => !prevOpen);
|
||||||
}
|
// }
|
||||||
} else if (!modelMap[value]) {
|
} else if (!modelMap[value]) {
|
||||||
dispatch(setCustomModel(null));
|
dispatch(setCustomModel(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set new conversation
|
// Set new conversation
|
||||||
dispatch(setNewConvo());
|
dispatch(setNewConvo());
|
||||||
// dispatch(
|
|
||||||
// setConversation({
|
|
||||||
// title: 'New Chat',
|
|
||||||
// error: false,
|
|
||||||
// conversationId: null,
|
|
||||||
// parentMessageId: null
|
|
||||||
// })
|
|
||||||
// );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onOpenChange = (open) => {
|
const onOpenChange = (open) => {
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,6 @@ export default function ClearConvos() {
|
||||||
const { trigger } = manualSWR(`http://localhost:3080/api/convos/clear`, 'post', () => {
|
const { trigger } = manualSWR(`http://localhost:3080/api/convos/clear`, 'post', () => {
|
||||||
dispatch(setMessages([]));
|
dispatch(setMessages([]));
|
||||||
dispatch(setNewConvo());
|
dispatch(setNewConvo());
|
||||||
// dispatch(
|
|
||||||
// setConversation({
|
|
||||||
// error: false,
|
|
||||||
// title: 'New chat',
|
|
||||||
// conversationId: null,
|
|
||||||
// parentMessageId: null
|
|
||||||
// })
|
|
||||||
// );
|
|
||||||
mutate(`http://localhost:3080/api/convos`);
|
mutate(`http://localhost:3080/api/convos`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ module.exports = {
|
||||||
* to use its built-in optimizations accordingly. default is production
|
* to use its built-in optimizations accordingly. default is production
|
||||||
*/
|
*/
|
||||||
mode: 'development',
|
mode: 'development',
|
||||||
cache: false,
|
// cache: false,
|
||||||
/** "entry"
|
/** "entry"
|
||||||
* the entry point
|
* the entry point
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue