@aigne/doc-smith 0.8.11-beta.6 → 0.8.11-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/.aigne/doc-smith/config.yaml +2 -0
  2. package/.aigne/doc-smith/output/structure-plan.json +2 -2
  3. package/.aigne/doc-smith/preferences.yml +28 -20
  4. package/.aigne/doc-smith/upload-cache.yaml +702 -0
  5. package/.release-please-manifest.json +1 -1
  6. package/CHANGELOG.md +13 -0
  7. package/README.md +1 -1
  8. package/agents/generate/document-structure-tools/add-document.mjs +35 -10
  9. package/agents/generate/document-structure-tools/delete-document.mjs +35 -12
  10. package/agents/generate/document-structure-tools/move-document.mjs +43 -17
  11. package/agents/generate/document-structure-tools/update-document.mjs +37 -10
  12. package/agents/generate/update-document-structure.yaml +1 -7
  13. package/agents/generate/user-review-document-structure.mjs +5 -4
  14. package/agents/translate/translate-document.yaml +1 -9
  15. package/agents/update/check-update-is-single.mjs +2 -1
  16. package/agents/update/document-tools/update-document-content.mjs +24 -14
  17. package/agents/update/fs-tools/glob.mjs +184 -0
  18. package/agents/update/fs-tools/grep.mjs +317 -0
  19. package/agents/update/fs-tools/read-file.mjs +307 -0
  20. package/agents/update/generate-document.yaml +4 -7
  21. package/agents/update/update-document-detail.yaml +6 -10
  22. package/agents/update/user-review-document.mjs +13 -13
  23. package/assets/screenshots/doc-complete-setup.png +0 -0
  24. package/assets/screenshots/doc-generate-docs.png +0 -0
  25. package/assets/screenshots/doc-generate.png +0 -0
  26. package/assets/screenshots/doc-generated-successfully.png +0 -0
  27. package/assets/screenshots/doc-publish.png +0 -0
  28. package/assets/screenshots/doc-regenerate.png +0 -0
  29. package/assets/screenshots/doc-translate-langs.png +0 -0
  30. package/assets/screenshots/doc-translate.png +0 -0
  31. package/assets/screenshots/doc-update.png +0 -0
  32. package/docs/advanced-how-it-works.ja.md +31 -31
  33. package/docs/advanced-how-it-works.md +9 -9
  34. package/docs/advanced-how-it-works.zh-TW.md +24 -24
  35. package/docs/advanced-how-it-works.zh.md +20 -20
  36. package/docs/advanced-quality-assurance.ja.md +57 -61
  37. package/docs/advanced-quality-assurance.md +57 -61
  38. package/docs/advanced-quality-assurance.zh-TW.md +57 -61
  39. package/docs/advanced-quality-assurance.zh.md +57 -61
  40. package/docs/advanced.ja.md +8 -4
  41. package/docs/advanced.md +7 -3
  42. package/docs/advanced.zh-TW.md +9 -5
  43. package/docs/advanced.zh.md +9 -5
  44. package/docs/changelog.ja.md +206 -29
  45. package/docs/changelog.md +177 -0
  46. package/docs/changelog.zh-TW.md +229 -52
  47. package/docs/changelog.zh.md +204 -27
  48. package/docs/cli-reference.ja.md +82 -52
  49. package/docs/cli-reference.md +56 -26
  50. package/docs/cli-reference.zh-TW.md +82 -52
  51. package/docs/cli-reference.zh.md +70 -40
  52. package/docs/configuration-interactive-setup.ja.md +45 -42
  53. package/docs/configuration-interactive-setup.md +8 -5
  54. package/docs/configuration-interactive-setup.zh-TW.md +26 -23
  55. package/docs/configuration-interactive-setup.zh.md +25 -22
  56. package/docs/configuration-language-support.ja.md +33 -63
  57. package/docs/configuration-language-support.md +32 -62
  58. package/docs/configuration-language-support.zh-TW.md +35 -65
  59. package/docs/configuration-language-support.zh.md +32 -62
  60. package/docs/configuration-llm-setup.ja.md +25 -23
  61. package/docs/configuration-llm-setup.md +20 -18
  62. package/docs/configuration-llm-setup.zh-TW.md +21 -19
  63. package/docs/configuration-llm-setup.zh.md +20 -18
  64. package/docs/configuration-preferences.ja.md +67 -52
  65. package/docs/configuration-preferences.md +56 -41
  66. package/docs/configuration-preferences.zh-TW.md +69 -54
  67. package/docs/configuration-preferences.zh.md +68 -53
  68. package/docs/configuration.ja.md +65 -81
  69. package/docs/configuration.md +19 -35
  70. package/docs/configuration.zh-TW.md +62 -79
  71. package/docs/configuration.zh.md +50 -67
  72. package/docs/features-generate-documentation.ja.md +44 -69
  73. package/docs/features-generate-documentation.md +36 -61
  74. package/docs/features-generate-documentation.zh-TW.md +42 -67
  75. package/docs/features-generate-documentation.zh.md +41 -67
  76. package/docs/features-publish-your-docs.ja.md +36 -36
  77. package/docs/features-publish-your-docs.md +2 -2
  78. package/docs/features-publish-your-docs.zh-TW.md +21 -21
  79. package/docs/features-publish-your-docs.zh.md +23 -23
  80. package/docs/features-translate-documentation.ja.md +40 -31
  81. package/docs/features-translate-documentation.md +15 -6
  82. package/docs/features-translate-documentation.zh-TW.md +37 -28
  83. package/docs/features-translate-documentation.zh.md +23 -14
  84. package/docs/features-update-and-refine.ja.md +68 -118
  85. package/docs/features-update-and-refine.md +58 -108
  86. package/docs/features-update-and-refine.zh-TW.md +67 -116
  87. package/docs/features-update-and-refine.zh.md +64 -114
  88. package/docs/features.ja.md +29 -19
  89. package/docs/features.md +25 -15
  90. package/docs/features.zh-TW.md +28 -18
  91. package/docs/features.zh.md +31 -21
  92. package/docs/getting-started.ja.md +40 -43
  93. package/docs/getting-started.md +36 -39
  94. package/docs/getting-started.zh-TW.md +38 -41
  95. package/docs/getting-started.zh.md +45 -48
  96. package/docs/overview.ja.md +63 -11
  97. package/docs/overview.md +60 -8
  98. package/docs/overview.zh-TW.md +67 -15
  99. package/docs/overview.zh.md +62 -10
  100. package/media.md +9 -9
  101. package/package.json +1 -1
  102. package/prompts/detail/custom/custom-components.md +304 -188
  103. package/prompts/detail/document-rules.md +4 -4
  104. package/prompts/detail/generate-document.md +21 -8
  105. package/prompts/detail/update-document.md +8 -12
  106. package/prompts/structure/update-document-structure.md +12 -8
  107. package/prompts/utils/feedback-refiner.md +3 -3
  108. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +9 -9
  109. package/tests/agents/generate/user-review-document-structure.test.mjs +29 -8
  110. package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
  111. package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
  112. package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
  113. package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
  114. package/tests/agents/update/user-review-document.test.mjs +48 -27
  115. package/types/document-schema.mjs +5 -6
  116. package/types/document-structure-schema.mjs +20 -8
