Merge pull request #1534 from Quorafind/fix_enter_key_to_select_prompt

Fix: press enter to select prompt when set pressing `enter` key to submit
This commit is contained in:
Yifei Zhang 2023-05-16 15:33:36 +08:00 committed by GitHub
commit daecd3efa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
}