'use client'; import { Button } from '@kandev/ui/button'; import { IconTrash, IconEdit, IconMessage } from '@tabler/icons-react'; import type { DiffComment } from '@/lib/diff/types'; import { formatLineRange } from '@/lib/diff'; interface CommentDisplayProps { /** The comment to display */ comment: DiffComment; /** Callback to delete the comment */ onDelete?: () => void; /** Callback to edit the comment */ onEdit?: () => void; /** Whether to show the code content */ showCode?: boolean; /** Compact mode for inline display */ compact?: boolean; } export function CommentDisplay({ comment, onDelete, onEdit, showCode = false, compact = false, }: CommentDisplayProps) { const lineRange = formatLineRange(comment.startLine, comment.endLine); if (compact) { return (
{comment.codeContent}
)}
{/* Comment text */}
{comment.annotation}