diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 1f7bd0570d..6ede5f90a4 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2060,6 +2060,20 @@ ////////////////////////// const openCallOverlay = () => { + if (!($user?.role === 'admin' || ($user?.permissions?.chat?.call ?? true))) { + return; + } + + if (selectedModels.length > 1) { + toast.error($i18n.t('Select only one model to call')); + return; + } + + if ($config.audio.stt.engine === 'web') { + toast.error($i18n.t('Call feature is not supported when using Web STT engine')); + return; + } + setTimeout(() => { showCallOverlay.set(true); showControls.set(true);