@@ -22,17 +22,10 @@ export enum Chapters {
22
22
xrobot_platform = "/xrobot/platform/" ,
23
23
// api
24
24
xrobot_api = "/xrobot/api/" ,
25
- xrobot_api_server = "/xrobot/api/server/" ,
26
- // xrobot_api_client = "/xrobot/api/client/",
27
25
// mcp
28
26
xrobot_mcp = "/xrobot/mcp/" ,
29
27
// guide
30
28
xrobot_guide = "/xrobot/guide/" ,
31
- xrobot_guide_quick_start = "/xrobot/guide/quick-start/" ,
32
- xrobot_guide_quick_start_net_config = "/xrobot/guide/quick-start/net-config/" ,
33
- xrobot_guide_xiaozhi_firmware = "/xrobot/guide/xiaozhi-firmware/" ,
34
- xrobot_guide_xiaozhi_hardware = "/xrobot/guide/xiaozhi-hardware/" ,
35
- xrobot_guide_platform_mp = "/xrobot/guide/platform-mp/" ,
36
29
// faq
37
30
xrobot_faq = "/xrobot/faq/" ,
38
31
}
@@ -90,38 +83,17 @@ const items_xrobot_platform = [
90
83
} ,
91
84
] ;
92
85
93
- const items_xrobot_api_server = [
86
+ const items_xrobot_api = [
94
87
{
95
- text : "服务端 API " ,
88
+ text : "平台API " ,
96
89
collapsed : true ,
97
- link : Chapters . xrobot_api_server ,
90
+ link : Chapters . xrobot_api ,
98
91
items : [
99
92
{ text : "用户API" , link : "user" } ,
100
93
{ text : "智能体API" , link : "agent" } ,
101
94
{ text : "设备API" , link : "device" } ,
102
95
{ text : "音色克隆API" , link : "voice-clone" } ,
103
- ] . map ( ( item ) => apply_prefix ( item , Chapters . xrobot_api_server ) ) ,
104
- } ,
105
- ] ;
106
-
107
- // const items_xrobot_api_client = [
108
- // {
109
- // text: "设备接入协议",
110
- // collapsed: true,
111
- // link: Chapters.xrobot_api_client,
112
- // items: [].map((item) => apply_prefix(item, Chapters.xrobot_api_client)),
113
- // },
114
- // ];
115
-
116
- const items_xrobot_api = [
117
- {
118
- text : "平台API" ,
119
- collapsed : true ,
120
- link : Chapters . xrobot_api ,
121
- items : [
122
- ...items_xrobot_api_server ,
123
- // ...items_xrobot_api_client,
124
- ] ,
96
+ ] . map ( ( item ) => apply_prefix ( item , Chapters . xrobot_api ) ) ,
125
97
} ,
126
98
] ;
127
99
@@ -140,96 +112,17 @@ const items_xrobot_mcp = [
140
112
] ;
141
113
142
114
// 设备接入指南
143
- const items_xrobot_platform_net_config = [
144
- {
145
- text : "配网" ,
146
- link : Chapters . xrobot_guide_quick_start_net_config ,
147
- collapsed : true ,
148
- items : [
149
- { text : "通过微信小程序" , link : "mp" } ,
150
- { text : "通过浏览器" , link : "browser" } ,
151
- ] . map ( ( item ) =>
152
- apply_prefix ( item , Chapters . xrobot_guide_quick_start_net_config )
153
- ) ,
154
- } ,
155
- ] ;
156
-
157
- const items_xrobot_guide_quick_start = [
158
- {
159
- text : "快速入门" ,
160
- link : Chapters . xrobot_guide_quick_start ,
161
- collapsed : true ,
162
- items : [
163
- ...items_xrobot_platform_net_config ,
164
- ...[
165
- { text : "智能体连接指南" , link : "device-connection" } ,
166
- ] . map ( ( item ) =>
167
- apply_prefix ( item , Chapters . xrobot_guide_quick_start )
168
- ) ,
169
- ]
170
- } ,
171
- ] ;
172
-
173
- const items_xrobot_guide_xiaozhi_firmware = [
174
- {
175
- text : "小智固件接入" ,
176
- link : Chapters . xrobot_guide_xiaozhi_firmware ,
177
- collapsed : true ,
178
- items : [
179
- ...[
180
- { text : "灵矽 固件 & 服务" , link : "lingxi-service" } ,
181
- { text : "编译小智固件" , link : "firmware-compilation" } ,
182
- { text : "烧录固件" , link : "flashing" } ,
183
- { text : "设备绑定" , link : "device-bind" } ,
184
- ] . map ( ( item ) =>
185
- apply_prefix ( item , Chapters . xrobot_guide_xiaozhi_firmware )
186
- ) ,
187
- ...items_xrobot_guide_quick_start . flatMap ( ( item ) => ( {
188
- text : item . text ,
189
- link : item . link ,
190
- } ) ) ,
191
- ] ,
192
- } ,
193
- ] ;
194
-
195
- const items_xrobot_guide_xiaozhi_hardware = [
196
- {
197
- text : "小智硬件接入" ,
198
- link : Chapters . xrobot_guide_xiaozhi_hardware ,
199
- collapsed : true ,
200
- items : [
201
- { text : "智能体管理" , link : "agent-management" } ,
202
- { text : "角色配置" , link : "role-config" } ,
203
- { text : "设备管理" , link : "device-management" } ,
204
- { text : "设备配网" , link : "device-net-config" } ,
205
- ] . map ( ( item ) =>
206
- apply_prefix ( item , Chapters . xrobot_guide_xiaozhi_hardware )
207
- ) ,
208
- } ,
209
- ] ;
210
- const items_xrobot_guide_platform_mp = [
211
- {
212
- text : "平台小程序接入" ,
213
- link : Chapters . xrobot_guide_platform_mp ,
214
- collapsed : true ,
215
- items : [ ] . map ( ( item ) =>
216
- apply_prefix ( item , Chapters . xrobot_guide_platform_mp )
217
- ) ,
218
- } ,
219
- ] ;
220
-
221
115
const items_xrobot_guide = [
222
116
{
223
117
text : "最佳实践" ,
224
118
link : Chapters . xrobot_guide ,
225
119
collapsed : true ,
226
120
items : [
227
- ...items_xrobot_guide_quick_start ,
228
- ...items_xrobot_guide_xiaozhi_firmware ,
229
- ...items_xrobot_guide_xiaozhi_hardware ,
230
- ...items_xrobot_guide_platform_mp ,
231
- ] ,
232
- // .map((item) => apply_prefix(item, Chapters.xrobot_guide)),
121
+ { text : "快速入门" , link : "quick-start" } ,
122
+ { text : "开源小智固件接入" , link : "xiaozhi-firmware" } ,
123
+ { text : "开源小智硬件接入" , link : "xiaozhi-hardware" } ,
124
+ { text : "平台小程序接入" , link : "platform-mp" } ,
125
+ ] . map ( ( item ) => apply_prefix ( item , Chapters . xrobot_guide ) ) ,
233
126
} ,
234
127
] ;
235
128
@@ -278,38 +171,10 @@ export const ChapterItems: Record<Chapters, ChapterItem[]> = {
278
171
] ,
279
172
// api
280
173
[ Chapters . xrobot_api ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_api ] ,
281
- [ Chapters . xrobot_api_server ] : [
282
- gobackItem ( Chapters . xrobot_api ) ,
283
- ...items_xrobot_api_server ,
284
- ] ,
285
174
// mcp
286
175
[ Chapters . xrobot_mcp ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_mcp ] ,
287
- // [Chapters.xrobot_api_client]: [
288
- // gobackItem(Chapters.xrobot_api),
289
- // ...items_xrobot_api_client,
290
- // ],
291
176
// guide
292
177
[ Chapters . xrobot_guide ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_guide ] ,
293
- [ Chapters . xrobot_guide_quick_start ] : [
294
- gobackItem ( Chapters . xrobot ) ,
295
- ...items_xrobot_guide_quick_start ,
296
- ] ,
297
- [ Chapters . xrobot_guide_quick_start_net_config ] : [
298
- gobackItem ( Chapters . xrobot_guide_quick_start ) ,
299
- ...items_xrobot_platform_net_config ,
300
- ] ,
301
- [ Chapters . xrobot_guide_xiaozhi_firmware ] : [
302
- gobackItem ( Chapters . xrobot ) ,
303
- ...items_xrobot_guide_xiaozhi_firmware ,
304
- ] ,
305
- [ Chapters . xrobot_guide_xiaozhi_hardware ] : [
306
- gobackItem ( Chapters . xrobot ) ,
307
- ...items_xrobot_guide_xiaozhi_hardware ,
308
- ] ,
309
- [ Chapters . xrobot_guide_platform_mp ] : [
310
- gobackItem ( Chapters . xrobot ) ,
311
- ...items_xrobot_guide_platform_mp ,
312
- ] ,
313
178
// platform - others END
314
179
// faq
315
180
[ Chapters . xrobot_faq ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_faq ] ,
0 commit comments