plugin-build-guide-block 1.0.9 → 1.0.11
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 +74 -74
- package/dist/client/index.js +1 -1
- package/dist/client/models/index.d.ts +1 -3
- package/dist/externalVersion.js +7 -7
- package/dist/locale/en-US.json +28 -27
- package/dist/locale/vi-VN.json +28 -27
- package/dist/locale/zh-CN.json +28 -27
- package/dist/node_modules/sanitize-html/index.js +2 -2
- package/dist/node_modules/sanitize-html/package.json +1 -1
- package/dist/server/actions/build.js +3 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +7 -1
- package/dist/server/plugin.js +14 -0
- package/package.json +31 -31
- package/src/client/UserGuideBlock.tsx +53 -53
- package/src/client/UserGuideBlockInitializer.tsx +26 -26
- package/src/client/UserGuideBlockProvider.tsx +12 -12
- package/src/client/UserGuideManager.tsx +128 -107
- package/src/client/components/BuildButton.tsx +78 -43
- package/src/client/components/LLMServiceSelect.tsx +44 -44
- package/src/client/components/ModelSelect.tsx +41 -41
- package/src/client/components/StatusTag.tsx +17 -17
- package/src/client/models/UserGuideBlockModel.ts +54 -54
- package/src/client/models/index.ts +1 -3
- package/src/client/plugin.tsx +30 -30
- package/src/client/schemas/spacesSchema.ts +316 -316
- package/src/locale/en-US.json +28 -27
- package/src/locale/vi-VN.json +28 -27
- package/src/locale/zh-CN.json +28 -27
- package/src/server/actions/build.ts +176 -171
- package/src/server/actions/getHtml.ts +26 -26
- package/src/server/collections/ai-build-guide-spaces.ts +50 -50
- package/src/server/index.ts +1 -0
- package/src/server/plugin.ts +76 -60
|
@@ -1,316 +1,316 @@
|
|
|
1
|
-
export const spacesSchema = {
|
|
2
|
-
type: 'void',
|
|
3
|
-
name: 'ai-build-guide-spaces',
|
|
4
|
-
properties: {
|
|
5
|
-
card: {
|
|
6
|
-
type: 'void',
|
|
7
|
-
'x-component': 'CardItem',
|
|
8
|
-
'x-decorator': 'TableBlockProvider',
|
|
9
|
-
'x-decorator-props': {
|
|
10
|
-
collection: 'aiBuildGuideSpaces',
|
|
11
|
-
action: 'list',
|
|
12
|
-
rowKey: 'id',
|
|
13
|
-
params: {
|
|
14
|
-
appends: ['documents'],
|
|
15
|
-
sort: ['-createdAt'],
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
properties: {
|
|
19
|
-
actions: {
|
|
20
|
-
type: 'void',
|
|
21
|
-
'x-component': 'ActionBar',
|
|
22
|
-
'x-component-props': {
|
|
23
|
-
style: {
|
|
24
|
-
marginBottom: 16,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
properties: {
|
|
28
|
-
create: {
|
|
29
|
-
type: 'void',
|
|
30
|
-
'x-component': 'Action',
|
|
31
|
-
'x-component-props': {
|
|
32
|
-
type: 'primary',
|
|
33
|
-
title: '{{t("Create space")}}',
|
|
34
|
-
icon: 'PlusOutlined',
|
|
35
|
-
},
|
|
36
|
-
properties: {
|
|
37
|
-
drawer: {
|
|
38
|
-
type: 'void',
|
|
39
|
-
'x-component': 'Action.Drawer',
|
|
40
|
-
'x-component-props': {
|
|
41
|
-
title: '{{t("Create space")}}',
|
|
42
|
-
},
|
|
43
|
-
properties: {
|
|
44
|
-
form: {
|
|
45
|
-
type: 'void',
|
|
46
|
-
'x-component': 'FormV2',
|
|
47
|
-
'x-use-component-props': 'useCreateFormProps',
|
|
48
|
-
properties: {
|
|
49
|
-
title: {
|
|
50
|
-
type: 'string',
|
|
51
|
-
title: '{{t("Title")}}',
|
|
52
|
-
required: true,
|
|
53
|
-
'x-decorator': 'FormItem',
|
|
54
|
-
'x-component': 'Input',
|
|
55
|
-
},
|
|
56
|
-
llmService: {
|
|
57
|
-
type: 'string',
|
|
58
|
-
title: '{{t("LLM Service")}}',
|
|
59
|
-
required: true,
|
|
60
|
-
'x-decorator': 'FormItem',
|
|
61
|
-
'x-component': 'LLMServiceSelect',
|
|
62
|
-
},
|
|
63
|
-
model: {
|
|
64
|
-
type: 'string',
|
|
65
|
-
title: '{{t("Model")}}',
|
|
66
|
-
required: true,
|
|
67
|
-
'x-decorator': 'FormItem',
|
|
68
|
-
'x-component': 'ModelSelect',
|
|
69
|
-
'x-reactions': {
|
|
70
|
-
dependencies: ['llmService'],
|
|
71
|
-
fulfill: {
|
|
72
|
-
state: {
|
|
73
|
-
value: '{{$deps[0] ? $self.value : undefined}}',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
systemPrompt: {
|
|
79
|
-
type: 'string',
|
|
80
|
-
title: '{{t("System Prompt")}}',
|
|
81
|
-
'x-decorator': 'FormItem',
|
|
82
|
-
'x-component': 'Input.TextArea',
|
|
83
|
-
'x-component-props': {
|
|
84
|
-
rows: 4,
|
|
85
|
-
},
|
|
86
|
-
default:
|
|
87
|
-
'You are an expert technical writer. Please generate a comprehensive HTML user guide based on the provided documents. Ensure the output is valid HTML and does not include Markdown syntax like ```html blocks.',
|
|
88
|
-
},
|
|
89
|
-
documents: {
|
|
90
|
-
type: 'array',
|
|
91
|
-
title: '{{t("Documents")}}',
|
|
92
|
-
'x-decorator': 'FormItem',
|
|
93
|
-
'x-component': 'Upload.Attachment',
|
|
94
|
-
'x-component-props': {
|
|
95
|
-
multiple: true,
|
|
96
|
-
action: 'attachments:create',
|
|
97
|
-
maxCount: 10,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
footer: {
|
|
101
|
-
type: 'void',
|
|
102
|
-
'x-component': 'Action.Drawer.Footer',
|
|
103
|
-
properties: {
|
|
104
|
-
cancel: {
|
|
105
|
-
type: 'void',
|
|
106
|
-
title: '{{t("Cancel")}}',
|
|
107
|
-
'x-component': 'Action',
|
|
108
|
-
'x-use-component-props': 'useCancelActionProps',
|
|
109
|
-
},
|
|
110
|
-
submit: {
|
|
111
|
-
type: 'void',
|
|
112
|
-
title: '{{t("Submit")}}',
|
|
113
|
-
'x-component': 'Action',
|
|
114
|
-
'x-use-component-props': 'useCreateActionProps',
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
table: {
|
|
127
|
-
type: 'array',
|
|
128
|
-
'x-component': 'TableV2',
|
|
129
|
-
'x-use-component-props': 'useTableBlockProps',
|
|
130
|
-
'x-component-props': {
|
|
131
|
-
rowKey: 'id',
|
|
132
|
-
rowSelection: {
|
|
133
|
-
type: 'checkbox',
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
properties: {
|
|
137
|
-
title: {
|
|
138
|
-
type: 'void',
|
|
139
|
-
title: '{{t("Title")}}',
|
|
140
|
-
'x-decorator': 'TableV2.Column.Decorator',
|
|
141
|
-
'x-component': 'TableV2.Column',
|
|
142
|
-
properties: {
|
|
143
|
-
title: {
|
|
144
|
-
type: 'string',
|
|
145
|
-
'x-component': 'CollectionField',
|
|
146
|
-
'x-read-pretty': true,
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
status: {
|
|
151
|
-
type: 'void',
|
|
152
|
-
title: '{{t("Status")}}',
|
|
153
|
-
'x-decorator': 'TableV2.Column.Decorator',
|
|
154
|
-
'x-component': 'TableV2.Column',
|
|
155
|
-
properties: {
|
|
156
|
-
status: {
|
|
157
|
-
type: 'string',
|
|
158
|
-
'x-component': 'StatusTag',
|
|
159
|
-
'x-read-pretty': true,
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
buildLog: {
|
|
164
|
-
type: 'void',
|
|
165
|
-
title: '{{t("Build Log")}}',
|
|
166
|
-
'x-decorator': 'TableV2.Column.Decorator',
|
|
167
|
-
'x-component': 'TableV2.Column',
|
|
168
|
-
properties: {
|
|
169
|
-
buildLog: {
|
|
170
|
-
type: 'string',
|
|
171
|
-
'x-component': 'CollectionField',
|
|
172
|
-
'x-read-pretty': true,
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
actions: {
|
|
177
|
-
type: 'void',
|
|
178
|
-
title: '{{t("Actions")}}',
|
|
179
|
-
'x-decorator': 'TableV2.Column.Decorator',
|
|
180
|
-
'x-component': 'TableV2.Column',
|
|
181
|
-
properties: {
|
|
182
|
-
actions: {
|
|
183
|
-
type: 'void',
|
|
184
|
-
'x-component': 'Space',
|
|
185
|
-
'x-component-props': {
|
|
186
|
-
split: '|',
|
|
187
|
-
},
|
|
188
|
-
properties: {
|
|
189
|
-
build: {
|
|
190
|
-
type: 'void',
|
|
191
|
-
'x-component': 'BuildButton',
|
|
192
|
-
},
|
|
193
|
-
update: {
|
|
194
|
-
type: 'void',
|
|
195
|
-
title: '{{t("Edit")}}',
|
|
196
|
-
'x-component': 'Action.Link',
|
|
197
|
-
'x-component-props': {
|
|
198
|
-
type: 'primary',
|
|
199
|
-
},
|
|
200
|
-
properties: {
|
|
201
|
-
drawer: {
|
|
202
|
-
type: 'void',
|
|
203
|
-
'x-component': 'Action.Drawer',
|
|
204
|
-
'x-component-props': {
|
|
205
|
-
title: '{{t("Edit space")}}',
|
|
206
|
-
},
|
|
207
|
-
properties: {
|
|
208
|
-
form: {
|
|
209
|
-
type: 'void',
|
|
210
|
-
'x-component': 'FormV2',
|
|
211
|
-
'x-use-component-props': 'useEditFormProps',
|
|
212
|
-
properties: {
|
|
213
|
-
title: {
|
|
214
|
-
type: 'string',
|
|
215
|
-
title: '{{t("Title")}}',
|
|
216
|
-
required: true,
|
|
217
|
-
'x-decorator': 'FormItem',
|
|
218
|
-
'x-component': 'Input',
|
|
219
|
-
},
|
|
220
|
-
llmService: {
|
|
221
|
-
type: 'string',
|
|
222
|
-
title: '{{t("LLM Service")}}',
|
|
223
|
-
required: true,
|
|
224
|
-
'x-decorator': 'FormItem',
|
|
225
|
-
'x-component': 'LLMServiceSelect',
|
|
226
|
-
},
|
|
227
|
-
model: {
|
|
228
|
-
type: 'string',
|
|
229
|
-
title: '{{t("Model")}}',
|
|
230
|
-
required: true,
|
|
231
|
-
'x-decorator': 'FormItem',
|
|
232
|
-
'x-component': 'ModelSelect',
|
|
233
|
-
},
|
|
234
|
-
systemPrompt: {
|
|
235
|
-
type: 'string',
|
|
236
|
-
title: '{{t("System Prompt")}}',
|
|
237
|
-
'x-decorator': 'FormItem',
|
|
238
|
-
'x-component': 'Input.TextArea',
|
|
239
|
-
'x-component-props': {
|
|
240
|
-
rows: 4,
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
|
-
documents: {
|
|
244
|
-
type: 'array',
|
|
245
|
-
title: '{{t("Documents")}}',
|
|
246
|
-
'x-decorator': 'FormItem',
|
|
247
|
-
'x-component': 'Upload.Attachment',
|
|
248
|
-
'x-component-props': {
|
|
249
|
-
multiple: true,
|
|
250
|
-
action: 'attachments:create',
|
|
251
|
-
maxCount: 10,
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
generatedHtml: {
|
|
255
|
-
type: 'string',
|
|
256
|
-
title: '{{t("Generated HTML")}}',
|
|
257
|
-
'x-decorator': 'FormItem',
|
|
258
|
-
'x-component': 'Input.TextArea',
|
|
259
|
-
'x-component-props': {
|
|
260
|
-
rows: 6,
|
|
261
|
-
},
|
|
262
|
-
'x-read-pretty': true,
|
|
263
|
-
},
|
|
264
|
-
buildLog: {
|
|
265
|
-
type: 'string',
|
|
266
|
-
title: '{{t("Build Log")}}',
|
|
267
|
-
'x-decorator': 'FormItem',
|
|
268
|
-
'x-component': 'Input.TextArea',
|
|
269
|
-
'x-read-pretty': true,
|
|
270
|
-
},
|
|
271
|
-
footer: {
|
|
272
|
-
type: 'void',
|
|
273
|
-
'x-component': 'Action.Drawer.Footer',
|
|
274
|
-
properties: {
|
|
275
|
-
cancel: {
|
|
276
|
-
type: 'void',
|
|
277
|
-
title: '{{t("Cancel")}}',
|
|
278
|
-
'x-component': 'Action',
|
|
279
|
-
'x-use-component-props': 'useCancelActionProps',
|
|
280
|
-
},
|
|
281
|
-
submit: {
|
|
282
|
-
type: 'void',
|
|
283
|
-
title: '{{t("Submit")}}',
|
|
284
|
-
'x-component': 'Action',
|
|
285
|
-
'x-use-component-props': 'useUpdateActionProps',
|
|
286
|
-
},
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
},
|
|
294
|
-
},
|
|
295
|
-
delete: {
|
|
296
|
-
type: 'void',
|
|
297
|
-
title: '{{t("Delete")}}',
|
|
298
|
-
'x-component': 'Action.Link',
|
|
299
|
-
'x-use-component-props': 'useDestroyActionProps',
|
|
300
|
-
'x-component-props': {
|
|
301
|
-
confirm: {
|
|
302
|
-
title: '{{t("Delete")}}',
|
|
303
|
-
content: '{{t("Are you sure you want to delete this space?")}}',
|
|
304
|
-
},
|
|
305
|
-
},
|
|
306
|
-
},
|
|
307
|
-
},
|
|
308
|
-
},
|
|
309
|
-
},
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
|
-
},
|
|
316
|
-
};
|
|
1
|
+
export const spacesSchema = {
|
|
2
|
+
type: 'void',
|
|
3
|
+
name: 'ai-build-guide-spaces',
|
|
4
|
+
properties: {
|
|
5
|
+
card: {
|
|
6
|
+
type: 'void',
|
|
7
|
+
'x-component': 'CardItem',
|
|
8
|
+
'x-decorator': 'TableBlockProvider',
|
|
9
|
+
'x-decorator-props': {
|
|
10
|
+
collection: 'aiBuildGuideSpaces',
|
|
11
|
+
action: 'list',
|
|
12
|
+
rowKey: 'id',
|
|
13
|
+
params: {
|
|
14
|
+
appends: ['documents'],
|
|
15
|
+
sort: ['-createdAt'],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
properties: {
|
|
19
|
+
actions: {
|
|
20
|
+
type: 'void',
|
|
21
|
+
'x-component': 'ActionBar',
|
|
22
|
+
'x-component-props': {
|
|
23
|
+
style: {
|
|
24
|
+
marginBottom: 16,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
properties: {
|
|
28
|
+
create: {
|
|
29
|
+
type: 'void',
|
|
30
|
+
'x-component': 'Action',
|
|
31
|
+
'x-component-props': {
|
|
32
|
+
type: 'primary',
|
|
33
|
+
title: '{{t("Create space")}}',
|
|
34
|
+
icon: 'PlusOutlined',
|
|
35
|
+
},
|
|
36
|
+
properties: {
|
|
37
|
+
drawer: {
|
|
38
|
+
type: 'void',
|
|
39
|
+
'x-component': 'Action.Drawer',
|
|
40
|
+
'x-component-props': {
|
|
41
|
+
title: '{{t("Create space")}}',
|
|
42
|
+
},
|
|
43
|
+
properties: {
|
|
44
|
+
form: {
|
|
45
|
+
type: 'void',
|
|
46
|
+
'x-component': 'FormV2',
|
|
47
|
+
'x-use-component-props': 'useCreateFormProps',
|
|
48
|
+
properties: {
|
|
49
|
+
title: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
title: '{{t("Title")}}',
|
|
52
|
+
required: true,
|
|
53
|
+
'x-decorator': 'FormItem',
|
|
54
|
+
'x-component': 'Input',
|
|
55
|
+
},
|
|
56
|
+
llmService: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
title: '{{t("LLM Service")}}',
|
|
59
|
+
required: true,
|
|
60
|
+
'x-decorator': 'FormItem',
|
|
61
|
+
'x-component': 'LLMServiceSelect',
|
|
62
|
+
},
|
|
63
|
+
model: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
title: '{{t("Model")}}',
|
|
66
|
+
required: true,
|
|
67
|
+
'x-decorator': 'FormItem',
|
|
68
|
+
'x-component': 'ModelSelect',
|
|
69
|
+
'x-reactions': {
|
|
70
|
+
dependencies: ['llmService'],
|
|
71
|
+
fulfill: {
|
|
72
|
+
state: {
|
|
73
|
+
value: '{{$deps[0] ? $self.value : undefined}}',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
systemPrompt: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
title: '{{t("System Prompt")}}',
|
|
81
|
+
'x-decorator': 'FormItem',
|
|
82
|
+
'x-component': 'Input.TextArea',
|
|
83
|
+
'x-component-props': {
|
|
84
|
+
rows: 4,
|
|
85
|
+
},
|
|
86
|
+
default:
|
|
87
|
+
'You are an expert technical writer. Please generate a comprehensive HTML user guide based on the provided documents. Ensure the output is valid HTML and does not include Markdown syntax like ```html blocks.',
|
|
88
|
+
},
|
|
89
|
+
documents: {
|
|
90
|
+
type: 'array',
|
|
91
|
+
title: '{{t("Documents")}}',
|
|
92
|
+
'x-decorator': 'FormItem',
|
|
93
|
+
'x-component': 'Upload.Attachment',
|
|
94
|
+
'x-component-props': {
|
|
95
|
+
multiple: true,
|
|
96
|
+
action: 'attachments:create',
|
|
97
|
+
maxCount: 10,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
footer: {
|
|
101
|
+
type: 'void',
|
|
102
|
+
'x-component': 'Action.Drawer.Footer',
|
|
103
|
+
properties: {
|
|
104
|
+
cancel: {
|
|
105
|
+
type: 'void',
|
|
106
|
+
title: '{{t("Cancel")}}',
|
|
107
|
+
'x-component': 'Action',
|
|
108
|
+
'x-use-component-props': 'useCancelActionProps',
|
|
109
|
+
},
|
|
110
|
+
submit: {
|
|
111
|
+
type: 'void',
|
|
112
|
+
title: '{{t("Submit")}}',
|
|
113
|
+
'x-component': 'Action',
|
|
114
|
+
'x-use-component-props': 'useCreateActionProps',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
table: {
|
|
127
|
+
type: 'array',
|
|
128
|
+
'x-component': 'TableV2',
|
|
129
|
+
'x-use-component-props': 'useTableBlockProps',
|
|
130
|
+
'x-component-props': {
|
|
131
|
+
rowKey: 'id',
|
|
132
|
+
rowSelection: {
|
|
133
|
+
type: 'checkbox',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
properties: {
|
|
137
|
+
title: {
|
|
138
|
+
type: 'void',
|
|
139
|
+
title: '{{t("Title")}}',
|
|
140
|
+
'x-decorator': 'TableV2.Column.Decorator',
|
|
141
|
+
'x-component': 'TableV2.Column',
|
|
142
|
+
properties: {
|
|
143
|
+
title: {
|
|
144
|
+
type: 'string',
|
|
145
|
+
'x-component': 'CollectionField',
|
|
146
|
+
'x-read-pretty': true,
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
status: {
|
|
151
|
+
type: 'void',
|
|
152
|
+
title: '{{t("Status")}}',
|
|
153
|
+
'x-decorator': 'TableV2.Column.Decorator',
|
|
154
|
+
'x-component': 'TableV2.Column',
|
|
155
|
+
properties: {
|
|
156
|
+
status: {
|
|
157
|
+
type: 'string',
|
|
158
|
+
'x-component': 'StatusTag',
|
|
159
|
+
'x-read-pretty': true,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
buildLog: {
|
|
164
|
+
type: 'void',
|
|
165
|
+
title: '{{t("Build Log")}}',
|
|
166
|
+
'x-decorator': 'TableV2.Column.Decorator',
|
|
167
|
+
'x-component': 'TableV2.Column',
|
|
168
|
+
properties: {
|
|
169
|
+
buildLog: {
|
|
170
|
+
type: 'string',
|
|
171
|
+
'x-component': 'CollectionField',
|
|
172
|
+
'x-read-pretty': true,
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
actions: {
|
|
177
|
+
type: 'void',
|
|
178
|
+
title: '{{t("Actions")}}',
|
|
179
|
+
'x-decorator': 'TableV2.Column.Decorator',
|
|
180
|
+
'x-component': 'TableV2.Column',
|
|
181
|
+
properties: {
|
|
182
|
+
actions: {
|
|
183
|
+
type: 'void',
|
|
184
|
+
'x-component': 'Space',
|
|
185
|
+
'x-component-props': {
|
|
186
|
+
split: '|',
|
|
187
|
+
},
|
|
188
|
+
properties: {
|
|
189
|
+
build: {
|
|
190
|
+
type: 'void',
|
|
191
|
+
'x-component': 'BuildButton',
|
|
192
|
+
},
|
|
193
|
+
update: {
|
|
194
|
+
type: 'void',
|
|
195
|
+
title: '{{t("Edit")}}',
|
|
196
|
+
'x-component': 'Action.Link',
|
|
197
|
+
'x-component-props': {
|
|
198
|
+
type: 'primary',
|
|
199
|
+
},
|
|
200
|
+
properties: {
|
|
201
|
+
drawer: {
|
|
202
|
+
type: 'void',
|
|
203
|
+
'x-component': 'Action.Drawer',
|
|
204
|
+
'x-component-props': {
|
|
205
|
+
title: '{{t("Edit space")}}',
|
|
206
|
+
},
|
|
207
|
+
properties: {
|
|
208
|
+
form: {
|
|
209
|
+
type: 'void',
|
|
210
|
+
'x-component': 'FormV2',
|
|
211
|
+
'x-use-component-props': 'useEditFormProps',
|
|
212
|
+
properties: {
|
|
213
|
+
title: {
|
|
214
|
+
type: 'string',
|
|
215
|
+
title: '{{t("Title")}}',
|
|
216
|
+
required: true,
|
|
217
|
+
'x-decorator': 'FormItem',
|
|
218
|
+
'x-component': 'Input',
|
|
219
|
+
},
|
|
220
|
+
llmService: {
|
|
221
|
+
type: 'string',
|
|
222
|
+
title: '{{t("LLM Service")}}',
|
|
223
|
+
required: true,
|
|
224
|
+
'x-decorator': 'FormItem',
|
|
225
|
+
'x-component': 'LLMServiceSelect',
|
|
226
|
+
},
|
|
227
|
+
model: {
|
|
228
|
+
type: 'string',
|
|
229
|
+
title: '{{t("Model")}}',
|
|
230
|
+
required: true,
|
|
231
|
+
'x-decorator': 'FormItem',
|
|
232
|
+
'x-component': 'ModelSelect',
|
|
233
|
+
},
|
|
234
|
+
systemPrompt: {
|
|
235
|
+
type: 'string',
|
|
236
|
+
title: '{{t("System Prompt")}}',
|
|
237
|
+
'x-decorator': 'FormItem',
|
|
238
|
+
'x-component': 'Input.TextArea',
|
|
239
|
+
'x-component-props': {
|
|
240
|
+
rows: 4,
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
documents: {
|
|
244
|
+
type: 'array',
|
|
245
|
+
title: '{{t("Documents")}}',
|
|
246
|
+
'x-decorator': 'FormItem',
|
|
247
|
+
'x-component': 'Upload.Attachment',
|
|
248
|
+
'x-component-props': {
|
|
249
|
+
multiple: true,
|
|
250
|
+
action: 'attachments:create',
|
|
251
|
+
maxCount: 10,
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
generatedHtml: {
|
|
255
|
+
type: 'string',
|
|
256
|
+
title: '{{t("Generated HTML")}}',
|
|
257
|
+
'x-decorator': 'FormItem',
|
|
258
|
+
'x-component': 'Input.TextArea',
|
|
259
|
+
'x-component-props': {
|
|
260
|
+
rows: 6,
|
|
261
|
+
},
|
|
262
|
+
'x-read-pretty': true,
|
|
263
|
+
},
|
|
264
|
+
buildLog: {
|
|
265
|
+
type: 'string',
|
|
266
|
+
title: '{{t("Build Log")}}',
|
|
267
|
+
'x-decorator': 'FormItem',
|
|
268
|
+
'x-component': 'Input.TextArea',
|
|
269
|
+
'x-read-pretty': true,
|
|
270
|
+
},
|
|
271
|
+
footer: {
|
|
272
|
+
type: 'void',
|
|
273
|
+
'x-component': 'Action.Drawer.Footer',
|
|
274
|
+
properties: {
|
|
275
|
+
cancel: {
|
|
276
|
+
type: 'void',
|
|
277
|
+
title: '{{t("Cancel")}}',
|
|
278
|
+
'x-component': 'Action',
|
|
279
|
+
'x-use-component-props': 'useCancelActionProps',
|
|
280
|
+
},
|
|
281
|
+
submit: {
|
|
282
|
+
type: 'void',
|
|
283
|
+
title: '{{t("Submit")}}',
|
|
284
|
+
'x-component': 'Action',
|
|
285
|
+
'x-use-component-props': 'useUpdateActionProps',
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
delete: {
|
|
296
|
+
type: 'void',
|
|
297
|
+
title: '{{t("Delete")}}',
|
|
298
|
+
'x-component': 'Action.Link',
|
|
299
|
+
'x-use-component-props': 'useDestroyActionProps',
|
|
300
|
+
'x-component-props': {
|
|
301
|
+
confirm: {
|
|
302
|
+
title: '{{t("Delete")}}',
|
|
303
|
+
content: '{{t("Are you sure you want to delete this space?")}}',
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
};
|