Skip to content

Commit 0e4289f

Browse files
committed
docs: add lost doc
1 parent 322c46b commit 0e4289f

File tree

4 files changed

+80
-27
lines changed

4 files changed

+80
-27
lines changed

docs/agent/custom-ai-agent.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,19 @@ Demo:
2828
[
2929
{
3030
"name": "内部 API 集成",
31+
"description": "在一个组织或项目中,不同系统或组件之间的通信接口。",
3132
"url": "http://127.0.0.1:8765/api/agent/api-market",
3233
"responseAction": "Direct"
3334
},
3435
{
3536
"name": "组件库查询",
37+
"description": "从组件库中检索特定的 UI 组件,以便在开发的应用程序中使用。",
3638
"url": "http://127.0.0.1:8765/api/agent/component-list",
3739
"responseAction": "TextChunk"
3840
},
3941
{
4042
"name": "页面生成",
43+
"description": "使用 React 框架,基于组件和状态来生成页面。",
4144
"url": "http://127.0.0.1:8765/api/agent/ux",
4245
"auth": {
4346
"type": "Bearer",

docs/patterns/by-example.md

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ nav_order: 1
55
parent: Design Patterns
66
---
77

8-
根据当前的用户习惯,寻找待生成的内容作为示例,而后作为生成式 AI 的输入。
8+
> Finding example content as context to generate as input for the generative AI, based on current user habits.
99
10-
## 提交信息示例
10+
## Git Commit message Example
1111

12-
步骤:
12+
Implementation steps:
1313

14-
1. 获取当前项目的版本控制系统(VCS)日志提供者。
15-
2. 获取当前分支和用户。
16-
3. 根据用户或分支过滤日志。
17-
4. 收集示例提交信息。
14+
1. Retrieve version control system (VCS) log providers for the current project.
15+
2. Get the current branch and user.
16+
3. Filter logs based on user or branch.
17+
4. Collect example submission information.
1818

19-
代码示例:
19+
### Code Implementation
2020

2121
```kotlin
2222
private fun findExampleCommitMessages(project: Project): String? {
2323
val logProviders = VcsProjectLog.getLogProviders(project)
24-
val entry = logProviders.entries.firstOrNull() ?: return null
24+
logProviders.entries.firstOrNull() ?: return null
2525

2626
val logProvider = entry.value
2727
val branch = logProvider.getCurrentBranch(entry.key) ?: return null
@@ -37,18 +37,43 @@ private fun findExampleCommitMessages(project: Project): String? {
3737
}
3838
```
3939

40-
## 代码示例:测试代码示例
40+
### Template Example
41+
42+
Write a cohesive yet descriptive commit message for a given diff.
43+
- Make sure to include both information What was changed and Why.
44+
- Start with a short sentence in imperative form, no more than 50 characters long.
45+
- Then leave an empty line and continue with a more detailed explanation, if necessary.
46+
- Explanation should have less than 200 characters.
47+
48+
Follow the Conventional Commits specification, examples:
49+
- fix(authentication): fix password regex pattern case
50+
- feat(storage): add support for S3 storage
51+
- test(java): fix test case for user controller
52+
- docs(docs): add architecture diagram to home page
53+
54+
#if( $context.historyExamples.length() > 0 )
55+
Here is History Examples:
56+
$context.historyExamples
57+
#end
58+
59+
Diff:
60+
61+
```diff
62+
${context.diffContent}
4163

42-
参考语言实现:`JavaTestContextProvider``KotlinTestContextProvider`
64+
## Code Example: Testing Code Samples
4365

44-
步骤:
66+
Reference language implementations: `JavaTestContextProvider`, `KotlinTestContextProvider`.
4567

46-
1. 获取当前项目的被测试代码。
47-
2. 根据被测试代码寻找模板:`Controller``Service`、默认测试等。
48-
- Kotlin:`ControllerTest.kt`, `ServiceTest.kt`, `Test.kt`
49-
- Java: `ControllerTest.java`, `ServiceTest.java`, `Test.java`
50-
3. 根据模板生成测试代码。
68+
Steps:
5169

52-
## 文档示例
70+
1. Retrieve the tested code for the current project.
71+
2. Find templates based on the tested code: `Controller`, `Service`, default tests, etc.
72+
- Kotlin: `ControllerTest.kt`, `ServiceTest.kt`, `Test.kt`
73+
- Java: `ControllerTest.java`, `ServiceTest.java`, `Test.java`
74+
3. Generate testing code based on templates.
75+
76+
## Document Example
5377

5478
DOC TODO
79+
```

docs/patterns/task-driven.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ nav_order: 3
55
parent: Design Patterns
66
---
77

8-
// TODO
8+
In issue [#79](https://github.com/unit-mesh/auto-dev/issues/79), we defined the concept of "task-driven AI generation"
9+
as a method or concept that emphasizes the use of artificial intelligence (AI) generation targeted at specific tasks or
10+
goals to meet particular needs or goals. In this context, tasks can refer to various modules in software development,
11+
such as function blocks, class blocks, test methods, SQL snippets, code snippets, or even user requirements, among
12+
others.
13+
14+
## Task Driven
15+

docs/patterns/unit-driven.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,33 @@ nav_order: 2
55
parent: Design Patterns
66
---
77

8-
"单元驱动 AI 生成" 是一种方法或理念,它强调通过针对具体的单元或模块进行人工智能(AI)生成,以满足特定的需求或目标。在这个上下文中,
9-
单元可以是各种软件开发中的模块,如函数块、类块、测试方法、SQL 片段、代码片段,甚至可以是用户需求等等。
8+
> "Unit-driven AI generation" is a method or concept that emphasizes the use of artificial intelligence (AI) generation
9+
> targeted at specific units or modules to meet particular needs or goals. In this context, units can refer to various
10+
> modules in software development, such as function blocks, class blocks, test methods, SQL snippets, code snippets, or
11+
> even user requirements, among others.
1012
11-
这种方法的核心思想是将整个系统或应用划分为小的、独立的单元,然后使用AI技术为每个单元生成相应的代码、脚本、查询或其他必要的实现。
12-
这种方法有助于提高开发效率,减少重复工作,同时确保每个单元都能够独立运作,并且在整个系统中具有一致性。
13+
The core idea of this approach is to divide the entire system or application into small, independent units and then use
14+
AI technology to generate corresponding code, scripts, queries, or other necessary implementations for each unit. This
15+
approach helps improve development efficiency, reduce repetitive work, and ensure that each unit can operate
16+
independently and consistently throughout the system.
1317

14-
具体而言,单元驱动 AI 生成可以涉及到使用自然语言处理(NLP)技术解析用户需求,然后生成对应的代码片段;或者针对特定的编程语言、数据库查询语言等,
15-
通过学习和推理生成相应的单元实现。这种方法的优势在于能够更灵活地适应不同的需求和环境,同时提高开发的速度和质量。
18+
Specifically, unit-driven AI generation may involve using natural language processing (NLP) techniques to parse user
19+
requirements and then generate corresponding code snippets. Alternatively, it could involve learning and inference to
20+
generate corresponding unit implementations for specific programming languages, database query languages, etc. The
21+
advantage of this approach is its flexibility in adapting to different requirements and environments while increasing
22+
the speed and quality of development.
1623

17-
## Unit Driven 示例
24+
## Unit Driven Example
25+
26+
### AutoSQL
27+
28+
see in [AutoSQL](https://github.com/unit-mesh/auto-dev/tree/master/exts/database/src/main/kotlin/cc/unitmesh/database/flow)
29+
30+
### AutoPage
31+
32+
see in [AutoPage](https://github.com/unit-mesh/auto-dev/tree/master/javascript/src/main/kotlin/cc/unitmesh/ide/javascript/flow)
33+
34+
### AutoArkUI
35+
36+
see in [AutoArkUI](https://github.com/unit-mesh/auto-dev/tree/master/exts/ext-harmonyos/src/main/kotlin/cc/unitmesh/harmonyos/actions/auto)
1837

19-
AutoSQL,AutoPage,AutoTest

0 commit comments

Comments
 (0)