diff --git a/pages/src/components/BenchmarkSection.tsx b/pages/src/components/BenchmarkSection.tsx index eb06bd1..75b75b9 100644 --- a/pages/src/components/BenchmarkSection.tsx +++ b/pages/src/components/BenchmarkSection.tsx @@ -153,7 +153,21 @@ const benchmarkData: BenchmarkEntry[] = [ avgOutputToken: '44K', avgTotalToken: '5153K', }, - { model: 'Claude-4.8-Opus', company: 'Anthropic', sourceType: 'cc', version: CC_VERSION }, + { + model: 'Claude-4.8-Opus', + company: 'Anthropic', + sourceType: 'cc', + version: CC_VERSION, + precision: 15.93, + precisionDetail: '191/1200', + recall: 12.70, + recallDetail: '191/1505', + f1: 14.13, + avgTime: '5m38s', + avgInputToken: '2,039K', + avgOutputToken: '23K', + avgTotalToken: '2,062K', + }, { model: 'Deepseek-V4-Pro', company: 'DeepSeek', @@ -169,7 +183,21 @@ const benchmarkData: BenchmarkEntry[] = [ avgOutputToken: '60K', avgTotalToken: '5450K', }, - { model: 'GLM-5.1', company: 'Zhipu AI', sourceType: 'cc', version: CC_VERSION }, + { + model: 'GLM-5.1', + company: 'Zhipu AI', + sourceType: 'cc', + version: CC_VERSION, + precision: 8.37, + precisionDetail: '313/3742', + recall: 20.80, + recallDetail: '313/1505', + f1: 11.93, + avgTime: '14m10s', + avgInputToken: '3,998K', + avgOutputToken: '39K', + avgTotalToken: '4,038K', + }, { model: 'GPT-5.5', company: 'OpenAI', sourceType: 'codex', version: '' }, ]; @@ -196,15 +224,20 @@ function computeMedals( return medals; } +type SortField = 'f1' | 'precision' | 'recall'; + const BenchmarkSection: React.FC = () => { const [hoveredRow, setHoveredRow] = useState(null); + const [sortField, setSortField] = useState('f1'); const { t } = useTranslation(); const sortedData = [...benchmarkData].sort((a, b) => { - if (a.f1 == null && b.f1 == null) return 0; - if (a.f1 == null) return 1; - if (b.f1 == null) return -1; - return b.f1 - a.f1; + const av = a[sortField]; + const bv = b[sortField]; + if (av == null && bv == null) return 0; + if (av == null) return 1; + if (bv == null) return -1; + return bv - av; }); const precisionMedals = computeMedals(sortedData, 'precision'); @@ -213,7 +246,7 @@ const BenchmarkSection: React.FC = () => { const ranks = new Map(); let rank = 0; sortedData.forEach((entry, index) => { - if (entry.f1 != null) { + if (entry[sortField] != null) { rank++; ranks.set(index, rank); } @@ -234,7 +267,13 @@ const BenchmarkSection: React.FC = () => { {t('benchmark.title')}

- {t('benchmark.subtitle')} + {t('benchmark.subtitlePreRepos')} + 50 + {t('benchmark.subtitlePrePRs')} + 200 + {t('benchmark.subtitlePreLangs')} + 10 + {t('benchmark.subtitleEnd')}

@@ -261,9 +300,23 @@ const BenchmarkSection: React.FC = () => {
{t('benchmark.colRank')}
{t('benchmark.colModel')}
{t('benchmark.colSource')}
-
F1
-
{t('benchmark.colPrecision')}
-
{t('benchmark.colRecall')}
+ {(['f1', 'precision', 'recall'] as const).map((field) => { + const labels: Record = { + f1: 'F1', + precision: t('benchmark.colPrecision'), + recall: t('benchmark.colRecall'), + }; + return ( +
setSortField(field)} + > + {labels[field]} + +
+ ); + })}
{t('benchmark.colAvgTime')}
{t('benchmark.colAvgToken')}
@@ -320,7 +373,7 @@ const BenchmarkSection: React.FC = () => { {entry.f1 != null ? ( {entry.f1.toFixed(2)}% diff --git a/pages/src/components/HeroSection.tsx b/pages/src/components/HeroSection.tsx index 407fdb4..54f022e 100644 --- a/pages/src/components/HeroSection.tsx +++ b/pages/src/components/HeroSection.tsx @@ -158,7 +158,7 @@ const HeroSection: React.FC = () => { {/* F1 badge */}
-
F1: 26.1%
+
F1: {t('highlights.stat4Value')}
{t('hero.badgeLabel')}
diff --git a/pages/src/components/HighlightsSection.tsx b/pages/src/components/HighlightsSection.tsx index ba149a6..1e48f07 100644 --- a/pages/src/components/HighlightsSection.tsx +++ b/pages/src/components/HighlightsSection.tsx @@ -35,13 +35,13 @@ const HighlightsSection: React.FC = () => { }, { label: t('highlights.stat3Label'), - value: '1/5', + value: t('highlights.stat3Value'), caption: t('highlights.stat3Caption'), delay: 200, }, { label: t('highlights.stat4Label'), - value: '26.1%', + value: t('highlights.stat4Value'), caption: t('highlights.stat4Caption'), delay: 300, }, diff --git a/pages/src/i18n/en.ts b/pages/src/i18n/en.ts index 56cba60..18c3908 100644 --- a/pages/src/i18n/en.ts +++ b/pages/src/i18n/en.ts @@ -14,7 +14,7 @@ export const en: TranslationKeys = { 'hero.description': 'Open Code Review brings Alibaba\'s battle-tested code review Agent into your workflow. Connect any LLM, keep data fully private, and get review comments developers actually adopt.', 'hero.pill1': 'Adoption Rate > 30%', 'hero.pill2': 'Data Stays Local', - 'hero.pill3': 'Token Cost Only 1/5', + 'hero.pill3': 'Token Cost Only 1/9', 'hero.cta1': 'Quick Start', 'hero.cta2': 'View Benchmark', 'hero.users': '20K+ Active Users', @@ -30,8 +30,10 @@ export const en: TranslationKeys = { 'highlights.stat2Value': '1M+', 'highlights.stat2Caption': 'Code review tasks executed', 'highlights.stat3Label': 'Token Cost', - 'highlights.stat3Caption': 'vs. generic Agent + Skills', + 'highlights.stat3Value': '1/9', + 'highlights.stat3Caption': 'vs. Claude Code · 1,000 PRs', 'highlights.stat4Label': 'AACR-Bench', + 'highlights.stat4Value': '25.1%', 'highlights.stat4Caption': 'SEM.F1 benchmark score', // Why Section @@ -64,7 +66,10 @@ export const en: TranslationKeys = { // Benchmark Section 'benchmark.sectionLabel': 'Open Benchmark', 'benchmark.title': 'Cross-Validated by 80+ Senior Engineers', - 'benchmark.subtitle': 'A real-world CodeReview benchmark comprising 200 real PullRequests selected from 50 popular open-source repositories, covering 10 programming languages, diverse issue types, and varying changeset sizes, cross-annotated by 80+ senior engineers.', + 'benchmark.subtitlePreRepos': 'A real-world CodeReview benchmark selecting from ', + 'benchmark.subtitlePrePRs': ' popular open-source repositories, comprising ', + 'benchmark.subtitlePreLangs': ' real PullRequests, covering ', + 'benchmark.subtitleEnd': ' programming languages, diverse issue types, and varying changeset sizes.', 'benchmark.legendOcr': 'Open Code Review', 'benchmark.legendCc': 'Claude Code · /code-review', 'benchmark.colRank': 'Rank', diff --git a/pages/src/i18n/zh.ts b/pages/src/i18n/zh.ts index e8afb03..065b44d 100644 --- a/pages/src/i18n/zh.ts +++ b/pages/src/i18n/zh.ts @@ -14,7 +14,7 @@ export const zh: TranslationKeys = { 'hero.description': 'Open Code Review 将阿里巴巴经大规模生产验证的代码评审 Agent 带入你的工作流。接入任意 LLM,数据完全私有,获得开发者真正愿意采纳的评审意见。', 'hero.pill1': '采纳率 > 30%', 'hero.pill2': '数据本地闭环', - 'hero.pill3': 'Token 消耗仅 1/5', + 'hero.pill3': 'Token 消耗仅 1/9', 'hero.cta1': '快速开始', 'hero.cta2': '查看基准测试', 'hero.users': '2 万+ 活跃用户', @@ -30,8 +30,10 @@ export const zh: TranslationKeys = { 'highlights.stat2Value': '1M+', 'highlights.stat2Caption': '累计运行代码评审任务', 'highlights.stat3Label': 'Token 效率', - 'highlights.stat3Caption': '相比通用 Agent + Skills 方案', + 'highlights.stat3Value': '1/9', + 'highlights.stat3Caption': '相比 Claude Code · 基于 1,000 次 PR 评审', 'highlights.stat4Label': 'AACR-Bench', + 'highlights.stat4Value': '25.1%', 'highlights.stat4Caption': 'SEM.F1 基准测试得分', // Why Section @@ -64,7 +66,10 @@ export const zh: TranslationKeys = { // Benchmark Section 'benchmark.sectionLabel': '开放基准测试', 'benchmark.title': '80+ 位资深工程师交叉标注验证', - 'benchmark.subtitle': '基于真实场景的 CodeReview 基准测试,从 50 个热门开源仓库中精选 200 个真实的 PullRequest,覆盖 10 种编程语言、多种问题类型与不同的变更规模,并由 80+ 位资深工程师交叉标注完成。', + 'benchmark.subtitlePreRepos': '基于真实场景的 CodeReview 基准测试,从 ', + 'benchmark.subtitlePrePRs': ' 个热门开源仓库中精选 ', + 'benchmark.subtitlePreLangs': ' 个真实的 PullRequest,覆盖 ', + 'benchmark.subtitleEnd': ' 种编程语言、多种问题类型与不同的变更规模。', 'benchmark.legendOcr': 'Open Code Review', 'benchmark.legendCc': 'Claude Code · /code-review', 'benchmark.colRank': '排名',