This commit is contained in:
Timothy Jaeryang Baek 2025-07-19 21:20:28 +04:00
parent 6f0def4ee3
commit 699c8073ff

View file

@ -37,7 +37,9 @@
let history = null; let history = null;
let messages = null; let messages = null;
$: loadChatPreview(selectedIdx); $: if (!chatListLoading && chatList) {
loadChatPreview(selectedIdx);
}
const loadChatPreview = async (selectedIdx) => { const loadChatPreview = async (selectedIdx) => {
if (!chatList || chatList.length === 0) { if (!chatList || chatList.length === 0) {
@ -98,6 +100,11 @@
}, 500); }, 500);
} }
selectedChat = null;
messages = null;
history = null;
selectedModels = [''];
if ((chatList ?? []).length === 0) { if ((chatList ?? []).length === 0) {
allChatsLoaded = true; allChatsLoaded = true;
} else { } else {