Spaces:
Paused
Paused
| with open("App.tsx", "r") as f: | |
| content = f.read() | |
| old_code = """ setSessions(prev => [newSession, ...prev]); | |
| setCurrentSessionId(newSession.id); | |
| setNewSessionModalOpen(false); | |
| setIsLoading(false);""" | |
| new_code = """ setSessions(prev => [newSession, ...prev]); | |
| setCurrentSessionId(newSession.id); | |
| // Queue HF Deployment Cue if checked | |
| if (config.runHfDeploymentCue) { | |
| const templates = [ | |
| "Please perform a deep investigation of the codebase to understand its current state and architecture. Look for dependencies, main entry points, and service patterns. READY", | |
| "Based on the investigation, create a detailed project vision and implementation plan. Outline the necessary changes and new components. READY", | |
| "Implement the changes according to the plan and prepare for deployment. Ensure all tests pass and documentation is updated. READY" | |
| ]; | |
| setTemplateQueue(prev => ({ | |
| ...prev, | |
| [newSession.id]: templates | |
| })); | |
| } | |
| setNewSessionModalOpen(false); | |
| setIsLoading(false);""" | |
| content = content.replace(old_code, new_code) | |
| with open("App.tsx", "w") as f: | |
| f.write(content) | |