diff --git a/components/features/community/AiAnswerSection.tsx b/components/features/community/AiAnswerSection.tsx index 8d40beb..0daba39 100644 --- a/components/features/community/AiAnswerSection.tsx +++ b/components/features/community/AiAnswerSection.tsx @@ -1,6 +1,7 @@ -import { RefreshCw } from "lucide-react"; +import { AlertTriangle, RefreshCw } from "lucide-react"; import { ContentRenderer } from "./ContentRenderer"; import { Skeleton } from "@/components/ui/skeleton"; +import { Badge } from "@/components/ui/badge"; import { cn } from "@/lib/utils"; type AiAnswerStatus = "loading" | "success" | "error" | "empty"; @@ -8,6 +9,9 @@ type AiAnswerStatus = "loading" | "success" | "error" | "empty"; interface AiAnswerSectionProps { status: AiAnswerStatus; content?: string; + keyPoints?: string[] | null; + suggestedTags?: string[] | null; + confidence?: number | null; onRetry?: () => void; isRetrying?: boolean; } @@ -15,6 +19,9 @@ interface AiAnswerSectionProps { export function AiAnswerSection({ status, content, + keyPoints, + suggestedTags, + confidence, onRetry, isRetrying = false, }: AiAnswerSectionProps) { @@ -26,10 +33,37 @@ export function AiAnswerSection({
아직 생성된 AI 답변이 없습니다.
diff --git a/components/features/community/CommunityDetailPage.tsx b/components/features/community/CommunityDetailPage.tsx index 3618b41..fddc990 100644 --- a/components/features/community/CommunityDetailPage.tsx +++ b/components/features/community/CommunityDetailPage.tsx @@ -86,6 +86,9 @@ export function CommunityDetailPage({ postId }: Props) { ? "success" : "empty"; const aiContent = aiAnswerRes?.data?.content; + const aiKeyPoints = aiAnswerRes?.data?.keyPoints; + const aiSuggestedTags = aiAnswerRes?.data?.suggestedTags; + const aiConfidence = aiAnswerRes?.data?.confidence; // isLoading은 캐시가 없는 최초 fetch, isFetching은 refetch 포함 모든 fetch const isAiRetrying = isAiError && isAiFetching; @@ -127,6 +130,9 @@ export function CommunityDetailPage({ postId }: Props) {