import React, { useState } from 'react'; import { useSetIsLoginModalOpen } from '../contexts/UIContext'; import { ASSISTANT_BRAND_NAME } from '../constants'; import { useUpdatePluginSettings } from '../contexts/PluginSettingsContext'; import AssistantSettingsSection from './Modals/settings/AssistantSettingsSection'; import { BrandMark, Button } from './ui'; const InitialSetupGate: React.FC = () => { const setIsLoginModalOpen = useSetIsLoginModalOpen(); const updatePluginSettings = useUpdatePluginSettings(); const [isSaving, setIsSaving] = useState(false); const [error, setError] = useState(null); // The permission toggles below persist live (shared with Settings → Permissions); // completing setup just records that the user has been through this screen. const handleSave = async () => { setError(null); setIsSaving(true); try { await updatePluginSettings({ setupCompleted: true }); } catch (e) { setError(e instanceof Error ? e.message : 'Failed to save setup.'); setIsSaving(false); } }; return (

{`Welcome to ${ASSISTANT_BRAND_NAME}`}

{`Choose what ${ASSISTANT_BRAND_NAME} can access before you start. You can change these anytime in Settings → Permissions.`}

{/* Reuses the same Permissions section shown in Settings. */}

With great power comes great responsibility.

{`${ASSISTANT_BRAND_NAME} is a helpful tool, but it can and does make mistakes. Review AI-generated output and any proposed changes carefully before publishing to a live site.`}

{error && (
{error}
)}
); }; export default InitialSetupGate;