diff --git a/src/components/GenerateGuide/AIGuide.tsx b/src/components/GenerateGuide/AIGuide.tsx index 5233001d1..fd78f1fbf 100644 --- a/src/components/GenerateGuide/AIGuide.tsx +++ b/src/components/GenerateGuide/AIGuide.tsx @@ -1,20 +1,21 @@ -import { useMemo, useState } from 'react'; -import { AITutorLayout } from '../AITutor/AITutorLayout'; -import { AIGuideContent } from './AIGuideContent'; import { useQuery } from '@tanstack/react-query'; +import { ExternalLink } from 'lucide-react'; +import { useMemo, useState } from 'react'; +import { flushSync } from 'react-dom'; +import { generateGuide } from '../../helper/generate-ai-guide'; +import { shuffle } from '../../helper/shuffle'; +import { useToast } from '../../hooks/use-toast'; +import { isLoggedIn } from '../../lib/jwt'; import { aiGuideSuggestionsOptions, getAiGuideOptions, } from '../../queries/ai-guide'; import { queryClient } from '../../stores/query-client'; -import { GenerateAIGuide } from './GenerateAIGuide'; -import { AIGuideChat } from './AIGuideChat'; +import { AITutorLayout } from '../AITutor/AITutorLayout'; import { UpgradeAccountModal } from '../Billing/UpgradeAccountModal'; -import { isLoggedIn } from '../../lib/jwt'; -import { shuffle } from '../../helper/shuffle'; -import { generateGuide } from '../../helper/generate-ai-guide'; -import { useToast } from '../../hooks/use-toast'; -import { flushSync } from 'react-dom'; +import { AIGuideChat } from './AIGuideChat'; +import { AIGuideContent } from './AIGuideContent'; +import { GenerateAIGuide } from './GenerateAIGuide'; type AIGuideProps = { guideSlug?: string; @@ -157,8 +158,8 @@ export function ListSuggestions(props: ListSuggestionsProps) { const { title, suggestions, depth, isLoading, currentGuideTitle } = props; return ( -
-
+
+

{title}

{depth === 'essentials' @@ -173,7 +174,7 @@ export function ListSuggestions(props: ListSuggestionsProps) { {[1, 2].map((i) => (

))}
@@ -198,19 +199,7 @@ export function ListSuggestions(props: ListSuggestionsProps) { {topic} - - - + ); })} diff --git a/src/components/GenerateGuide/AIGuideChat.tsx b/src/components/GenerateGuide/AIGuideChat.tsx index 431832cc2..3a826387a 100644 --- a/src/components/GenerateGuide/AIGuideChat.tsx +++ b/src/components/GenerateGuide/AIGuideChat.tsx @@ -3,10 +3,11 @@ import { useChat, type ChatMessage } from '../../hooks/use-chat'; import { RoadmapAIChatCard } from '../RoadmapAIChat/RoadmapAIChatCard'; import { ArrowDownIcon, - BotIcon, LockIcon, + BotIcon, + LockIcon, PauseCircleIcon, SendIcon, - Trash2Icon + Trash2Icon, } from 'lucide-react'; import { ChatHeaderButton } from '../FrameRenderer/RoadmapFloatingChat'; import { isLoggedIn } from '../../lib/jwt'; @@ -153,7 +154,7 @@ export function AIGuideChat(props: AIGuideChatProps) {
{isLoading && ( -
+
)} @@ -170,11 +171,11 @@ export function AIGuideChat(props: AIGuideChatProps) { isIntro /> {isQuestionsLoading && ( -
+
{[1, 2, 3, 4].map((i) => (
))}
@@ -183,24 +184,26 @@ export function AIGuideChat(props: AIGuideChatProps) { randomQuestions && randomQuestions.length > 0 && messages.length === 0 && ( - <> -
    +
    +

    + Some questions you might have about this lesson. +

    +
    {randomQuestions?.map((question) => { return ( -
  • - -
  • + ); })} -
- +
+
)} {messages.map((chat, index) => {