Explorar o código

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

liyuze hai 1 ano
pai
achega
ec19b86ade
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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("");
           }}