diff --git a/client/src/plus/ai-help/index.tsx b/client/src/plus/ai-help/index.tsx index 970fd40ca913..3a72fbdb1c68 100644 --- a/client/src/plus/ai-help/index.tsx +++ b/client/src/plus/ai-help/index.tsx @@ -154,7 +154,7 @@ function AIHelpUserQuestion({ className="ai-help-input-form" onSubmit={(event) => { event.preventDefault(); - if (canEdit && question) { + if (canEdit && question?.trim()) { gleanClick(`${AI_HELP}: edit submit`); setEditing(false); submit(question, message.chatId, message.parentId, message.messageId); @@ -167,7 +167,7 @@ function AIHelpUserQuestion({ onKeyDown={(event) => { if (event.key === "Enter" && !event.shiftKey) { event.preventDefault(); - if (canEdit && question) { + if (canEdit && question?.trim()) { gleanClick(`${AI_HELP}: edit submit`); setEditing(false); submit( @@ -205,7 +205,7 @@ function AIHelpUserQuestion({ icon="send" buttonType="submit" title="Submit question" - isDisabled={!question} + isDisabled={!question.trim()} > Submit question @@ -810,7 +810,7 @@ export function AIHelpInner() { icon="send" buttonType="submit" title="Submit question" - isDisabled={!query} + isDisabled={!query.trim()} > Submit question