fix(chat): show visible error toast when no provider or model is selected
Sending a message without a provider/model selection failed silently: only a console.warn was emitted and the UI gave no feedback. Surface a toast (i18n key chat.chatInput.toast.noModelSelected, added to all 11 locales) so the user knows why the message was not sent.
This commit is contained in:
@@ -1002,6 +1002,7 @@ const ChatInputComponent: React.FC<ChatInputProps> = ({ onOpenSettings, scrollTo
|
||||
|
||||
if (!providerIdToSend || !modelIdToSend) {
|
||||
console.warn('Cannot send message: provider or model not selected');
|
||||
toast.error(t('chat.chatInput.toast.noModelSelected'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user