diff --git a/frontend/src/Hero.tsx b/frontend/src/Hero.tsx index e515af16..0161eac2 100644 --- a/frontend/src/Hero.tsx +++ b/frontend/src/Hero.tsx @@ -1,6 +1,6 @@ -import { Fragment } from 'react'; import DocsGPT3 from './assets/cute_docsgpt3.svg'; import { useTranslation } from 'react-i18next'; + export default function Hero({ handleQuestion, }: { @@ -17,40 +17,41 @@ export default function Hero({ header: string; query: string; }>; - return ( -
diff --git a/frontend/src/conversation/ConversationMessages.tsx b/frontend/src/conversation/ConversationMessages.tsx
new file mode 100644
index 00000000..c83ee50c
--- /dev/null
+++ b/frontend/src/conversation/ConversationMessages.tsx
@@ -0,0 +1,180 @@
+import { Fragment, useEffect, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import ConversationBubble from './ConversationBubble';
+import Hero from '../Hero';
+import { FEEDBACK, Query, Status } from './conversationModels';
+import ArrowDown from '../assets/arrow-down.svg';
+import RetryIcon from '../components/RetryIcon';
+import { useDarkTheme } from '../hooks';
+
+interface ConversationMessagesProps {
+ handleQuestion: (params: {
+ question: string;
+ isRetry?: boolean;
+ updated?: boolean | null;
+ indx?: number;
+ }) => void;
+ handleQuestionSubmission: (
+ updatedQuestion?: string,
+ updated?: boolean,
+ indx?: number,
+ ) => void;
+ handleFeedback?: (query: Query, feedback: FEEDBACK, index: number) => void;
+ queries: Query[];
+ status: Status;
+}
+
+export default function ConversationMessages({
+ handleQuestion,
+ handleQuestionSubmission,
+ queries,
+ status,
+ handleFeedback,
+}: ConversationMessagesProps) {
+ const [isDarkTheme] = useDarkTheme();
+ const { t } = useTranslation();
+
+ const conversationRef = useRef
{t('sharedConv.meta')}
-
- ) : (
-
-