diff --git a/src/components/FrameRenderer/RoadmapFloatingChat.tsx b/src/components/FrameRenderer/RoadmapFloatingChat.tsx index 4e34f8aac..4a0add940 100644 --- a/src/components/FrameRenderer/RoadmapFloatingChat.tsx +++ b/src/components/FrameRenderer/RoadmapFloatingChat.tsx @@ -82,6 +82,33 @@ export function RoadmapFloatingChat(props: RoadmapChatProps) { const scrollareaRef = useRef(null); const [inputValue, setInputValue] = useState(''); + // Default questions - will be populated from API later + const allDefaultQuestions = [ + 'What should I learn next based on my current progress?', + 'What are the most important topics I should focus on?', + 'Which topics are prerequisites for advanced concepts?', + 'Can you recommend other roadmaps related to this field?', + 'What learning resources are available for specific topics?', + 'Which topics should I prioritize based on job market demand?', + 'What are common learning pitfalls I should avoid?', + 'How can I share my progress with others?', + 'What projects should I build while following this roadmap?', + 'Which skills are most valuable for career advancement?', + 'Give me some project ideas based on my progress', + 'What are the latest industry trends in this field?', + 'Can you suggest a study schedule for this roadmap?', + 'What other roadmaps complement this learning path?', + 'How should I approach learning complex topics?', + "What's the best way to practice what I've learned?", + 'What are different job roles in this field?', + ]; + + // Randomly select 4 questions to display + const defaultQuestions = useMemo(() => { + const shuffled = [...allDefaultQuestions].sort(() => 0.5 - Math.random()); + return shuffled.slice(0, 4); + }, []); + const { data: roadmapDetail, isLoading: isRoadmapDetailLoading } = useQuery( roadmapJSONOptions(roadmapId), queryClient, @@ -178,7 +205,7 @@ export function RoadmapFloatingChat(props: RoadmapChatProps) {
@@ -235,6 +262,35 @@ export function RoadmapFloatingChat(props: RoadmapChatProps) { isIntro /> + {/* Show default questions only when there's no chat history */} + {aiChatHistory.length === 0 && defaultQuestions.length > 0 && ( +
+

+ Some questions you might have about this roadmap: +

+
+ {defaultQuestions.map((question, index) => ( + + ))} +
+
+ )} + {aiChatHistory.map( (chat: RoadmapAIChatHistoryType, index: number) => (