This commit is contained in:
Timothy J. Baek 2024-06-11 00:37:31 -07:00
parent 5237439e29
commit 354683296b
2 changed files with 16 additions and 11 deletions

View File

@ -24,7 +24,8 @@
banners,
user,
socket,
showCallOverlay
showCallOverlay,
tools
} from '$lib/stores';
import {
convertMessagesToHistory,
@ -1280,6 +1281,17 @@
bind:selectedToolIds
bind:webSearchEnabled
bind:atSelectedModel
availableTools={$user.role === 'admin'
? $tools.reduce((a, e, i, arr) => {
a[e.id] = {
name: e.name,
description: e.meta.description,
enabled: false
};
return a;
}, {})
: {}}
{selectedModels}
{messages}
{submitPrompt}

View File

@ -58,8 +58,9 @@
let chatInputPlaceholder = '';
export let files = [];
export let selectedToolIds = [];
export let availableTools = {};
export let selectedToolIds = [];
export let webSearchEnabled = false;
export let prompt = '';
@ -656,15 +657,7 @@
<InputMenu
bind:webSearchEnabled
bind:selectedToolIds
tools={$tools.reduce((a, e, i, arr) => {
a[e.id] = {
name: e.name,
description: e.meta.description,
enabled: false
};
return a;
}, {})}
tools={availableTools}
uploadFilesHandler={() => {
filesInputElement.click();
}}