@@ -1,94 +1,64 @@
1
1
  # Language Support
2
2
 
3
- AIGNE DocSmith uses AI to provide automated documentation translation into 12 languages. Generate and maintain documentation for a global audience using the `aigne doc translate` command.
4
-
5
- The translation workflow processes your source documents through an AI engine to generate localized versions in your selected target languages.
6
-
7
- ```d2
8
- direction: down
9
-
10
- Source-Doc: {
11
- label: "Source Document\n(e.g., English)"
12
- shape: rectangle
13
- }
14
-
15
- AI-Engine: {
16
- label: "AIGNE DocSmith\nAI Translation Engine"
17
- shape: rectangle
18
- }
19
-
20
- Translated-Docs: {
21
- label: "Translated Documents"
22
- shape: rectangle
23
- grid-columns: 3
24
-
25
- zh: "简体中文"
26
- ja: "日本語"
27
- es: "Español"
28
- fr: "Français"
29
- de: "Deutsch"
30
- more: "..."
31
- }
32
-
33
- Source-Doc -> AI-Engine: "`aigne doc translate`"
34
- AI-Engine -> Translated-Docs: "Generates"
35
- ```
3
+ AIGNE DocSmith provides automated documentation translation into 12 languages, enabling you to generate and maintain localized content for a global audience. This functionality is primarily managed through the `aigne doc translate` command.
4
+
5
+ The translation workflow uses an AI engine to process your source documents and generate versions in your selected target languages. The `aigne doc translate` command offers an interactive interface to guide you through selecting documents and languages for translation.
6
+
7
+ ![Interactive document translation flow](../assets/screenshots/doc-translate.png)
36
8
 
37
9
  ## Supported Languages
38
10
 
39
- DocSmith offers AI-powered translations for the following languages. You can define your project's primary language during the initial setup and select any number of target languages for translation.
40
-
41
- | Language | Language Code | Sample Text |
42
- |---|---|---|
43
- | English | `en` | Hello |
44
- | 简体中文 | `zh` | 你好 |
45
- | 繁體中文 | `zh-TW` | 你好 |
46
- | 日本語 | `ja` | こんにちは |
47
- | 한국어 | `ko` | 안녕하세요 |
48
- | Español | `es` | Hola |
49
- | Français | `fr` | Bonjour |
50
- | Deutsch | `de` | Hallo |
51
- | Português | `pt` | Olá |
52
- | Русский | `ru` | Привет |
53
- | Italiano | `it` | Ciao |
54
- | العربية | `ar` | مرحبا |
11
+ DocSmith supports AI-powered translations for the following languages. Your project's primary language can be defined during the initial setup with `aigne doc init`, and you can select any number of the following languages for translation.
12
+
13
+ | Language | Language Code |
14
+ |---|---|
15
+ | English | `en` |
16
+ | 简体中文 | `zh` |
17
+ | 繁體中文 | `zh-TW` |
18
+ | 日本語 | `ja` |
19
+ | 한국어 | `ko` |
20
+ | Español | `es` |
21
+ | Français | `fr` |
22
+ | Deutsch | `de` |
23
+ | Português | `pt` |
24
+ | Русский | `ru` |
25
+ | Italiano | `it` |
26
+ | العربية | `ar` |
55
27
 
56
28
  ## How to Configure and Use Translation
57
29
 
58
- Translation languages are set when you initialize your project with `aigne doc init`. You can add new languages or translate documents at any time using the `aigne doc translate` command, which has two modes of operation.
30
+ Language settings are configured when you initialize a project. You can add new languages or translate existing documents at any time using the `aigne doc translate` command, which supports two operational modes.
59
31
 
60
32
  ### Interactive Mode for Guided Translation
61
33
 
62
- For a step-by-step guided experience, run the command without any arguments. This is the recommended approach for most users.
34
+ For a step-by-step guided process, run the command without any arguments. This method is recommended for most users.
63
35
 
64
36
  ```bash Interactive Translation icon=lucide:wand
65
37
  aigne doc translate
66
38
  ```
67
39
 
