mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-09 21:27:53 -05:00
ENG-482 fix
This commit is contained in:
@@ -492,6 +492,10 @@ class ProjectState(Base):
|
||||
"""
|
||||
return self.epics and any(epic.get("source") == "frontend" for epic in self.epics)
|
||||
|
||||
# function that checks whether old project or new project is currently in frontend stage
|
||||
def working_on_frontend(self) -> bool:
|
||||
return self.has_frontend() and len(self.epics) == 1
|
||||
|
||||
def is_feature(self) -> bool:
|
||||
"""
|
||||
Check if the current epic is a feature.
|
||||
|
||||
@@ -20,9 +20,12 @@ These files are currently implemented on the frontend that contain all API reque
|
||||
{% if not state.has_frontend() or (state.has_frontend() and 'server/' not in file.path) %}
|
||||
* `{{ file.path }}{% if file.meta.get("description") %}: {{file.meta.description}}{% endif %}`
|
||||
{% endif %}{% endfor %}
|
||||
|
||||
{% if not state.working_on_frontend() %}
|
||||
These files are currently implemented in the project on the backend:
|
||||
{% for file in state.files %}{% if 'server/' in file.path %}
|
||||
* `{{ file.path }}{% if file.meta.get("description") %}: {{file.meta.description}}{% endif %}`
|
||||
{% endif %}{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
@@ -107,28 +107,15 @@ class ViteReactProjectTemplate(BaseProjectTemplate):
|
||||
relevant_files = [
|
||||
"server/server.js",
|
||||
"server/routes/index.js",
|
||||
"client/components.json",
|
||||
"client/index.html",
|
||||
"client/package.json",
|
||||
"client/src/api/api.ts",
|
||||
"client/src/app.css",
|
||||
"client/src/App.tsx",
|
||||
"client/src/components/Footer.tsx",
|
||||
"client/src/components/Header.tsx",
|
||||
"client/src/components/Layout.tsx",
|
||||
"client/src/components/ProtectedRoute.tsx",
|
||||
"client/src/contexts/AuthContext.tsx",
|
||||
"client/src/pages/Login.tsx",
|
||||
"client/src/pages/Register.tsx",
|
||||
"client/src/index.css",
|
||||
"client/src/lib/utils.ts",
|
||||
"client/src/main.tsx",
|
||||
"client/src/vite-env.d.ts",
|
||||
"client/tailwind.config.js",
|
||||
"client/tsconfig.app.json",
|
||||
"client/tsconfig.json",
|
||||
"client/tsconfig.node.json",
|
||||
"client/vite.config.ts",
|
||||
"package.json",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user