This commit is contained in:
Timothy Jaeryang Baek 2024-11-12 15:53:16 -08:00
parent ee05455155
commit f470f3fce2

View File

@ -12,7 +12,7 @@
import { getKnowledgeItems } from '$lib/apis/knowledge';
import { getFunctions } from '$lib/apis/functions';
import { getModels as _getModels, getVersionUpdates } from '$lib/apis';
import { getModels, getVersionUpdates } from '$lib/apis';
import { getAllTags } from '$lib/apis/chats';
import { getPrompts } from '$lib/apis/prompts';
import { getTools } from '$lib/apis/tools';
@ -52,10 +52,6 @@
let version;
const getModels = async () => {
return _getModels(localStorage.token);
};
onMount(async () => {
if ($user === undefined) {
await goto('/auth');
@ -97,14 +93,8 @@
settings.set(localStorageSettings);
}
await Promise.all([
(async () => {
models.set(await getModels());
})(),
(async () => {
banners.set(await getBanners(localStorage.token));
})()
]);
models.set(await getModels(localStorage.token));
banners.set(await getBanners(localStorage.token));
document.addEventListener('keydown', function (event) {
const isCtrlPressed = event.ctrlKey || event.metaKey; // metaKey is for Cmd key on Mac