Skip to content

Commit

Permalink
fix: enter key cannot select prompt when using enter key to submit
Browse files Browse the repository at this point in the history
  • Loading branch information
Quorafind committed May 16, 2023
1 parent 5ba0aef commit cf775e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ dev
public/prompts.json

.vscode
.idea
.idea

# Other Package Manager
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export function Chat() {
e.preventDefault();
return;
}
if (shouldSubmit(e)) {
if (shouldSubmit(e) && promptHints.length === 0) {
doSubmit(userInput);
e.preventDefault();
}
Expand Down

0 comments on commit cf775e3

Please sign in to comment.