68
- The interactive mode will then present a series of prompts that allow you to:
40
+ The interactive mode presents a series of prompts, allowing you to select which documents to translate and choose your target languages from a list. This mode also allows you to add new translation languages to your project's configuration if they are not already included.
69
41
 
70
- 1. Select which of your existing documents to translate from a list.
71
- 2. Choose one or more target languages from the supported list.
72
- 3. Add new translation languages to your project's configuration if they are not already included.
42
+ ![Selecting target languages for translation](../assets/screenshots/doc-translate-langs.png)
73
43
 
74
44
  ### Command-Line Arguments for Automation
75
45
 
76
- For direct control or for use in automated scripts, you can specify documents and languages directly as command-line arguments. This is ideal for developers and CI/CD pipelines.
46
+ For direct control or for use in automated scripts, you can specify documents and languages as command-line arguments. This method is suitable for integration into CI/CD pipelines.
77
47
 
78
48
  ```bash Command Example icon=lucide:terminal
79
49
  # Translate overview.md and examples.md into Chinese and Japanese
80
50
  aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
81
51
  ```
82
52
 
83
- Key parameters for the command include:
53
+ The following table details the key parameters for the `translate` command:
84
54
 
85
55
  | Parameter | Description |
86
56
  |---|---|
87
- | `--langs` | Specify a target language code. This flag can be used multiple times to select several languages. |
88
- | `--docs` | Specify the path to a document to translate (e.g., `overview.md`). This can also be used multiple times. |
89
- | `--feedback` | Provide specific instructions to guide the translation model (e.g., `"Use a formal tone"`). |
90
- | `--glossary` | Use a custom glossary file (e.g., `@path/to/glossary.md`) to ensure consistent translation of project-specific terms. |
57
+ | `--langs` | Specifies a target language code. This flag can be used multiple times to select several languages. |
58
+ | `--docs` | Specifies the path to a document to translate (e.g., `overview.md`). This flag can also be used multiple times. |
59
+ | `--feedback` | Provides specific instructions to guide the translation model (e.g., `"Use a formal tone"`). |
60
+ | `--glossary` | Uses a custom glossary file (e.g., `@path/to/glossary.md`) to ensure consistent translation of project-specific terms. |
91
61
 
92
62
  ---
93
63
 
94
- This section covers the available languages and how to enable them. For a complete guide on the translation workflow, see the [Translate Documentation](./features-translate-documentation.md) guide.
64
+ This section provides an overview of the available languages and how to enable them. For a complete guide on the translation workflow, refer to the [Translate Documentation](./features-translate-documentation.md) guide.
@@ -1,94 +1,64 @@
1
1
  # 語言支援
2
2
 
3
- AIGNE DocSmith 使用 AI 提供 12 種語言的自動化文件翻譯。這讓您可以使用 `aigne doc translate` 命令為全球使用者產生和維護文件。
4
-
5
- 翻譯工作流程會透過 AI 引擎處理您的來源文件,以產生您所選目標語言的本地化版本。
6
-
7
- ```d2
8
- direction: down
9
-
10
- Source-Doc: {
11
- label: "來源文件\n(例如,英文)"
12
- shape: rectangle
13
- }
14
-
15
- AI-Engine: {
16
- label: "AIGNE DocSmith\nAI 翻譯引擎"
17
- shape: rectangle
18
- }
19
-
20
- Translated-Docs: {
21
- label: "翻譯後的文件"
22
- shape: rectangle
23
- grid-columns: 3
24
-
25
- zh: "简体中文"
26
- ja: "日本語"
27
- es: "Español"
28
- fr: "Français"
29
- de: "Deutsch"
30
- more: "..."
31
- }
32
-
33
- Source-Doc -> AI-Engine: "`aigne doc translate`"
34
- AI-Engine -> Translated-Docs: "產生"
35
- ```
3
+ AIGNE DocSmith 提供 12 種語言的自動化文件翻譯功能,讓您能夠為全球受眾產生並維護本地化內容。此功能主要透過 `aigne doc translate` 命令進行管理。
36
4
 
37
- ## 支援的語言
5
+ 翻譯工作流程使用 AI 引擎處理您的來源文件,並產生您所選目標語言的版本。`aigne doc translate` 命令提供一個互動式介面,引導您選擇要翻譯的文件和語言。
38
6
 
39
- DocSmith 為以下語言提供 AI 驅動的翻譯。您可以在初始設定時定義專案的主要語言,並選擇任意數量的目標語言進行翻譯。
7
+ ![互動式文件翻譯流程](../assets/screenshots/doc-translate.png)
40
8
 
41
- | 語言 | 語言代碼 | 範例文字 |
42
- |---|---|---|
43
- | English | `en` | Hello |
44
- | 简体中文 | `zh` | 你好 |
45
- | 繁體中文 | `zh-TW` | 你好 |
46
- | 日本語 | `ja` | こんにちは |
47
- | 한국어 | `ko` | 안녕하세요 |
48
- | Español | `es` | Hola |
49
- | Français | `fr` | Bonjour |
50
- | Deutsch | `de` | Hallo |
51
- | Português | `pt` | Olá |
52
- | Русский | `ru` | Привет |
53
- | Italiano | `it` | Ciao |
54
- | العربية | `ar` | مرحبا |
9
+ ## 支援的語言
55
10
 
56
- ## 如何設定與使用翻譯
11
+ DocSmith 支援以下語言的 AI 翻譯。您可以在使用 `aigne doc init` 進行初始設定時定義專案的主要語言,並可選擇以下任何數量的語言進行翻譯。
57
12
 
