From 5c4124ebe5824dc6a20f3d499713a4e2e6e36e4e Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 19 Nov 2024 03:18:40 -0800 Subject: [PATCH] refac --- src/lib/components/chat/MessageInput.svelte | 4 ---- src/routes/(app)/+layout.svelte | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) 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