Start adding Act 1 dialog

This commit is contained in:
Alex Gleason committed 2025-09-25 17:34:38 -05:00
1 parent f62b2f807c
commit 94bcc7eccb
3 files changed
+527

No files matched your search

+15
View File
@@ -10,6 +10,7 @@ import { useAISettings } from '@/hooks/useAISettings';
import { useToast } from '@/hooks/useToast';
import { AppLayout } from '@/components/AppLayout';
import { OnboardingDialog } from '@/components/OnboardingDialog';
import { Act1Dialog } from '@/components/Act1Dialog';
import { DotAI } from '@/lib/DotAI';
import { parseProviderModel } from '@/lib/parseProviderModel';
import type { AIMessage } from '@/lib/SessionManager';
@@ -29,6 +30,7 @@ export default function Index() {
const [isCreating, setIsCreating] = useState(false);
const [storedPrompt, setStoredPrompt] = useLocalStorage('shakespeare-draft-prompt', '');
const [showOnboarding, setShowOnboarding] = useState(false);
const [showAct1Dialog, setShowAct1Dialog] = useState(false);
const navigate = useNavigate();
const projectsManager = useProjectsManager();
const { fs } = useFS();
@@ -99,6 +101,13 @@ export default function Index() {
}
}, [storedPrompt]);
// Check for Act 1 users and show welcome dialog
useEffect(() => {
if (localStorage.getItem('selectedNSPAddr')) {
setShowAct1Dialog(true);
}
}, []);
// Sync prompt with local storage
const handlePromptChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
const newPrompt = e.target.value;
@@ -383,6 +392,12 @@ export default function Index() {
open={showOnboarding}
onOpenChange={setShowOnboarding}
/>
{/* Act 1 Welcome Dialog */}
<Act1Dialog
open={showAct1Dialog}
onOpenChange={setShowAct1Dialog}
/>
</>
);
}