fix: Fix for case where nothing is selected for context.

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-06-04 23:09:31 -07:00
parent 03aacc6d8b
commit 96f545f982
5 changed files with 185 additions and 71 deletions

View file

@ -600,10 +600,10 @@ const ChatPage = () => {
if (!input.trim() || status !== 'ready') return;
// Validation: require at least one connector OR at least one document
if (selectedConnectors.length === 0 && selectedDocuments.length === 0) {
alert("Please select at least one connector or document");
return;
}
// if (selectedConnectors.length === 0 && selectedDocuments.length === 0) {
// alert("Please select at least one connector or document");
// return;
// }
// Call the original handleSubmit from useChat
handleChatSubmit(e);