mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-24 22:44:50 -06:00
refac
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
import '../app.css';
|
||||
import 'tippy.js/dist/tippy.css';
|
||||
|
||||
import { executeToolServer, getBackendConfig, getVersion } from '$lib/apis';
|
||||
import { executeToolServer, getBackendConfig, getModels, getVersion } from '$lib/apis';
|
||||
import { getSessionUser, userSignOut } from '$lib/apis/auths';
|
||||
import { getAllTags, getChatList } from '$lib/apis/chats';
|
||||
import { chatCompletion } from '$lib/apis/openai';
|
||||
@@ -704,6 +704,24 @@
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
if (event.type === 'page:navigate' && event.data?.path) {
|
||||
await goto(event.data.path);
|
||||
return;
|
||||
}
|
||||
if (event.type === 'models:refresh') {
|
||||
const token = localStorage.token;
|
||||
if (token) {
|
||||
models.set(
|
||||
await getModels(
|
||||
token,
|
||||
$config?.features?.enable_direct_connections
|
||||
? ($settings?.directConnections ?? null)
|
||||
: null
|
||||
)
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const token = localStorage.token;
|
||||
if (!token) return;
|
||||
|
||||
Reference in New Issue
Block a user