From 963ccdd2339a848022c7043a971ba23c4a95ce63 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Mon, 20 Jul 2026 18:33:43 +0800 Subject: [PATCH] fix: refine AI Agent sidebar navigation Place AI Agent after Account, expose only its first-level groups by default, and add the missing sidebar icons across all locales. Co-authored-by: Codex --- docs/.vitepress/locales/en/sidebar.ts | 12 ------------ docs/.vitepress/locales/zh-CN/sidebar.ts | 12 ------------ docs/.vitepress/locales/zh-HK/sidebar.ts | 12 ------------ docs/.vitepress/theme/utils/gen.ts | 1 + docs/en/docs/ai/_category_.json | 4 ++-- docs/en/docs/ai/chat/_category_.json | 2 +- docs/en/docs/ai/workspace/_category_.json | 2 +- docs/en/docs/market/_category_.json | 5 +++-- docs/en/docs/screener/_category_.json | 3 ++- docs/zh-CN/docs/ai/_category_.json | 4 ++-- docs/zh-CN/docs/ai/chat/_category_.json | 2 +- docs/zh-CN/docs/ai/workspace/_category_.json | 2 +- docs/zh-CN/docs/market/_category_.json | 5 +++-- docs/zh-CN/docs/screener/_category_.json | 3 ++- docs/zh-HK/docs/ai/_category_.json | 4 ++-- docs/zh-HK/docs/ai/chat/_category_.json | 2 +- docs/zh-HK/docs/ai/workspace/_category_.json | 2 +- docs/zh-HK/docs/market/_category_.json | 5 +++-- docs/zh-HK/docs/screener/_category_.json | 3 ++- 19 files changed, 28 insertions(+), 57 deletions(-) diff --git a/docs/.vitepress/locales/en/sidebar.ts b/docs/.vitepress/locales/en/sidebar.ts index 825e2e544..0b6c57797 100644 --- a/docs/.vitepress/locales/en/sidebar.ts +++ b/docs/.vitepress/locales/en/sidebar.ts @@ -30,18 +30,6 @@ function buildDocsSidebar(): DefaultTheme.SidebarItem[] { return !link.endsWith('/mcp') && !link.endsWith('/docs/api') }) - // Move AI Agent item to the end and set collapsed: true - const aiAgentIndex = items.findIndex((item) => { - const link = typeof item.link === 'string' ? item.link : '' - return link.includes('/ai') - }) - - if (aiAgentIndex !== -1) { - const aiAgentItem = items.splice(aiAgentIndex, 1)[0] - aiAgentItem.collapsed = true - items.push(aiAgentItem) - } - items.push(apiRefItem) return items } diff --git a/docs/.vitepress/locales/zh-CN/sidebar.ts b/docs/.vitepress/locales/zh-CN/sidebar.ts index 728272c88..034792d3d 100644 --- a/docs/.vitepress/locales/zh-CN/sidebar.ts +++ b/docs/.vitepress/locales/zh-CN/sidebar.ts @@ -31,18 +31,6 @@ function buildDocsSidebar(): DefaultTheme.SidebarItem[] { return !link.endsWith('/mcp') && !link.endsWith('/docs/api') }) - // Move AI Agent item to the end and set collapsed: true - const aiAgentIndex = items.findIndex((item) => { - const link = typeof item.link === 'string' ? item.link : '' - return link.includes('/ai') - }) - - if (aiAgentIndex !== -1) { - const aiAgentItem = items.splice(aiAgentIndex, 1)[0] - aiAgentItem.collapsed = true - items.push(aiAgentItem) - } - items.push(apiRefItem) return items } diff --git a/docs/.vitepress/locales/zh-HK/sidebar.ts b/docs/.vitepress/locales/zh-HK/sidebar.ts index 1f2b7d04a..d9e53dc5f 100644 --- a/docs/.vitepress/locales/zh-HK/sidebar.ts +++ b/docs/.vitepress/locales/zh-HK/sidebar.ts @@ -31,18 +31,6 @@ function buildDocsSidebar(): DefaultTheme.SidebarItem[] { return !link.endsWith('/mcp') && !link.endsWith('/docs/api') }) - // Move AI Agent item to the end and set collapsed: true - const aiAgentIndex = items.findIndex((item) => { - const link = typeof item.link === 'string' ? item.link : '' - return link.includes('/ai') - }) - - if (aiAgentIndex !== -1) { - const aiAgentItem = items.splice(aiAgentIndex, 1)[0] - aiAgentItem.collapsed = true - items.push(aiAgentItem) - } - items.push(apiRefItem) return items } diff --git a/docs/.vitepress/theme/utils/gen.ts b/docs/.vitepress/theme/utils/gen.ts index 0e5d61cfc..d02c6c09c 100644 --- a/docs/.vitepress/theme/utils/gen.ts +++ b/docs/.vitepress/theme/utils/gen.ts @@ -9,6 +9,7 @@ const SIDEBAR_ICONS: Record = { book: ``, zap: ``, cpu: ``, + bot: ``, terminal: ``, sparkles: ``, 'bar-chart-2': ``, diff --git a/docs/en/docs/ai/_category_.json b/docs/en/docs/ai/_category_.json index 2e103af65..b66450b41 100644 --- a/docs/en/docs/ai/_category_.json +++ b/docs/en/docs/ai/_category_.json @@ -3,6 +3,6 @@ "collapsible": true, "collapsed": false, "link": null, - "position": 2.7, - "icon": "cpu" + "position": 6.1, + "icon": "bot" } diff --git a/docs/en/docs/ai/chat/_category_.json b/docs/en/docs/ai/chat/_category_.json index 3c5c21749..3f2593c47 100644 --- a/docs/en/docs/ai/chat/_category_.json +++ b/docs/en/docs/ai/chat/_category_.json @@ -2,6 +2,6 @@ "position": 1, "label": "Conversation", "collapsible": true, - "collapsed": false, + "collapsed": true, "link": null } diff --git a/docs/en/docs/ai/workspace/_category_.json b/docs/en/docs/ai/workspace/_category_.json index c01f99cfd..18daf9343 100644 --- a/docs/en/docs/ai/workspace/_category_.json +++ b/docs/en/docs/ai/workspace/_category_.json @@ -2,6 +2,6 @@ "position": 0, "label": "Workspace", "collapsible": true, - "collapsed": false, + "collapsed": true, "link": null } diff --git a/docs/en/docs/market/_category_.json b/docs/en/docs/market/_category_.json index f0e85967b..aeb091332 100644 --- a/docs/en/docs/market/_category_.json +++ b/docs/en/docs/market/_category_.json @@ -3,5 +3,6 @@ "collapsible": true, "collapsed": false, "link": null, - "position": 3.7 -} \ No newline at end of file + "position": 3.7, + "icon": "line-chart" +} diff --git a/docs/en/docs/screener/_category_.json b/docs/en/docs/screener/_category_.json index bfe81409a..c7984a2a1 100644 --- a/docs/en/docs/screener/_category_.json +++ b/docs/en/docs/screener/_category_.json @@ -3,5 +3,6 @@ "collapsible": true, "collapsed": true, "link": null, - "position": 4.5 + "position": 4.5, + "icon": "search" } diff --git a/docs/zh-CN/docs/ai/_category_.json b/docs/zh-CN/docs/ai/_category_.json index 2e103af65..b66450b41 100644 --- a/docs/zh-CN/docs/ai/_category_.json +++ b/docs/zh-CN/docs/ai/_category_.json @@ -3,6 +3,6 @@ "collapsible": true, "collapsed": false, "link": null, - "position": 2.7, - "icon": "cpu" + "position": 6.1, + "icon": "bot" } diff --git a/docs/zh-CN/docs/ai/chat/_category_.json b/docs/zh-CN/docs/ai/chat/_category_.json index c36ceaba9..61573e330 100644 --- a/docs/zh-CN/docs/ai/chat/_category_.json +++ b/docs/zh-CN/docs/ai/chat/_category_.json @@ -2,6 +2,6 @@ "position": 1, "label": "对话", "collapsible": true, - "collapsed": false, + "collapsed": true, "link": null } diff --git a/docs/zh-CN/docs/ai/workspace/_category_.json b/docs/zh-CN/docs/ai/workspace/_category_.json index 5e2645824..ce95ecd0c 100644 --- a/docs/zh-CN/docs/ai/workspace/_category_.json +++ b/docs/zh-CN/docs/ai/workspace/_category_.json @@ -2,6 +2,6 @@ "position": 0, "label": "工作空间", "collapsible": true, - "collapsed": false, + "collapsed": true, "link": null } diff --git a/docs/zh-CN/docs/market/_category_.json b/docs/zh-CN/docs/market/_category_.json index edf6c8095..5356f07ef 100644 --- a/docs/zh-CN/docs/market/_category_.json +++ b/docs/zh-CN/docs/market/_category_.json @@ -3,5 +3,6 @@ "collapsible": true, "collapsed": false, "link": null, - "position": 3.7 -} \ No newline at end of file + "position": 3.7, + "icon": "line-chart" +} diff --git a/docs/zh-CN/docs/screener/_category_.json b/docs/zh-CN/docs/screener/_category_.json index f7a6310ef..1ebcf1a90 100644 --- a/docs/zh-CN/docs/screener/_category_.json +++ b/docs/zh-CN/docs/screener/_category_.json @@ -3,5 +3,6 @@ "collapsible": true, "collapsed": true, "link": null, - "position": 4.5 + "position": 4.5, + "icon": "search" } diff --git a/docs/zh-HK/docs/ai/_category_.json b/docs/zh-HK/docs/ai/_category_.json index 2e103af65..b66450b41 100644 --- a/docs/zh-HK/docs/ai/_category_.json +++ b/docs/zh-HK/docs/ai/_category_.json @@ -3,6 +3,6 @@ "collapsible": true, "collapsed": false, "link": null, - "position": 2.7, - "icon": "cpu" + "position": 6.1, + "icon": "bot" } diff --git a/docs/zh-HK/docs/ai/chat/_category_.json b/docs/zh-HK/docs/ai/chat/_category_.json index b94409891..7cb61e3db 100644 --- a/docs/zh-HK/docs/ai/chat/_category_.json +++ b/docs/zh-HK/docs/ai/chat/_category_.json @@ -2,6 +2,6 @@ "position": 1, "label": "對話", "collapsible": true, - "collapsed": false, + "collapsed": true, "link": null } diff --git a/docs/zh-HK/docs/ai/workspace/_category_.json b/docs/zh-HK/docs/ai/workspace/_category_.json index fa21f0036..60fce13a9 100644 --- a/docs/zh-HK/docs/ai/workspace/_category_.json +++ b/docs/zh-HK/docs/ai/workspace/_category_.json @@ -2,6 +2,6 @@ "position": 0, "label": "工作空間", "collapsible": true, - "collapsed": false, + "collapsed": true, "link": null } diff --git a/docs/zh-HK/docs/market/_category_.json b/docs/zh-HK/docs/market/_category_.json index 9f64f0c7a..24de90080 100644 --- a/docs/zh-HK/docs/market/_category_.json +++ b/docs/zh-HK/docs/market/_category_.json @@ -3,5 +3,6 @@ "collapsible": true, "collapsed": false, "link": null, - "position": 3.7 -} \ No newline at end of file + "position": 3.7, + "icon": "line-chart" +} diff --git a/docs/zh-HK/docs/screener/_category_.json b/docs/zh-HK/docs/screener/_category_.json index fa271fd39..1072e7865 100644 --- a/docs/zh-HK/docs/screener/_category_.json +++ b/docs/zh-HK/docs/screener/_category_.json @@ -3,5 +3,6 @@ "collapsible": true, "collapsed": true, "link": null, - "position": 4.5 + "position": 4.5, + "icon": "search" }