Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
35468329
Commit
35468329
authored
Jun 11, 2024
by
Timothy J. Baek
Browse files
refac
parent
5237439e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
src/lib/components/chat/Chat.svelte
src/lib/components/chat/Chat.svelte
+13
-1
src/lib/components/chat/MessageInput.svelte
src/lib/components/chat/MessageInput.svelte
+3
-10
No files found.
src/lib/components/chat/Chat.svelte
View file @
35468329
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
banners,
banners,
user,
user,
socket,
socket,
showCallOverlay
showCallOverlay,
tools
} from '$lib/stores';
} from '$lib/stores';
import {
import {
convertMessagesToHistory,
convertMessagesToHistory,
...
@@ -1280,6 +1281,17 @@
...
@@ -1280,6 +1281,17 @@
bind:selectedToolIds
bind:selectedToolIds
bind:webSearchEnabled
bind:webSearchEnabled
bind:atSelectedModel
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}
{selectedModels}
{messages}
{messages}
{submitPrompt}
{submitPrompt}
...
...
src/lib/components/chat/MessageInput.svelte
View file @
35468329
...
@@ -58,8 +58,9 @@
...
@@ -58,8 +58,9 @@
let chatInputPlaceholder = '';
let chatInputPlaceholder = '';
export let files = [];
export let files = [];
export let selectedToolIds = [];
export let availableTools = {};
export let selectedToolIds = [];
export let webSearchEnabled = false;
export let webSearchEnabled = false;
export let prompt = '';
export let prompt = '';
...
@@ -656,15 +657,7 @@
...
@@ -656,15 +657,7 @@
<InputMenu
<InputMenu
bind:webSearchEnabled
bind:webSearchEnabled
bind:selectedToolIds
bind:selectedToolIds
tools={$tools.reduce((a, e, i, arr) => {
tools={availableTools}
a[e.id] = {
name: e.name,
description: e.meta.description,
enabled: false
};
return a;
}, {})}
uploadFilesHandler={() => {
uploadFilesHandler={() => {
filesInputElement.click();
filesInputElement.click();
}}
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment