diff --git a/src/lib/components/workspace/Functions.svelte b/src/lib/components/workspace/Functions.svelte index 853a4fd03..c010fd380 100644 --- a/src/lib/components/workspace/Functions.svelte +++ b/src/lib/components/workspace/Functions.svelte @@ -43,7 +43,12 @@ let showDeleteConfirm = false; - const shareHandler = async (item) => { + const shareHandler = async (func) => { + const item = await getFunctionById(localStorage.token, func.id).catch((error) => { + toast.error(error); + return null; + }); + toast.success($i18n.t('Redirecting you to OpenWebUI Community')); const url = 'https://openwebui.com'; diff --git a/src/lib/components/workspace/Tools.svelte b/src/lib/components/workspace/Tools.svelte index 1aaec2629..8df128a9b 100644 --- a/src/lib/components/workspace/Tools.svelte +++ b/src/lib/components/workspace/Tools.svelte @@ -39,7 +39,12 @@ let showDeleteConfirm = false; - const shareHandler = async (item) => { + const shareHandler = async (tool) => { + const item = await getToolById(localStorage.token, tool.id).catch((error) => { + toast.error(error); + return null; + }); + toast.success($i18n.t('Redirecting you to OpenWebUI Community')); const url = 'https://openwebui.com';