changes on msging in pr description

This commit is contained in:
Sarthak Agarwal 2026-03-18 04:40:46 +05:30
parent a0fe602a30
commit 825904c7d2
2 changed files with 6 additions and 0 deletions

View file

@ -39,6 +39,7 @@ export interface PrCommentFields {
original_async_throughput?: string
best_async_throughput?: string
language?: string
render_benchmark_markdown?: string
}
// Dependencies interface for easier testing

View file

@ -192,11 +192,16 @@ export function buildPrCommentBody(
prCommentFields.benchmark_details && prCommentFields.benchmark_details.length > 0
? buildBenchmarkInfo(prCommentFields)
: ""
// Build render benchmark info for React components
const renderBenchmark = prCommentFields.render_benchmark_markdown
? `#### 🎨 React Render Benchmark\n${prCommentFields.render_benchmark_markdown}\n`
: ""
return (
`${buildOptimizationMetadata(prCommentFields, trace_id)}\n` +
(includeHeader ? `#### ⚡️ Codeflash found optimizations for this PR\n` : "") +
`${buildResultHeader(prCommentFields, isUnifiedReview)}\n` +
(benchmarkInfo ? `${benchmarkInfo}\n` : "") +
(renderBenchmark ? `${renderBenchmark}\n` : "") +
`${buildResultDetails(prCommentFields, isCollapsed)}\n` +
`${buildResultTestReport(
prCommentFields,