Fix empty chats not showing in chat manager

1b570bf16f2cf1313cd29073f9f5402f9bb3e913

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +5 -0Ignore whitespace
public/script.js+5 -0
@@ -6816,6 +6816,11 @@ export async function displayPastChats() {
6816 const fileName = chat['file_name'];6816 const fileName = chat['file_name'];
6817 const chatContent = rawChats[fileName];6817 const chatContent = rawChats[fileName];
68186818
6819 // Make sure empty chats are displayed when there is no search query
6820 if (Array.isArray(chatContent) && !chatContent.length && !searchQuery) {
6821 return true;
6822 }
6823
6819 // // Uncomment this to return to old behavior (classical full-substring search).6824 // // Uncomment this to return to old behavior (classical full-substring search).
6820 // return chatContent && Object.values(chatContent).some(message => message?.mes?.toLowerCase()?.includes(searchQuery.toLowerCase()));6825 // return chatContent && Object.values(chatContent).some(message => message?.mes?.toLowerCase()?.includes(searchQuery.toLowerCase()));
68216826