import { type UseChatHelpers } from 'ai-connector/react' import { Button } from '@/components/ui/button' import { ExternalLink } from '@/components/external-link' import { PromptForm } from '@/components/prompt-form' import { ButtonScrollToBottom } from '@/components/button-scroll-to-bottom' import { IconRefresh, IconStop } from '@/components/ui/icons' export interface ChatPanelProps extends Pick< UseChatHelpers, | 'append' | 'isLoading' | 'reload' | 'messages' | 'stop' | 'input' | 'setInput' > { id?: string } export function ChatPanel({ isLoading, stop, append, reload, input, setInput, messages }: ChatPanelProps) { return (
{isLoading ? ( ) : ( messages?.length > 0 && ( ) )}
{ append({ content: value, role: 'user' }) }} input={input} setInput={setInput} isLoading={isLoading} />

Open source AI chatbot app built with{' '} Next.js and{' '} Vercel KV .

) }