fix: enter key cannot select prompt when using enter key to submit

This commit is contained in:
Quorafind
2023-05-16 12:06:06 +08:00
parent 5ba0aef799
commit cf775e3487
2 changed files with 5 additions and 2 deletions

View File

@@ -502,7 +502,7 @@ export function Chat() {
e.preventDefault();
return;
}
if (shouldSubmit(e)) {
if (shouldSubmit(e) && promptHints.length === 0) {
doSubmit(userInput);
e.preventDefault();
}