diff --git a/frontend/src/About.tsx b/frontend/src/About.tsx index b144ce8..90842c5 100644 --- a/frontend/src/About.tsx +++ b/frontend/src/About.tsx @@ -5,7 +5,7 @@ import DocsGPT3 from './assets/cute_docsgpt3.svg'; export default function About() { return (
-
+

About DocsGPT

DocsGPT @@ -31,23 +31,34 @@ export default function About() {

1. Navigate to{' '} - /application folder + + {' '} + /application + {' '} + folder

2. Install dependencies from{' '} - + pip install -r requirements.txt

- 3. Prepare a .env file. - Copy .env_sample and - create .env with your - OpenAI API token + 3. Prepare a{' '} + .env{' '} + file. Copy{' '} + + .env_sample + {' '} + and create{' '} + .env{' '} + with your OpenAI API token

4. Run the app with{' '} - python app.py + + python app.py +

diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index f3f8bef..6a1fd00 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -5,7 +5,7 @@ import About from './About'; import PageNotFound from './PageNotFound'; import { inject } from '@vercel/analytics'; import { useMediaQuery } from './hooks'; -import { useState} from 'react'; +import { useState } from 'react'; import Setting from './Setting'; inject(); @@ -32,4 +32,4 @@ export default function App() {
); -} \ No newline at end of file +} diff --git a/frontend/src/Hero.tsx b/frontend/src/Hero.tsx index e23c06f..e14e0cd 100644 --- a/frontend/src/Hero.tsx +++ b/frontend/src/Hero.tsx @@ -4,11 +4,14 @@ import DocsGPT3 from './assets/cute_docsgpt3.svg'; export default function Hero({ className = '' }: { className?: string }) { // const isMobile = window.innerWidth <= 768; const { isMobile } = useMediaQuery(); - const [isDarkTheme] = useDarkTheme() + const [isDarkTheme] = useDarkTheme(); return ( -
+
-

DocsGPT

DocsGPT
@@ -36,20 +39,24 @@ export default function Hero({ className = '' }: { className?: string }) { )}
{/* first */} -
+
{/* Add Mobile check here */} {isMobile ? (
lock @@ -60,7 +67,9 @@ export default function Hero({ className = '' }: { className?: string }) { ) : ( <> lock @@ -84,22 +93,31 @@ export default function Hero({ className = '' }: { className?: string }) {
{/* second */} -
+
{/* Add Mobile check here */} {isMobile ? (
- lock + lock

Secure Data Storage

) : ( <> - lock + lock

Secure Data Storage

@@ -120,16 +138,21 @@ export default function Hero({ className = '' }: { className?: string }) {
{/* third */} -
+
{/* Add Mobile check here */} {isMobile ? (
lock @@ -140,7 +163,11 @@ export default function Hero({ className = '' }: { className?: string }) { ) : ( <> lock diff --git a/frontend/src/Setting.tsx b/frontend/src/Setting.tsx index 4fb8c5d..5642379 100644 --- a/frontend/src/Setting.tsx +++ b/frontend/src/Setting.tsx @@ -1,6 +1,5 @@ import React, { useState, useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; -import Arrow2 from './assets/dropdown-arrow.svg'; import ArrowLeft from './assets/arrow-left.svg'; import ArrowRight from './assets/arrow-right.svg'; import Trash from './assets/trash.svg'; diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 13a3d48..b4efe80 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -12,7 +12,7 @@ import { updateQuery, } from './conversationSlice'; import Send from './../assets/send.svg'; -import SendDark from './../assets/send_dark.svg' +import SendDark from './../assets/send_dark.svg'; import Spinner from './../assets/spinner.svg'; import { FEEDBACK, Query } from './conversationModels'; import { sendFeedback } from './conversationApi'; @@ -29,9 +29,8 @@ export default function Conversation() { const [eventInterrupt, setEventInterrupt] = useState(false); const handleUserInterruption = () => { - if (!eventInterrupt && status === "loading") - setEventInterrupt(true) - } + if (!eventInterrupt && status === 'loading') setEventInterrupt(true); + }; useEffect(() => { !eventInterrupt && scrollIntoView(); }, [queries.length, queries[queries.length - 1]]); @@ -48,8 +47,8 @@ export default function Conversation() { if (status !== 'idle') { fetchStream.current && fetchStream.current.abort(); //abort previous stream } - } - }, [status]) + }; + }, [status]); useEffect(() => { const observerCallback: IntersectionObserverCallback = (entries) => { @@ -76,12 +75,12 @@ export default function Conversation() { behavior: 'smooth', block: 'start', }); - } + }; const handleQuestion = (question: string) => { question = question.trim(); if (question === '') return; - setEventInterrupt(false) + setEventInterrupt(false); dispatch(addQuery({ prompt: question })); fetchStream.current = dispatch(fetchAnswer({ question })); }; @@ -134,12 +133,13 @@ export default function Conversation() {
+ className="flex w-full flex-col justify-center p-4 md:flex-row" + > {queries.length > 0 && !hasScrolledToLast && (