58
- 翻譯語言是在您使用 `aigne doc init` 初始化專案時設定的。您可以隨時使用 `aigne doc translate` 命令新增語言或翻譯文件,該命令有兩種操作模式。
13
+ | 語言 | 語言代碼 |
14
+ |---|---|
15
+ | 英語 | `en` |
16
+ | 简体中文 | `zh` |
17
+ | 繁體中文 | `zh-TW` |
18
+ | 日本語 | `ja` |
19
+ | 한국어 | `ko` |
20
+ | Español | `es` |
21
+ | Français | `fr` |
22
+ | Deutsch | `de` |
23
+ | Português | `pt` |
24
+ | Русский | `ru` |
25
+ | Italiano | `it` |
26
+ | العربية | `ar` |
27
+
28
+ ## 如何設定與使用翻譯功能
29
+
30
+ 語言設定在您初始化專案時進行配置。您可以隨時使用 `aigne doc translate` 命令新增語言或翻譯現有文件,該命令支援兩種操作模式。
59
31
 
60
32
  ### 用於引導式翻譯的互動模式
61
33
 
62
- 若要獲得逐步引導的體驗,請在不帶任何參數的情況下執行此命令。這是對大多數使用者推薦的方法。
34
+ 若要進行逐步引導的流程,請執行不含任何參數的命令。建議大多數使用者使用此方法。
63
35
 
64
- ```bash Interactive Translation icon=lucide:wand
36
+ ```bash 互動式翻譯 icon=lucide:wand
65
37
  aigne doc translate
66
38
  ```
67
39
 
68
- 互動模式將會顯示一系列提示,讓您可以:
40
+ 互動模式會顯示一系列提示,讓您能夠選擇要翻譯的文件,並從清單中選擇您的目標語言。如果專案設定中尚未包含新的翻譯語言,此模式也允許您新增。
69
41
 
70
- 1. 從清單中選擇要翻譯的現有文件。
71
- 2. 從支援的清單中選擇一種或多種目標語言。
72
- 3. 如果專案設定中尚未包含新的翻譯語言,則可以將其新增。
42
+ ![選擇目標翻譯語言](../assets/screenshots/doc-translate-langs.png)
73
43
 
74
44
  ### 用於自動化的命令列參數
75
45
 
76
- 若要直接控制或在自動化腳本中使用,您可以直接將文件和語言指定為命令列參數。這對於開發人員和 CI/CD 管線來說是理想的選擇。
46
+ 為了直接控制或在自動化腳本中使用,您可以將文件和語言指定為命令列參數。此方法適合整合到 CI/CD 管線中。
77
47
 
78
- ```bash Command Example icon=lucide:terminal
48
+ ```bash 命令範例 icon=lucide:terminal
79
49
  # 將 overview.md 和 examples.md 翻譯成中文和日文
80
50
  aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
81
51
  ```
82
52
 
83
- 該命令的主要參數包括:
53
+ 下表詳細說明了 `translate` 命令的主要參數:
84
54
 
85
55
  | 參數 | 說明 |
86
56
  |---|---|
87
- | `--langs` | 指定目標語言代碼。此旗標可以多次使用以選擇多種語言。 |
88
- | `--docs` | 指定要翻譯的文件的路徑(例如,`overview.md`)。此旗標也可以多次使用。 |
89
- | `--feedback` | 提供具體說明以指導翻譯模型(例如,`"使用正式語氣"`)。 |
90
- | `--glossary` | 使用自訂詞彙表檔案(例如,`@path/to/glossary.md`)以確保專案特定術語的翻譯一致性。 |
57
+ | `--langs` | 指定目標語言代碼。此旗標可多次使用以選擇多種語言。 |
58
+ | `--docs` | 指定要翻譯的文件的路徑(例如 `overview.md`)。此旗標也可多次使用。 |
59
+ | `--feedback` | 提供具體指令以引導翻譯模型(例如 `「使用正式語氣」`)。 |
60
+ | `--glossary` | 使用自訂詞彙表檔案(例如 `@path/to/glossary.md`)以確保專案特定術語的翻譯一致性。 |
91
61
 
92
62
  ---
93
63
 
94
- 本節介紹了可用的語言以及如何啟用它們。有關翻譯工作流程的完整指南,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。
64
+ 本節概述了可用的語言以及如何啟用它們。有關翻譯工作流程的完整指南,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。
@@ -1,94 +1,64 @@
1
1
  # 语言支持
2
2
 
3
- AIGNE DocSmith 使用 AI 提供 12 种语言的自动化文档翻译。这使您可以使用 `aigne doc translate` 命令为全球受众生成和维护文档。
4
-
5
- 翻译工作流通过 AI 引擎处理您的源文档,以生成所选目标语言的本地化版本。
6
-
7
- ```d2
8
- direction: down
9
-
10
- Source-Doc: {
11
- label: "源文档\n(例如,英语)"
12
- shape: rectangle
13
- }
14
-
15
- AI-Engine: {
16
- label: "AIGNE DocSmith\nAI 翻译引擎"
17
- shape: rectangle
18
- }
19
-
20
- Translated-Docs: {
21
- label: "翻译后的文档"
22
- shape: rectangle
23
- grid-columns: 3
24
-
25
- zh: "简体中文"
26
- ja: "日本語"
27
- es: "Español"
28
- fr: "Français"
29
- de: "Deutsch"
30
- more: "..."
31
- }
32
-
33
- Source-Doc -> AI-Engine: "`aigne doc translate`"
34
- AI-Engine -> Translated-Docs: "生成"
35
- ```
3
+ AIGNE DocSmith 提供 12 种语言的自动化文档翻译,使您能够为全球受众生成和维护本地化内容。该功能主要通过 `aigne doc translate` 命令进行管理。
4
+
5
+ 翻译工作流使用 AI 引擎处理您的源文档,并生成您所选目标语言的版本。`aigne doc translate` 命令提供了一个交互式界面,引导您选择要翻译的文档和语言。
6
+
7
+ ![交互式文档翻译流程](../assets/screenshots/doc-translate.png)
36
8
 
