Bladeren bron

fix: click the prompt button to hide hints when it's already shown

liyuze 1 jaar geleden
bovenliggende
commit
ec19b86ade
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. 6 0
      app/components/chat.tsx

+ 6 - 0
app/components/chat.tsx

@@ -789,6 +789,12 @@ export function Chat() {
           scrollToBottom={scrollToBottom}
           hitBottom={hitBottom}
           showPromptHints={() => {
+            // Click again to close
+            if (promptHints.length > 0) {
+              setPromptHints([]);
+              return;
+            }
+
             inputRef.current?.focus();
             onSearch("");
           }}