@aigne/doc-smith 0.8.12-beta.3 → 0.8.12-beta.4
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.
- package/.aigne/doc-smith/config.yaml +9 -6
- package/.aigne/doc-smith/output/structure-plan.json +123 -109
- package/.aigne/doc-smith/upload-cache.yaml +48 -0
- package/.github/workflows/publish-docs.yml +4 -7
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +13 -0
- package/agents/clear/choose-contents.mjs +22 -5
- package/agents/clear/clear-auth-tokens.mjs +2 -4
- package/agents/clear/clear-deployment-config.mjs +49 -0
- package/agents/clear/clear-document-config.mjs +2 -5
- package/agents/clear/clear-document-structure.mjs +2 -6
- package/agents/clear/clear-generated-docs.mjs +0 -1
- package/agents/generate/check-need-generate-structure.mjs +15 -60
- package/agents/generate/document-structure-tools/generate-sub-structure.mjs +131 -0
- package/agents/generate/generate-structure-without-tools.yaml +65 -0
- package/agents/generate/generate-structure.yaml +7 -1
- package/agents/generate/index.yaml +0 -3
- package/agents/generate/update-document-structure.yaml +3 -0
- package/agents/generate/user-review-document-structure.mjs +7 -5
- package/agents/init/index.mjs +15 -15
- package/agents/publish/publish-docs.mjs +130 -111
- package/agents/translate/index.yaml +1 -1
- package/agents/update/batch-generate-document.yaml +1 -1
- package/agents/update/batch-update-document.yaml +1 -1
- package/agents/update/check-document.mjs +3 -19
- package/agents/update/user-review-document.mjs +4 -3
- package/agents/utils/load-sources.mjs +54 -151
- package/agents/utils/transform-detail-datasources.mjs +14 -18
- package/aigne.yaml +2 -0
- package/biome.json +1 -1
- package/docs/_sidebar.md +13 -15
- package/docs/configuration-initial-setup.ja.md +179 -0
- package/docs/configuration-initial-setup.md +179 -0
- package/docs/configuration-initial-setup.zh-TW.md +179 -0
- package/docs/configuration-initial-setup.zh.md +179 -0
- package/docs/configuration-managing-preferences.ja.md +100 -0
- package/docs/configuration-managing-preferences.md +100 -0
- package/docs/configuration-managing-preferences.zh-TW.md +100 -0
- package/docs/configuration-managing-preferences.zh.md +100 -0
- package/docs/configuration.ja.md +68 -184
- package/docs/configuration.md +62 -178
- package/docs/configuration.zh-TW.md +70 -186
- package/docs/configuration.zh.md +67 -183
- package/docs/getting-started.ja.md +46 -78
- package/docs/getting-started.md +46 -78
- package/docs/getting-started.zh-TW.md +47 -79
- package/docs/getting-started.zh.md +47 -79
- package/docs/guides-cleaning-up.ja.md +50 -0
- package/docs/guides-cleaning-up.md +50 -0
- package/docs/guides-cleaning-up.zh-TW.md +50 -0
- package/docs/guides-cleaning-up.zh.md +50 -0
- package/docs/guides-evaluating-documents.ja.md +66 -0
- package/docs/guides-evaluating-documents.md +66 -0
- package/docs/guides-evaluating-documents.zh-TW.md +66 -0
- package/docs/guides-evaluating-documents.zh.md +66 -0
- package/docs/guides-generating-documentation.ja.md +149 -0
- package/docs/guides-generating-documentation.md +149 -0
- package/docs/guides-generating-documentation.zh-TW.md +149 -0
- package/docs/guides-generating-documentation.zh.md +149 -0
- package/docs/guides-interactive-chat.ja.md +85 -0
- package/docs/guides-interactive-chat.md +85 -0
- package/docs/guides-interactive-chat.zh-TW.md +85 -0
- package/docs/guides-interactive-chat.zh.md +85 -0
- package/docs/guides-managing-history.ja.md +51 -0
- package/docs/guides-managing-history.md +51 -0
- package/docs/guides-managing-history.zh-TW.md +51 -0
- package/docs/guides-managing-history.zh.md +51 -0
- package/docs/guides-publishing-your-docs.ja.md +78 -0
- package/docs/guides-publishing-your-docs.md +78 -0
- package/docs/guides-publishing-your-docs.zh-TW.md +78 -0
- package/docs/guides-publishing-your-docs.zh.md +78 -0
- package/docs/guides-translating-documentation.ja.md +95 -0
- package/docs/guides-translating-documentation.md +95 -0
- package/docs/guides-translating-documentation.zh-TW.md +95 -0
- package/docs/guides-translating-documentation.zh.md +95 -0
- package/docs/guides-updating-documentation.ja.md +77 -0
- package/docs/guides-updating-documentation.md +77 -0
- package/docs/guides-updating-documentation.zh-TW.md +77 -0
- package/docs/guides-updating-documentation.zh.md +77 -0
- package/docs/guides.ja.md +32 -0
- package/docs/guides.md +32 -0
- package/docs/guides.zh-TW.md +32 -0
- package/docs/guides.zh.md +32 -0
- package/docs/overview.ja.md +39 -60
- package/docs/overview.md +39 -60
- package/docs/overview.zh-TW.md +39 -60
- package/docs/overview.zh.md +39 -60
- package/docs/release-notes.ja.md +255 -0
- package/docs/release-notes.md +255 -0
- package/docs/release-notes.zh-TW.md +255 -0
- package/docs/release-notes.zh.md +255 -0
- package/package.json +4 -2
- package/prompts/common/document/content-rules-core.md +1 -0
- package/prompts/common/document-structure/document-structure-rules.md +8 -9
- package/prompts/common/document-structure/output-constraints.md +1 -1
- package/prompts/structure/document-rules.md +8 -2
- package/prompts/structure/generate/system-prompt.md +27 -2
- package/prompts/structure/generate/user-prompt.md +18 -0
- package/prompts/structure/update/system-prompt.md +12 -0
- package/prompts/structure/update/user-prompt.md +3 -0
- package/tests/agents/clear/choose-contents.test.mjs +8 -4
- package/tests/agents/generate/check-need-generate-structure.test.mjs +53 -63
- package/tests/agents/generate/document-structure-tools/generate-sub-structure.test.mjs +277 -0
- package/tests/agents/init/init.test.mjs +18 -18
- package/tests/agents/publish/publish-docs.test.mjs +79 -0
- package/tests/agents/update/check-document.test.mjs +7 -67
- package/tests/agents/utils/load-sources.test.mjs +90 -90
- package/tests/agents/utils/transform-detail-datasources.test.mjs +153 -196
- package/tests/utils/file-utils.test.mjs +309 -1
- package/utils/auth-utils.mjs +9 -3
- package/utils/constants/index.mjs +3 -1
- package/utils/file-utils.mjs +315 -0
- package/utils/utils.mjs +89 -50
- package/docs/advanced-how-it-works.ja.md +0 -101
- package/docs/advanced-how-it-works.md +0 -101
- package/docs/advanced-how-it-works.zh-TW.md +0 -101
- package/docs/advanced-how-it-works.zh.md +0 -101
- package/docs/advanced-quality-assurance.ja.md +0 -92
- package/docs/advanced-quality-assurance.md +0 -92
- package/docs/advanced-quality-assurance.zh-TW.md +0 -92
- package/docs/advanced-quality-assurance.zh.md +0 -92
- package/docs/advanced.ja.md +0 -20
- package/docs/advanced.md +0 -20
- package/docs/advanced.zh-TW.md +0 -20
- package/docs/advanced.zh.md +0 -20
- package/docs/changelog.ja.md +0 -486
- package/docs/changelog.md +0 -486
- package/docs/changelog.zh-TW.md +0 -486
- package/docs/changelog.zh.md +0 -486
- package/docs/cli-reference.ja.md +0 -311
- package/docs/cli-reference.md +0 -311
- package/docs/cli-reference.zh-TW.md +0 -311
- package/docs/cli-reference.zh.md +0 -311
- package/docs/configuration-interactive-setup.ja.md +0 -138
- package/docs/configuration-interactive-setup.md +0 -138
- package/docs/configuration-interactive-setup.zh-TW.md +0 -138
- package/docs/configuration-interactive-setup.zh.md +0 -138
- package/docs/configuration-language-support.ja.md +0 -64
- package/docs/configuration-language-support.md +0 -64
- package/docs/configuration-language-support.zh-TW.md +0 -64
- package/docs/configuration-language-support.zh.md +0 -64
- package/docs/configuration-llm-setup.ja.md +0 -56
- package/docs/configuration-llm-setup.md +0 -56
- package/docs/configuration-llm-setup.zh-TW.md +0 -56
- package/docs/configuration-llm-setup.zh.md +0 -56
- package/docs/configuration-preferences.ja.md +0 -144
- package/docs/configuration-preferences.md +0 -144
- package/docs/configuration-preferences.zh-TW.md +0 -144
- package/docs/configuration-preferences.zh.md +0 -144
- package/docs/features-generate-documentation.ja.md +0 -95
- package/docs/features-generate-documentation.md +0 -95
- package/docs/features-generate-documentation.zh-TW.md +0 -95
- package/docs/features-generate-documentation.zh.md +0 -95
- package/docs/features-publish-your-docs.ja.md +0 -130
- package/docs/features-publish-your-docs.md +0 -130
- package/docs/features-publish-your-docs.zh-TW.md +0 -130
- package/docs/features-publish-your-docs.zh.md +0 -130
- package/docs/features-translate-documentation.ja.md +0 -90
- package/docs/features-translate-documentation.md +0 -90
- package/docs/features-translate-documentation.zh-TW.md +0 -90
- package/docs/features-translate-documentation.zh.md +0 -90
- package/docs/features-update-and-refine.ja.md +0 -142
- package/docs/features-update-and-refine.md +0 -142
- package/docs/features-update-and-refine.zh-TW.md +0 -143
- package/docs/features-update-and-refine.zh.md +0 -142
- package/docs/features.ja.md +0 -62
- package/docs/features.md +0 -62
- package/docs/features.zh-TW.md +0 -62
- package/docs/features.zh.md +0 -62
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# 初始设置
|
|
2
|
+
|
|
3
|
+
本指南将分步介绍 AIGNE DocSmith 的交互式设置过程。此过程在您首次运行 `generate` 命令时启动,也可以手动启动。其目的是创建一个 `config.yaml` 文件,用于存储您生成文档的偏好设置。
|
|
4
|
+
|
|
5
|
+
## 启动过程
|
|
6
|
+
|
|
7
|
+
要手动开始配置,请在终端中导航到项目的根目录并执行以下命令:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
aigne doc init
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
此命令会启动一个交互式问卷,引导您完成文档设置的配置。
|
|
14
|
+
|
|
15
|
+
## 配置步骤
|
|
16
|
+
|
|
17
|
+
设置过程包括九个问题,旨在根据您的具体需求定制文档。
|
|
18
|
+
|
|
19
|
+
### 步骤 1:定义文档目的
|
|
20
|
+
|
|
21
|
+
首先,您需要定义文档的主要目标。此选择会影响生成内容的基调、结构和重点。
|
|
22
|
+
|
|
23
|
+
**提示:** `📝 [1/9]:您的文档应帮助读者实现什么目标?`
|
|
24
|
+
|
|
25
|
+
您可以从下面的列表中选择多个选项:
|
|
26
|
+
|
|
27
|
+
| 选项 | 名称 | 描述 |
|
|
28
|
+
| :--- | :--- | :--- |
|
|
29
|
+
| `getStarted` | 快速入门 | 帮助新用户在 30 分钟内从零开始上手。 |
|
|
30
|
+
| `completeTasks` | 完成特定任务 | 指导用户完成常见工作流和用例。 |
|
|
31
|
+
| `findAnswers` | 快速查找答案 | 为所有功能和 API 提供可搜索的参考。 |
|
|
32
|
+
| `understandSystem` | 理解系统 | 解释其工作原理及设计决策背后的原因。 |
|
|
33
|
+
| `solveProblems` | 解决问题 | 帮助用户排查和修复问题。 |
|
|
34
|
+
| `mixedPurpose` | 以上混合 | 全面覆盖多种需求。 |
|
|
35
|
+
|
|
36
|
+
### 步骤 2:确定目标受众
|
|
37
|
+
|
|
38
|
+
接下来,指定谁将是您文档的主要读者。这有助于适当地调整语言和技术深度。
|
|
39
|
+
|
|
40
|
+
**提示:** `👥 [2/9]:谁将是您文档的读者?`
|
|
41
|
+
|
|
42
|
+
您可以选择以下一个或多个受众:
|
|
43
|
+
|
|
44
|
+
| 选项 | 名称 | 描述 |
|
|
45
|
+
| :--- | :--- | :--- |
|
|
46
|
+
| `endUsers` | 最终用户(非技术人员) | 使用产品但不编码的人员。 |
|
|
47
|
+
| `developers` | 集成开发者 | 将此产品添加到其项目中的工程师。 |
|
|
48
|
+
| `devops` | DevOps/基础设施 | 部署、监控和维护系统的团队。 |
|
|
49
|
+
| `decisionMakers` | 技术决策者 | 评估该技术的架构师或负责人。 |
|
|
50
|
+
| `supportTeams` | 支持团队 | 帮助他人使用产品的人员。 |
|
|
51
|
+
| `mixedTechnical` | 混合技术受众 | 开发人员、DevOps 和其他技术用户的组合。 |
|
|
52
|
+
|
|
53
|
+
### 步骤 3:提供自定义规则
|
|
54
|
+
|
|
55
|
+
此可选步骤允许您提供具体说明或约束,供 AI 在内容生成过程中遵循。
|
|
56
|
+
|
|
57
|
+
**提示:** `📋 [3/9]:对您的文档有任何自定义规则或要求吗?(可选,按 Enter 键跳过)`
|
|
58
|
+
|
|
59
|
+
您可以输入任何具体要求,例如语气、风格或要排除的内容。例如:“避免使用营销性语言,专注于技术准确性。”
|
|
60
|
+
|
|
61
|
+
### 步骤 4:指定读者知识水平
|
|
62
|
+
|
|
63
|
+
指明您受众的假定知识水平。这能确保内容难度适中,既不会过于基础,也不会过于复杂。
|
|
64
|
+
|
|
65
|
+
**提示:** `🧠 [4/9]:读者对您的项目了解多少?`
|
|
66
|
+
|
|
67
|
+
选择最能描述您读者的选项:
|
|
68
|
+
|
|
69
|
+
| 选项 | 名称 | 描述 |
|
|
70
|
+
| :--- | :--- | :--- |
|
|
71
|
+
| `completeBeginners` | 完全初学者 | 完全不熟悉该领域或技术。 |
|
|
72
|
+
| `domainFamiliar` | 熟悉领域,不熟悉工具 | 了解问题领域,但对该解决方案不熟悉。 |
|
|
73
|
+
| `experiencedUsers` | 经验丰富的用户 | 需要参考或高级主题的常规用户。 |
|
|
74
|
+
| `emergencyTroubleshooting` | 紧急/故障排查 | 需要快速解决问题的用户。 |
|
|
75
|
+
| `exploringEvaluating` | 探索/评估 | 试图确定该工具是否满足其需求的用户。 |
|
|
76
|
+
|
|
77
|
+
### 步骤 5:设置文档深度
|
|
78
|
+
|
|
79
|
+
选择文档的详细程度。这决定了生成内容的范围和细节水平。
|
|
80
|
+
|
|
81
|
+
**提示:** `📊 [5/9]:您的文档应该有多详细?`
|
|
82
|
+
|
|
83
|
+
选择以下详细级别之一:
|
|
84
|
+
|
|
85
|
+
| 选项 | 名称 | 描述 |
|
|
86
|
+
| :--- | :--- | :--- |
|
|
87
|
+
| `essentialOnly` | 仅包含核心内容 | 简明扼要地覆盖 80% 的最常见用例。 |
|
|
88
|
+
| `balancedCoverage` | 平衡覆盖 | 提供良好深度和实用示例。 |
|
|
89
|
+
| `comprehensive` | 全面详尽 | 覆盖所有功能、边缘案例和高级场景。 |
|
|
90
|
+
| `aiDecide` | 由 AI 决定 | 工具会分析代码复杂度以建议合适的深度。 |
|
|
91
|
+
|
|
92
|
+
### 步骤 6:选择主要语言
|
|
93
|
+
|
|
94
|
+
选择您文档的主要语言。系统将检测您操作系统的语言并建议其为默认语言。
|
|
95
|
+
|
|
96
|
+
**提示:** `🌐 [6/9]:您的主要文档语言是什么?`
|
|
97
|
+
|
|
98
|
+
系统将为您呈现一个包含 12 种受支持语言的列表,包括英语、中文(简体)和西班牙语。
|
|
99
|
+
|
|
100
|
+
### 步骤 7:选择翻译语言
|
|
101
|
+
|
|
102
|
+
选择您希望将文档翻译成的其他语言。
|
|
103
|
+
|
|
104
|
+
**提示:** `🔄 [7/9]:我们应该翻译成哪些语言?`
|
|
105
|
+
|
|
106
|
+
您可以从支持的选项列表中选择多种语言,不包括您在上一步中选择的主要语言。
|
|
107
|
+
|
|
108
|
+
### 步骤 8:定义输出目录
|
|
109
|
+
|
|
110
|
+
指定保存生成的文档文件的文件夹。
|
|
111
|
+
|
|
112
|
+
**提示:** `📁 [8/9]:我们应该将您的文档保存在哪里?`
|
|
113
|
+
|
|
114
|
+
默认路径是 `.aigne/doc-smith/docs`。您可以接受此路径或提供其他路径。
|
|
115
|
+
|
|
116
|
+
### 步骤 9:指定内容源
|
|
117
|
+
|
|
118
|
+
指明工具应分析哪些文件和文件夹以生成文档。您可以添加多个路径,并使用 glob 模式进行高级筛选。
|
|
119
|
+
|
|
120
|
+
**提示:** `🔍 [9/9]:内容源`
|
|
121
|
+
|
|
122
|
+
系统将提示您输入文件路径、文件夹路径或 glob 模式(例如,`src/**/*.js`)。如果您不提供任何路径,工具将默认分析整个项目目录。
|
|
123
|
+
|
|
124
|
+
## 生成的配置文件
|
|
125
|
+
|
|
126
|
+
完成问卷后,DocSmith 会将您的回答保存到 `.aigne/doc-smith/` 目录中一个名为 `config.yaml` 的配置文件中。该文件将作为未来所有文档生成的蓝图,并可随时手动编辑。
|
|
127
|
+
|
|
128
|
+
以下是生成的 `config.yaml` 文件示例:
|
|
129
|
+
|
|
130
|
+
```yaml config.yaml title="config.yaml"
|
|
131
|
+
# 用于文档发布的项目信息
|
|
132
|
+
projectName: AIGNE DocSmith
|
|
133
|
+
projectDesc: AIGNE DocSmith is a powerful, AI-driven documentation generation tool...
|
|
134
|
+
projectLogo: https://docsmith.aigne.io/image-bin/uploads/9645caf64b4232699982c4d940b03b90.svg
|
|
135
|
+
|
|
136
|
+
# =============================================================================
|
|
137
|
+
# 文档配置
|
|
138
|
+
# =============================================================================
|
|
139
|
+
|
|
140
|
+
# 目的:您希望读者实现的主要成果是什么?
|
|
141
|
+
documentPurpose:
|
|
142
|
+
- getStarted
|
|
143
|
+
- completeTasks
|
|
144
|
+
|
|
145
|
+
# 目标受众:谁会最常阅读本文档?
|
|
146
|
+
targetAudienceTypes:
|
|
147
|
+
- endUsers
|
|
148
|
+
|
|
149
|
+
# 读者知识水平:读者通常具备哪些知识?
|
|
150
|
+
readerKnowledgeLevel: completeBeginners
|
|
151
|
+
|
|
152
|
+
# 文档深度:文档应达到何种程度的全面性?
|
|
153
|
+
documentationDepth: comprehensive
|
|
154
|
+
|
|
155
|
+
# 自定义规则:定义具体的文档生成规则和要求
|
|
156
|
+
rules: |
|
|
157
|
+
Avoid using vague or empty words...
|
|
158
|
+
|
|
159
|
+
# 目标受众:描述您的具体目标受众及其特征
|
|
160
|
+
targetAudience: |
|
|
161
|
+
|
|
162
|
+
# 语言设置
|
|
163
|
+
locale: en
|
|
164
|
+
translateLanguages:
|
|
165
|
+
- zh
|
|
166
|
+
- ja
|
|
167
|
+
|
|
168
|
+
# 目录和源路径配置
|
|
169
|
+
docsDir: ./docs # 保存生成文档的目录
|
|
170
|
+
sourcesPath: # 要分析的源代码路径
|
|
171
|
+
- ./README.md
|
|
172
|
+
- ./agents
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## 后续步骤
|
|
176
|
+
|
|
177
|
+
完成初始配置后,您现在可以开始创建文档了。
|
|
178
|
+
|
|
179
|
+
* 继续阅读 [生成文档](./guides-generating-documentation.md) 指南,了解如何运行生成过程。
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# プリファレンスの管理
|
|
2
|
+
|
|
3
|
+
ドキュメントを生成または更新する際に、`--feedback` フラグを使用してフィードバックを提供できます。このフィードバックは「プリファレンス」として保存され、将来のセッションで再利用されることで、AIが以前の指示との一貫性を維持するようになります。`aigne doc prefs` コマンドは、これらの保存されたプリファレンスを直接管理する方法を提供します。
|
|
4
|
+
|
|
5
|
+
このガイドでは、保存されたプリファレンスのリスト表示、削除、およびアクティブ状態の切り替え方法について詳しく説明します。
|
|
6
|
+
|
|
7
|
+
## 保存されたプリファレンスの表示
|
|
8
|
+
|
|
9
|
+
保存されているすべてのプリファレンスを確認するには、`--list` フラグを使用します。このコマンドは、各プリファレンスをそのステータス、スコープ、一意のID、および内容とともに表示します。
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
aigne doc prefs --list
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### 出力の理解
|
|
16
|
+
|
|
17
|
+
リストは、各プリファレンスルールに関する明確な情報を提供するようにフォーマットされています:
|
|
18
|
+
|
|
19
|
+
* **ステータス**: プリファレンスがアクティブか非アクティブかを示します。
|
|
20
|
+
* `🟢`: アクティブ。ルールはドキュメント生成中に適用されます。
|
|
21
|
+
* `⚪`: 非アクティブ。ルールは保存されていますが、無視されます。
|
|
22
|
+
* **スコープ**: プリファレンスが適用されるコンテキスト(例:`global`、`document`)。
|
|
23
|
+
* **ID**: プリファレンスの一意の識別子で、削除や切り替えに使用されます。
|
|
24
|
+
* **パス**: プリファレンスが特定のファイルにのみ適用される場合、そのパスがここにリストされます。
|
|
25
|
+
* **ルール内容**: プリファレンスルール自体のテキストです。
|
|
26
|
+
|
|
27
|
+
**出力例:**
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
# ユーザープリファレンス
|
|
31
|
+
|
|
32
|
+
**フォーマットの説明:**
|
|
33
|
+
- 🟢 = アクティブなプリファレンス, ⚪ = 非アクティブなプリファレンス
|
|
34
|
+
- [scope] = プリファレンスのスコープ (global, structure, document, translation)
|
|
35
|
+
- ID = 一意のプリファレンス識別子
|
|
36
|
+
- Paths = 特定のファイルパス(該当する場合)
|
|
37
|
+
|
|
38
|
+
🟢 [document] 2af5c | Paths: /guides/generating-documentation.md
|
|
39
|
+
具体的で検証可能な事実と情報に焦点を当てること。測定可能または具体的な情報を提供しない、曖昧または空虚な言葉の使用は避けること...
|
|
40
|
+
|
|
41
|
+
⚪ [global] 8b1e2
|
|
42
|
+
ドキュメント全体でフォーマルかつアカデミックなトーンを使用すること。
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## プリファレンスの削除
|
|
47
|
+
|
|
48
|
+
プリファレンスが不要になった場合、`--remove` フラグを使用して完全に削除できます。IDを指定するか、インタラクティブメニューを通じてプリファレンスを削除できます。
|
|
49
|
+
|
|
50
|
+
### インタラクティブモード
|
|
51
|
+
|
|
52
|
+
リストからプリファレンスを選択するには、IDなしでコマンドを実行します。これにより、削除したい項目をチェックできるインタラクティブなプロンプトが開きます。
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
aigne doc prefs --remove
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
チェックリストが表示され、1つ以上のプリファレンスを選択できます。これは、正しい項目を確実に削除するための推奨される方法です。
|
|
59
|
+
|
|
60
|
+
### ダイレクトモード
|
|
61
|
+
|
|
62
|
+
削除したいプリファレンスの一意のIDがすでにわかっている場合は、`--id` フラグを使用してそれらを指定できます。削除する項目が確かな場合は、この方法がより高速です。
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 単一のプリファレンスを削除
|
|
66
|
+
aigne doc prefs --remove --id 2af5c
|
|
67
|
+
|
|
68
|
+
# 複数のプリファレンスを削除
|
|
69
|
+
aigne doc prefs --remove --id 2af5c --id 8b1e2
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## プリファレンスの切り替え
|
|
73
|
+
|
|
74
|
+
プリファレンスを完全に削除する代わりに、一時的に有効または無効にすることができます。これは、ルールを失うことなく特定のタスクのために一時停止したい場合に便利です。プリファレンスのアクティブ状態を変更するには、`--toggle` フラグを使用します。
|
|
75
|
+
|
|
76
|
+
### インタラクティブモード
|
|
77
|
+
|
|
78
|
+
IDなしでコマンドを実行すると、削除コマンドと同様のインタラクティブなチェックリストが起動します。
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
aigne doc prefs --toggle
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
有効化または無効化したいプリファレンスを選択できます。ステータスアイコン(`🟢`/`⚪`)が更新され、新しい状態が反映されます。
|
|
85
|
+
|
|
86
|
+
### ダイレクトモード
|
|
87
|
+
|
|
88
|
+
特定のプリファレンスを直接切り替えるには、`--id` フラグを使用します。
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# 単一のプリファレンスを切り替え
|
|
92
|
+
aigne doc prefs --toggle --id 2af5c
|
|
93
|
+
|
|
94
|
+
# 複数のプリファレンスを切り替え
|
|
95
|
+
aigne doc prefs --toggle --id 2af5c --id 8b1e2
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
プリファレンスを管理することで、ドキュメント生成プロセスをきめ細かく制御し、出力がプロジェクトの特定の要件やスタイルに一貫して沿うようにすることができます。
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Managing Preferences
|
|
2
|
+
|
|
3
|
+
When you generate or update documentation, you can provide feedback using the `--feedback` flag. This feedback is saved as a "preference" to be reused in future sessions, ensuring the AI maintains consistency with your previous instructions. The `aigne doc prefs` command provides a direct way to manage these saved preferences.
|
|
4
|
+
|
|
5
|
+
This guide details how to list, remove, and toggle the active status of your saved preferences.
|
|
6
|
+
|
|
7
|
+
## Viewing Saved Preferences
|
|
8
|
+
|
|
9
|
+
To review all saved preferences, use the `--list` flag. This command displays each preference with its status, scope, unique ID, and content.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
aigne doc prefs --list
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Understanding the Output
|
|
16
|
+
|
|
17
|
+
The list is formatted to provide clear information about each preference rule:
|
|
18
|
+
|
|
19
|
+
* **Status**: Indicates if a preference is active or inactive.
|
|
20
|
+
* `🟢`: Active. The rule will be applied during documentation generation.
|
|
21
|
+
* `⚪`: Inactive. The rule is saved but will be ignored.
|
|
22
|
+
* **Scope**: The context in which the preference applies (e.g., `global`, `document`).
|
|
23
|
+
* **ID**: A unique identifier for the preference, used for removing or toggling.
|
|
24
|
+
* **Paths**: If the preference applies only to specific files, their paths are listed here.
|
|
25
|
+
* **Rule Content**: The text of the preference rule itself.
|
|
26
|
+
|
|
27
|
+
**Example Output:**
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
# User Preferences
|
|
31
|
+
|
|
32
|
+
**Format explanation:**
|
|
33
|
+
- 🟢 = Active preference, ⚪ = Inactive preference
|
|
34
|
+
- [scope] = Preference scope (global, structure, document, translation)
|
|
35
|
+
- ID = Unique preference identifier
|
|
36
|
+
- Paths = Specific file paths (if applicable)
|
|
37
|
+
|
|
38
|
+
🟢 [document] 2af5c | Paths: /guides/generating-documentation.md
|
|
39
|
+
Focus on concrete, verifiable facts and information. Avoid using vague or empty words that don't provide measurable or specific d...
|
|
40
|
+
|
|
41
|
+
⚪ [global] 8b1e2
|
|
42
|
+
Use a formal and academic tone throughout the documentation.
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Removing Preferences
|
|
47
|
+
|
|
48
|
+
When a preference is no longer needed, you can permanently delete it using the `--remove` flag. You can remove preferences either by specifying their IDs or through an interactive menu.
|
|
49
|
+
|
|
50
|
+
### Interactive Mode
|
|
51
|
+
|
|
52
|
+
To select preferences from a list, run the command without any IDs. This will open an interactive prompt where you can check the items you wish to delete.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
aigne doc prefs --remove
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
A checklist will appear, allowing you to select one or more preferences. This is the recommended method for ensuring you remove the correct items.
|
|
59
|
+
|
|
60
|
+
### Direct Mode
|
|
61
|
+
|
|
62
|
+
If you already know the unique IDs of the preferences you want to remove, you can specify them using the `--id` flag. This is faster if you are certain about which items to delete.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Remove a single preference
|
|
66
|
+
aigne doc prefs --remove --id 2af5c
|
|
67
|
+
|
|
68
|
+
# Remove multiple preferences
|
|
69
|
+
aigne doc prefs --remove --id 2af5c --id 8b1e2
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Toggling Preferences
|
|
73
|
+
|
|
74
|
+
Instead of permanently deleting a preference, you can temporarily enable or disable it. This is useful when you want to suspend a rule for a specific task without losing it. Use the `--toggle` flag to change a preference's active status.
|
|
75
|
+
|
|
76
|
+
### Interactive Mode
|
|
77
|
+
|
|
78
|
+
Running the command without IDs will launch an interactive checklist, similar to the remove command.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
aigne doc prefs --toggle
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
You can select the preferences you wish to activate or deactivate. The status icon (`🟢`/`⚪`) will update to reflect the new state.
|
|
85
|
+
|
|
86
|
+
### Direct Mode
|
|
87
|
+
|
|
88
|
+
To toggle specific preferences directly, use the `--id` flag.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Toggle a single preference
|
|
92
|
+
aigne doc prefs --toggle --id 2af5c
|
|
93
|
+
|
|
94
|
+
# Toggle multiple preferences
|
|
95
|
+
aigne doc prefs --toggle --id 2af5c --id 8b1e2
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
By managing your preferences, you can maintain fine-grained control over the documentation generation process, ensuring that the output consistently aligns with your project's specific requirements and style.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# 管理偏好設定
|
|
2
|
+
|
|
3
|
+
當您生成或更新文件時,可以使用 `--feedback` 旗標提供回饋。此回饋會儲存為「偏好設定」,以便在未來的會話中重複使用,確保 AI 與您先前的指示保持一致。`aigne doc prefs` 指令提供了一種直接管理這些已儲存偏好設定的方法。
|
|
4
|
+
|
|
5
|
+
本指南詳細說明如何列出、移除以及切換您已儲存偏好設定的啟用狀態。
|
|
6
|
+
|
|
7
|
+
## 檢視已儲存的偏好設定
|
|
8
|
+
|
|
9
|
+
若要檢視所有已儲存的偏好設定,請使用 `--list` 旗標。此指令會顯示每個偏好設定的狀態、範圍、唯一 ID 和內容。
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
aigne doc prefs --list
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### 理解輸出內容
|
|
16
|
+
|
|
17
|
+
列表經過格式化,以提供關於每個偏好設定規則的清晰資訊:
|
|
18
|
+
|
|
19
|
+
* **Status**:指示偏好設定為啟用或停用。
|
|
20
|
+
* `🟢`:啟用。此規則將在文件生成期間應用。
|
|
21
|
+
* `⚪`:停用。此規則已儲存但將被忽略。
|
|
22
|
+
* **Scope**:偏好設定應用的情境(例如:`global`、`document`)。
|
|
23
|
+
* **ID**:偏好設定的唯一識別碼,用於移除或切換狀態。
|
|
24
|
+
* **Paths**:如果偏好設定僅適用於特定檔案,其路徑會在此列出。
|
|
25
|
+
* **Rule Content**:偏好設定規則本身的文字。
|
|
26
|
+
|
|
27
|
+
**輸出範例:**
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
# 使用者偏好設定
|
|
31
|
+
|
|
32
|
+
**格式說明:**
|
|
33
|
+
- 🟢 = 啟用中的偏好設定,⚪ = 停用中的偏好設定
|
|
34
|
+
- [scope] = 偏好設定範圍 (global, structure, document, translation)
|
|
35
|
+
- ID = 唯一的偏好設定識別碼
|
|
36
|
+
- Paths = 特定檔案路徑(如果適用)
|
|
37
|
+
|
|
38
|
+
🟢 [document] 2af5c | Paths: /guides/generating-documentation.md
|
|
39
|
+
Focus on concrete, verifiable facts and information. Avoid using vague or empty words that don't provide measurable or specific d...
|
|
40
|
+
|
|
41
|
+
⚪ [global] 8b1e2
|
|
42
|
+
Use a formal and academic tone throughout the documentation.
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 移除偏好設定
|
|
47
|
+
|
|
48
|
+
當不再需要某個偏好設定時,您可以使用 `--remove` 旗標將其永久刪除。您可以透過指定其 ID 或透過互動式選單來移除偏好設定。
|
|
49
|
+
|
|
50
|
+
### 互動模式
|
|
51
|
+
|
|
52
|
+
若要從列表中選擇偏好設定,請執行不含任何 ID 的指令。這將開啟一個互動式提示,您可以在其中勾選您希望刪除的項目。
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
aigne doc prefs --remove
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
會出現一個清單,讓您選擇一個或多個偏好設定。這是確保您移除正確項目的建議方法。
|
|
59
|
+
|
|
60
|
+
### 直接模式
|
|
61
|
+
|
|
62
|
+
如果您已經知道要移除的偏好設定的唯一 ID,您可以使用 `--id` 旗標來指定它們。如果您確定要刪除哪些項目,這種方式會更快。
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 移除單一偏好設定
|
|
66
|
+
aigne doc prefs --remove --id 2af5c
|
|
67
|
+
|
|
68
|
+
# 移除多個偏好設定
|
|
69
|
+
aigne doc prefs --remove --id 2af5c --id 8b1e2
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 切換偏好設定
|
|
73
|
+
|
|
74
|
+
您可以暫時啟用或停用偏好設定,而不是永久刪除它。當您想為特定任務暫停某個規則而不想失去它時,這非常有用。使用 `--toggle` 旗標來變更偏好設定的啟用狀態。
|
|
75
|
+
|
|
76
|
+
### 互動模式
|
|
77
|
+
|
|
78
|
+
執行不含 ID 的指令將會啟動一個互動式清單,類似於移除指令。
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
aigne doc prefs --toggle
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
您可以選擇您希望啟用或停用的偏好設定。狀態圖示 (`🟢`/`⚪`) 將會更新以反映新的狀態。
|
|
85
|
+
|
|
86
|
+
### 直接模式
|
|
87
|
+
|
|
88
|
+
若要直接切換特定偏好設定,請使用 `--id` 旗標。
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# 切換單一偏好設定
|
|
92
|
+
aigne doc prefs --toggle --id 2af5c
|
|
93
|
+
|
|
94
|
+
# 切換多個偏好設定
|
|
95
|
+
aigne doc prefs --toggle --id 2af5c --id 8b1e2
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
透過管理您的偏好設定,您可以對文件生成過程進行細緻的控制,確保輸出結果能持續符合您專案的特定要求和風格。
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# 管理偏好设置
|
|
2
|
+
|
|
3
|
+
在生成或更新文档时,您可以使用 `--feedback` 标志提供反馈。此反馈将作为“偏好设置”保存,以便在未来的会话中重复使用,确保 AI 与您之前的指令保持一致。`aigne doc prefs` 命令提供了一种直接管理这些已保存偏好设置的方法。
|
|
4
|
+
|
|
5
|
+
本指南详细介绍了如何列出、删除和切换已保存偏好设置的活动状态。
|
|
6
|
+
|
|
7
|
+
## 查看已保存的偏好设置
|
|
8
|
+
|
|
9
|
+
要查看所有已保存的偏好设置,请使用 `--list` 标志。此命令会显示每个偏好设置的状态、范围、唯一 ID 和内容。
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
aigne doc prefs --list
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### 理解输出
|
|
16
|
+
|
|
17
|
+
列表经过格式化,以提供关于每个偏好规则的清晰信息:
|
|
18
|
+
|
|
19
|
+
* **状态**:指示偏好设置是活动还是非活动状态。
|
|
20
|
+
* `🟢`:活动。该规则将在文档生成期间应用。
|
|
21
|
+
* `⚪`:非活动。该规则已保存但将被忽略。
|
|
22
|
+
* **范围**:偏好设置适用的上下文(例如,`global`、`document`)。
|
|
23
|
+
* **ID**:偏好设置的唯一标识符,用于删除或切换状态。
|
|
24
|
+
* **路径**:如果偏好设置仅适用于特定文件,其路径会在此处列出。
|
|
25
|
+
* **规则内容**:偏好规则本身的文本。
|
|
26
|
+
|
|
27
|
+
**输出示例:**
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
# 用户偏好设置
|
|
31
|
+
|
|
32
|
+
**格式说明:**
|
|
33
|
+
- 🟢 = 活动偏好,⚪ = 非活动偏好
|
|
34
|
+
- [scope] = 偏好范围 (global, structure, document, translation)
|
|
35
|
+
- ID = 唯一偏好标识符
|
|
36
|
+
- Paths = 特定文件路径(如适用)
|
|
37
|
+
|
|
38
|
+
🟢 [document] 2af5c | Paths: /guides/generating-documentation.md
|
|
39
|
+
Focus on concrete, verifiable facts and information. Avoid using vague or empty words that don't provide measurable or specific d...
|
|
40
|
+
|
|
41
|
+
⚪ [global] 8b1e2
|
|
42
|
+
Use a formal and academic tone throughout the documentation.
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 删除偏好设置
|
|
47
|
+
|
|
48
|
+
当不再需要某个偏好设置时,您可以使用 `--remove` 标志将其永久删除。您可以通过指定其 ID 或通过交互式菜单来删除偏好设置。
|
|
49
|
+
|
|
50
|
+
### 交互模式
|
|
51
|
+
|
|
52
|
+
要从列表中选择偏好设置,请在不带任何 ID 的情况下运行该命令。这将打开一个交互式提示,您可以在其中勾选要删除的项目。
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
aigne doc prefs --remove
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
将出现一个清单,允许您选择一个或多个偏好设置。这是确保您删除正确项目的推荐方法。
|
|
59
|
+
|
|
60
|
+
### 直接模式
|
|
61
|
+
|
|
62
|
+
如果您已经知道要删除的偏好设置的唯一 ID,可以使用 `--id` 标志来指定它们。如果您确定要删除哪些项目,这种方式会更快。
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 删除单个偏好设置
|
|
66
|
+
aigne doc prefs --remove --id 2af5c
|
|
67
|
+
|
|
68
|
+
# 删除多个偏好设置
|
|
69
|
+
aigne doc prefs --remove --id 2af5c --id 8b1e2
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 切换偏好设置
|
|
73
|
+
|
|
74
|
+
除了永久删除偏好设置,您还可以临时启用或禁用它。当您想为特定任务暂停某条规则但又不想丢失它时,这非常有用。使用 `--toggle` 标志来更改偏好设置的活动状态。
|
|
75
|
+
|
|
76
|
+
### 交互模式
|
|
77
|
+
|
|
78
|
+
在不带 ID 的情况下运行该命令将启动一个交互式清单,类似于删除命令。
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
aigne doc prefs --toggle
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
您可以选择希望激活或停用的偏好设置。状态图标(`🟢`/`⚪`)将更新以反映新状态。
|
|
85
|
+
|
|
86
|
+
### 直接模式
|
|
87
|
+
|
|
88
|
+
要直接切换特定偏好设置,请使用 `--id` 标志。
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# 切换单个偏好设置
|
|
92
|
+
aigne doc prefs --toggle --id 2af5c
|
|
93
|
+
|
|
94
|
+
# 切换多个偏好设置
|
|
95
|
+
aigne doc prefs --toggle --id 2af5c --id 8b1e2
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
通过管理您的偏好设置,您可以对文档生成过程进行精细控制,确保输出始终符合您项目的特定要求和风格。
|