Make sure model is saved in DB for imported chats (or chats with no model saved already)

This commit is contained in:
Brandon Hulston 2024-01-17 02:07:29 -07:00
parent 415777eca2
commit 81bfb97c91

View file

@ -200,8 +200,15 @@
await chatId.set('local');
}
await tick();
}
} else if (chat.chat["models"][0] == "") {
// If model is not saved in DB, then save selectedmodel when message is sent
chat = await updateChatById(localStorage.token, $chatId, {
models: selectedModels
});
await chats.set(await getChatList(localStorage.token));
}
// Reset chat input textarea
prompt = '';
files = [];