mirror of
https://github.com/open-webui/open-webui
synced 2024-11-29 07:21:01 +00:00
refac
This commit is contained in:
parent
5237439e29
commit
354683296b
@ -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}
|
||||
|
@ -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();
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user