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
4d5e161a
Commit
4d5e161a
authored
Jun 25, 2024
by
rdavis
Browse files
Updated Functions and Tools to use existing selected* Variable
Applied formatting
parent
263d4bf4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
src/lib/components/workspace/Functions.svelte
src/lib/components/workspace/Functions.svelte
+4
-6
src/lib/components/workspace/Prompts.svelte
src/lib/components/workspace/Prompts.svelte
+1
-1
src/lib/components/workspace/Tools.svelte
src/lib/components/workspace/Tools.svelte
+3
-4
No files found.
src/lib/components/workspace/Functions.svelte
View file @
4d5e161a
...
@@ -41,9 +41,7 @@
...
@@ -41,9 +41,7 @@
let showValvesModal = false;
let showValvesModal = false;
let selectedFunction = null;
let selectedFunction = null;
let showDeleteConfirm = false;
let showDeleteConfirm = false;
let deleteFunction = null;
const shareHandler = async (tool) => {
const shareHandler = async (tool) => {
console.log(tool);
console.log(tool);
...
@@ -250,8 +248,8 @@
...
@@ -250,8 +248,8 @@
exportHandler={() => {
exportHandler={() => {
exportHandler(func);
exportHandler(func);
}}
}}
deleteHandler={async () => {
deleteHandler={async () => {
d
eleteFunction = func;
s
ele
c
te
d
Function = func;
showDeleteConfirm = true;
showDeleteConfirm = true;
}}
}}
onClose={() => {}}
onClose={() => {}}
...
@@ -396,11 +394,11 @@
...
@@ -396,11 +394,11 @@
bind:show={showDeleteConfirm}
bind:show={showDeleteConfirm}
title={$i18n.t('Delete function?')}
title={$i18n.t('Delete function?')}
on:confirm={() => {
on:confirm={() => {
deleteHandler(
d
eleteFunction);
deleteHandler(
s
ele
c
te
d
Function);
}}
}}
>
>
<div class=" text-sm text-gray-500">
<div class=" text-sm text-gray-500">
{$i18n.t('This will delete')} <span class=" font-semibold">{
d
eleteFunction.name}</span>.
{$i18n.t('This will delete')} <span class=" font-semibold">{
s
ele
c
te
d
Function.name}</span>.
</div>
</div>
</DeleteConfirmDialog>
</DeleteConfirmDialog>
...
...
src/lib/components/workspace/Prompts.svelte
View file @
4d5e161a
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
exportHandler={() => {
exportHandler={() => {
exportHandler(prompt);
exportHandler(prompt);
}}
}}
deleteHandler={async () => {
deleteHandler={async () => {
deletePrompt = prompt;
deletePrompt = prompt;
showDeleteConfirm = true;
showDeleteConfirm = true;
}}
}}
...
...
src/lib/components/workspace/Tools.svelte
View file @
4d5e161a
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
let selectedTool = null;
let selectedTool = null;
let showDeleteConfirm = false;
let showDeleteConfirm = false;
let deleteTool = null;
const shareHandler = async (tool) => {
const shareHandler = async (tool) => {
console.log(tool);
console.log(tool);
...
@@ -244,7 +243,7 @@
...
@@ -244,7 +243,7 @@
exportHandler(tool);
exportHandler(tool);
}}
}}
deleteHandler={async () => {
deleteHandler={async () => {
d
eleteTool = tool;
s
ele
c
te
d
Tool = tool;
showDeleteConfirm = true;
showDeleteConfirm = true;
}}
}}
onClose={() => {}}
onClose={() => {}}
...
@@ -379,11 +378,11 @@
...
@@ -379,11 +378,11 @@
bind:show={showDeleteConfirm}
bind:show={showDeleteConfirm}
title={$i18n.t('Delete tool?')}
title={$i18n.t('Delete tool?')}
on:confirm={() => {
on:confirm={() => {
deleteHandler(
d
eleteTool);
deleteHandler(
s
ele
c
te
d
Tool);
}}
}}
>
>
<div class=" text-sm text-gray-500">
<div class=" text-sm text-gray-500">
{$i18n.t('This will delete')} <span class=" font-semibold">{
d
eleteTool.name}</span>.
{$i18n.t('This will delete')} <span class=" font-semibold">{
s
ele
c
te
d
Tool.name}</span>.
</div>
</div>
</DeleteConfirmDialog>
</DeleteConfirmDialog>
...
...
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