From 1aaf4ae5bc30309de7e1d8aea1df0fe413e11c45 Mon Sep 17 00:00:00 2001
From: Yidadaa <yidadaa@qq.com>
Date: Mon, 1 May 2023 23:39:54 +0800
Subject: [PATCH] fix: #1126 can not select prompt

---
 app/components/chat.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/components/chat.tsx b/app/components/chat.tsx
index 8fc39e31..4c168669 100644
--- a/app/components/chat.tsx
+++ b/app/components/chat.tsx
@@ -391,7 +391,7 @@ export function Chat() {
   const onPromptSelect = (prompt: Prompt) => {
     setPromptHints([]);
     inputRef.current?.focus();
-    setUserInput(prompt.content);
+    setTimeout(() => setUserInput(prompt.content), 60);
   };
 
   // auto grow input