'use client'; import { memo } from 'react'; import type { CommentContextItem } from '@/lib/types/context'; import { getFileName } from '@/lib/utils/file-path'; import { ContextChip } from './context-chip'; import { CommentDisplay } from '@/components/diff/comment-display'; export const CommentItem = memo(function CommentItem({ item }: { item: CommentContextItem }) { const fileName = getFileName(item.filePath); const preview = (
{fileName}
{item.comments.map((comment) => ( item.onRemoveComment(comment.id)} /> ))}
); return ( ); });