Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#1421 from zxdclyz/hide-hints
Browse files Browse the repository at this point in the history
Fix: click the prompt button to hide hints when it's already shown
  • Loading branch information
Yidadaa authored May 11, 2023
2 parents 3bc4155 + 79b1f44 commit b4c687a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
Expand Down

0 comments on commit b4c687a

Please sign in to comment.