소스 검색

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

liyuze 1 년 전
부모
커밋
ec19b86ade
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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("");
           }}