This commit is contained in:
Timothy J. Baek committed 2024-08-04 16:36:44 +02:00
1 parent 4441338574
commit a2f9f7c975
6 files changed
+87 -72

No files matched your search

+8 -1
View File
@@ -1,7 +1,7 @@
import { v4 as uuidv4 } from 'uuid';
import sha256 from 'js-sha256';
import { WEBUI_BASE_URL } from '$lib/constants';
import { scrollPaginationEnabled, pageLimit, pageSkip } from '$lib/stores';
import { scrollPaginationEnabled, pageLimit, pageSkip, chats } from '$lib/stores';
//////////////////////////
// Helper functions
@@ -781,6 +781,13 @@ export const bestMatchingLanguage = (supportedLanguages, preferredLanguages, def
return match || defaultLocale;
};
export const enablePagination = () => {
chats.set([]);
scrollPaginationEnabled.set(true);
pageLimit.set(20);
pageSkip.set(0);
};
export const disablePagination = () => {
scrollPaginationEnabled.set(false);
pageLimit.set(-1);