openpetswithchatandmcp/website/check.py
OpenPets Dev 65ac83849e Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827'
git-subtree-dir: website
git-subtree-mainline: 8d3849caea
git-subtree-split: 966aea480f
2026-06-17 20:48:39 +00:00

21 lines
937 B
Python
Executable file

import re
with open('c:/ScriptoriumAI/scriptoriumai-ui/src/pages/EditorSimplified.tsx', 'r', encoding='utf-8') as f:
text = f.read()
# Make sure lucide-react has Focus icon
if 'Focus,' not in text and 'Focus ' not in text:
text = text.replace('import { Activity, ', 'import { Activity, Focus, ')
# Add state
if 'const [isZenMode, setIsZenMode] = useState(false)' not in text:
text = re.sub(
r'(const \[splitRatio, setSplitRatio\] = useState\(initialWorkspaceState\.centerPaneRatio\)\n)',
r'\1 const [isZenMode, setIsZenMode] = useState(false)\n',
text
)
# Add Zen Mode styling to app header (hide header if zen mode)
# In EditorLayout? Wait, EditorSimplified is rendered inside EditorLayout which has a toolbar.
# We don't have access to EditorLayout from EditorSimplified unless we use Context or expose a prop.
# Let's bypass the layout toggle if we can't easily reach it without a Store.