diff --git a/components/custom/chat.tsx b/components/custom/chat.tsx index a091af4..041827a 100644 --- a/components/custom/chat.tsx +++ b/components/custom/chat.tsx @@ -3,7 +3,6 @@ import { Attachment, Message } from 'ai'; import { useChat } from 'ai/react'; import { AnimatePresence } from 'framer-motion'; -import { useRouter } from 'next/navigation'; import { useState } from 'react'; import useSWR, { useSWRConfig } from 'swr'; import { useWindowSize } from 'usehooks-ts'; @@ -28,7 +27,6 @@ export function Chat({ initialMessages: Array; selectedModelId: string; }) { - const router = useRouter(); const { mutate } = useSWRConfig(); const { @@ -46,7 +44,6 @@ export function Chat({ initialMessages, onFinish: () => { mutate('/api/history'); - router.push(`/chat/${id}`); }, }); diff --git a/components/custom/message.tsx b/components/custom/message.tsx index 3e47a73..9934c72 100644 --- a/components/custom/message.tsx +++ b/components/custom/message.tsx @@ -2,6 +2,7 @@ import { Message } from 'ai'; import cx from 'classnames'; +import { motion } from 'framer-motion'; import { Sparkles } from 'lucide-react'; import { Dispatch, SetStateAction } from 'react'; @@ -30,8 +31,10 @@ export const PreviewMessage = ({ isLoading: boolean; }) => { return ( -
- + ); };