feat: external tool server support frontend

This commit is contained in:
Timothy Jaeryang Baek
2025-03-27 01:38:35 -07:00
parent 3514a6c5ed
commit d9b6d78d5c
9 changed files with 536 additions and 18 deletions
+7
View File
@@ -119,6 +119,9 @@
let imageGenerationEnabled = false;
let webSearchEnabled = false;
let codeInterpreterEnabled = false;
let toolServers = [];
let chat = null;
let tags = [];
@@ -191,6 +194,8 @@
setToolIds();
}
$: toolServers = ($settings?.toolServers ?? []).filter((server) => server?.config?.enable);
const setToolIds = async () => {
if (!$tools) {
tools.set(await getTools(localStorage.token));
@@ -2033,6 +2038,7 @@
bind:codeInterpreterEnabled
bind:webSearchEnabled
bind:atSelectedModel
{toolServers}
transparentBackground={$settings?.backgroundImageUrl ?? false}
{stopResponse}
{createMessagePair}
@@ -2086,6 +2092,7 @@
bind:webSearchEnabled
bind:atSelectedModel
transparentBackground={$settings?.backgroundImageUrl ?? false}
{toolServers}
{stopResponse}
{createMessagePair}
on:upload={async (e) => {