mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-09 07:42:39 +02:00
fix: Fix for case where nothing is selected for context.
This commit is contained in:
parent
03aacc6d8b
commit
96f545f982
5 changed files with 185 additions and 71 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue