fix: apply the Voice mode button's checks when Voice Mode is opened from the URL (#31826)

This commit is contained in:
G30 2026-10-01 12:24:16 -04:00 • committed by GitHub
parent 51da3eefc9
commit 79baaca3bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);