@@ -22,17 +22,10 @@ export enum Chapters {
2222 xrobot_platform = "/xrobot/platform/" ,
2323 // api
2424 xrobot_api = "/xrobot/api/" ,
25- xrobot_api_server = "/xrobot/api/server/" ,
26- // xrobot_api_client = "/xrobot/api/client/",
2725 // mcp
2826 xrobot_mcp = "/xrobot/mcp/" ,
2927 // guide
3028 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/" ,
3629 // faq
3730 xrobot_faq = "/xrobot/faq/" ,
3831}
@@ -90,38 +83,17 @@ const items_xrobot_platform = [
9083 } ,
9184] ;
9285
93- const items_xrobot_api_server = [
86+ const items_xrobot_api = [
9487 {
95- text : "服务端 API " ,
88+ text : "平台API " ,
9689 collapsed : true ,
97- link : Chapters . xrobot_api_server ,
90+ link : Chapters . xrobot_api ,
9891 items : [
9992 { text : "用户API" , link : "user" } ,
10093 { text : "智能体API" , link : "agent" } ,
10194 { text : "设备API" , link : "device" } ,
10295 { 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 ) ) ,
12597 } ,
12698] ;
12799
@@ -140,96 +112,17 @@ const items_xrobot_mcp = [
140112] ;
141113
142114// 设备接入指南
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-
221115const items_xrobot_guide = [
222116 {
223117 text : "最佳实践" ,
224118 link : Chapters . xrobot_guide ,
225119 collapsed : true ,
226120 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 ) ) ,
233126 } ,
234127] ;
235128
@@ -278,38 +171,10 @@ export const ChapterItems: Record<Chapters, ChapterItem[]> = {
278171 ] ,
279172 // api
280173 [ 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- ] ,
285174 // mcp
286175 [ 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- // ],
291176 // guide
292177 [ 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- ] ,
313178 // platform - others END
314179 // faq
315180 [ Chapters . xrobot_faq ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_faq ] ,
0 commit comments