diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 08277cd09..4d9a915ab 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -238,10 +238,6 @@ }; onMount(async () => { - if (!$tools) { - await tools.set(await getTools(localStorage.token)); - } - loaded = true; window.setTimeout(() => { diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 746eacc9f..6ce1612b7 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -95,6 +95,7 @@ models.set(await getModels(localStorage.token)); banners.set(await getBanners(localStorage.token)); + tools.set(await getTools(localStorage.token)); document.addEventListener('keydown', function (event) { const isCtrlPressed = event.ctrlKey || event.metaKey; // metaKey is for Cmd key on Mac