mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Start adding Act 1 dialog
This commit is contained in:
3 files changed
+527
No files matched your search
@@ -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}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user