From f18317f7b71bc216da591361967d5e23f7690d82 Mon Sep 17 00:00:00 2001 From: Daniel Avila Date: Tue, 14 Feb 2023 21:23:14 -0500 Subject: [PATCH] useDocumentTitle changes title on first title change, scrollBar renders when expected --- README.md | 9 ++--- _PRESS-RELEASE.md | 66 -------------------------------- src/components/main/Messages.jsx | 4 +- src/hooks/useDocumentTitle.js | 14 +++---- src/style.css | 8 ++-- 5 files changed, 16 insertions(+), 85 deletions(-) delete mode 100644 _PRESS-RELEASE.md diff --git a/README.md b/README.md index 31b712e032..5328046281 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Currently, this project is only functional with the `text-davinci-003` model. - [x] Rename, delete conversations - [x] Persistent conversation +- [x] UI Error handling - [x] AI Model Selection - [ ] Highlight.js for code blocks - [ ] Prompt Templates @@ -52,13 +53,9 @@ Currently, this project is only functional with the `text-davinci-003` model. - ChatGPT/Google Bard/Bing AI conversations are lost in space or cannot be searched past a certain timeframe. - -## Solution ## + ## How to Get Started ## > **Warning** diff --git a/_PRESS-RELEASE.md b/_PRESS-RELEASE.md deleted file mode 100644 index d6cf87e1b3..0000000000 --- a/_PRESS-RELEASE.md +++ /dev/null @@ -1,66 +0,0 @@ -# ChatGPT Clone # - - - - - -## Wrap all conversational AIs under one roof. ## - - -## Summary ## - - - Conversational/Utility AIs are the future and OpenAI revolutionized this movement with ChatGPT. This app commemorates the original - styling of ChatGPT, with the ability to integrate any current/future conversational AI models through user-provided APIs. - -## Problem ## - - - ![use case example](./use_case.png "GPT is down! Plus is too expensive!") - - ChatGPT is down ( and don't want to pay for ChatGPT Plus). ChatGPT/Google Bard/Bing AI conversations are lost in space or - cannot be searched past a certain timeframe. - - -## Solution ## - - - Serves and searches all conversations reliably. All AI convos under one house. - Pay per call and not per month (cents compared to dollars). - -## Quote from You ## - - - Keep AI open - -## How to Get Started ## - - - Input your API key(s) and you're ready to go. - -## Customer Quote ## - - - I can semantically search my conversations and customize templates for any AI model! - -## Closing and Call to Action ## - - - Keep an eye out for new conversational AI models and respective API access! Own your - conversations! Pay per call and not subscription! diff --git a/src/components/main/Messages.jsx b/src/components/main/Messages.jsx index a98d6a8553..040d7d0e92 100644 --- a/src/components/main/Messages.jsx +++ b/src/components/main/Messages.jsx @@ -18,7 +18,7 @@ const Messages = ({ messages }) => { return () => { clearTimeout(timeoutId); }; - }, []); + }, [messages]); const scrollToBottom = () => { messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' }); @@ -72,7 +72,7 @@ const Messages = ({ messages }) => { timeout={400} classNames="scroll-down" unmountOnExit={false} - appear + // appear > {(state) => showScrollButton && } diff --git a/src/hooks/useDocumentTitle.js b/src/hooks/useDocumentTitle.js index 10162a15f9..85e813602c 100644 --- a/src/hooks/useDocumentTitle.js +++ b/src/hooks/useDocumentTitle.js @@ -8,13 +8,13 @@ function useDocumentTitle(title, prevailOnUnmount = false) { document.title = title; }, [title]); - useEffect( - () => () => { - if (!prevailOnUnmount) { - document.title = defaultTitle.current; - } - }, [] - ); + // useEffect( + // () => () => { + // if (!prevailOnUnmount) { + // document.title = defaultTitle.current; + // } + // }, [] + // ); } export default useDocumentTitle; diff --git a/src/style.css b/src/style.css index 5f062262da..99e7d8c59f 100644 --- a/src/style.css +++ b/src/style.css @@ -10,13 +10,13 @@ .scroll-down-enter { opacity: 0; } -.scroll-down-appear { +/* .scroll-down-appear { opacity: 0; -} +} */ .scroll-down-enter-active { opacity: 1; - transition: opacity 650ms; + transition: opacity 400ms; } .scroll-down-exit { @@ -25,7 +25,7 @@ .scroll-down-exit-active { opacity: 0; - transition: opacity 650ms; + transition: opacity 400ms; } .blink {