with open("App.tsx", "r") as f: content = f.read() # Update handleSubmitCreateSession so it uses the new queue format if the HF Deployment Cue checkbox is checked! old_submit = """ // 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 })); }""" new_submit = """ // Queue HF Deployment Cue if checked if (config.runHfDeploymentCue) { const templates = [ "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" ]; // The first template is config.prompt which is already sent setHfTimerQueue(prev => ({ ...prev, [newSession.id]: { templates: templates, nextExecutionTime: Date.now() + 30 * 60 * 1000 } })); }""" content = content.replace(old_submit, new_submit) with open("App.tsx", "w") as f: f.write(content)