refac
This commit is contained in:
1 parent
4441338574
commit
a2f9f7c975
6 files changed
+87
-72
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user