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

3
.gitignore vendored
View File

@ -40,3 +40,6 @@ public/prompts.json
.vscode
.idea
# Other Package Manager
pnpm-lock.yaml

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