This commit is contained in:
Timothy Jaeryang Baek
2026-03-19 18:06:43 -05:00
parent 9793315e0b
commit c53cd78dcb
+19 -1
View File
@@ -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;