diff --git a/public/script.js b/public/script.js index 1dd8599c2..08b6aeee0 100644 --- a/public/script.js +++ b/public/script.js @@ -6816,6 +6816,11 @@ export async function displayPastChats() { const fileName = chat['file_name']; const chatContent = rawChats[fileName]; + // Make sure empty chats are displayed when there is no search query + if (Array.isArray(chatContent) && !chatContent.length && !searchQuery) { + return true; + } + // // Uncomment this to return to old behavior (classical full-substring search). // return chatContent && Object.values(chatContent).some(message => message?.mes?.toLowerCase()?.includes(searchQuery.toLowerCase()));