37
9
  ## 支持的语言
38
10
 
39
- DocSmith 为以下语言提供 AI 驱动的翻译。您可以在初始设置期间定义项目的主要语言,并选择任意数量的目标语言进行翻译。
40
-
41
- | 语言 | 语言代码 | 示例文本 |
42
- |---|---|---|
43
- | 英语 | `en` | Hello |
44
- | 简体中文 | `zh` | 你好 |
45
- | 繁體中文 | `zh-TW` | 你好 |
46
- | 日本語 | `ja` | こんにちは |
47
- | 한국어 | `ko` | 안녕하세요 |
48
- | Español | `es` | Hola |
49
- | Français | `fr` | Bonjour |
50
- | Deutsch | `de` | Hallo |
51
- | Português | `pt` | Olá |
52
- | Русский | `ru` | Привет |
53
- | Italiano | `it` | Ciao |
54
- | العربية | `ar` | مرحبا |
11
+ DocSmith 支持以下语言的 AI 翻译。您可以在使用 `aigne doc init` 进行初始设置时定义项目的主要语言,并可以选择以下任意数量的语言进行翻译。
12
+
13
+ | 语言 | 语言代码 |
14
+ |---|---|
15
+ | English | `en` |
16
+ | 简体中文 | `zh` |
17
+ | 繁體中文 | `zh-TW` |
18
+ | 日本語 | `ja` |
19
+ | 한국어 | `ko` |
20
+ | Español | `es` |
21
+ | Français | `fr` |
22
+ | Deutsch | `de` |
23
+ | Português | `pt` |
24
+ | Русский | `ru` |
25
+ | Italiano | `it` |
26
+ | العربية | `ar` |
55
27
 
56
28
  ## 如何配置和使用翻译
57
29
 
58
- 翻译语言在您使用 `aigne doc init` 初始化项目时设置。您可以随时使用 `aigne doc translate` 命令添加新语言或翻译文档,该命令有两种操作模式。
30
+ 语言设置在您初始化项目时进行配置。您可以随时使用 `aigne doc translate` 命令添加新语言或翻译现有文档,该命令支持两种操作模式。
59
31
 
60
32
  ### 用于引导式翻译的交互模式
61
33
 
62
- 要获得分步指导的体验,请在不带任何参数的情况下运行该命令。这是大多数用户的推荐方法。
34
+ 如需分步引导流程,请运行不带任何参数的命令。建议大多数用户使用此方法。
63
35
 
64
36
  ```bash 交互式翻译 icon=lucide:wand
65
37
  aigne doc translate
66
38
  ```
67
39
 
68
- 然后,交互模式将显示一系列提示,允许您:
40
+ 交互模式会显示一系列提示,允许您选择要翻译的文档并从列表中选择目标语言。如果项目中尚未包含某些翻译语言,此模式也允许您将其添加到项目配置中。
69
41
 
70
- 1. 从列表中选择要翻译的现有文档。
71
- 2. 从支持的语言列表中选择一个或多个目标语言。
72
- 3. 如果项目中尚未包含新的翻译语言,则将其添加到项目配置中。
42
+ ![选择目标翻译语言](../assets/screenshots/doc-translate-langs.png)
73
43
 
74
44
  ### 用于自动化的命令行参数
75
45
 
76
- 为了直接控制或在自动化脚本中使用,您可以直接将文档和语言指定为命令行参数。这对于开发人员和 CI/CD 流水线非常理想。
46
+ 为了直接控制或在自动化脚本中使用,您可以将文档和语言指定为命令行参数。此方法适用于集成到 CI/CD 管道中。
77
47
 
78
48
  ```bash 命令示例 icon=lucide:terminal
79
49
  # 将 overview.md 和 examples.md 翻译成中文和日文
80
50
  aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
81
51
  ```
82
52
 
83
- 该命令的关键参数包括:
53
+ 下表详细介绍了 `translate` 命令的关键参数:
84
54
 
85
55
  | 参数 | 描述 |
86
56
  |---|---|
87
- | `--langs` | 指定目标语言代码。此标志可以多次使用以选择多种语言。 |
88
- | `--docs` | 指定要翻译的文档路径(例如,`overview.md`)。此参数也可以多次使用。 |
89
- | `--feedback` | 提供具体说明以指导翻译模型(例如,`"使用正式语气"`)。 |
90
- | `--glossary` | 使用自定义术语表文件(例如,`@path/to/glossary.md`)以确保项目特定术语的一致翻译。 |
57
+ | `--langs` | 指定目标语言代码。该标志可以多次使用以选择多种语言。 |
58
+ | `--docs` | 指定要翻译的文档路径(例如 `overview.md`)。该标志也可以多次使用。 |
59
+ | `--feedback` | 提供具体指令以指导翻译模型(例如 `"使用正式语气"`)。 |
60
+ | `--glossary` | 使用自定义术语表文件(例如 `@path/to/glossary.md`)来确保项目特定术语的翻译一致性。 |
91
61
 
92
62
  ---
93
63
 
94
- 本节介绍了可用语言以及如何启用它们。有关翻译工作流的完整指南,请参阅[翻译文档](./features-translate-documentation.md)指南。
64
+ 本节概述了可用的语言以及如何启用它们。有关翻译工作流的完整指南,请参阅 [翻译文档](./features-translate-documentation.md) 指南。
@@ -1,44 +1,46 @@
1
- # LLMセットアップ
1
+ # LLM セットアップ
2
2
 
