From cf775e3487db1b519dd6a48dfc67eac46765372c Mon Sep 17 00:00:00 2001 From: Quorafind Date: Tue, 16 May 2023 12:06:06 +0800 Subject: [PATCH] fix: enter key cannot select prompt when using enter key to submit --- .gitignore | 5 ++++- app/components/chat.tsx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 37f6b902..d622039c 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,7 @@ dev public/prompts.json .vscode -.idea \ No newline at end of file +.idea + +# Other Package Manager +pnpm-lock.yaml \ No newline at end of file diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 94baf1b6..f2cd8cc4 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -502,7 +502,7 @@ export function Chat() { e.preventDefault(); return; } - if (shouldSubmit(e)) { + if (shouldSubmit(e) && promptHints.length === 0) { doSubmit(userInput); e.preventDefault(); }