@@ -28,6 +28,7 @@ export enum Chapters {
2828 xrobot_api = "/xrobot/api/" ,
2929 xrobot_api_server = "/xrobot/api/server/" ,
3030 xrobot_api_client = "/xrobot/api/client/" ,
31+ xrobot_api_protocol = "/xrobot/api/protocol/" ,
3132 // platform
3233 xrobot_platform = "/xrobot/platform/" ,
3334 xrobot_platform_esp32 = "/xrobot/platform/esp32/" ,
@@ -98,12 +99,27 @@ export const items_xrobot_api_client = [
9899 } ,
99100] ;
100101
102+ export const items_xrobot_api_protocol = [
103+ {
104+ text : "WebSocket API参考" ,
105+ collapsed : true ,
106+ link : Chapters . xrobot_api_protocol ,
107+ items : [ { text : "服务通信协议" , link : "device-protocol" } ] . map ( ( item ) =>
108+ apply_prefix ( item , Chapters . xrobot_api_protocol )
109+ ) ,
110+ } ,
111+ ] ;
112+
101113export const items_xrobot_api = [
102114 {
103115 text : "API参考" ,
104116 collapsed : false ,
105117 link : Chapters . xrobot_api ,
106- items : [ ...items_xrobot_api_server , ...items_xrobot_api_client ] ,
118+ items : [
119+ ...items_xrobot_api_server ,
120+ ...items_xrobot_api_client ,
121+ ...items_xrobot_api_protocol ,
122+ ] ,
107123 } ,
108124] ;
109125
@@ -129,7 +145,6 @@ export const items_xrobot_guide_device = [
129145 items : [
130146 { text : "使用指南" , link : "device-intro" } ,
131147 { text : "绑定" , link : "device-bind" } ,
132- { text : "服务通信协议" , link : "device-protocol" } ,
133148 { text : "智能体连接指南" , link : "device-connection" } ,
134149 ] . map ( ( item ) => apply_prefix ( item , Chapters . xrobot_guide_device ) ) ,
135150 } ,
@@ -157,23 +172,11 @@ const items_xrobot_guide_net_config = [
157172 } ,
158173] ;
159174
160- export const items_xrobot_guide = [
161- {
162- text : "厂商接入指南" ,
163- link : Chapters . xrobot_guide ,
164- collapsed : false ,
165- items : [
166- ...items_xrobot_guide_mp ,
167- ...items_xrobot_guide_device ,
168- ...items_xrobot_guide_console ,
169- ...items_xrobot_guide_net_config ,
170- ] ,
171- } ,
172- ] ;
175+ export const items_xrobot_guide = [ ] ;
173176
174177const items_xrobot_platform_esp32 = [
175178 {
176- text : "ESP32" ,
179+ text : "小智接入指南 ( ESP32) " ,
177180 link : Chapters . xrobot_platform_esp32 ,
178181 collapsed : true ,
179182 items : [
@@ -183,12 +186,27 @@ const items_xrobot_platform_esp32 = [
183186 } ,
184187] ;
185188
189+ // todo: 调整guide内容位置
190+ const items_xrobot_platform_others = [
191+ {
192+ text : "厂商接入指南" ,
193+ link : Chapters . xrobot_guide ,
194+ collapsed : true ,
195+ items : [
196+ ...items_xrobot_guide_mp ,
197+ ...items_xrobot_guide_device ,
198+ ...items_xrobot_guide_console ,
199+ ...items_xrobot_guide_net_config ,
200+ ] ,
201+ } ,
202+ ] ;
203+
186204const items_xrobot_platform = [
187205 {
188- text : "设备平台 " ,
206+ text : "最佳实践 " ,
189207 link : Chapters . xrobot_platform ,
190208 collapsed : false ,
191- items : [ ...items_xrobot_platform_esp32 ] ,
209+ items : [ ...items_xrobot_platform_esp32 , ... items_xrobot_platform_others ] ,
192210 } ,
193211] ;
194212
@@ -239,6 +257,10 @@ export const ChapterItems: Record<Chapters, ChapterItem[]> = {
239257 gobackItem ( Chapters . xrobot_api ) ,
240258 ...items_xrobot_api_client ,
241259 ] ,
260+ [ Chapters . xrobot_api_protocol ] : [
261+ gobackItem ( Chapters . xrobot_api ) ,
262+ ...items_xrobot_api_protocol ,
263+ ] ,
242264 // guide
243265 [ Chapters . xrobot_guide ] : [ gobackItem ( Chapters . xrobot ) , ...items_xrobot_guide ] ,
244266 [ Chapters . xrobot_guide_mp ] : [
0 commit comments