3
- AIGNE DocSmithは、大規模言語モデル(LLM)を使用してドキュメントコンテンツを生成します。AIモデルプロバイダーは、統合されたAIGNE Hubを使用する方法と、独自のカスタムAPIキーを接続する方法の2通りで設定できます。
3
+ AIGNE DocSmith は、大規模言語モデル (LLM) を使用してドキュメンテーションコンテンツを生成します。AI モデルプロバイダーの設定は、主に 2 つの方法で行うことができます。統合された AIGNE Hub を利用する方法、またはお好みのプロバイダーから独自のカスタム API キーを接続する方法です。
4
4
 
5
- ## AIGNE Hub(推奨)
5
+ ## AIGNE Hub (推奨)
6
6
 
7
- 最も手軽に始める方法はAIGNE Hubを使用することです。これは複数のLLMプロバイダーへのゲートウェイとして機能し、主に2つの利点があります:
7
+ LLM を設定する最も直接的な方法は、AIGNE Hub を使用することです。これは複数の LLM プロバイダーへのゲートウェイとして機能し、主に 2 つの利点があります。
8
8
 
9
- - **APIキー不要:** 独自のAPIキーやサービス契約を管理することなく、ドキュメントを生成できます。
10
- - **簡単なモデル切り替え:** `--model`フラグを使用することで、どのコマンドでもAIモデルを変更できます。
9
+ - **API キー不要:** 独自の API キーやサービスサブスクリプションを管理する必要なく、ドキュメントを生成できます。
10
+ - **柔軟なモデル切り替え:** `--model` フラグを使用することで、任意のコマンドの AI モデルを変更できます。
11
11
 
12
- AIGNE Hubを通じて特定のモデルを使用するには、コマンドに`--model`フラグを追加します。以下にいくつかの例を示します:
12
+ AIGNE Hub を介して特定のモデルを使用するには、コマンドに `--model` フラグを追加します。以下の例でその使用方法を示します。
13
13
 
14
- ```bash Using Different Models via AIGNE Hub icon=mdi:code-braces
15
- # GoogleGemini 2.5 Flashモデルを使用
16
- aigne doc generate --model google:gemini-2.5-flash
14
+ ```bash AIGNE Hub経由で異なるモデルを使用する icon=mdi:code-braces
15
+ # OpenAI GPT-4o モデルを使用
16
+ aigne doc generate --model openai:gpt-4o
17
17
 
18
- # AnthropicのClaude 3.5 Sonnetモデルを使用
19
- aigne doc generate --model claude:claude-3-5-sonnet
18
+ # Anthropic Claude 4.5 Sonnet モデルを使用
19
+ aigne doc generate --model anthropic:claude-sonnet-4-5
20
20
 
21
- # OpenAIGPT-4oモデルを使用
22
- aigne doc generate --model openai:gpt-4o
21
+ # Google Gemini 2.5 Pro モデルを使用
22
+ aigne doc generate --model google:gemini-2.5-pro
23
23
  ```
24
24
 
25
- モデルを指定しない場合、DocSmithはプロジェクトの設定ファイルで定義されたデフォルトのモデルを使用します。
25
+ `--model` フラグが指定されていない場合、DocSmith はプロジェクトの設定ファイルで定義されたモデルをデフォルトで使用します。
26
26
 
27
- ## カスタムAPIキーの使用
27
+ ## カスタム API キーの使用
28
28
 
29
- OpenAIAnthropicのようなプロバイダーで自身のアカウントを使用したい場合は、個人のAPIキーでDocSmithを設定できます。この方法により、APIの使用状況と請求を直接管理できます。
29
+ OpenAIAnthropic、Google などのプロバイダーで独自のアカウントを使用したいユーザーのために、DocSmith は個人の API キーで設定できます。この方法により、API の使用状況と請求を直接管理できます。
30
30
 
31
- 設定は対話型のウィザードを通じて行われます。ウィザードを起動するには、次のコマンドを実行してください:
31
+ 設定は対話型ウィザードを通じて行われます。起動するには、次のコマンドを実行します。
32
32
 
33
- ```bash
33
+ ```bash 対話型ウィザードの起動 icon=lucide:magic-wand
34
34
  aigne doc init
35
35
  ```
36
36
 
37
- ウィザードがプロバイダーの選択と認証情報の入力を求めます。詳細なガイドについては、[対話型セットアップ](./configuration-interactive-setup.md)のドキュメントを参照してください。
37
+ ウィザードがプロバイダーの選択と必要な認証情報の入力を求めます。このプロセスの完全なステップバイステップガイドについては、[インタラクティブ設定](./configuration-interactive-setup.md) のドキュメントを参照してください。
38
38
 
39
39
  ## デフォルトモデルの設定
40
40
 
41
- すべてのドキュメント生成タスクで一貫性を保つために、プロジェクトの`aigne.yaml`設定ファイルでデフォルトのLLMを設定できます。このモデルは、`--model`フラグを含まないコマンドで使用されます。
41
+ すべてのドキュメント生成タスクで一貫性を保つため、プロジェクトの `aigne.yaml` 設定ファイルでデフォルトの LLM を設定できます。このモデルは、`--model` フラグを明示的に含まないすべてのコマンドで使用されます。
42
+
43
+ 以下は設定例です。
42
44
 
43
45
  ```yaml aigne.yaml icon=mdi:file-code
44
46
  chat_model:
@@ -47,8 +49,8 @@ chat_model:
47
49
  temperature: 0.8
48
50
  ```
49
51
 
