2024-10-30 03:44:09 +00:00
|
|
|
import { Settings } from 'lucide-react';
|
2024-04-09 10:51:05 +00:00
|
|
|
import EmptyChatMessageInput from './EmptyChatMessageInput';
|
2024-10-30 03:44:09 +00:00
|
|
|
import SettingsDialog from './SettingsDialog';
|
|
|
|
import { useState } from 'react';
|
2024-11-23 09:34:19 +00:00
|
|
|
import { File } from './ChatWindow';
|
2024-04-09 10:51:05 +00:00
|
|
|
|
|
|
|
const EmptyChat = ({
|
|
|
|
sendMessage,
|
2024-04-13 06:41:47 +00:00
|
|
|
focusMode,
|
|
|
|
setFocusMode,
|
2024-10-11 05:05:59 +00:00
|
|
|
optimizationMode,
|
|
|
|
setOptimizationMode,
|
2024-11-23 09:34:19 +00:00
|
|
|
fileIds,
|
|
|
|
setFileIds,
|
|
|
|
files,
|
|
|
|
setFiles,
|
2024-04-09 10:51:05 +00:00
|
|
|
}: {
|
|
|
|
sendMessage: (message: string) => void;
|
2024-04-13 06:41:47 +00:00
|
|
|
focusMode: string;
|
|
|
|
setFocusMode: (mode: string) => void;
|
2024-10-11 05:05:59 +00:00
|
|
|
optimizationMode: string;
|
|
|
|
setOptimizationMode: (mode: string) => void;
|
2024-11-23 09:34:19 +00:00
|
|
|
fileIds: string[];
|
|
|
|
setFileIds: (fileIds: string[]) => void;
|
|
|
|
files: File[];
|
|
|
|
setFiles: (files: File[]) => void;
|
2024-04-09 10:51:05 +00:00
|
|
|
}) => {
|
2024-10-30 03:44:09 +00:00
|
|
|
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
|
|
|
|
|
2024-04-09 10:51:05 +00:00
|
|
|
return (
|
2024-05-29 06:31:42 +00:00
|
|
|
<div className="relative">
|
2024-10-30 03:44:09 +00:00
|
|
|
<SettingsDialog isOpen={isSettingsOpen} setIsOpen={setIsSettingsOpen} />
|
|
|
|
<div className="absolute w-full flex flex-row items-center justify-end mr-5 mt-5">
|
|
|
|
<Settings
|
|
|
|
className="cursor-pointer lg:hidden"
|
|
|
|
onClick={() => setIsSettingsOpen(true)}
|
|
|
|
/>
|
|
|
|
</div>
|
2024-05-29 06:31:42 +00:00
|
|
|
<div className="flex flex-col items-center justify-center min-h-screen max-w-screen-sm mx-auto p-2 space-y-8">
|
|
|
|
<h2 className="text-black/70 dark:text-white/70 text-3xl font-medium -mt-8">
|
|
|
|
Research begins here.
|
|
|
|
</h2>
|
|
|
|
<EmptyChatMessageInput
|
|
|
|
sendMessage={sendMessage}
|
|
|
|
focusMode={focusMode}
|
|
|
|
setFocusMode={setFocusMode}
|
2024-10-11 05:05:59 +00:00
|
|
|
optimizationMode={optimizationMode}
|
|
|
|
setOptimizationMode={setOptimizationMode}
|
2024-11-23 09:34:19 +00:00
|
|
|
fileIds={fileIds}
|
|
|
|
setFileIds={setFileIds}
|
|
|
|
files={files}
|
|
|
|
setFiles={setFiles}
|
2024-05-29 06:31:42 +00:00
|
|
|
/>
|
|
|
|
</div>
|
2024-04-09 10:51:05 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default EmptyChat;
|