File size: 1,971 Bytes
0110dee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { useEffect, useState } from 'react';
import { AppShell } from './components/shell/AppShell';
import { Welcome } from './pages/Welcome';
import { OmegaShell } from './components/terminal/OmegaShell';
import { SovereignIDE } from './components/ide/SovereignIDE';
import { useWorkspaceStore } from './stores/workspace.store';
import { sovereignIDE } from '../artifacts/SOVEREIGN_IDE_FRAMEWORK';

function App() {
  const [isLoading, setIsLoading] = useState(true);
  const [sovereignReady, setSovereignReady] = useState(false);
  const [showIDE, setShowIDE] = useState(false);
  const { workspaceId, initialize } = useWorkspaceStore();

  useEffect(() => {
    // Initialize Sovereign IDE framework (all BOB components)
    sovereignIDE.initialize().then(() => {
      setSovereignReady(true);
      console.log('✅ Sovereign IDE Framework loaded');
    });

    // Initialize stores and check for existing workspace
    initialize().finally(() => setIsLoading(false));
  }, [initialize]);

  if (isLoading) {
    return (
      <div style={{

        display: 'flex',

        alignItems: 'center',

        justifyContent: 'center',

        height: '100vh',

        background: 'var(--bg-canvas)',

        color: 'var(--text-primary)',

        fontFamily: 'var(--font-ui)'

      }}>

        <div>

          <div style={{ fontSize: '2rem', marginBottom: '1rem' }}>🤖</div>

          <div>Loading BOB IDE...</div>

        </div>

      </div>
    );
  }

  // Show welcome screen if no workspace is open
  if (!workspaceId) {
    return <Welcome />;
  }

  // Toggle between Vortex shell (game) and Sovereign IDE (editor)
  if (showIDE) {
    return (
      <div>

        <SovereignIDE />

        <OmegaShell />

      </div>
    );
  }

  // Show main Vortex shell (game world)
  return (
    <div>

      <AppShell />

      <OmegaShell />

    </div>
  );
}

export default App;

// Made with Bob