From bc8a2c731d7d86bac85dc2abfb09b5e68af8cb28 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Mon, 25 Sep 2023 17:12:40 -0400 Subject: [PATCH] feat(nx-dev): add link to AI Chat beta in docs header --- .../feature-ai/src/lib/feed/feed-answer.tsx | 4 ++-- nx-dev/nx-dev/pages/ai-chat/index.tsx | 2 +- .../src/lib/documentation-header.tsx | 24 +++++++++++++++++-- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/nx-dev/feature-ai/src/lib/feed/feed-answer.tsx b/nx-dev/feature-ai/src/lib/feed/feed-answer.tsx index 10bb67a9e3d3a..6f0f63079b9ce 100644 --- a/nx-dev/feature-ai/src/lib/feed/feed-answer.tsx +++ b/nx-dev/feature-ai/src/lib/feed/feed-answer.tsx @@ -67,8 +67,8 @@ export function FeedAnswer({
Nx Assistant{' '} - - alpha + + beta

diff --git a/nx-dev/nx-dev/pages/ai-chat/index.tsx b/nx-dev/nx-dev/pages/ai-chat/index.tsx index f951582a71fcd..9d4bbecfc65d3 100644 --- a/nx-dev/nx-dev/pages/ai-chat/index.tsx +++ b/nx-dev/nx-dev/pages/ai-chat/index.tsx @@ -9,7 +9,7 @@ export default function AiDocs(): JSX.Element { return ( <> - {tab.name} + {tab.content ?? tab.name} ))} @@ -44,8 +45,14 @@ export function DocumentationHeader({ const isExtendingNx: boolean = routerPath.startsWith('/extending-nx'); const isPlugins: boolean = routerPath.startsWith('/plugin-registry'); const isChangelog: boolean = routerPath.startsWith('/changelog'); + const isAiChat: boolean = router.asPath.startsWith('/ai-chat'); const isNx: boolean = - !isNxCloud && !isAPI && !isExtendingNx && !isPlugins && !isChangelog; + !isNxCloud && + !isAPI && + !isExtendingNx && + !isPlugins && + !isChangelog && + !isAiChat; const sections = [ { name: 'Nx', href: '/getting-started/intro', current: isNx }, @@ -74,6 +81,19 @@ export function DocumentationHeader({ href: '/changelog', current: isChangelog, }, + { + name: 'AI Chat', + href: '/ai-chat', + current: isAiChat, + content: ( + <> + AI Chat + + beta + + + ), + }, ]; const communityLinks = [