Skip to content

Commit d628bed

Browse files
committed
Add chatbot
1 parent a48ba2c commit d628bed

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/app/chat.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import { Chatbot } from '@langbase/components';
3+
import {Chatbot} from '@langbase/components';
44
import '@langbase/components/styles';
55

66
export default function Chat() {
@@ -11,8 +11,9 @@ export default function Chat() {
1111
background-color: #dedede;
1212
}
1313
`}</style>
14-
<Chatbot apiRoute="/docs/api/chat"
15-
openingMessage="Hi there! Welcome to Ask Sourcegraph AI agent. How can I help you?"
14+
<Chatbot
15+
apiRoute="/docs/api/chat"
16+
openingMessage="Hi there! I'm Sourcegraph's AI assistant trained for our documentation. How can I help you?"
1617
// Remember AI can make mistakes, please double-check responses.
1718
suggestions={[
1819
{

src/app/layout.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { Providers } from '@/app/providers';
2-
import { Layout } from '@/components/Layout';
3-
import { GoogleAnalytics } from '@next/third-parties/google';
1+
import Chat from '@/app/chat';
2+
import {Providers} from '@/app/providers';
3+
import {Layout} from '@/components/Layout';
4+
import {GoogleAnalytics} from '@next/third-parties/google';
45
import clsx from 'clsx';
56
import config from 'docs.config';
6-
import { type Metadata } from 'next';
7-
import { Inter } from 'next/font/google';
7+
import {type Metadata} from 'next';
8+
import {Inter} from 'next/font/google';
89
import localFont from 'next/font/local';
910

1011
import '@/styles/tailwind.css';
@@ -98,7 +99,7 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
9899
className="flex min-h-full bg-light-bg dark:bg-dark-bg"
99100
>
100101
<Providers>
101-
{/* <Chat /> */}
102+
<Chat />
102103
<Layout>{children}</Layout>
103104
</Providers>
104105
</body>

0 commit comments

Comments
 (0)