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() {
68166816 const fileName = chat['file_name'];
68176817 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+
68196824 // // Uncomment this to return to old behavior (classical full-substring search).
68206825 // return chatContent && Object.values(chatContent).some(message => message?.mes?.toLowerCase()?.includes(searchQuery.toLowerCase()));
68216826