Skip to content

Commit 8b290c6

Browse files
committed
调整路由,将guide路由划分到最佳实践子项,调整设备ws协议api参考页面位置; 调整一些文本
1 parent 3a53a8e commit 8b290c6

File tree

7 files changed

+56
-26
lines changed

7 files changed

+56
-26
lines changed

docs/.vitepress/config.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ export default defineConfig({
2626
outline: [2, 4],
2727
nav: [
2828
{ text: "主页", link: "/" },
29-
{ text: "设备操作指南", link: Chapters.xrobot_guide_device },
29+
{ text: "使用文档", link: Chapters.xrobot_guide_device },
3030
{ text: "API参考", link: Chapters.xrobot_api },
31+
{ text: "最佳实践: ESP32 接入", link: Chapters.xrobot_platform_esp32 },
3132
{ text: "FAQ", link: Chapters.xrobot_faq },
3233
],
3334
sidebar: sidebarItems,

docs/.vitepress/theme/constrants/route.ts

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
101113
export 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

174177
const 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+
186204
const 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]: [
File renamed without changes.

docs/xrobot/guide/device/imgs/device-protocol/auto.png renamed to docs/xrobot/api/protocol/imgs/device-protocol/auto.png

File renamed without changes.

docs/xrobot/guide/device/imgs/device-protocol/manual.png renamed to docs/xrobot/api/protocol/imgs/device-protocol/manual.png

File renamed without changes.

docs/xrobot/api/protocol/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script setup>
2+
import { Chapters } from "../../../.vitepress/theme/constrants/route";
3+
4+
const chapter_root = Chapters.xrobot_api_protocol;
5+
</script>
6+
7+
<ChapterContents :chapter=chapter_root />

docs/xrobot/guide/mini-program/agent-management.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ todo: 图片错误
1010

1111
## 2. 添加智能体
1212

13-
1. 点击左下角创建智能体,输入智能体名称后点击确定,即成功添加。
13+
点击左下角创建智能体,输入智能体名称后点击确定,即成功添加。
1414

15-
| ![image-20250804163148843](./imgs/agent-management/image-20250804163148843.png) | ![image-20250804163120234](./imgs/agent-management/image-20250804163120234.png) | ![image-20250804163158656](./imgs/agent-management/image-20250804163158656.png) |
16-
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
15+
| ![image-20250804163148843](./imgs/agent-management/image-20250804163148843.png) | ![image-20250804163120234](./imgs/agent-management/image-20250804163120234.png) | ![image-20250804163158656](./imgs/agent-management/image-20250804163158656.png) |
16+
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
1717

18-
2. 删除智能体
18+
## 3. 删除智能体
1919

20-
点击想要删除的智能体卡片的删除按钮,出现删除智能体弹窗后点击确定,即删除成功。
20+
点击想要删除的智能体卡片的删除按钮,出现删除智能体弹窗后点击确定,即删除成功。
2121

22-
| ![image-20250804163238641](./imgs/agent-management/image-20250804163238641.png) | ![image-20250804163247247](./imgs/agent-management/image-20250804163247247.png) | ![image-20250804163253084](./imgs/agent-management/image-20250804163253084.png) |
23-
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
22+
| ![image-20250804163238641](./imgs/agent-management/image-20250804163238641.png) | ![image-20250804163247247](./imgs/agent-management/image-20250804163247247.png) | ![image-20250804163253084](./imgs/agent-management/image-20250804163253084.png) |
23+
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |

0 commit comments

Comments
 (0)