plugin-build-guide-block 1.0.12 → 1.1.3
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/README.md +16 -74
- package/dist/client/components/SpaceSelect.d.ts +2 -0
- package/dist/client/index.js +9 -10
- package/dist/client/schemas/spacesSchema.d.ts +81 -0
- package/dist/externalVersion.js +7 -16
- package/dist/index.js +0 -9
- package/dist/locale/en-US.json +12 -4
- package/dist/locale/namespace.js +0 -9
- package/dist/locale/vi-VN.json +12 -4
- package/dist/locale/zh-CN.json +12 -4
- package/dist/server/actions/build.js +346 -80
- package/dist/server/actions/getHtml.js +0 -9
- package/dist/server/actions/getMarkdown.js +0 -9
- package/dist/server/collections/ai-build-guide-pages.d.ts +2 -0
- package/dist/server/collections/ai-build-guide-pages.js +81 -0
- package/dist/server/collections/ai-build-guide-spaces.js +33 -9
- package/dist/server/index.js +0 -9
- package/dist/server/plugin.d.ts +3 -0
- package/dist/server/plugin.js +50 -21
- package/package.json +1 -1
- package/src/client/UserGuideBlock.tsx +368 -53
- package/src/client/UserGuideBlockProvider.tsx +9 -8
- package/src/client/UserGuideManager.tsx +52 -23
- package/src/client/components/SpaceSelect.tsx +37 -0
- package/src/client/models/UserGuideBlockModel.ts +19 -29
- package/src/client/plugin.tsx +3 -2
- package/src/client/schemaSettings.ts +2 -12
- package/src/client/schemas/spacesSchema.ts +439 -357
- package/src/locale/en-US.json +12 -4
- package/src/locale/vi-VN.json +12 -4
- package/src/locale/zh-CN.json +12 -4
- package/src/server/actions/build.ts +501 -189
- package/src/server/collections/ai-build-guide-pages.ts +60 -0
- package/src/server/collections/ai-build-guide-spaces.ts +57 -24
- package/src/server/plugin.ts +58 -11
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export declare const MIN_TARGET_CHAPTER_COUNT = 1;
|
|
2
|
+
export declare const MAX_TARGET_CHAPTER_COUNT = 12;
|
|
3
|
+
export declare const DEFAULT_TARGET_CHAPTER_COUNT = 5;
|
|
1
4
|
export declare const spacesSchema: {
|
|
2
5
|
type: string;
|
|
3
6
|
name: string;
|
|
@@ -87,6 +90,32 @@ export declare const spacesSchema: {
|
|
|
87
90
|
value: string;
|
|
88
91
|
}[];
|
|
89
92
|
};
|
|
93
|
+
targetChapterCount: {
|
|
94
|
+
type: string;
|
|
95
|
+
title: string;
|
|
96
|
+
required: boolean;
|
|
97
|
+
default: number;
|
|
98
|
+
'x-decorator': string;
|
|
99
|
+
'x-component': string;
|
|
100
|
+
'x-component-props': {
|
|
101
|
+
min: number;
|
|
102
|
+
max: number;
|
|
103
|
+
precision: number;
|
|
104
|
+
style: {
|
|
105
|
+
width: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
chapterGuidance: {
|
|
110
|
+
type: string;
|
|
111
|
+
title: string;
|
|
112
|
+
'x-decorator': string;
|
|
113
|
+
'x-component': string;
|
|
114
|
+
'x-component-props': {
|
|
115
|
+
rows: number;
|
|
116
|
+
placeholder: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
90
119
|
systemPrompt: {
|
|
91
120
|
type: string;
|
|
92
121
|
title: string;
|
|
@@ -171,6 +200,32 @@ export declare const spacesSchema: {
|
|
|
171
200
|
};
|
|
172
201
|
};
|
|
173
202
|
};
|
|
203
|
+
buildPhase: {
|
|
204
|
+
type: string;
|
|
205
|
+
title: string;
|
|
206
|
+
'x-decorator': string;
|
|
207
|
+
'x-component': string;
|
|
208
|
+
properties: {
|
|
209
|
+
buildPhase: {
|
|
210
|
+
type: string;
|
|
211
|
+
'x-component': string;
|
|
212
|
+
'x-read-pretty': boolean;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
pageCount: {
|
|
217
|
+
type: string;
|
|
218
|
+
title: string;
|
|
219
|
+
'x-decorator': string;
|
|
220
|
+
'x-component': string;
|
|
221
|
+
properties: {
|
|
222
|
+
pageCount: {
|
|
223
|
+
type: string;
|
|
224
|
+
'x-component': string;
|
|
225
|
+
'x-read-pretty': boolean;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
};
|
|
174
229
|
buildLog: {
|
|
175
230
|
type: string;
|
|
176
231
|
title: string;
|
|
@@ -253,6 +308,32 @@ export declare const spacesSchema: {
|
|
|
253
308
|
value: string;
|
|
254
309
|
}[];
|
|
255
310
|
};
|
|
311
|
+
targetChapterCount: {
|
|
312
|
+
type: string;
|
|
313
|
+
title: string;
|
|
314
|
+
required: boolean;
|
|
315
|
+
default: number;
|
|
316
|
+
'x-decorator': string;
|
|
317
|
+
'x-component': string;
|
|
318
|
+
'x-component-props': {
|
|
319
|
+
min: number;
|
|
320
|
+
max: number;
|
|
321
|
+
precision: number;
|
|
322
|
+
style: {
|
|
323
|
+
width: string;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
chapterGuidance: {
|
|
328
|
+
type: string;
|
|
329
|
+
title: string;
|
|
330
|
+
'x-decorator': string;
|
|
331
|
+
'x-component': string;
|
|
332
|
+
'x-component-props': {
|
|
333
|
+
rows: number;
|
|
334
|
+
placeholder: string;
|
|
335
|
+
};
|
|
336
|
+
};
|
|
256
337
|
systemPrompt: {
|
|
257
338
|
type: string;
|
|
258
339
|
title: string;
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
1
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.0.
|
|
2
|
+
"@nocobase/client": "2.0.46",
|
|
12
3
|
"react": "18.2.0",
|
|
13
4
|
"@formily/react": "2.3.7",
|
|
14
5
|
"antd": "5.24.2",
|
|
15
6
|
"react-i18next": "11.18.6",
|
|
16
7
|
"@ant-design/icons": "5.6.1",
|
|
17
8
|
"@formily/core": "2.3.7",
|
|
18
|
-
"@nocobase/server": "2.0.
|
|
19
|
-
"@nocobase/flow-engine": "2.0.
|
|
20
|
-
"@nocobase/actions": "2.0.
|
|
21
|
-
"@nocobase/database": "2.0.
|
|
22
|
-
"@nocobase/plugin-ai": "2.0.
|
|
23
|
-
"@nocobase/plugin-file-manager": "2.0.
|
|
9
|
+
"@nocobase/server": "2.0.46",
|
|
10
|
+
"@nocobase/flow-engine": "2.0.46",
|
|
11
|
+
"@nocobase/actions": "2.0.46",
|
|
12
|
+
"@nocobase/database": "2.0.46",
|
|
13
|
+
"@nocobase/plugin-ai": "2.0.46",
|
|
14
|
+
"@nocobase/plugin-file-manager": "2.0.46",
|
|
24
15
|
"@langchain/core": "1.1.24",
|
|
25
16
|
"axios": "1.7.7"
|
|
26
17
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
1
|
var __create = Object.create;
|
|
11
2
|
var __defProp = Object.defineProperty;
|
|
12
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/locale/en-US.json
CHANGED
|
@@ -15,10 +15,18 @@
|
|
|
15
15
|
"Actions": "Actions",
|
|
16
16
|
"Edit": "Edit",
|
|
17
17
|
"Edit space": "Edit space",
|
|
18
|
-
"Generated HTML": "Generated HTML",
|
|
19
|
-
"Generated Markdown": "Generated Markdown",
|
|
20
|
-
"Output format": "Output format",
|
|
21
|
-
"
|
|
18
|
+
"Generated HTML": "Generated HTML",
|
|
19
|
+
"Generated Markdown": "Generated Markdown",
|
|
20
|
+
"Output format": "Output format",
|
|
21
|
+
"Target chapters": "Target chapters",
|
|
22
|
+
"Chapter guidance": "Chapter guidance",
|
|
23
|
+
"Describe how the guide should be split into chapters": "Describe how the guide should be split into chapters",
|
|
24
|
+
"Build Phase": "Build Phase",
|
|
25
|
+
"Chapters": "Chapters",
|
|
26
|
+
"Breakdown Plan": "Breakdown Plan",
|
|
27
|
+
"Contents": "Contents",
|
|
28
|
+
"No guide content available": "No guide content available",
|
|
29
|
+
"Select Space": "Select Space",
|
|
22
30
|
"Build Log": "Build Log",
|
|
23
31
|
"Delete": "Delete",
|
|
24
32
|
"Saved successfully": "Saved successfully",
|
package/dist/locale/namespace.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
1
|
var __defProp = Object.defineProperty;
|
|
11
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
package/dist/locale/vi-VN.json
CHANGED
|
@@ -15,10 +15,18 @@
|
|
|
15
15
|
"Actions": "Hành động",
|
|
16
16
|
"Edit": "Sửa",
|
|
17
17
|
"Edit space": "Sửa Space",
|
|
18
|
-
"Generated HTML": "HTML Đã tạo",
|
|
19
|
-
"Generated Markdown": "Markdown Đã tạo",
|
|
20
|
-
"Output format": "Định dạng đầu ra",
|
|
21
|
-
"
|
|
18
|
+
"Generated HTML": "HTML Đã tạo",
|
|
19
|
+
"Generated Markdown": "Markdown Đã tạo",
|
|
20
|
+
"Output format": "Định dạng đầu ra",
|
|
21
|
+
"Target chapters": "Số chapter cần tạo",
|
|
22
|
+
"Chapter guidance": "Hướng dẫn chia chapter",
|
|
23
|
+
"Describe how the guide should be split into chapters": "Mô tả cách chia hướng dẫn thành các chapter",
|
|
24
|
+
"Build Phase": "Giai đoạn Build",
|
|
25
|
+
"Chapters": "Chapter",
|
|
26
|
+
"Breakdown Plan": "Kế hoạch chia nội dung",
|
|
27
|
+
"Contents": "Mục lục",
|
|
28
|
+
"No guide content available": "Chưa có nội dung hướng dẫn",
|
|
29
|
+
"Select Space": "Chọn Space",
|
|
22
30
|
"Build Log": "Log quá trình Build",
|
|
23
31
|
"Delete": "Xóa",
|
|
24
32
|
"Saved successfully": "Lưu thành công",
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -15,10 +15,18 @@
|
|
|
15
15
|
"Actions": "操作",
|
|
16
16
|
"Edit": "编辑",
|
|
17
17
|
"Edit space": "编辑空间",
|
|
18
|
-
"Generated HTML": "生成的 HTML",
|
|
19
|
-
"Generated Markdown": "生成的 Markdown",
|
|
20
|
-
"Output format": "输出格式",
|
|
21
|
-
"
|
|
18
|
+
"Generated HTML": "生成的 HTML",
|
|
19
|
+
"Generated Markdown": "生成的 Markdown",
|
|
20
|
+
"Output format": "输出格式",
|
|
21
|
+
"Target chapters": "目标章节数",
|
|
22
|
+
"Chapter guidance": "章节拆分说明",
|
|
23
|
+
"Describe how the guide should be split into chapters": "描述应如何将指南拆分为章节",
|
|
24
|
+
"Build Phase": "构建阶段",
|
|
25
|
+
"Chapters": "章节",
|
|
26
|
+
"Breakdown Plan": "拆分计划",
|
|
27
|
+
"Contents": "目录",
|
|
28
|
+
"No guide content available": "暂无指南内容",
|
|
29
|
+
"Select Space": "选择空间",
|
|
22
30
|
"Build Log": "构建日志",
|
|
23
31
|
"Delete": "删除",
|
|
24
32
|
"Saved successfully": "保存成功",
|