refac: external tools server support
This commit is contained in:
1 parent
69dee19568
commit
d1bc2cfa2f
9 files changed
+264
-30
No files matched your search
@@ -12,7 +12,7 @@
|
||||
|
||||
import { getKnowledgeBases } from '$lib/apis/knowledge';
|
||||
import { getFunctions } from '$lib/apis/functions';
|
||||
import { getModels, getVersionUpdates } from '$lib/apis';
|
||||
import { getModels, getToolServersData, getVersionUpdates } from '$lib/apis';
|
||||
import { getAllTags } from '$lib/apis/chats';
|
||||
import { getPrompts } from '$lib/apis/prompts';
|
||||
import { getTools } from '$lib/apis/tools';
|
||||
@@ -35,7 +35,8 @@
|
||||
banners,
|
||||
showSettings,
|
||||
showChangelog,
|
||||
temporaryChatEnabled
|
||||
temporaryChatEnabled,
|
||||
toolServers
|
||||
} from '$lib/stores';
|
||||
|
||||
import Sidebar from '$lib/components/layout/Sidebar.svelte';
|
||||
@@ -43,6 +44,7 @@
|
||||
import ChangelogModal from '$lib/components/ChangelogModal.svelte';
|
||||
import AccountPending from '$lib/components/layout/Overlay/AccountPending.svelte';
|
||||
import UpdateInfoToast from '$lib/components/layout/UpdateInfoToast.svelte';
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -99,8 +101,10 @@
|
||||
$config?.features?.enable_direct_connections && ($settings?.directConnections ?? null)
|
||||
)
|
||||
);
|
||||
|
||||
banners.set(await getBanners(localStorage.token));
|
||||
tools.set(await getTools(localStorage.token));
|
||||
toolServers.set(await getToolServersData($settings?.toolServers ?? []));
|
||||
|
||||
document.addEventListener('keydown', async function (event) {
|
||||
const isCtrlPressed = event.ctrlKey || event.metaKey; // metaKey is for Cmd key on Mac
|
||||
|
||||
Reference in new issue
Block a user