mirror of
https://github.com/open-webui/open-webui
synced 2025-02-22 13:18:25 +00:00
refac
This commit is contained in:
parent
b6703be859
commit
bc6113f4ba
@ -2,17 +2,18 @@
|
|||||||
import Fuse from 'fuse.js';
|
import Fuse from 'fuse.js';
|
||||||
import { toast } from 'svelte-sonner';
|
import { toast } from 'svelte-sonner';
|
||||||
|
|
||||||
import { onMount, getContext, onDestroy } from 'svelte';
|
import { onMount, getContext, onDestroy, tick } from 'svelte';
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { mobile, showSidebar } from '$lib/stores';
|
import { mobile, showSidebar, knowledge as _knowledge } from '$lib/stores';
|
||||||
|
|
||||||
import { updateFileDataContentById, uploadFile } from '$lib/apis/files';
|
import { updateFileDataContentById, uploadFile } from '$lib/apis/files';
|
||||||
import {
|
import {
|
||||||
addFileToKnowledgeById,
|
addFileToKnowledgeById,
|
||||||
getKnowledgeById,
|
getKnowledgeById,
|
||||||
|
getKnowledgeItems,
|
||||||
removeFileFromKnowledgeById,
|
removeFileFromKnowledgeById,
|
||||||
resetKnowledgeById,
|
resetKnowledgeById,
|
||||||
updateFileFromKnowledgeById,
|
updateFileFromKnowledgeById,
|
||||||
@ -376,6 +377,7 @@
|
|||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
toast.success($i18n.t('Knowledge updated successfully'));
|
toast.success($i18n.t('Knowledge updated successfully'));
|
||||||
|
_knowledge.set(await getKnowledgeItems(localStorage.token));
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user