50
- この例では、DocSmithはGoogleの`gemini-2.5-pro`モデルをデフォルトで使用し、`temperature`設定は`0.8`に設定されています。
52
+ この例では、DocSmith Google の `gemini-2.5-pro` モデルを `temperature` 設定 `0.8` で、すべての生成タスクのデフォルトとして使用するように設定されています。
51
53
 
52
54
  ---
53
55
 
54
- LLMプロバイダーの設定が完了したら、ドキュメントの言語設定を管理する準備が整いました。サポートされている言語の完全なリストを確認し、それらを有効にする方法については、[言語サポート](./configuration-language-support.md)ガイドに進んでください。
56
+ LLM プロバイダーの設定が完了したら、次のステップはドキュメントの言語設定を管理することです。[言語サポート](./configuration-language-support.md) ガイドに進み、サポートされている言語の全リストを確認し、それらを有効にする方法を学んでください。
@@ -1,44 +1,46 @@
1
1
  # LLM Setup
2
2
 
3
- AIGNE DocSmith uses Large Language Models (LLMs) to generate documentation content. You can configure the AI model provider in two ways: using the integrated AIGNE Hub, or by connecting your own custom API keys.
3
+ AIGNE DocSmith uses Large Language Models (LLMs) to generate documentation content. Configuration of the AI model provider can be accomplished through two primary methods: utilizing the integrated AIGNE Hub or connecting your own custom API keys from a provider of your choice.
4
4
 
5
5
  ## AIGNE Hub (Recommended)
6
6
 
7
- The most direct way to start is with AIGNE Hub. It functions as a gateway to multiple LLM providers, offering two main benefits:
7
+ The most direct method for configuring the LLM is through AIGNE Hub. It functions as a gateway to multiple LLM providers, offering two main benefits:
8
8
 
9
- - **No API Key Required:** You can generate documents without managing your own API keys or service subscriptions.
10
- - **Easy Model Switching:** You can change the AI model for any command by using the `--model` flag.
9
+ - **No API Key Required:** You can generate documents without the need to manage your own API keys or service subscriptions.
10
+ - **Flexible Model Switching:** You can change the AI model for any command by using the `--model` flag.
11
11
 
12
- To use a specific model through AIGNE Hub, add the `--model` flag to your command. Here are a few examples:
12
+ To use a specific model through AIGNE Hub, append the `--model` flag to your command. The following examples demonstrate its usage:
13
13
 
14
14
  ```bash Using Different Models via AIGNE Hub icon=mdi:code-braces
15
- # Use Google's Gemini 2.5 Flash model
16
- aigne doc generate --model google:gemini-2.5-flash
17
-
18
- # Use Anthropic's Claude 3.5 Sonnet model
19
- aigne doc generate --model claude:claude-3-5-sonnet
20
-
21
15
  # Use OpenAI's GPT-4o model
22
16
  aigne doc generate --model openai:gpt-4o
17
+
18
+ # Use Anthropic's Claude 4.5 Sonnet model
19
+ aigne doc generate --model anthropic:claude-sonnet-4-5
20
+
21
+ # Use Google's Gemini 2.5 Pro model
22
+ aigne doc generate --model google:gemini-2.5-pro
23
23
  ```
24
24
 
25
- If you do not specify a model, DocSmith will use the default model defined in your project's configuration.
25
+ If the `--model` flag is not specified, DocSmith will default to the model defined in your project's configuration file.
26
26
 
27
27
  ## Using Custom API Keys
28
28
 
29
- If you prefer to use your own accounts with providers like OpenAI or Anthropic, you can configure DocSmith with your personal API keys. This method gives you direct control over API usage and billing.
29
+ For users who prefer to use their own accounts with providers such as OpenAI, Anthropic, or Google, DocSmith can be configured with personal API keys. This method provides direct control over API usage and billing.
30
30
 
31
31
  Configuration is handled through an interactive wizard. To launch it, run the following command:
32
32
 
33
- ```bash
33
+ ```bash Launching the Interactive Wizard icon=lucide:magic-wand
34
34
  aigne doc init
35
35
  ```
36
36
 
37
- The wizard will prompt you to select your provider and enter your credentials. For a complete guide, refer to the [Interactive Setup](./configuration-interactive-setup.md) documentation.
37
+ The wizard will prompt you to select your provider and enter the necessary credentials. For a complete, step-by-step guide on this process, refer to the [Interactive Setup](./configuration-interactive-setup.md) documentation.
38
38
 
39
39
  ## Setting a Default Model
40
40
 
41
- To maintain consistency across all documentation generation tasks, you can set a default LLM in your project's `aigne.yaml` configuration file. This model will be used for any command that does not include the `--model` flag.
41
+ To maintain consistency across all documentation generation tasks, a default LLM can be set in your project's `aigne.yaml` configuration file. This model will be used for any command that does not explicitly include the `--model` flag.
42
+
43
+ The following is an example configuration:
42
44
 
43
45
  ```yaml aigne.yaml icon=mdi:file-code
44
46
  chat_model:
@@ -47,8 +49,8 @@ chat_model:
47
49
  temperature: 0.8
