import { Globe, MessageCircle, Pencil } from 'lucide-react';
import { cn } from '@/lib/utils';
import { useState } from 'react';
const focusModes = [
{
key: 'webSearch',
title: 'All',
description: 'Searches across all of the internet',
icon: ,
},
{
key: 'chat',
title: 'Chat',
description: 'Have a creative conversation',
icon: ,
},
{
key: 'localResearch',
title: 'Local Research',
description: 'Research and interact with local files with citations',
icon: ,
},
];
const Focus = ({
focusMode,
setFocusMode,
}: {
focusMode: string;
setFocusMode: (mode: string) => void;
}) => {
const [showWebSearchTooltip, setShowWebSearchTooltip] = useState(false);
const [showChatTooltip, setShowChatTooltip] = useState(false);
const [showLocalResearchTooltip, setShowLocalResearchTooltip] =
useState(false);
const webSearchMode = focusModes.find((mode) => mode.key === 'webSearch');
const chatMode = focusModes.find((mode) => mode.key === 'chat');
const localResearchMode = focusModes.find(
(mode) => mode.key === 'localResearch',
);
return (
{/* Web Search Mode Icon */}
{/* Divider */}
{/* Chat Mode Icon */}
{/* Divider */}
{/* Local Research Mode Icon */}
{/* Web Search Mode Tooltip */}
{showWebSearchTooltip && (
{webSearchMode?.title}
{webSearchMode?.description}
)}
{/* Chat Mode Tooltip */}
{showChatTooltip && (
{chatMode?.title}
{chatMode?.description}
)}
{/* Local Research Mode Tooltip */}
{showLocalResearchTooltip && (
{localResearchMode?.title}
{localResearchMode?.description}
)}
);
};
export default Focus;