Skip to content

Commit 699c807

Browse files
committed
refac
1 parent 6f0def4 commit 699c807

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/lib/components/layout/SearchModal.svelte‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
let history = null;
3838
let messages = null;
3939
40-
$: loadChatPreview(selectedIdx);
40+
$: if (!chatListLoading && chatList) {
41+
loadChatPreview(selectedIdx);
42+
}
4143
4244
const loadChatPreview = async (selectedIdx) => {
4345
if (!chatList || chatList.length === 0) {
@@ -98,6 +100,11 @@
98100
}, 500);
99101
}
100102
103+
selectedChat = null;
104+
messages = null;
105+
history = null;
106+
selectedModels = [''];
107+
101108
if ((chatList ?? []).length === 0) {
102109
allChatsLoaded = true;
103110
} else {

0 commit comments

Comments
 (0)