48
50
  ```
49
51
 
50
- In this example, DocSmith is configured to use Google's `gemini-2.5-pro` model with a `temperature` setting of `0.8` by default.
52
+ In this example, DocSmith is configured to use Google's `gemini-2.5-pro` model with a `temperature` setting of `0.8` as the default for all generation tasks.
51
53
 
52
54
  ---
53
55
 
54
- With your LLM provider configured, you are ready to manage language settings for your documentation. Proceed to the [Language Support](./configuration-language-support.md) guide to see the full list of supported languages and learn how to enable them.
56
+ With the LLM provider configured, the next step is to manage language settings for your documentation. Proceed to the [Language Support](./configuration-language-support.md) guide to see the full list of supported languages and learn how to enable them.
@@ -1,44 +1,46 @@
1
1
  # LLM 設定
2
2
 
3
- AIGNE DocSmith 使用大型語言模型 (LLM) 來產生文件內容。您可以透過兩種方式設定 AI 模型提供者:使用整合的 AIGNE Hub,或連接您自己的自訂 API 金鑰。
3
+ AIGNE DocSmith 使用大型語言模型 (LLM) 來產生文件內容。AI 模型提供者的設定可以透過兩種主要方式完成:使用整合的 AIGNE Hub 或連接您自己選擇的提供者的自訂 API 金鑰。
4
4
 
5
5
  ## AIGNE Hub (推薦)
6
6
 
7
- 最直接的開始方式是使用 AIGNE Hub。它作為多個 LLM 提供者的閘道,提供兩大好處:
7
+ 設定 LLM 最直接的方法是透過 AIGNE Hub。它作為多個 LLM 提供者的閘道,提供兩大好處:
8
8
 
9
- - **無需 API 金鑰:** 您無需管理自己的 API 金鑰或服務訂閱即可產生文件。
10
- - **輕鬆切換模型:** 您可以使用 `--model` 旗標為任何指令變更 AI 模型。
9
+ - **無需 API 金鑰:** 您可以產生文件,而無需管理自己的 API 金鑰或服務訂閱。
10
+ - **靈活的模型切換:** 您可以使用 `--model` 旗標為任何指令變更 AI 模型。
11
11
 
12
- 若要透過 AIGNE Hub 使用特定模型,請在您的指令中加入 `--model` 旗標。以下是一些範例:
13
-
14
- ```bash 使用不同模型透過 AIGNE Hub icon=mdi:code-braces
15
- # 使用 Google 的 Gemini 2.5 Flash 模型
16
- aigne doc generate --model google:gemini-2.5-flash
17
-
18
- # 使用 Anthropic 的 Claude 3.5 Sonnet 模型
19
- aigne doc generate --model claude:claude-3-5-sonnet
12
+ 若要透過 AIGNE Hub 使用特定模型,請在您的指令後加上 `--model` 旗標。以下範例展示了其用法:
20
13
 
14
+ ```bash 透過 AIGNE Hub 使用不同模型 icon=mdi:code-braces
21
15
  # 使用 OpenAI 的 GPT-4o 模型
22
16
  aigne doc generate --model openai:gpt-4o
17
+
18
+ # 使用 Anthropic 的 Claude 4.5 Sonnet 模型
19
+ aigne doc generate --model anthropic:claude-sonnet-4-5
20
+
21
+ # 使用 Google 的 Gemini 2.5 Pro 模型
22
+ aigne doc generate --model google:gemini-2.5-pro
23
23
  ```
24
24
 
25
- 如果您未指定模型,DocSmith 將使用您專案設定中定義的預設模型。
25
+ 如果未指定 `--model` 旗標,DocSmith 將預設使用您專案設定檔中定義的模型。
26
26
 
27
27
  ## 使用自訂 API 金鑰
28
28
 
29
- 如果您偏好使用自己像 OpenAI 或 Anthropic 等提供者的帳戶,您可以使用個人 API 金鑰來設定 DocSmith。這種方法讓您可以直接控制 API 的使用和計費。
29
+ 對於偏好使用自己在 OpenAI、AnthropicGoogle 等提供者帳戶的使用者,DocSmith 可以設定個人 API 金鑰。此方法可直接控制 API 的使用和計費。
30
30
 
31
31
  設定是透過互動式精靈處理的。若要啟動它,請執行以下指令:
32
32
 
33
- ```bash
33
+ ```bash 啟動互動式精靈 icon=lucide:magic-wand
34
34
  aigne doc init
35
35
  ```
36
36
 
37
- 精靈會提示您選擇您的提供者並輸入您的憑證。有關完整的指南,請參閱 [互動式設定](./configuration-interactive-setup.md) 文件。
37
+ 精靈會提示您選擇您的提供者並輸入必要的憑證。有關此過程的完整逐步指南,請參閱 [互動式設定](./configuration-interactive-setup.md) 文件。
38
38
 
39
39
  ## 設定預設模型
40
40
 
41
- 為了在所有文件產生任務中保持一致性,您可以在專案的 `aigne.yaml` 設定檔中設定預設的 LLM。此模型將用於任何不包含 `--model` 旗標的指令。
41
+ 為維持所有文件產生任務的一致性,可以在您專案的 `aigne.yaml` 設定檔中設定預設的 LLM。此模型將用於任何未明確包含 `--model` 旗標的指令。
42
+
43
+ 以下是範例設定:
42
44
 
43
45
  ```yaml aigne.yaml icon=mdi:file-code
44
46
  chat_model:
@@ -47,8 +49,8 @@ chat_model:
47
49
  temperature: 0.8
48
50
  ```
49
51
 
50
- 在此範例中,DocSmith 預設設定為使用 Google 的 `gemini-2.5-pro` 模型,並將 `temperature` 設定為 `0.8`。
52
+ 在此範例中,DocSmith 設定為使用 Google 的 `gemini-2.5-pro` 模型,並將 `temperature` 設定為 `0.8`,作為所有產生任務的預設值。
51
53
 
52
54
  ---
53
55
 
54
- 設定好您的 LLM 提供者後,您就可以開始管理文件的語言設定了。請前往 [語言支援](./configuration-language-support.md) 指南查看支援的語言完整清單,並了解如何啟用它們。
56
+ 設定好 LLM 提供者後,下一步是管理您文件的語言設定。請前往 [語言支援](./configuration-language-support.md) 指南,查看支援的語言完整列表並了解如何啟用它們。