소스 검색

Merge pull request #1421 from zxdclyz/hide-hints

Fix: click the prompt button to hide hints when it's already shown
Yifei Zhang 1 년 전
부모
커밋
cdfcf0f068
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      app/components/chat.tsx

+ 6 - 0
app/components/chat.tsx

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