mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 00:30:51 +00:00
refac
This commit is contained in:
parent
ee05455155
commit
f470f3fce2
@ -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 () => {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user