@@ -18,6 +18,48 @@ const prodAlias = {
1818 '@opentiny/tiny-robot-style' : '@opentiny/tiny-robot/dist/style.css' ,
1919}
2020
21+ // 定义共享的侧边栏配置
22+ const sharedSidebarItems = [
23+ {
24+ text : '指南' ,
25+ base : '/guide/' ,
26+ items : [
27+ { text : '快速开始' , link : 'quick-start' } ,
28+ { text : '主题配置' , link : 'theme-config' } ,
29+ { text : '更新日志' , link : 'update-log' } ,
30+ ] ,
31+ } ,
32+ {
33+ text : '组件' ,
34+ base : '/components/' ,
35+ items : [
36+ { text : 'Container 容器' , link : 'container' } ,
37+ { text : 'Bubble 气泡' , link : 'bubble' } ,
38+ { text : 'Sender 消息输入框' , link : 'sender' } ,
39+ { text : 'Prompts 提示集' , link : 'prompts' } ,
40+ { text : 'Welcome 欢迎' , link : 'welcome' } ,
41+ { text : 'Feedback 气泡反馈' , link : 'feedback' } ,
42+ { text : 'History 历史' , link : 'history' } ,
43+ { text : 'DropdownMenu 下拉菜单' , link : 'dropdown-menu' } ,
44+ { text : 'SuggestionPopover 建议弹出框' , link : 'suggestion-popover' } ,
45+ { text : 'SuggestionPills 建议按钮组' , link : 'suggestion-pills' } ,
46+ { text : 'DragOverlay 拖拽浮层' , link : 'drag-overlay' } ,
47+ { text : 'Attachments 附件卡片' , link : 'attachments' } ,
48+ { text : 'McpServerPicker 插件选择器' , link : 'mcp-server-picker' } ,
49+ { text : 'Theme 主题' , link : 'theme' } ,
50+ ] ,
51+ } ,
52+ {
53+ text : '工具' ,
54+ base : '/tools/' ,
55+ items : [
56+ { text : 'AI模型交互工具类' , link : 'ai-client' } ,
57+ { text : '消息数据管理' , link : 'message' } ,
58+ { text : '会话数据管理' , link : 'conversation' } ,
59+ ] ,
60+ } ,
61+ ]
62+
2163// https://vitepress.dev/reference/site-config
2264export default defineConfig ( {
2365 title : 'TinyRobot' ,
@@ -57,52 +99,12 @@ export default defineConfig({
5799 siteTitle : 'TinyRobot' ,
58100 nav : [
59101 { text : '指南' , link : '/guide/quick-start' , activeMatch : '/guide/' } ,
60- { text : '组件' , link : '/components/bubble' , activeMatch : '/components/' } ,
61- { text : '工具' , link : '/tools/ai-client' , activeMatch : '/tools/' } ,
62102 { text : '演示' , link : '/examples/assistant' , activeMatch : '/examples/' } ,
63- { text : `v${ version } ` , link : '/releases/update-log' , activeMatch : '/releases/' } ,
64103 ] ,
65104 sidebar : {
66- '/guide/' : [
67- {
68- text : '指南' ,
69- base : '/guide/' ,
70- items : [ { text : '快速开始' , link : 'quick-start' } ] ,
71- } ,
72- ] ,
73- '/components/' : [
74- {
75- text : '组件' ,
76- base : '/components/' ,
77- items : [
78- { text : 'Container 容器' , link : 'container' } ,
79- { text : 'Bubble 气泡' , link : 'bubble' } ,
80- { text : 'Sender 消息输入框' , link : 'sender' } ,
81- { text : 'Prompts 提示集' , link : 'prompts' } ,
82- { text : 'Welcome 欢迎' , link : 'welcome' } ,
83- { text : 'Feedback 气泡反馈' , link : 'feedback' } ,
84- { text : 'History 历史' , link : 'history' } ,
85- { text : 'DropdownMenu 下拉菜单' , link : 'dropdown-menu' } ,
86- { text : 'SuggestionPopover 建议弹出框' , link : 'suggestion-popover' } ,
87- { text : 'SuggestionPills 建议按钮组' , link : 'suggestion-pills' } ,
88- { text : 'DragOverlay 拖拽浮层' , link : 'drag-overlay' } ,
89- { text : 'Attachments 附件卡片' , link : 'attachments' } ,
90- { text : 'McpServerPicker 插件选择器' , link : 'mcp-server-picker' } ,
91- { text : 'Theme 主题' , link : 'theme' } ,
92- ] ,
93- } ,
94- ] ,
95- '/tools/' : [
96- {
97- text : '工具' ,
98- base : '/tools/' ,
99- items : [
100- { text : 'AI模型交互工具类' , link : 'ai-client' } ,
101- { text : '消息数据管理' , link : 'message' } ,
102- { text : '会话数据管理' , link : 'conversation' } ,
103- ] ,
104- } ,
105- ] ,
105+ '/guide/' : sharedSidebarItems ,
106+ '/components/' : sharedSidebarItems ,
107+ '/tools/' : sharedSidebarItems ,
106108 '/examples/' : [
107109 {
108110 text : '演示' ,
0 commit comments