11'use client' ;
22
3- import { Hero } from '@/components/Hero' ;
4- import { Logo } from '@/components/Logo' ;
5- import { MobileNavigation } from '@/components/MobileNavigation' ;
6- import { Navigation } from '@/components/Navigation' ;
7- import { ThemeSelector } from '@/components/ThemeSelector' ;
3+ import { Hero } from '@/components/Hero' ;
4+ import { Logo } from '@/components/Logo' ;
5+ import { MobileNavigation } from '@/components/MobileNavigation' ;
6+ import { Navigation } from '@/components/Navigation' ;
7+ import { ThemeSelector } from '@/components/ThemeSelector' ;
88import clsx from 'clsx' ;
99import Link from 'next/link' ;
10- import { usePathname } from 'next/navigation' ;
11- import { useEffect , useState } from 'react' ;
12- import { LogoMark } from './LogoMark' ;
10+ import { usePathname } from 'next/navigation' ;
11+ import { useEffect , useState } from 'react' ;
12+ import { LogoMark } from './LogoMark' ;
1313import VersionSelector from './VersionSelector' ;
14- import { Search } from './search/Search' ;
15- import { DemoLayout } from '@/components/DemoLayout' ;
14+ import { Search } from './search/Search' ;
1615
1716function GitHubIcon ( props : React . ComponentPropsWithoutRef < 'svg' > ) {
1817 return (
@@ -30,7 +29,7 @@ function Header() {
3029 setIsScrolled ( window . scrollY > 0 ) ;
3130 }
3231 onScroll ( ) ;
33- window . addEventListener ( 'scroll' , onScroll , { passive : true } ) ;
32+ window . addEventListener ( 'scroll' , onScroll , { passive : true } ) ;
3433 return ( ) => {
3534 window . removeEventListener ( 'scroll' , onScroll ) ;
3635 } ;
@@ -100,14 +99,34 @@ function Header() {
10099 ) ;
101100}
102101
103- export function Layout ( { children } : { children : React . ReactNode } ) {
102+ export function Layout ( { children} : { children : React . ReactNode } ) {
104103 let pathname = usePathname ( ) ;
105104 let isHomePage = pathname === '/' ;
105+ let isCodyDocs = pathname . includes ( '/cody' ) ;
106+ let isopenCtxDocs = pathname . includes ( '/cody/capabilities/openctx' ) ;
106107
107108 return (
108109 < div className = "flex w-full flex-col" >
109110 < Header />
110111
112+ { /* Cody docs banner */ }
113+ { /* {isCodyDocs && !isopenCtxDocs && <TopBanner
114+ text="NEW: Introducing chat and search in a single input with Sourcegraph 6.0."
115+ link="https://sourcegraph.com/blog/combining-chat-and-search"
116+ linkText="Read here"
117+ textColor="#ffffff"
118+ backgroundColor="#F34E3F"
119+ />} */ }
120+
121+ { /* Openctx docs banner */ }
122+ { /* {isopenCtxDocs && <TopBanner
123+ text="NEW: MCP is the recommended method for adding external context in Cody due to its broad community adoption and extensive tool support."
124+ link="https://sourcegraph.com/docs/cody/capabilities/agentic-context-fetching#mcp-support"
125+ linkText="Read docs to learn more about configuring MCP."
126+ textColor="#ffffff"
127+ backgroundColor="#F34E3F"
128+ />} */ }
129+
111130 { isHomePage && < Hero /> }
112131 { /* {isHomePage && <DemoLayout />} */ }
113132
0 commit comments