diff --git a/src/lib/components/chat/MessageInput/InputMenu.svelte b/src/lib/components/chat/MessageInput/InputMenu.svelte index b1df43e25..b540dc6c5 100644 --- a/src/lib/components/chat/MessageInput/InputMenu.svelte +++ b/src/lib/components/chat/MessageInput/InputMenu.svelte @@ -31,7 +31,12 @@ init(); } + $: if (tools) { + selectedToolIds = Object.keys(tools).filter((toolId) => tools[toolId]?.enabled ?? false); + } + const init = async () => { + console.log('init'); if ($_tools === null) { await _tools.set(await getTools(localStorage.token)); } @@ -76,9 +81,7 @@