diff --git a/docs/.vitepress/locales/en/sidebar.ts b/docs/.vitepress/locales/en/sidebar.ts index 8b05a1e1..825e2e54 100644 --- a/docs/.vitepress/locales/en/sidebar.ts +++ b/docs/.vitepress/locales/en/sidebar.ts @@ -29,6 +29,19 @@ function buildDocsSidebar(): DefaultTheme.SidebarItem[] { const link = typeof item.link === 'string' ? item.link : '' 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 0f6e2e1d..728272c8 100644 --- a/docs/.vitepress/locales/zh-CN/sidebar.ts +++ b/docs/.vitepress/locales/zh-CN/sidebar.ts @@ -30,6 +30,19 @@ function buildDocsSidebar(): DefaultTheme.SidebarItem[] { const link = typeof item.link === 'string' ? item.link : '' 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 4ed64be3..1f2b7d04 100644 --- a/docs/.vitepress/locales/zh-HK/sidebar.ts +++ b/docs/.vitepress/locales/zh-HK/sidebar.ts @@ -30,6 +30,19 @@ function buildDocsSidebar(): DefaultTheme.SidebarItem[] { const link = typeof item.link === 'string' ? item.link : '' 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 }