diff --git a/ui/src/components/CommentThread.test.tsx b/ui/src/components/CommentThread.test.tsx index ed791baa2c6..f42a4112763 100644 --- a/ui/src/components/CommentThread.test.tsx +++ b/ui/src/components/CommentThread.test.tsx @@ -9,8 +9,22 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { CommentThread } from "./CommentThread"; vi.mock("./MarkdownBody", () => ({ - MarkdownBody: ({ children, className }: { children: ReactNode; className?: string }) => ( -
No timeline entries yet.
; @@ -718,6 +723,7 @@ const TimelineList = memo(function TimelineList({ onVote={onVote ? (vote, options) => onVote(comment.id, vote, options) : undefined} voting={votingTargetId === comment.id} highlightCommentId={highlightCommentId} + externalReferences={externalReferences} /> ); })} @@ -756,6 +762,7 @@ export function CommentThread({ onInterruptQueued, interruptingQueuedRunId = null, composerDisabledReason = null, + externalReferences, }: CommentThreadProps) { const [body, setBody] = useState(""); const [submitting, setSubmitting] = useState(false); @@ -974,6 +981,7 @@ export function CommentThread({ votingTargetId={votingTargetId} highlightCommentId={highlightCommentId} feedbackTermsUrl={feedbackTermsUrl} + externalReferences={externalReferences} /> {liveRunSlot} @@ -1006,6 +1014,7 @@ export function CommentThread({ projectId={projectId} highlightCommentId={highlightCommentId} queued + externalReferences={externalReferences} /> ))}No message content.
)} @@ -705,7 +713,7 @@ function commentDateLabel(date: Date | string | undefined): string { } const IssueChatTextPart = memo(function IssueChatTextPart({ text, recessed, onAccent }: { text: string; recessed?: boolean; onAccent?: boolean }) { - const { onImageClick } = useContext(IssueChatCtx); + const { onImageClick, externalReferences } = useContext(IssueChatCtx); if (isSuccessfulRunHandoffComment(text)) { return{activeConflict.serverDocument.title}
) : null} - {renderFoldableBody(activeConflict.serverDocument.body, "text-[14px] leading-7")} + {renderFoldableBody(activeConflict.serverDocument.body, "text-[14px] leading-7", externalReferences)} )} @@ -1235,7 +1245,7 @@ export function IssueDocumentsSection({ defaultFocusedThreadId={defaultAnnotationFocusedThreadIds?.[doc.key]} > {isHistoricalPreview ? ( - renderFoldableBody(displayedBody, documentBodyContentClassName) + renderFoldableBody(displayedBody, documentBodyContentClassName, externalReferences) ) : activeDraft ? (