fix user_options

This commit is contained in:
LeonOstrez
2025-01-09 11:13:54 +01:00
parent f77c2b9420
commit efbad3f162
4 changed files with 3 additions and 4 deletions

View File

@@ -56,7 +56,7 @@ class Frontend(FileDiffMixin, BaseAgent):
options = {
"auth": auth_needed.button == "yes",
}
self.state_manager.user_options = options
self.next_state.knowledge_base["user_options"] = options
await self.send_message("Setting up the project...")

View File

@@ -13,7 +13,7 @@ When thinking about the scope of a single task, here are the components that nee
**IMPORTANT: order of tasks**
The tasks you create **MUST** be in the order that they should be implemented. When CRUD operations need to be implemented, first implement the Create operation, then Read, Update, and Delete.
{% if state.has_frontend() and not state.is_feature() and state.user_options.auth %}
{% if state.has_frontend() and not state.is_feature() and (state.user_options|default({})).get('auth', True) %}
**IMPORTANT**
If you are working on the Epic #1 that needs to implement the authentication system. The first task **MUST** be to remove the mocked data for authentication (register and login). After that, add any custom authentication requirements like different roles, different user data, etc.
{% endif %}

View File

@@ -25,7 +25,7 @@ Before we go into the coding part, your job is to split the development process
Now, based on the project details provided{% if task_type == 'feature' %} and new feature description{% endif %}, think epic by epic and create the entire development plan{% if task_type == 'feature' %} for new feature{% elif task_type == 'app' %}. {% if state.files %}Continue from the existing code listed above{% else %}Start from the project setup{% endif %} and specify each epic until the moment when the entire app should be fully working{% if state.files %}. IMPORTANT: You should not reimplement what's already done - just continue from the implementation already there.{% endif %}{% endif %}
IMPORTANT!
Frontend is already built and you don't need to create epics for it. You only need to create epics for backend implementation and connect it to existing frontend. Keep in mind that some backend functionality is already implemented.{% if task_type == 'app' and state.user_options.auth %} The first epic **MUST** be to implement the authentication system if it's required.{% endif %}
Frontend is already built and you don't need to create epics for it. You only need to create epics for backend implementation and connect it to existing frontend. Keep in mind that some backend functionality is already implemented.{% if task_type == 'app' and (state.user_options|default({})).get('auth', True) %} The first epic **MUST** be to implement the authentication system if it's required.{% endif %}
Strictly follow these rules:

View File

@@ -52,7 +52,6 @@ class StateManager:
self.blockDb = False
self.git_available = False
self.git_used = False
self.user_options = {}
@asynccontextmanager
async def db_blocker(self):