diff --git a/src/lib/components/documents/Settings/General.svelte b/src/lib/components/documents/Settings/General.svelte index 19a6493b..c3c7df5b 100644 --- a/src/lib/components/documents/Settings/General.svelte +++ b/src/lib/components/documents/Settings/General.svelte @@ -3,13 +3,20 @@ import { scanDocs } from '$lib/apis/rag'; import { documents } from '$lib/stores'; import { onMount } from 'svelte'; + import toast from 'svelte-french-toast'; export let saveHandler: Function; + + let loading = false; + const scanHandler = async () => { + loading = true; const res = await scanDocs(localStorage.token); + loading = false; if (res) { await documents.set(await getDocs(localStorage.token)); + toast.success('Scan complete!'); } }; @@ -31,16 +38,19 @@
Scan for documents from '/data/docs'