diff --git a/app/empty-screen.tsx b/app/empty-screen.tsx
new file mode 100644
index 0000000..9b998f5
--- /dev/null
+++ b/app/empty-screen.tsx
@@ -0,0 +1,69 @@
+import { cn } from '@/lib/utils'
+import { ExternalLink } from './external-link'
+import { ArrowRight } from 'lucide-react'
+import { useChatStore } from '@/hooks/use-chat-store'
+import { Button } from '@/components/ui/button'
+import { OpenAI } from '@/components/icons'
+
+const exampleMessages = [
+ {
+ heading: 'Explain technical concepts',
+ message: `What is a "serverless function"?`
+ },
+ {
+ heading: 'Summarize article',
+ message: 'Summarize the following article for a 2nd grader: \n'
+ },
+ {
+ heading: 'Draft an email',
+ message: `Draft an email to my boss about the following: \n`
+ }
+]
+
+export function EmptyScreen({ className }: React.ComponentProps<'div'>) {
+ const { setDefaultMessage } = useChatStore()
+
+ return (
+
+
+
+
+
+
Welcome to Next.js Chatbot!
+
+ This is an open source AI chatbot app built with{' '}
+ Next.js and{' '}
+
+ Vercel KV
+
+ .
+
+
+ You can start a conversation here or try the following examples:
+
+
+ {exampleMessages.map((message, index) => (
+
setDefaultMessage(message.message)}
+ >
+
+ {message.heading}
+
+ ))}
+
+
+
+ )
+}
diff --git a/app/empty.tsx b/app/empty.tsx
deleted file mode 100644
index 0deaf75..0000000
--- a/app/empty.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { cn } from '@/lib/utils'
-import { ExternalLink } from './external-link'
-import { fontMessage } from '@/lib/fonts'
-
-function ExampleBubble({ children }: { children?: React.ReactNode }) {
- return (
-
- )
-}
-
-export function EmptyScreen() {
- return (
-
-
-
-
-
Welcome to Next.js Chatbot!
-
- This is an open source AI chatbot app built with{' '}
- Next.js and{' '}
-
- Vercel KV
-
- . You can start a conversation here or try the following examples:
-
-
-
-
- Explain technical concepts
- Summarize article
- Get assistance
- Draft an email
-
-
-
- )
-}
diff --git a/app/globals.css b/app/globals.css
index 69f3827..b2bc4f4 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -3,14 +3,80 @@
@tailwind utilities;
@layer base {
- #__next,
- #root {
- height: 100%;
+ :root {
+ --background: 0 0% 100%;
+ --foreground: 222.2 47.4% 11.2%;
+
+ --muted: 210 40% 96.1%;
+ --muted-foreground: 215.4 16.3% 46.9%;
+
+ --popover: 0 0% 100%;
+ --popover-foreground: 222.2 47.4% 11.2%;
+
+ --card: 0 0% 100%;
+ --card-foreground: 222.2 47.4% 11.2%;
+
+ --border: 214.3 31.8% 91.4%;
+ --input: 214.3 31.8% 91.4%;
+
+ --primary: 222.2 47.4% 11.2%;
+ --primary-foreground: 210 40% 98%;
+
+ --secondary: 210 40% 96.1%;
+ --secondary-foreground: 222.2 47.4% 11.2%;
+
+ --accent: 210 40% 96.1%;
+ --accent-foreground: 222.2 47.4% 11.2%;
+
+ --destructive: 0 100% 50%;
+ --destructive-foreground: 210 40% 98%;
+
+ --ring: 215 20.2% 65.1%;
+
+ --radius: 0.5rem;
}
- body,
- html {
- height: 100%;
+ .dark {
+ --background: 224 71% 4%;
+ --foreground: 213 31% 91%;
+
+ --muted: 223 47% 11%;
+ --muted-foreground: 215.4 16.3% 56.9%;
+
+ --popover: 224 71% 4%;
+ --popover-foreground: 215 20.2% 65.1%;
+
+ --card: 224 71% 4%;
+ --card-foreground: 213 31% 91%;
+
+ --border: 216 34% 17%;
+ --input: 216 34% 17%;
+
+ --primary: 210 40% 98%;
+ --primary-foreground: 222.2 47.4% 1.2%;
+
+ --secondary: 222.2 47.4% 11.2%;
+ --secondary-foreground: 210 40% 98%;
+
+ --accent: 216 34% 17%;
+ --accent-foreground: 210 40% 98%;
+
+ --destructive: 0 63% 31%;
+ --destructive-foreground: 210 40% 98%;
+
+ --ring: 216 34% 17%;
+
+ --radius: 0.5rem;
+ }
+}
+
+@layer base {
+ * {
+ @apply border-border;
+ }
+ body {
+ @apply bg-background text-foreground;
+ font-feature-settings: 'rlig' 1, 'calt' 1;
}
}
diff --git a/app/header.tsx b/app/header.tsx
new file mode 100644
index 0000000..7cce3f7
--- /dev/null
+++ b/app/header.tsx
@@ -0,0 +1,52 @@
+import { GitHub, Vercel } from '@/components/icons'
+import './globals.css'
+
+import { Sidebar } from '@/app/sidebar'
+import { buttonVariants } from '@/components/ui/button'
+import { cn } from '@/lib/utils'
+import { Plus } from 'lucide-react'
+import Link from 'next/link'
+import { UserMenu } from '@/components/user-menu'
+import { auth } from '@/auth'
+
+export async function Header() {
+ const session = await auth()
+
+ return (
+
+ )
+}
diff --git a/app/layout.tsx b/app/layout.tsx
index b9e8d26..496838e 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,9 +1,11 @@
-import './globals.css'
import { Metadata } from 'next'
+import './globals.css'
+import { TailwindIndicator } from '@/components/tailwind-indicator'
import { ThemeProvider } from '@/components/theme-provider'
import { fontMono, fontSans } from '@/lib/fonts'
import { cn } from '@/lib/utils'
+import { Header } from '@/app/header'
export const metadata: Metadata = {
title: {
@@ -28,22 +30,24 @@ interface RootLayoutProps {
export default function RootLayout({ children }: RootLayoutProps) {
return (
- <>
-
-