feat: implement sharing

This commit is contained in:
shadcn 2023-06-16 15:20:42 +04:00
parent 385b31d42c
commit 8cc3fea048
19 changed files with 507 additions and 96 deletions

View file

@ -10,10 +10,11 @@ import { ChatScrollAnchor } from '@/components/chat-scroll-anchor'
export interface ChatProps extends React.ComponentProps<'div'> {
initialMessages?: Message[]
id?: string
}
export function Chat({ id, initialMessages, className }: ChatProps) {
export function Chat({ id, title, initialMessages, className }: ChatProps) {
const { messages, append, reload, stop, isLoading, input, setInput } =
useChat({
initialMessages,