@@ -18,27 +18,21 @@ export type ChapterItem = {
18
18
export enum Chapters {
19
19
// xrobot 主章节
20
20
xrobot = "/xrobot/" ,
21
+ // platform
22
+ xrobot_platform = "/xrobot/platform/" ,
23
+ // api
24
+ xrobot_api = "/xrobot/api/" ,
25
+ xrobot_api_server = "/xrobot/api/server/" ,
26
+ // xrobot_api_client = "/xrobot/api/client/",
27
+ // mcp
28
+ xrobot_mcp = "/xrobot/mcp/" ,
21
29
// guide
22
30
xrobot_guide = "/xrobot/guide/" ,
23
31
xrobot_guide_quick_start = "/xrobot/guide/quick-start/" ,
32
+ xrobot_guide_quick_start_net_config = "/xrobot/guide/quick-start/net-config/" ,
24
33
xrobot_guide_xiaozhi_firmware = "/xrobot/guide/xiaozhi-firmware/" ,
25
34
xrobot_guide_xiaozhi_hardware = "/xrobot/guide/xiaozhi-hardware/" ,
26
35
xrobot_guide_platform_mp = "/xrobot/guide/platform-mp/" ,
27
- // api
28
- xrobot_api = "/xrobot/api/" ,
29
- xrobot_api_server = "/xrobot/api/server/" ,
30
- // xrobot_api_client = "/xrobot/api/client/",
31
- xrobot_api_protocol = "/xrobot/api/protocol/" ,
32
- xrobot_api_mcp = "/xrobot/api/mcp/" ,
33
- // platform
34
- xrobot_platform = "/xrobot/platform/" ,
35
- xrobot_platform_esp32 = "/xrobot/platform/esp32/" ,
36
- xrobot_platform_others = "/xrobot/platform/others/" ,
37
- xrobot_platform_others_mp = "/xrobot/platform/others/mini-program/" ,
38
- xrobot_platform_others_console = "/xrobot/platform/others/console/" ,
39
- xrobot_platform_others_device = "/xrobot/platform/others/device/" ,
40
- xrobot_platform_others_device_net_config = "/xrobot/platform/others/device/net-config/" ,
41
- xrobot_platform_others_device_device_bind = "/xrobot/platform/others/device/device-bind/" ,
42
36
// faq
43
37
xrobot_faq = "/xrobot/faq/" ,
44
38
}
@@ -83,9 +77,22 @@ export function apply_prefix(item: ChapterItem, prefix: Chapters) {
83
77
return { ...item , link : prefix + item . link } ;
84
78
}
85
79
80
+ const items_xrobot_platform = [
81
+ {
82
+ text : "设备接入协议" ,
83
+ link : Chapters . xrobot_platform ,
84
+ // collapsed: false,
85
+ items : [
86
+ { text : "OTA" , link : "OTA" } ,
87
+ { text : "websocket" , link : "websocket" } ,
88
+ { text : "MQTT" , link : "MQTT" } ,
89
+ ] . map ( ( item ) => apply_prefix ( item , Chapters . xrobot_platform ) ) ,
90
+ } ,
91
+ ] ;
92
+
86
93
const items_xrobot_api_server = [
87
94
{
88
- text : "平台接入API " ,
95
+ text : "服务端 API " ,
89
96
collapsed : true ,
90
97
link : Chapters . xrobot_api_server ,
91
98
items : [
@@ -106,109 +113,43 @@ const items_xrobot_api_server = [
106
113
// },
107
114
// ];
108
115
109
- const items_xrobot_api_protocol = [
110
- {
111
- text : "设备接入协议" ,
112
- collapsed : true ,
113
- link : Chapters . xrobot_api_protocol ,
114
- items : [
115
- { text : "WebSocket 协议" , link : "websocket" } ,
116
- { text : "MQTT 协议" , link : "MQTT" } ,
117
- { text : "OTA协议" , link : "OTA" } ,
118
- ] . map ( ( item ) => apply_prefix ( item , Chapters . xrobot_api_protocol ) ) ,
119
- } ,
120
- ] ;
121
-
122
- const items_xrobot_api_mcp = [
123
- {
124
- text : "MCP接入" ,
125
- link : Chapters . xrobot_api_mcp ,
126
- items : [ ] . map ( ( item ) => apply_prefix ( item , Chapters . xrobot_api_mcp ) ) ,
127
- } ,
128
- ] ;
129
-
130
116
const items_xrobot_api = [
131
117
{
132
- text : "API参考 " ,
118
+ text : "平台API " ,
133
119
// collapsed: false,
134
120
link : Chapters . xrobot_api ,
135
121
items : [
136
122
...items_xrobot_api_server ,
137
123
// ...items_xrobot_api_client,
138
- ...items_xrobot_api_protocol ,
139
- ...items_xrobot_api_mcp ,
140
124
] ,
141
125
} ,
142
126
] ;
143
127
144
- const items_xrobot_platform_mp = [
128
+ const items_xrobot_mcp = [
145
129
{
146
- text : "微信小程序" ,
147
- link : Chapters . xrobot_platform_others_mp ,
148
- collapsed : true ,
149
- items : [
150
- { text : "智能体管理" , link : "agent-management" } ,
151
- { text : "角色配置" , link : "role-config" } ,
152
- { text : "设备管理" , link : "device-management" } ,
153
- { text : "设备配网" , link : "device-net-config" } ,
154
- ] . map ( ( item ) => apply_prefix ( item , Chapters . xrobot_platform_others_mp ) ) ,
155
- } ,
156
- ] ;
157
-
158
- const items_xrobot_platform_net_config = [
159
- {
160
- text : "配网" ,
161
- link : Chapters . xrobot_platform_others_device_net_config ,
162
- collapsed : true ,
130
+ text : "MCP接入" ,
131
+ // collapsed: false,
132
+ link : Chapters . xrobot_mcp ,
163
133
items : [
164
- { text : "通过微信小程序 " , link : "mp " } ,
165
- { text : "通过浏览器 " , link : "browser " } ,
134
+ // { text: "硬件MCP ", link: "hardware-mcp " },
135
+ // { text: "软件MCP ", link: "software-mcp " },
166
136
] . map ( ( item ) =>
167
- apply_prefix ( item , Chapters . xrobot_platform_others_device_net_config )
137
+ apply_prefix ( item , Chapters . xrobot_mcp )
168
138
) ,
169
139
} ,
170
140
] ;
171
141
172
- const items_xrobot_platform_device_bind = [
142
+ // 设备接入指南
143
+ const items_xrobot_platform_net_config = [
173
144
{
174
- text : "绑定设备 " ,
175
- link : Chapters . xrobot_platform_others_device_device_bind ,
145
+ text : "配网 " ,
146
+ link : Chapters . xrobot_guide_quick_start_net_config ,
176
147
collapsed : true ,
177
148
items : [
178
149
{ text : "通过微信小程序" , link : "mp" } ,
179
150
{ text : "通过浏览器" , link : "browser" } ,
180
151
] . map ( ( item ) =>
181
- apply_prefix ( item , Chapters . xrobot_platform_others_device_device_bind )
182
- ) ,
183
- } ,
184
- ] ;
185
-
186
- const items_xrobot_platform_device = [
187
- {
188
- text : "设备配置与使用" ,
189
- link : Chapters . xrobot_platform_others_device ,
190
- collapsed : true ,
191
- items : [
192
- ...[ { text : "设备基本配置流程说明" , link : "device-intro" } ] . map ( ( item ) =>
193
- apply_prefix ( item , Chapters . xrobot_platform_others_device )
194
- ) ,
195
- ...items_xrobot_platform_net_config ,
196
- ...items_xrobot_platform_device_bind ,
197
- ] ,
198
- } ,
199
- ] ;
200
-
201
- const items_xrobot_platform_console = [
202
- {
203
- text : "控制台(智控台)" ,
204
- link : Chapters . xrobot_platform_others_console ,
205
- collapsed : true ,
206
- items : [
207
- // { text: "基本介绍", link: "intro" },
208
- { text : "智能体连接指南" , link : "device-connection" } ,
209
- { text : "设备绑定" , link : "device-bind" } ,
210
- ] . map ( ( item ) =>
211
- apply_prefix ( item , Chapters . xrobot_platform_others_console )
152
+ apply_prefix ( item , Chapters . xrobot_guide_quick_start_net_config )
212
153
) ,
213
154
} ,
214
155
] ;
@@ -218,9 +159,17 @@ const items_xrobot_guide_quick_start = [
218
159
text : "快速入门" ,
219
160
link : Chapters . xrobot_guide_quick_start ,
220
161
collapsed : false ,
221
- items : [ { text : "创建智能体" , link : "create-agent" } ] . map ( ( item ) =>
222
- apply_prefix ( item , Chapters . xrobot_guide_quick_start )
223
- ) ,
162
+ items : [
163
+ ...[ { text : "设备基本配置流程说明" , link : "device-intro" } ] . map ( ( item ) =>
164
+ apply_prefix ( item , Chapters . xrobot_guide_quick_start )
165
+ ) ,
166
+ ...items_xrobot_platform_net_config ,
167
+ ...[
168
+ { text : "智能体连接指南" , link : "device-connection" } ,
169
+ ] . map ( ( item ) =>
170
+ apply_prefix ( item , Chapters . xrobot_guide_quick_start )
171
+ ) ,
172
+ ]
224
173
} ,
225
174
] ;
226
175
@@ -231,8 +180,10 @@ const items_xrobot_guide_xiaozhi_firmware = [
231
180
collapsed : true ,
232
181
items : [
233
182
...[
234
- { text : "编译小智固件" , link : "compile" } ,
235
- { text : "配网高级选项" , link : "advanced-options" } ,
183
+ { text : "灵矽 固件 & 服务" , link : "lingxi-service" } ,
184
+ { text : "编译小智固件" , link : "firmware-compilation" } ,
185
+ { text : "烧录固件" , link : "flashing" } ,
186
+ { text : "设备绑定" , link : "device-bind" } ,
236
187
] . map ( ( item ) =>
237
188
apply_prefix ( item , Chapters . xrobot_guide_xiaozhi_firmware )
238
189
) ,
@@ -249,7 +200,12 @@ const items_xrobot_guide_xiaozhi_hardware = [
249
200
text : "小智硬件接入" ,
250
201
link : Chapters . xrobot_guide_xiaozhi_hardware ,
251
202
collapsed : true ,
252
- items : [ ] . map ( ( item ) =>
203
+ items : [
204
+ { text : "智能体管理" , link : "agent-management" } ,
205
+ { text : "角色配置" , link : "role-config" } ,
206
+ { text : "设备管理" , link : "device-management" } ,
207
+ { text : "设备配网" , link : "device-net-config" } ,
208
+ ] . map ( ( item ) =>
253
209
apply_prefix ( item , Chapters . xrobot_guide_xiaozhi_hardware )
254
210
) ,
255
211
} ,
@@ -280,40 +236,6 @@ const items_xrobot_guide = [
280
236
} ,
281
237
] ;
282
238
283
- const items_xrobot_platform_esp32 = [
284
- {
285
- text : "小智接入指南 (ESP32)" ,
286
- link : Chapters . xrobot_platform_esp32 ,
287
- collapsed : true ,
288
- items : [
289
- { text : "esp32-s3" , link : "S3" } ,
290
- { text : "esp32-c3" , link : "C3" } ,
291
- ] . map ( ( item ) => apply_prefix ( item , Chapters . xrobot_platform_esp32 ) ) ,
292
- } ,
293
- ] ;
294
-
295
- const items_xrobot_platform_others = [
296
- {
297
- text : "厂商接入指南" ,
298
- link : Chapters . xrobot_platform_others ,
299
- collapsed : true ,
300
- items : [
301
- ...items_xrobot_platform_device ,
302
- ...items_xrobot_platform_mp ,
303
- ...items_xrobot_platform_console ,
304
- ] ,
305
- } ,
306
- ] ;
307
-
308
- const items_xrobot_platform = [
309
- {
310
- text : "最佳实践" ,
311
- link : Chapters . xrobot_platform ,
312
- // collapsed: false,
313
- items : [ ...items_xrobot_platform_esp32 , ...items_xrobot_platform_others ] ,
314
- } ,
315
- ] ;
316
-
317
239
const items_xrobot_faq = [
318
240
{
319
241
text : "常见问题" ,
@@ -332,9 +254,10 @@ const items_xrobot = [
332
254
link : Chapters . xrobot ,
333
255
// collapsed: false,
334
256
items : [
335
- ...items_xrobot_guide ,
336
- ...items_xrobot_api ,
337
257
...items_xrobot_platform ,
258
+ ...items_xrobot_api ,
259
+ ...items_xrobot_mcp ,
260
+ ...items_xrobot_guide ,
338
261
...items_xrobot_faq ,
339
262
] ,
340
263
} ,
@@ -351,30 +274,33 @@ function gobackItem(chapter: Chapters) {
351
274
export const ChapterItems : Record < Chapters , ChapterItem [ ] > = {
352
275
// main
353
276
[ Chapters . xrobot ] : items_xrobot ,
277
+ // platform
278
+ [ Chapters . xrobot_platform ] : [
279
+ gobackItem ( Chapters . xrobot ) ,
280
+ ...items_xrobot_platform ,
281
+ ] ,
354
282
// api
355
283
[ Chapters . xrobot_api ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_api ] ,
356
284
[ Chapters . xrobot_api_server ] : [
357
285
gobackItem ( Chapters . xrobot_api ) ,
358
286
...items_xrobot_api_server ,
359
287
] ,
288
+ // mcp
289
+ [ Chapters . xrobot_mcp ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_mcp ] ,
360
290
// [Chapters.xrobot_api_client]: [
361
291
// gobackItem(Chapters.xrobot_api),
362
292
// ...items_xrobot_api_client,
363
293
// ],
364
- [ Chapters . xrobot_api_protocol ] : [
365
- gobackItem ( Chapters . xrobot_api ) ,
366
- ...items_xrobot_api_protocol ,
367
- ] ,
368
- [ Chapters . xrobot_api_mcp ] : [
369
- gobackItem ( Chapters . xrobot_api ) ,
370
- ...items_xrobot_api_mcp ,
371
- ] ,
372
294
// guide
373
295
[ Chapters . xrobot_guide ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_guide ] ,
374
296
[ Chapters . xrobot_guide_quick_start ] : [
375
297
gobackItem ( Chapters . xrobot ) ,
376
298
...items_xrobot_guide_quick_start ,
377
299
] ,
300
+ [ Chapters . xrobot_guide_quick_start_net_config ] : [
301
+ gobackItem ( Chapters . xrobot_guide_quick_start ) ,
302
+ ...items_xrobot_platform_net_config ,
303
+ ] ,
378
304
[ Chapters . xrobot_guide_xiaozhi_firmware ] : [
379
305
gobackItem ( Chapters . xrobot ) ,
380
306
...items_xrobot_guide_xiaozhi_firmware ,
@@ -387,41 +313,6 @@ export const ChapterItems: Record<Chapters, ChapterItem[]> = {
387
313
gobackItem ( Chapters . xrobot ) ,
388
314
...items_xrobot_guide_platform_mp ,
389
315
] ,
390
- // platform
391
- [ Chapters . xrobot_platform ] : [
392
- gobackItem ( Chapters . xrobot ) ,
393
- ...items_xrobot_platform ,
394
- ] ,
395
- // - esp32
396
- [ Chapters . xrobot_platform_esp32 ] : [
397
- gobackItem ( Chapters . xrobot_platform ) ,
398
- ...items_xrobot_platform_esp32 ,
399
- ] ,
400
- // - others
401
- [ Chapters . xrobot_platform_others ] : [
402
- gobackItem ( Chapters . xrobot_platform ) ,
403
- ...items_xrobot_platform_others ,
404
- ] ,
405
- [ Chapters . xrobot_platform_others_mp ] : [
406
- gobackItem ( Chapters . xrobot_platform_others ) ,
407
- ...items_xrobot_platform_mp ,
408
- ] ,
409
- [ Chapters . xrobot_platform_others_device ] : [
410
- gobackItem ( Chapters . xrobot_platform_others ) ,
411
- ...items_xrobot_platform_device ,
412
- ] ,
413
- [ Chapters . xrobot_platform_others_console ] : [
414
- gobackItem ( Chapters . xrobot_platform_others ) ,
415
- ...items_xrobot_platform_console ,
416
- ] ,
417
- [ Chapters . xrobot_platform_others_device_net_config ] : [
418
- gobackItem ( Chapters . xrobot_platform_others ) ,
419
- ...items_xrobot_platform_net_config ,
420
- ] ,
421
- [ Chapters . xrobot_platform_others_device_device_bind ] : [
422
- gobackItem ( Chapters . xrobot_platform_others ) ,
423
- ...items_xrobot_platform_device_bind ,
424
- ] ,
425
316
// platform - others END
426
317
// faq
427
318
[ Chapters . xrobot_faq ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_faq ] ,
0 commit comments