@aigne/doc-smith 0.8.12-beta.5 → 0.8.12-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.
- package/.aigne/doc-smith/history.yaml +37 -0
- package/.aigne/doc-smith/preferences.yml +12 -0
- package/.aigne/doc-smith/upload-cache.yaml +30 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +19 -0
- package/agents/generate/update-document-structure.yaml +9 -3
- package/agents/history/view.mjs +5 -2
- package/agents/publish/publish-docs.mjs +12 -10
- package/agents/update/generate-document.yaml +10 -4
- package/agents/update/update-document-detail.yaml +9 -3
- package/agents/update/user-review-document.mjs +2 -1
- package/docs/guides-cleaning-up.ja.md +16 -15
- package/docs/guides-cleaning-up.md +5 -4
- package/docs/guides-cleaning-up.zh-TW.md +16 -15
- package/docs/guides-cleaning-up.zh.md +12 -11
- package/docs/guides-generating-documentation.ja.md +34 -32
- package/docs/guides-generating-documentation.md +15 -13
- package/docs/guides-generating-documentation.zh-TW.md +34 -32
- package/docs/guides-generating-documentation.zh.md +30 -28
- package/docs/guides-managing-history.ja.md +17 -20
- package/docs/guides-managing-history.md +5 -8
- package/docs/guides-managing-history.zh-TW.md +18 -21
- package/docs/guides-managing-history.zh.md +13 -16
- package/docs/guides-translating-documentation.ja.md +17 -17
- package/docs/guides-translating-documentation.md +1 -1
- package/docs/guides-translating-documentation.zh-TW.md +21 -21
- package/docs/guides-translating-documentation.zh.md +18 -18
- package/docs/guides-updating-documentation.ja.md +35 -35
- package/docs/guides-updating-documentation.md +4 -4
- package/docs/guides-updating-documentation.zh-TW.md +27 -27
- package/docs/guides-updating-documentation.zh.md +26 -26
- package/docs/overview.ja.md +13 -13
- package/docs/overview.md +1 -1
- package/docs/overview.zh-TW.md +19 -19
- package/docs/overview.zh.md +16 -16
- package/package.json +1 -1
- package/prompts/common/afs/afs-tools-usage.md +5 -0
- package/prompts/common/afs/use-afs-instruction.md +1 -0
- package/prompts/detail/generate/system-prompt.md +0 -13
- package/prompts/detail/generate/user-prompt.md +7 -0
- package/prompts/detail/update/system-prompt.md +1 -2
- package/prompts/detail/update/user-prompt.md +7 -0
- package/prompts/structure/generate/system-prompt.md +0 -19
- package/prompts/structure/generate/user-prompt.md +22 -1
- package/prompts/structure/update/system-prompt.md +0 -17
- package/prompts/structure/update/user-prompt.md +24 -0
- package/tests/agents/history/view.test.mjs +97 -0
- package/tests/agents/publish/publish-docs.test.mjs +0 -33
- package/tests/utils/history-utils.test.mjs +125 -97
- package/utils/auth-utils.mjs +2 -2
- package/utils/file-utils.mjs +1 -1
- package/utils/history-utils.mjs +3 -3
- package/agents/update/fs-tools/glob.mjs +0 -184
- package/agents/update/fs-tools/grep.mjs +0 -317
- package/agents/update/fs-tools/read-file.mjs +0 -309
- package/tests/agents/update/fs-tools/glob.test.mjs +0 -438
- package/tests/agents/update/fs-tools/grep.test.mjs +0 -279
- package/tests/agents/update/fs-tools/read-file.test.mjs +0 -549
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
entries:
|
|
2
|
+
- timestamp: 2025-10-11T13:21:51.992Z
|
|
3
|
+
operation: translation_update
|
|
4
|
+
feedback: Do not translate the Target column in the Cleanup Targets table.
|
|
5
|
+
documentPath: /guides/cleaning-up
|
|
6
|
+
- timestamp: 2025-10-11T13:20:30.314Z
|
|
7
|
+
operation: document_update
|
|
8
|
+
feedback: The targets in Cleanup Targets are incomplete and need to be supplemented. The corresponding descriptions also require updating. Additionally, the target values should use the original enumeration values, such as 'generatedDocs'.
|
|
9
|
+
documentPath: /guides/cleaning-up
|
|
10
|
+
- timestamp: 2025-10-11T13:03:20.327Z
|
|
11
|
+
operation: document_update
|
|
12
|
+
feedback: The two aliases for the 'history' command in Viewing Update History can be combined into a single code block. The Short Hash in Understanding the History Output now consists of 8 characters. Additionally, operation types are separated by underscores, such as 'document_update'.
|
|
13
|
+
documentPath: /guides/managing-history
|
|
14
|
+
- timestamp: 2025-10-11T12:56:23.107Z
|
|
15
|
+
operation: document_update
|
|
16
|
+
feedback: In interactive mode, translated files are saved with a suffix appended to their original filenames within the same directory, rather than in dedicated language directories.
|
|
17
|
+
documentPath: /guides/translating-documentation
|
|
18
|
+
- timestamp: 2025-10-11T12:50:25.563Z
|
|
19
|
+
operation: document_update
|
|
20
|
+
feedback: The value of the 'docs' parameter in the demo should be a path separated by '-' rather than '/', and '.md' should be preserved.
|
|
21
|
+
documentPath: /guides/updating-documentation
|
|
22
|
+
- timestamp: 2025-10-11T12:46:37.507Z
|
|
23
|
+
operation: document_update
|
|
24
|
+
feedback: The value of the 'docs' parameter in the demo should be a path separated by '-' rather than '/'.
|
|
25
|
+
documentPath: /guides/updating-documentation
|
|
26
|
+
- timestamp: 2025-10-11T12:39:53.222Z
|
|
27
|
+
operation: document_update
|
|
28
|
+
feedback: The prompts in Review the Documentation Structure are outdated and need updating. Command Parameters also require updating.
|
|
29
|
+
documentPath: /guides/generating-documentation
|
|
30
|
+
- timestamp: 2025-10-11T12:26:24.598Z
|
|
31
|
+
operation: translation_update
|
|
32
|
+
feedback: AIGNE Framework is a proper noun and has its own link; no translation is required.
|
|
33
|
+
documentPath: /overview
|
|
34
|
+
- timestamp: 2025-10-11T12:24:05.477Z
|
|
35
|
+
operation: document_update
|
|
36
|
+
feedback: Add a link to the AIGNE Framework 'https://www.aigne.io/framework'.
|
|
37
|
+
documentPath: /overview
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
rules:
|
|
2
|
+
- id: pref_cbc8005011c08ca0
|
|
3
|
+
active: true
|
|
4
|
+
scope: translation
|
|
5
|
+
rule: In the table titled 'Cleanup Targets', the 'Target' column must retain the original text and should not be translated.
|
|
6
|
+
feedback: Do not translate the Target column in the Cleanup Targets table.
|
|
7
|
+
createdAt: 2025-10-11T13:22:06.529Z
|
|
8
|
+
- id: pref_545cabc521ecd4a5
|
|
9
|
+
active: true
|
|
10
|
+
scope: translation
|
|
11
|
+
rule: The proprietary term 'AIGNE Framework' must not be translated and must be retained in its original form.
|
|
12
|
+
feedback: AIGNE Framework is a proper noun and has its own link; no translation is required.
|
|
13
|
+
createdAt: 2025-10-11T12:26:37.517Z
|
|
2
14
|
- id: pref_6e612d7ca8b7f3b6
|
|
3
15
|
active: true
|
|
4
16
|
scope: document
|
|
@@ -1861,3 +1861,33 @@ e87fcba2227e472141f99b92eb0247965db132079459ce8c83454dde7fc9a6ae:
|
|
|
1861
1861
|
https://docsmith.aigne.io:
|
|
1862
1862
|
url: https://docsmith.aigne.io/image-bin/uploads/3b189fa893cc2120.svg
|
|
1863
1863
|
upload_time: 2025-10-10T07:40:22.634Z
|
|
1864
|
+
7b946c226f73c4c222b37ea23b94b3152932e1712f9d99b78f64c0b93e12bdd9:
|
|
1865
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/97b496a8d3d5b12b9c8d4d0729110db999a2be33359a1cb70b3f858997ba91a3.svg
|
|
1866
|
+
sites:
|
|
1867
|
+
https://docsmith.aigne.io:
|
|
1868
|
+
url: https://docsmith.aigne.io/image-bin/uploads/7b946c226f73c4c2.svg
|
|
1869
|
+
upload_time: 2025-10-11T16:43:05.278Z
|
|
1870
|
+
c2a826d21a6eeb8664b88a864e1d5ae3ff68bd9e7dad3c46742f855898441747:
|
|
1871
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/44d2c5dc7e7fcf4ada941e8c4e444b19d5870dd02d44046dea585bbd77b03e0d.svg
|
|
1872
|
+
sites:
|
|
1873
|
+
https://docsmith.aigne.io:
|
|
1874
|
+
url: https://docsmith.aigne.io/image-bin/uploads/c2a826d21a6eeb86.svg
|
|
1875
|
+
upload_time: 2025-10-11T16:43:06.895Z
|
|
1876
|
+
605705e827c243bb5402f14ed3b7750f2e6564214a81880df12b857c41935917:
|
|
1877
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/8ff7639517a76840aaf851b1345b8dae330d4df6f5788b70d2c41febf86e63ab.svg
|
|
1878
|
+
sites:
|
|
1879
|
+
https://docsmith.aigne.io:
|
|
1880
|
+
url: https://docsmith.aigne.io/image-bin/uploads/605705e827c243bb.svg
|
|
1881
|
+
upload_time: 2025-10-11T16:43:06.968Z
|
|
1882
|
+
71ec3af141d2bcda728a2f7e7a47ca2e2e76a86f54d648832d11f4193d9975f4:
|
|
1883
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/db5b4787a2dc7655434d00ecf3eb9a25fbf73f93cda2b3f10d4022fd9c2bd16b.svg
|
|
1884
|
+
sites:
|
|
1885
|
+
https://docsmith.aigne.io:
|
|
1886
|
+
url: https://docsmith.aigne.io/image-bin/uploads/71ec3af141d2bcda.svg
|
|
1887
|
+
upload_time: 2025-10-11T16:43:08.753Z
|
|
1888
|
+
c61907da62788c6ad5b8d89b0fde7f235046b9a6aed309c43be9b0d5b3abb670:
|
|
1889
|
+
local_path: .aigne/doc-smith/.tmp/assets/d2/8f38985e99e81e8edf973a328862e8ec33cc6de1e1382ebbe55c56f64edbd2ad.svg
|
|
1890
|
+
sites:
|
|
1891
|
+
https://docsmith.aigne.io:
|
|
1892
|
+
url: https://docsmith.aigne.io/image-bin/uploads/c61907da62788c6a.svg
|
|
1893
|
+
upload_time: 2025-10-11T16:43:10.182Z
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.12-beta.7](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.12-beta.6...v0.8.12-beta.7) (2025-10-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* support retrieve context from repo by AFS ([#175](https://github.com/AIGNE-io/aigne-doc-smith/issues/175)) ([352ce75](https://github.com/AIGNE-io/aigne-doc-smith/commit/352ce751ae9b51a71581793ead7952fb49cda7c4))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* disable git based update history within git repo ([#180](https://github.com/AIGNE-io/aigne-doc-smith/issues/180)) ([826b4bd](https://github.com/AIGNE-io/aigne-doc-smith/commit/826b4bdeb5042b2dcd14ce1da975965ad7805347))
|
|
14
|
+
|
|
15
|
+
## [0.8.12-beta.6](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.12-beta.5...v0.8.12-beta.6) (2025-10-11)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **publish:** enhance access token retrieval and session check logic ([#178](https://github.com/AIGNE-io/aigne-doc-smith/issues/178)) ([e19e9f5](https://github.com/AIGNE-io/aigne-doc-smith/commit/e19e9f52b1c80ba8eb725cfa945cd312d0690ef1))
|
|
21
|
+
|
|
3
22
|
## [0.8.12-beta.5](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.12-beta.4...v0.8.12-beta.5) (2025-10-11)
|
|
4
23
|
|
|
5
24
|
|
|
@@ -32,11 +32,17 @@ input_schema:
|
|
|
32
32
|
- documentStructure
|
|
33
33
|
- feedback
|
|
34
34
|
output_key: message
|
|
35
|
+
afs:
|
|
36
|
+
modules:
|
|
37
|
+
- module: system-fs
|
|
38
|
+
options:
|
|
39
|
+
mount: /sources
|
|
40
|
+
path: .
|
|
41
|
+
description: |
|
|
42
|
+
Codebase of the project to be documented used as context for document generation,
|
|
43
|
+
should search and read as needed while generating document content
|
|
35
44
|
skills:
|
|
36
45
|
- ./document-structure-tools/add-document.mjs
|
|
37
46
|
- ./document-structure-tools/delete-document.mjs
|
|
38
47
|
- ./document-structure-tools/update-document.mjs
|
|
39
48
|
- ./document-structure-tools/move-document.mjs
|
|
40
|
-
- ../update/fs-tools/glob.mjs
|
|
41
|
-
- ../update/fs-tools/grep.mjs
|
|
42
|
-
- ../update/fs-tools/read-file.mjs
|
package/agents/history/view.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
2
3
|
import { getHistory } from "../../utils/history-utils.mjs";
|
|
3
4
|
|
|
4
5
|
export default function viewHistory() {
|
|
@@ -35,8 +36,10 @@ export default function viewHistory() {
|
|
|
35
36
|
* Generate a short hash from timestamp (git-style)
|
|
36
37
|
*/
|
|
37
38
|
function generateShortHash(timestamp) {
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
// Create a deterministic hash from timestamp only
|
|
40
|
+
// This ensures the same timestamp always produces the same hash
|
|
41
|
+
const hash = createHash("sha1").update(timestamp).digest("hex");
|
|
42
|
+
return hash.substring(0, 8); // First 8 chars of SHA1 hash
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
/**
|
|
@@ -57,18 +57,20 @@ export default async function publishDocs(
|
|
|
57
57
|
let token = "";
|
|
58
58
|
|
|
59
59
|
if (!useEnvAppUrl && isDefaultAppUrl && !hasAppUrlInConfig) {
|
|
60
|
-
const authToken = await getOfficialAccessToken(BASE_URL);
|
|
60
|
+
const authToken = await getOfficialAccessToken(BASE_URL, false);
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const client = new BrokerClient({ baseUrl: BASE_URL, authToken });
|
|
62
|
+
let sessionId = "";
|
|
63
|
+
let paymentLink = "";
|
|
67
64
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
if (authToken) {
|
|
66
|
+
const client = new BrokerClient({ baseUrl: BASE_URL, authToken });
|
|
67
|
+
const info = await client.checkCacheSession({
|
|
68
|
+
needShortUrl: true,
|
|
69
|
+
sessionId: config?.checkoutId,
|
|
70
|
+
});
|
|
71
|
+
sessionId = info.sessionId;
|
|
72
|
+
paymentLink = info.paymentLink;
|
|
73
|
+
}
|
|
72
74
|
|
|
73
75
|
const choice = await options.prompts.select({
|
|
74
76
|
message: "Select platform to publish your documents:",
|
|
@@ -45,10 +45,16 @@ input_schema:
|
|
|
45
45
|
- datasources
|
|
46
46
|
- originalDocumentStructure
|
|
47
47
|
output_key: content
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
afs:
|
|
49
|
+
modules:
|
|
50
|
+
- module: system-fs
|
|
51
|
+
options:
|
|
52
|
+
mount: /sources
|
|
53
|
+
path: .
|
|
54
|
+
description: |
|
|
55
|
+
Codebase of the project to be documented used as context for document generation,
|
|
56
|
+
should search and read as needed while generating document content
|
|
57
|
+
# skills:
|
|
52
58
|
# FIXME: @zhanghan temporary disable diagram tool
|
|
53
59
|
# - type: team
|
|
54
60
|
# task_render_mode: collapse
|
|
@@ -44,9 +44,15 @@ input_schema:
|
|
|
44
44
|
- originalContent
|
|
45
45
|
- feedback
|
|
46
46
|
output_key: message
|
|
47
|
+
afs:
|
|
48
|
+
modules:
|
|
49
|
+
- module: system-fs
|
|
50
|
+
options:
|
|
51
|
+
mount: /sources
|
|
52
|
+
path: .
|
|
53
|
+
description: |
|
|
54
|
+
Codebase of the project to be documented used as context for document generation,
|
|
55
|
+
should search and read as needed while generating document content
|
|
47
56
|
skills:
|
|
48
57
|
- ./document-tools/update-document-content.mjs
|
|
49
|
-
- ./fs-tools/glob.mjs
|
|
50
|
-
- ./fs-tools/grep.mjs
|
|
51
|
-
- ./fs-tools/read-file.mjs
|
|
52
58
|
task_render_mode: collapse
|
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
# クリーンアップ
|
|
2
2
|
|
|
3
|
-
`aigne doc clear`
|
|
3
|
+
`aigne doc clear` コマンドは、生成されたファイル、キャッシュデータ、設定を削除するための簡単な方法を提供します。これは、ドキュメントプロジェクトをリセットしたり、クリーンな状態から開始したり、古くなったファイルや破損したファイルに関連する問題をトラブルシューティングしたりする場合に役立ちます。
|
|
4
4
|
|
|
5
5
|
## 対話的なクリーンアップ
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
このコマンドを使用する最も簡単な方法は、引数なしで実行することです:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
aigne doc clear
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
このコマンドを実行すると対話型のプロンプトが起動し、削除したい項目を正確に選択できます。各オプションについて明確な説明が提供され、偶発的なデータ損失を防ぐことができるため、ほとんどのユースケースでこのアプローチが推奨されます。
|
|
14
14
|
|
|
15
15
|
## クリーンアップ対象
|
|
16
16
|
|
|
17
|
-
`clear`
|
|
17
|
+
`clear` コマンドは、いくつかの異なる種類のデータを削除できます。次の表は、利用可能な各ターゲット、その機能、および影響を受ける特定のファイルやディレクトリについて詳しく説明しています。
|
|
18
18
|
|
|
19
|
-
|
|
|
19
|
+
| Target | 説明 | 影響を受けるファイルとディレクトリ |
|
|
20
20
|
| :--- | :--- | :--- |
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
21
|
+
| `generatedDocs` | 出力ディレクトリ内の生成されたすべてのドキュメントを削除しますが、ドキュメント構造計画は保持します。 | 設定で指定された `docsDir` ディレクトリ。 |
|
|
22
|
+
| `documentStructure` | 生成されたすべてのドキュメントとドキュメント構造計画を削除し、ドキュメントコンテンツを効果的にリセットします。 | `.aigne/doc-smith/output/structure-plan.json` ファイルと `docsDir` ディレクトリ。 |
|
|
23
|
+
| `documentConfig` | プロジェクトの設定ファイルを削除します。この操作の後、再度 `aigne doc init` を実行する必要があります。 | `.aigne/doc-smith/config.yaml` ファイル。 |
|
|
24
|
+
| `authTokens` | 公開サイト用に保存された認証トークンを削除します。どのサイトをクリアするか選択するよう求められます。 | ホームディレクトリにある `~/.aigne/doc-smith-connected.yaml` ファイル。 |
|
|
25
|
+
| `deploymentConfig` | 設定ファイルから `appUrl` を削除します。 | `.aigne/doc-smith/config.yaml` ファイル。 |
|
|
25
26
|
|
|
26
27
|
## 非対話的なクリーンアップ
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
自動化スクリプトやコマンドラインを好むユーザーのために、`--targets` フラグを使用してクリアする1つ以上のターゲットを直接指定できます。これにより、対話型のプロンプトがバイパスされます。
|
|
29
30
|
|
|
30
|
-
###
|
|
31
|
+
### 単一ターゲットのクリア
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
生成されたドキュメントのみをクリアするには、次のコマンドを使用します:
|
|
33
34
|
|
|
34
35
|
```bash
|
|
35
36
|
aigne doc clear --targets generatedDocs
|
|
36
37
|
```
|
|
37
38
|
|
|
38
|
-
###
|
|
39
|
+
### 複数ターゲットのクリア
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
複数のターゲット名を指定して、一度に複数の項目をクリアできます。例えば、ドキュメント設定とドキュメント構造の両方を削除するには、次のように実行します:
|
|
41
42
|
|
|
42
43
|
```bash
|
|
43
44
|
aigne doc clear --targets documentConfig documentStructure
|
|
44
45
|
```
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
設定をクリアした後、再度セットアッププロセスを実行して新たに開始できます。
|
|
47
48
|
|
|
48
49
|
---
|
|
49
50
|
|
|
@@ -18,10 +18,11 @@ The `clear` command can remove several distinct types of data. The following tab
|
|
|
18
18
|
|
|
19
19
|
| Target | Description | Files and Directories Affected |
|
|
20
20
|
| :--- | :--- | :--- |
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
21
|
+
| `generatedDocs` | Deletes all generated documents in your output directory, but keeps the documentation structure plan. | The directory specified by `docsDir` in your configuration. |
|
|
22
|
+
| `documentStructure` | Deletes all generated documents and the documentation structure plan, effectively resetting your documentation content. | The `.aigne/doc-smith/output/structure-plan.json` file and the `docsDir` directory. |
|
|
23
|
+
| `documentConfig` | Deletes the project's configuration file. You will need to run `aigne doc init` again after this. | The `.aigne/doc-smith/config.yaml` file. |
|
|
24
|
+
| `authTokens` | Removes saved authorization tokens for publishing sites. You will be prompted to select which sites to clear. | The `~/.aigne/doc-smith-connected.yaml` file in your home directory. |
|
|
25
|
+
| `deploymentConfig` | Deletes the `appUrl` from your configuration file. | The `.aigne/doc-smith/config.yaml` file. |
|
|
25
26
|
|
|
26
27
|
## Non-Interactive Cleaning
|
|
27
28
|
|
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
# 清理
|
|
2
2
|
|
|
3
|
-
`aigne doc clear`
|
|
3
|
+
`aigne doc clear` 指令提供了一個直接的方法來移除生成的檔案、快取資料和配置設定。當您想要重設您的文件專案、從乾淨的狀態開始,或解決與過時或損壞檔案相關的問題時,這個指令非常有用。
|
|
4
4
|
|
|
5
5
|
## 互動式清理
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
使用此指令最簡單的方法是不帶任何參數直接執行:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
aigne doc clear
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
執行此指令將啟動一個互動式提示,讓您精確選擇要移除的項目。這是大多數使用情境下的建議方法,因為它為每個選項提供了清晰的說明,並能防止意外的資料遺失。
|
|
14
14
|
|
|
15
15
|
## 清理目標
|
|
16
16
|
|
|
17
|
-
`clear`
|
|
17
|
+
`clear` 指令可以移除幾種不同類型的資料。下表詳細說明了每個可用的目標、其功能以及它所影響的特定檔案或目錄。
|
|
18
18
|
|
|
19
|
-
|
|
|
19
|
+
| Target | 說明 | 受影響的檔案與目錄 |
|
|
20
20
|
| :--- | :--- | :--- |
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
21
|
+
| `generatedDocs` | 刪除您輸出目錄中所有已生成的檔案,但保留文件結構計畫。 | 您設定中 `docsDir` 所指定的目錄。 |
|
|
22
|
+
| `documentStructure` | 刪除所有已生成的檔案和文件結構計畫,有效地重設您的文件內容。 | `.aigne/doc-smith/output/structure-plan.json` 檔案和 `docsDir` 目錄。 |
|
|
23
|
+
| `documentConfig` | 刪除專案的設定檔。此操作後,您將需要重新執行 `aigne doc init`。 | `.aigne/doc-smith/config.yaml` 檔案。 |
|
|
24
|
+
| `authTokens` | 移除已儲存的發布網站授權權杖。系統將提示您選擇要清除哪些網站。 | 您家目錄中的 `~/.aigne/doc-smith-connected.yaml` 檔案。 |
|
|
25
|
+
| `deploymentConfig` | 從您的設定檔中刪除 `appUrl`。 | `.aigne/doc-smith/config.yaml` 檔案。 |
|
|
25
26
|
|
|
26
27
|
## 非互動式清理
|
|
27
28
|
|
|
28
|
-
對於自動化腳本或偏好使用命令列的使用者,您可以使用 `--targets`
|
|
29
|
+
對於自動化腳本或偏好使用命令列的使用者,您可以使用 `--targets` 旗標直接指定一個或多個要清除的目標。這將繞過互動式提示。
|
|
29
30
|
|
|
30
|
-
###
|
|
31
|
+
### 清除單一目標
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
若要僅清除已生成的檔案,請使用以下指令:
|
|
33
34
|
|
|
34
35
|
```bash
|
|
35
36
|
aigne doc clear --targets generatedDocs
|
|
36
37
|
```
|
|
37
38
|
|
|
38
|
-
###
|
|
39
|
+
### 清除多個目標
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
您可以提供多個目標名稱來一次清除多個項目。例如,若要同時移除文件設定和文件結構,請執行:
|
|
41
42
|
|
|
42
43
|
```bash
|
|
43
44
|
aigne doc clear --targets documentConfig documentStructure
|
|
44
45
|
```
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
清除您的設定後,您可以再次執行設定流程以重新開始。
|
|
47
48
|
|
|
48
49
|
---
|
|
49
50
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 清理
|
|
2
2
|
|
|
3
|
-
`aigne doc clear`
|
|
3
|
+
`aigne doc clear` 命令提供了一种简单直接的方法来移除生成的文件、缓存数据和配置设置。当您想要重置文档项目、从干净的状态开始或排查与过时或损坏文件相关的问题时,这个命令非常有用。
|
|
4
4
|
|
|
5
5
|
## 交互式清理
|
|
6
6
|
|
|
@@ -10,22 +10,23 @@
|
|
|
10
10
|
aigne doc clear
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
执行此命令将启动一个交互式提示,让您能够精确选择要移除的项目。这是大多数用例的推荐方法,因为它为每个选项提供了清晰的描述,并能防止意外的数据丢失。
|
|
14
14
|
|
|
15
15
|
## 清理目标
|
|
16
16
|
|
|
17
|
-
`clear`
|
|
17
|
+
`clear` 命令可以移除几种不同类型的数据。下表详细说明了每个可用的目标、其功能以及所影响的具体文件或目录。
|
|
18
18
|
|
|
19
|
-
|
|
|
19
|
+
| Target | Description | Files and Directories Affected |
|
|
20
20
|
| :--- | :--- | :--- |
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
21
|
+
| `generatedDocs` | 删除输出目录中所有生成的文档,但保留文档结构计划。 | 您配置中由 `docsDir` 指定的目录。 |
|
|
22
|
+
| `documentStructure` | 删除所有生成的文档和文档结构计划,从而有效重置您的文档内容。 | `.aigne/doc-smith/output/structure-plan.json` 文件和 `docsDir` 目录。 |
|
|
23
|
+
| `documentConfig` | 删除项目的配置文件。执行此操作后,您需要重新运行 `aigne doc init`。 | `.aigne/doc-smith/config.yaml` 文件。 |
|
|
24
|
+
| `authTokens` | 移除已保存的用于发布站点的授权令牌。系统将提示您选择要清除哪些站点。 | 您主目录下的 `~/.aigne/doc-smith-connected.yaml` 文件。 |
|
|
25
|
+
| `deploymentConfig` | 从您的配置文件中删除 `appUrl`。 | `.aigne/doc-smith/config.yaml` 文件。 |
|
|
25
26
|
|
|
26
27
|
## 非交互式清理
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
对于自动化脚本或偏好使用命令行的用户,您可以使用 `--targets` 标志直接指定一个或多个要清理的目标。这将绕过交互式提示。
|
|
29
30
|
|
|
30
31
|
### 清理单个目标
|
|
31
32
|
|
|
@@ -43,8 +44,8 @@ aigne doc clear --targets generatedDocs
|
|
|
43
44
|
aigne doc clear --targets documentConfig documentStructure
|
|
44
45
|
```
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
清理配置后,您可以通过再次运行设置过程来重新开始。
|
|
47
48
|
|
|
48
49
|
---
|
|
49
50
|
|
|
50
|
-
有关初始设置的更多信息,请参阅[初始设置](./configuration-initial-setup.md)指南。
|
|
51
|
+
有关初始设置的更多信息,请参阅 [初始设置](./configuration-initial-setup.md) 指南。
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# ドキュメントの生成
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
このガイドでは、プロジェクトのソースファイルから完全なドキュメント一式を作成するための体系的な手順を説明します。このプロセスは `aigne doc generate` コマンドを使用して開始します。このコマンドはコードベースを分析し、論理的な構造を提案し、各ドキュメントのコンテンツを書き込みます。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
このコマンドは、ドキュメントを最初に作成するための主要なツールです。作成済みのドキュメントを修正する場合は、[ドキュメントの更新](./guides-updating-documentation.md)ガイドを参照してください。
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### 生成ワークフロー
|
|
8
8
|
|
|
9
|
-
`generate`
|
|
9
|
+
`generate` コマンドは、ドキュメントを構築するための一連の自動化されたステップを実行します。このプロセスは対話形式で設計されており、コンテンツが書き込まれる前に、提案された構造を確認・承認できます。
|
|
10
10
|
|
|
11
11
|
```d2
|
|
12
12
|
direction: down
|
|
@@ -22,12 +22,12 @@ run_command: {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
check_config: {
|
|
25
|
-
label: "
|
|
25
|
+
label: "設定ファイルは存在するか?"
|
|
26
26
|
shape: diamond
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
interactive_setup: {
|
|
30
|
-
label: "
|
|
30
|
+
label: "対話型セットアップをガイド"
|
|
31
31
|
shape: rectangle
|
|
32
32
|
tooltip: ".aigne/doc-smith/config.yaml が見つからない場合、対話型セットアップがトリガーされます。"
|
|
33
33
|
}
|
|
@@ -43,14 +43,14 @@ review_structure: {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
user_approve: {
|
|
46
|
-
label: "
|
|
46
|
+
label: "構造を承認するか?"
|
|
47
47
|
shape: diamond
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
provide_feedback: {
|
|
51
|
-
label: "
|
|
51
|
+
label: "構造を洗練させるためのフィードバックを提供"
|
|
52
52
|
shape: rectangle
|
|
53
|
-
tooltip: "
|
|
53
|
+
tooltip: "ユーザーはセクションの名前変更、追加、削除などの変更を要求できます。"
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
generate_content: {
|
|
@@ -88,61 +88,63 @@ generate_content -> end
|
|
|
88
88
|
|
|
89
89
|
ドキュメントを生成するには、ターミナルでプロジェクトのルートディレクトリに移動し、以下の手順に従ってください。
|
|
90
90
|
|
|
91
|
-
### 1.
|
|
91
|
+
### 1. 生成コマンドの実行
|
|
92
92
|
|
|
93
|
-
`generate`
|
|
93
|
+
`generate` コマンドを実行してプロセスを開始します。ツールはプロジェクトのファイルと構造の分析から始めます。
|
|
94
94
|
|
|
95
95
|
```bash 基本的な生成コマンド
|
|
96
96
|
aigne doc generate
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
簡潔にするために、エイリアスの `gen` や `g` を使用することもできます。
|
|
100
100
|
|
|
101
101
|
### 2. ドキュメント構造の確認
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
この計画を確認するよう求められます。
|
|
103
|
+
分析が完了すると、ツールは提案されたドキュメント構造を表示し、確認を求めます。
|
|
106
104
|
|
|
107
105
|
```
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
はい、構造を最適化します
|
|
106
|
+
ドキュメント構造を最適化しますか?
|
|
107
|
+
❯ いいえ、問題ありません
|
|
108
|
+
はい、構造を最適化します(例:「はじめに」を「クイックスタート」に名称変更、「APIリファレンス」を「設定」の前に移動するなど)
|
|
112
109
|
```
|
|
113
110
|
|
|
114
|
-
-
|
|
115
|
-
- **はい、構造を最適化します**:
|
|
111
|
+
- **いいえ、問題ありません**: このオプションを選択すると、提案された構造を承認し、直接コンテンツ生成に進みます。
|
|
112
|
+
- **はい、構造を最適化します**: このオプションを選択すると、プランを修正できます。ツールは対話ループでフィードバックを求めます。次のようなプレーンテキストで指示を与えることができます。
|
|
113
|
+
- `「トラブルシューティング」という新しいドキュメントを追加`
|
|
114
|
+
- `「レガシー機能」ドキュメントを削除`
|
|
115
|
+
- `「インストール」を構造の最上部に移動`
|
|
116
|
+
|
|
117
|
+
フィードバックのたびに、AIが構造を修正し、再度確認できます。フィードバックを入力せずにEnterキーを押すと、ループを終了して最終的な構造を承認します。
|
|
116
118
|
|
|
117
119
|
### 3. コンテンツの生成
|
|
118
120
|
|
|
119
|
-
ドキュメント構造が承認されると、DocSmith
|
|
121
|
+
ドキュメント構造が承認されると、DocSmithはプラン内の各ドキュメントの詳細なコンテンツの生成を開始します。このプロセスは自動的に実行され、所要時間はプロジェクトの規模と複雑さによって異なります。
|
|
120
122
|
|
|
121
123
|
完了すると、生成されたファイルは設定で指定された出力ディレクトリ(例:`./docs`)に保存されます。
|
|
122
124
|
|
|
123
|
-
##
|
|
125
|
+
## コマンドパラメータ
|
|
124
126
|
|
|
125
127
|
`generate` コマンドは、その動作を制御するためのいくつかのオプションパラメータを受け入れます。
|
|
126
128
|
|
|
127
|
-
| パラメータ
|
|
128
|
-
|
|
129
|
-
| `--forceRegenerate` |
|
|
130
|
-
| `--feedback`
|
|
131
|
-
| `--glossary`
|
|
129
|
+
| パラメータ | 説明 | 例 |
|
|
130
|
+
|---|---|---|
|
|
131
|
+
| `--forceRegenerate` | 既存の構造やコンテンツをすべて無視して、すべてのドキュメントを最初から再構築します。完全にリセットしたい場合に便利です。 | `aigne doc generate --forceRegenerate` |
|
|
132
|
+
| `--feedback` | 対話型の確認が始まる前に、構造生成フェーズでAIをガイドするための初期のテキストベースの指示を提供します。 | `aigne doc generate --feedback "Add more API examples"` |
|
|
133
|
+
| `--glossary` | 用語集ファイル(例:`glossary.md`)を指定して、ドキュメント全体で一貫した用語の使用を保証します。 | `aigne doc generate --glossary @/path/to/glossary.md` |
|
|
132
134
|
|
|
133
|
-
###
|
|
135
|
+
### 例:完全な再構築の強制
|
|
134
136
|
|
|
135
137
|
以前に生成されたすべてのドキュメントを破棄し、コードの現在の状態に基づいて新しいセットを作成したい場合は、`--forceRegenerate` フラグを使用します。
|
|
136
138
|
|
|
137
|
-
```bash
|
|
139
|
+
```bash 再構築の強制
|
|
138
140
|
aigne doc generate --forceRegenerate
|
|
139
141
|
```
|
|
140
142
|
|
|
141
143
|
## まとめ
|
|
142
144
|
|
|
143
|
-
`generate`
|
|
145
|
+
`generate` コマンドは、初期プロジェクトドキュメントを作成するプロセス全体を統括します。自動化されたコード分析と対話型の確認プロセスを組み合わせることで、構造化された関連性の高いドキュメント一式を生成します。
|
|
144
146
|
|
|
145
|
-
|
|
147
|
+
ドキュメントが生成されたら、次のような操作ができます。
|
|
146
148
|
|
|
147
149
|
- [ドキュメントの更新](./guides-updating-documentation.md): 特定のドキュメントに変更を加える。
|
|
148
150
|
- [ドキュメントの翻訳](./guides-translating-documentation.md): コンテンツを他の言語に翻訳する。
|