chatbot-template/app/(chat)/page.tsx
rudrodip 045ad9035a refactor: Update import path for getMissingKeys
The import path for the getMissingKeys function was updated from
'../actions' to '@/app/actions' to align with the project's import
conventions and improve code clarity.
2024-04-29 19:12:17 +06:00

22 lines
598 B
TypeScript

import { nanoid } from '@/lib/utils'
import { Chat } from '@/components/chat'
import { AI } from '@/lib/chat/actions'
import { auth } from '@/auth'
import { Session } from '@/lib/types'
import { getMissingKeys } from '@/app/actions'
export const metadata = {
title: 'Next.js AI Chatbot'
}
export default async function IndexPage() {
const id = nanoid()
const session = (await auth()) as Session
const missingKeys = await getMissingKeys()
return (
<AI initialAIState={{ chatId: id, messages: [] }}>
<Chat id={id} session={session} missingKeys={missingKeys} />
</AI>
)
}