mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-07 08:27:05 +00:00
refac
This commit is contained in:
parent
9793315e0b
commit
c53cd78dcb
1 changed files with 19 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue