Browse Source

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

Quorafind 1 year ago
parent
commit
cf775e3487
2 changed files with 5 additions and 2 deletions
  1. 4 1
      .gitignore
  2. 1 1
      app/components/chat.tsx

+ 4 - 1
.gitignore

@@ -39,4 +39,7 @@ dev
 public/prompts.json
 
 .vscode
-.idea
+.idea
+
+# Other Package Manager
+pnpm-lock.yaml

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