Fix empty chats not showing in chat manager
This commit is contained in:
parent
5ad433c576
commit
1b570bf16f
|
@ -6816,6 +6816,11 @@ export async function displayPastChats() {
|
||||||
const fileName = chat['file_name'];
|
const fileName = chat['file_name'];
|
||||||
const chatContent = rawChats[fileName];
|
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).
|
// // Uncomment this to return to old behavior (classical full-substring search).
|
||||||
// return chatContent && Object.values(chatContent).some(message => message?.mes?.toLowerCase()?.includes(searchQuery.toLowerCase()));
|
// return chatContent && Object.values(chatContent).some(message => message?.mes?.toLowerCase()?.includes(searchQuery.toLowerCase()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue