Fix: Prevent submission of empty prompts with spaces (#5874)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
mamoodi 2024-12-27 15:31:28 -05:00 committed by GitHub
parent cc928e6d3f
commit 157ff4a4b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,7 +90,9 @@ export function TaskForm({ ref }: TaskFormProps) {
const formData = new FormData(event.currentTarget);
const q = formData.get("q")?.toString();
newConversationMutation.mutate({ q });
if (q?.trim()) {
newConversationMutation.mutate({ q });
}
};
return (