'use client'; import { MediaDetails } from '@/lib/fetch'; import React, { useState } from 'react'; import { ChatList } from '../chat/ChatList'; import useVisionAgent from '@/lib/hooks/useVisionAgent'; import { nanoid } from '@/lib/utils'; import { useScrollAnchor } from '@/lib/hooks/useScrollAnchor'; import { Composer } from '../chat/Composer'; import { useAtomValue } from 'jotai'; import { selectedMediaIdAtom } from '@/state/media'; export interface ChatProps { mediaList: MediaDetails[]; } const ProjectChat: React.FC = ({ mediaList }) => { return
TO BE FIXED
; // const selectedMediaId = useAtomValue(selectedMediaIdAtom); // // fallback to the first media // const selectedMedia = // mediaList.find(media => media.id === selectedMediaId) ?? mediaList[0]; // const { messages, append, reload, stop, isLoading, input, setInput } = // useVisionAgent({ // mediaUrl: selectedMedia.url, // messages: [], // userId: nanoid(), // }); // const { messagesRef, scrollRef, visibilityRef, isAtBottom, scrollToBottom } = // useScrollAnchor(); // return ( // <> //
//
// //
//
//
//
// //
// // ); }; export default ProjectChat;