32 lines
669 B
TypeScript
32 lines
669 B
TypeScript
import type { UserType } from "@/app/(auth)/auth";
|
|
import { Chat } from "@/components/chat";
|
|
import { DataStreamHandler } from "@/components/data-stream-handler";
|
|
|
|
type ClassicChatStartProps = {
|
|
id: string;
|
|
initialModelId: string;
|
|
userType?: UserType;
|
|
};
|
|
|
|
export function ClassicChatStart({
|
|
id,
|
|
initialModelId,
|
|
userType,
|
|
}: ClassicChatStartProps) {
|
|
return (
|
|
<>
|
|
<Chat
|
|
autoResume={false}
|
|
id={id}
|
|
initialChatModel={initialModelId}
|
|
initialMessages={[]}
|
|
initialVisibilityType="private"
|
|
isReadonly={false}
|
|
key={id}
|
|
userType={userType}
|
|
/>
|
|
<DataStreamHandler />
|
|
</>
|
|
);
|
|
}
|