"use client"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { RAGQueryResponse } from "@/types"; import { RAGCitationCard } from "./rag-citation-card"; import { Markdown } from "@/components/ui/markdown"; import { Skeleton } from "@/components/ui/skeleton"; import { Bot, BookOpen, MessageSquareText, Sparkles, AlertCircle, } from "lucide-react"; interface RAGAnswerDisplayProps { response: RAGQueryResponse | null; isLoading: boolean; question: string | null; error?: string | null; } export function RAGAnswerDisplay({ response, isLoading, question, error, }: RAGAnswerDisplayProps) { if (isLoading) { return (
Ask questions about your codebase, documentation, or past conversations. The AI will provide answers with citations from the knowledge base.
{question}
{error}
{response.query}