mirror of
https://github.com/open-webui/open-webui
synced 2025-02-21 12:29:29 +00:00
refac: valves save
This commit is contained in:
parent
6bad71adca
commit
74a4f642fd
@ -4,7 +4,7 @@
|
|||||||
const { saveAs } = fileSaver;
|
const { saveAs } = fileSaver;
|
||||||
|
|
||||||
import { WEBUI_NAME, functions, models } from '$lib/stores';
|
import { WEBUI_NAME, functions, models } from '$lib/stores';
|
||||||
import { onMount, getContext } from 'svelte';
|
import { onMount, getContext, tick } from 'svelte';
|
||||||
import { createNewPrompt, deletePromptByCommand, getPrompts } from '$lib/apis/prompts';
|
import { createNewPrompt, deletePromptByCommand, getPrompts } from '$lib/apis/prompts';
|
||||||
|
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
@ -387,7 +387,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ManifestModal bind:show={showManifestModal} manifest={selectedFunction?.meta?.manifest ?? {}} />
|
<ManifestModal bind:show={showManifestModal} manifest={selectedFunction?.meta?.manifest ?? {}} />
|
||||||
<ValvesModal bind:show={showValvesModal} type="function" id={selectedFunction?.id ?? null} />
|
<ValvesModal
|
||||||
|
bind:show={showValvesModal}
|
||||||
|
type="function"
|
||||||
|
id={selectedFunction?.id ?? null}
|
||||||
|
on:save={async () => {
|
||||||
|
await tick();
|
||||||
|
models.set(await getModels(localStorage.token));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:show={showConfirm}
|
bind:show={showConfirm}
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
toast.success('Valves updated successfully');
|
toast.success('Valves updated successfully');
|
||||||
|
dispatch('save');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user