"use client"; import { cn } from "@/lib/cn"; import type { DashboardPR } from "@/lib/types"; import { cleanBugbotComment } from "./session-detail-utils"; type UnresolvedComment = DashboardPR["unresolvedComments"][number]; interface PRCommentThreadProps { comments: UnresolvedComment[]; unresolvedThreads: number; sendingUrls: Set; sentUrls: Set; errorUrls: Set; onAskAgentToFix: (comment: UnresolvedComment) => void; } export function PRCommentThread({ comments, unresolvedThreads, sendingUrls, sentUrls, errorUrls, onAskAgentToFix, }: PRCommentThreadProps) { if (comments.length === 0) return null; return (
Unresolved Comments {unresolvedThreads} click to expand
{comments.map((comment, index) => { const { title, description } = cleanBugbotComment(comment.body); const isSending = sendingUrls.has(comment.url); const isSent = sentUrls.has(comment.url); const isError = errorUrls.has(comment.url); return (
{comment.path}

{description}

); })}
); }