@@ -3,42 +3,60 @@ import clsx from 'clsx';
3
3
import styles from './styles.module.css' ;
4
4
import Heading from "@theme/Heading" ;
5
5
import Link from '@docusaurus/Link' ;
6
+ import useDocusaurusContext from '@docusaurus/useDocusaurusContext' ;
6
7
7
8
type FeatureItem = {
8
9
title : string ;
9
10
description : ReactNode ;
10
11
icon ?: ReactNode ;
11
12
} ;
12
13
13
- const FeatureList : FeatureItem [ ] = [
14
- {
15
- title : '智能任务自动化' ,
16
- description : (
17
- < >
18
- 利用 AutoDev Planner 结合 AI 模型,自动规划与执行复杂的开发任务(编码、测试、构建等),支持手动调整,简化工作流程。
19
- </ >
20
- ) ,
21
- icon : < div className = { styles . featureIconBrain } />
22
- } ,
23
- {
24
- title : '高度定制化体验' ,
25
- description : (
26
- < >
27
- 支持自定义智能体、私有模型及提示词指令,轻松打造满足个人、团队或企业特定需求的 AutoDev 工作流,提升开发效率。
28
- </ >
29
- ) ,
30
- icon : < div className = { styles . featureIconSettings } />
31
- } ,
32
- {
33
- title : '精准上下文感知' ,
34
- description : (
35
- < >
36
- 深度整合 IDE 插件并支持 MCP 协议,为 AI 提供丰富准确的项目上下文,显著减少 AI 幻觉,确保结果更可靠。
37
- </ >
38
- ) ,
39
- icon : < div className = { styles . featureIconCode } />
40
- } ,
41
- ] ;
14
+ function useFeatureList ( ) {
15
+ const { i18n : { currentLocale } } = useDocusaurusContext ( ) ;
16
+ const isEnglish = currentLocale === 'en' ;
17
+
18
+ return [
19
+ {
20
+ title : isEnglish ? 'Intelligent Task Automation' : '智能任务自动化' ,
21
+ description : isEnglish ? (
22
+ < >
23
+ Leverage AutoDev Planner with AI models to automatically plan and execute complex development tasks (coding, testing, building, etc.), supporting manual adjustments and simplifying workflows.
24
+ </ >
25
+ ) : (
26
+ < >
27
+ 利用 AutoDev Planner 结合 AI 模型,自动规划与执行复杂的开发任务(编码、测试、构建等),支持手动调整,简化工作流程。
28
+ </ >
29
+ ) ,
30
+ icon : < div className = { styles . featureIconBrain } />
31
+ } ,
32
+ {
33
+ title : isEnglish ? 'Highly Customizable Experience' : '高度定制化体验' ,
34
+ description : isEnglish ? (
35
+ < >
36
+ Support for custom agents, private models, and prompt instructions, easily creating AutoDev workflows that meet the specific needs of individuals, teams, or enterprises to improve development efficiency.
37
+ </ >
38
+ ) : (
39
+ < >
40
+ 支持自定义智能体、私有模型及提示词指令,轻松打造满足个人、团队或企业特定需求的 AutoDev 工作流,提升开发效率。
41
+ </ >
42
+ ) ,
43
+ icon : < div className = { styles . featureIconSettings } />
44
+ } ,
45
+ {
46
+ title : isEnglish ? 'Precise Context Awareness' : '精准上下文感知' ,
47
+ description : isEnglish ? (
48
+ < >
49
+ Deep integration with IDE plugins and support for MCP protocol, providing rich and accurate project context for AI, significantly reducing AI hallucinations and ensuring more reliable results.
50
+ </ >
51
+ ) : (
52
+ < >
53
+ 深度整合 IDE 插件并支持 MCP 协议,为 AI 提供丰富准确的项目上下文,显著减少 AI 幻觉,确保结果更可靠。
54
+ </ >
55
+ ) ,
56
+ icon : < div className = { styles . featureIconCode } />
57
+ } ,
58
+ ] ;
59
+ }
42
60
43
61
function Feature ( { title, description, icon} : FeatureItem ) {
44
62
return (
@@ -56,7 +74,15 @@ function Feature({title, description, icon}: FeatureItem) {
56
74
57
75
// Quick links section
58
76
function QuickLinks ( ) {
59
- const links = [
77
+ const { i18n : { currentLocale } } = useDocusaurusContext ( ) ;
78
+ const isEnglish = currentLocale === 'en' ;
79
+
80
+ const links = isEnglish ? [
81
+ { title : 'Installation Guide' , description : 'Quickly set up AutoDev in your environment' , link : '/quick-start' } ,
82
+ { title : 'AI Programmer' , description : 'Explore AutoDev Sketch automatic coding' , link : '/composer' } ,
83
+ { title : 'Customization' , description : 'Learn how to customize AutoDev for your specific needs' , link : '/customize' } ,
84
+ { title : 'Agents' , description : 'Build personal, team agents, integrate company agents' , link : '/agent' } ,
85
+ ] : [
60
86
{ title : '安装指南' , description : '快速在您的环境中设置 AutoDev' , link : '/quick-start' } ,
61
87
{ title : 'AI 程序员' , description : '探索 AutoDev Sketch 自动编码' , link : '/composer' } ,
62
88
{ title : '定制化' , description : '学习如何根据您的特定需求自定义 AutoDev' , link : '/customize' } ,
@@ -67,8 +93,8 @@ function QuickLinks() {
67
93
< section className = { styles . quickLinks } >
68
94
< div className = "container" >
69
95
< div className = "text--center margin-bottom--xl" >
70
- < Heading as = "h2" > 快速开始</ Heading >
71
- < p > 探索我们的文档,了解更多关于 AutoDev 的信息</ p >
96
+ < Heading as = "h2" > { isEnglish ? 'Quick Start' : ' 快速开始' } </ Heading >
97
+ < p > { isEnglish ? 'Explore our documentation to learn more about AutoDev' : ' 探索我们的文档,了解更多关于 AutoDev 的信息' } </ p >
72
98
</ div >
73
99
< div className = "row" >
74
100
{ links . map ( ( item , idx ) => (
@@ -87,82 +113,85 @@ function QuickLinks() {
87
113
}
88
114
89
115
function ComparisonTable ( ) {
116
+ const { i18n : { currentLocale } } = useDocusaurusContext ( ) ;
117
+ const isEnglish = currentLocale === 'en' ;
118
+
90
119
return (
91
120
< section className = { styles . comparisonSection } >
92
121
< div className = "container" >
93
122
< div className = "text--center margin-bottom--xl" >
94
- < Heading as = "h2" > AutoDev 与传统 AI 编码助手的对比</ Heading >
95
- < p > 了解 AutoDev 如何从传统 AI 编码助手中脱颖而出</ p >
123
+ < Heading as = "h2" > { isEnglish ? ' AutoDev vs Traditional AI Coding Assistants' : 'AutoDev 与传统 AI 编码助手的对比' } </ Heading >
124
+ < p > { isEnglish ? 'Learn how AutoDev stands out from traditional AI coding assistants' : ' 了解 AutoDev 如何从传统 AI 编码助手中脱颖而出' } </ p >
96
125
</ div >
97
126
< div className = { styles . tableWrapper } >
98
127
< table className = { styles . comparisonTable } >
99
128
< thead >
100
129
< tr >
101
- < th className = { styles . featureCell } > 功能 </ th >
102
- < th > 传统 AI 助手</ th >
130
+ < th className = { styles . featureCell } > { isEnglish ? 'Feature' : '功能' } </ th >
131
+ < th > { isEnglish ? 'Traditional AI Assistants' : ' 传统 AI 助手' } </ th >
103
132
< th className = { styles . advantageCell } > AutoDev</ th >
104
133
</ tr >
105
134
</ thead >
106
135
< tbody >
107
136
< tr >
108
- < td className = { styles . featureCell } > 主要功能</ td >
109
- < td > 代码建议和补全</ td >
110
- < td className = { styles . advantageCell } > 自主规划和执行复杂开发任务</ td >
137
+ < td className = { styles . featureCell } > { isEnglish ? 'Main Function' : ' 主要功能' } </ td >
138
+ < td > { isEnglish ? 'Code suggestions and completions' : ' 代码建议和补全' } </ td >
139
+ < td className = { styles . advantageCell } > { isEnglish ? 'Autonomous planning and execution of complex development tasks' : ' 自主规划和执行复杂开发任务' } </ td >
111
140
</ tr >
112
141
< tr >
113
- < td className = { styles . featureCell } > 代码修改</ td >
114
- < td > 建议代码片段</ td >
115
- < td className = { styles . advantageCell } > 自主编辑、重构和改进现有代码</ td >
142
+ < td className = { styles . featureCell } > { isEnglish ? 'Code Modification' : ' 代码修改' } </ td >
143
+ < td > { isEnglish ? 'Suggest code snippets' : ' 建议代码片段' } </ td >
144
+ < td className = { styles . advantageCell } > { isEnglish ? 'Autonomously edit, refactor, and improve existing code' : ' 自主编辑、重构和改进现有代码' } </ td >
116
145
</ tr >
117
146
< tr >
118
- < td className = { styles . featureCell } > 构建与执行</ td >
147
+ < td className = { styles . featureCell } > { isEnglish ? 'Build & Execute' : ' 构建与执行' } </ td >
119
148
< td >
120
149
< div className = { styles . disadvantage } >
121
150
< span className = { styles . xIcon } > ✕</ span >
122
- < span > 有限或无</ span >
151
+ < span > { isEnglish ? 'Limited or none' : ' 有限或无' } </ span >
123
152
</ div >
124
153
</ td >
125
154
< td className = { styles . advantageCell } >
126
155
< div className = { styles . advantage } >
127
156
< span className = { styles . checkIcon } > ✓</ span >
128
- < span > 在安全环境中构建和执行代码</ span >
157
+ < span > { isEnglish ? 'Build and execute code in a safe environment' : ' 在安全环境中构建和执行代码' } </ span >
129
158
</ div >
130
159
</ td >
131
160
</ tr >
132
161
< tr >
133
- < td className = { styles . featureCell } > 测试 </ td >
162
+ < td className = { styles . featureCell } > { isEnglish ? 'Testing' : '测试' } </ td >
134
163
< td >
135
164
< div className = { styles . disadvantage } >
136
165
< span className = { styles . xIcon } > ✕</ span >
137
- < span > 有限的测试生成</ span >
166
+ < span > { isEnglish ? 'Limited test generation' : ' 有限的测试生成' } </ span >
138
167
</ div >
139
168
</ td >
140
169
< td className = { styles . advantageCell } >
141
170
< div className = { styles . advantage } >
142
171
< span className = { styles . checkIcon } > ✓</ span >
143
- < span > 创建并运行全面的测试</ span >
172
+ < span > { isEnglish ? 'Create and run comprehensive tests' : ' 创建并运行全面的测试' } </ span >
144
173
</ div >
145
174
</ td >
146
175
</ tr >
147
176
< tr >
148
- < td className = { styles . featureCell } > Git 操作 </ td >
177
+ < td className = { styles . featureCell } > { isEnglish ? ' Git Operations' : 'Git 操作' } </ td >
149
178
< td >
150
179
< div className = { styles . disadvantage } >
151
180
< span className = { styles . xIcon } > ✕</ span >
152
- < span > 无 </ span >
181
+ < span > { isEnglish ? 'None' : '无' } </ span >
153
182
</ div >
154
183
</ td >
155
184
< td className = { styles . advantageCell } >
156
185
< div className = { styles . advantage } >
157
186
< span className = { styles . checkIcon } > ✓</ span >
158
- < span > 管理分支、提交和 PR</ span >
187
+ < span > { isEnglish ? 'Manage branches, commits, and PRs' : ' 管理分支、提交和 PR' } </ span >
159
188
</ div >
160
189
</ td >
161
190
</ tr >
162
191
< tr >
163
- < td className = { styles . featureCell } > 工作流复杂性</ td >
164
- < td > 简单、孤立的任务</ td >
165
- < td className = { styles . advantageCell } > 端到端复杂开发工作流</ td >
192
+ < td className = { styles . featureCell } > { isEnglish ? 'Workflow Complexity' : ' 工作流复杂性' } </ td >
193
+ < td > { isEnglish ? 'Simple, isolated tasks' : ' 简单、孤立的任务' } </ td >
194
+ < td className = { styles . advantageCell } > { isEnglish ? 'End-to-end complex development workflows' : ' 端到端复杂开发工作流' } </ td >
166
195
</ tr >
167
196
</ tbody >
168
197
</ table >
@@ -174,8 +203,15 @@ function ComparisonTable() {
174
203
175
204
// Community section
176
205
function Community ( ) {
177
- const resources = [
178
- { title : 'GitHub' , description : '为我们的仓库加星标,报告问题,并为代码库做出贡献' , link : 'https://github.com/username/autodev' , icon : < div className = { styles . communityIconGithub } /> } ,
206
+ const { i18n : { currentLocale } } = useDocusaurusContext ( ) ;
207
+ const isEnglish = currentLocale === 'en' ;
208
+
209
+ const resources = isEnglish ? [
210
+ { title : 'GitHub' , description : 'Star our repository, report issues, and contribute to the codebase' , link : 'https://github.com/unit-mesh/auto-dev' , icon : < div className = { styles . communityIconGithub } /> } ,
211
+ { title : 'Research Paper' , description : 'Read our academic paper on arXiv to learn about the research behind AutoDev' , link : '' , icon : < div className = { styles . communityIconPaper } /> } ,
212
+ { title : 'WeChat Group' , description : 'Join our WeChat community to connect with other developers and get support (Add phodal02 as friend, note: AutoDev)' , link : '' , icon : < div className = { styles . communityIconDiscord } /> } ,
213
+ ] : [
214
+ { title : 'GitHub' , description : '为我们的仓库加星标,报告问题,并为代码库做出贡献' , link : 'https://github.com/unit-mesh/auto-dev' , icon : < div className = { styles . communityIconGithub } /> } ,
179
215
{ title : '研究论文' , description : '阅读我们在 arXiv 上的学术论文,了解 AutoDev 背后的研究' , link : '' , icon : < div className = { styles . communityIconPaper } /> } ,
180
216
{ title : '微信群' , description : '加入我们的 Wechat 社区,与其他开发者交流并获取支持(添加 phodal02 为好友,注明:AutoDev)' , link : '' , icon : < div className = { styles . communityIconDiscord } /> } ,
181
217
] ;
@@ -184,8 +220,8 @@ function Community() {
184
220
< section className = { styles . communitySection } >
185
221
< div className = "container" >
186
222
< div className = "text--center margin-bottom--xl" >
187
- < Heading as = "h2" > 加入我们的社区</ Heading >
188
- < p > 与其他开发者联系并为 AutoDev 做出贡献</ p >
223
+ < Heading as = "h2" > { isEnglish ? 'Join Our Community' : ' 加入我们的社区' } </ Heading >
224
+ < p > { isEnglish ? 'Connect with other developers and contribute to AutoDev' : ' 与其他开发者联系并为 AutoDev 做出贡献' } </ p >
189
225
</ div >
190
226
< div className = "row" >
191
227
{ resources . map ( ( item , idx ) => (
@@ -204,12 +240,14 @@ function Community() {
204
240
}
205
241
206
242
export default function HomepageFeatures ( ) : ReactNode {
243
+ const featureList = useFeatureList ( ) ;
244
+
207
245
return (
208
246
< >
209
247
< section className = { styles . features } >
210
248
< div className = "container" >
211
249
< div className = "row" >
212
- { FeatureList . map ( ( props , idx ) => (
250
+ { featureList . map ( ( props , idx ) => (
213
251
< Feature key = { idx } { ...props } />
214
252
) ) }
215
253
</ div >
0 commit comments