"use client"; import { BookOpen, FileQuestion, Languages, Layers3, MessageSquareText, PenLine, Upload, Video } from "lucide-react"; import type { ApiDocument } from "@/lib/api/types"; import type { StudyIntent } from "@/lib/study-intents"; type ContextAction = { label: string; intent: StudyIntent; prompt: string; icon: typeof BookOpen; }; const contextActions: ContextAction[] = [ { label: "Explain in Malayalam", intent: "teach_topic", prompt: "Explain this in Malayalam + English: ", icon: Languages }, { label: "Make it simpler", intent: "teach_topic", prompt: "Make this simpler: ", icon: BookOpen }, { label: "Give exam answer", intent: "generate_exam_answer", prompt: "Give a mark-wise exam answer for: ", icon: PenLine }, { label: "Generate flashcards", intent: "generate_flashcards", prompt: "Generate flashcards for: ", icon: Layers3 }, { label: "Give PYQ questions", intent: "analyze_pyq", prompt: "Give exam-relevant PYQ questions for: ", icon: FileQuestion }, { label: "Correct my answer", intent: "generate_exam_answer", prompt: "Correct this answer and show missing keywords: ", icon: PenLine }, { label: "Create video plan", intent: "create_video_plan", prompt: "Create a video plan for: ", icon: Video }, ]; export function StudyChatContextPanel({ selectedDocuments, onAction, onUpload, }: { selectedDocuments: ApiDocument[]; onAction: (intent: StudyIntent, prompt: string) => void; onUpload: () => void; }) { const currentSubject = selectedDocuments[0]?.subject ?? "Not fixed"; const currentClass = selectedDocuments[0]?.syllabus ?? "Student-controlled chat"; return (
Current context
Study Chat answers what you ask. It does not replace the official Tuition class.
Materials
{document.title || document.file_name}
{document.subject ?? "Study material"}
No material selected. You can still ask general academic questions.
)}Quick prompts
For a different chapter, ask here. Tuition Mode keeps DocDoe's official class unchanged.