import { Button } from "@/components/ui/button"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; import { Switch } from "@/components/ui/switch"; import { Label } from "@/components/ui/label"; import { Sparkles, Info } from "lucide-react"; import { useSettings } from "@/hooks/useSettings"; import { IpcClient } from "@/ipc/ipc_client"; export function ProModeSelector() { const { settings, updateSettings } = useSettings(); const toggleLazyEdits = () => { updateSettings({ enableProLazyEditsMode: !settings?.enableProLazyEditsMode, }); }; const toggleSmartContext = () => { updateSettings({ enableProSmartFilesContextMode: !settings?.enableProSmartFilesContextMode, }); }; const proEnabled = Boolean(settings?.enableDyadPro); return ( Configure Dyad Pro settings

Dyad Pro

{!proEnabled && (
{ IpcClient.getInstance().openExternalUrl( "https://dyad.sh/pro#ai", ); }} > Unlock Pro modes
)}
); } function SelectorRow({ id, label, description, tooltip, proEnabled, settingEnabled, toggle, }: { id: string; label: string; description: string; tooltip: string; proEnabled: boolean; settingEnabled: boolean; toggle: () => void; }) { return (
{tooltip}

{description}

); }