Comments (3)
hey there, does this happend during troubleshoot or debugging ?
from gpt-pilot.
hey there, does this happend during troubleshoot or debugging ?
Not sure what the difference is between "troubleshoot" versus debugging. It certainly happens often when it "asks" me if everything is working and whether I want to change anything. So I describe the problem, and what I want I want to be done. Below is an example of output. I have no idea why it created the app.js when there is already server.js It already has folder "models" but then it creates "src/models" and puts junk there, etc....
I have initialized the mongodb string like 30 times, and from time to time, it just decides to overwrite it, for no reason at all.
Sometimes it creates database.js, and sometimes it creates db.js in a different folder.
It should INIT the folder structure with npm init (if node is used) and stick with it. The folder structure should be self-consistent.
Dev step 202
const mongoose = require('mongoose');
// INPUT_REQUIRED {MongoDB connection string}
const connectionString = 'mongodb://localhost:27017/mydatabase';
mongoose.connect(connectionString, {
useNewUrlParser: true,
useUnifiedTopology: true
});
const db = mongoose.connection;
db.on('error', (err) => {
console.error('Error connecting to MongoDB:', err.message, err.stack);
});
db.once('open', () => {
console.log('Connected to MongoDB');
});
Sending code for review...
{
"hunks": [
{"number": 1, "reason": "The hunk accurately delivers the intended functionality of connecting to MongoDB and handling errors.", "decision": "apply"}
],
"review_notes": ""
}
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/.env
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/.env.example
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/package.json
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/server.js
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/routes/userRoute.js
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/routes/authRoutes.js
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/routes/index.js
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/routes/middleware/authMiddleware.js
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/views/login.ejs
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/views/index.ejs
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/views/register.ejs
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/views/partials/_header.ejs
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/views/partials/_head.ejs
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/views/partials/_footer.ejs
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/src/app.js
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/src/index.js
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/models/User.js
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/public/js/main.js
Saving file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/public/css/style.css
Dev step 203
{"hunks": [{"number": 1, "reason": "The hunk accurately delivers the intended functionality of connecting to MongoDB and handling errors.", "decision": "apply"}], "review_notes": ""}
Applying entire change
Review finished. Continuing...
Updated file /home/developer/PROJECTS/gpt-pilot/workspace/MenAtWork/src/models/db.js
Input required on line 3:
// INPUT_REQUIRED {MongoDB connection string}
? Please open the file ./src/models/db.js on the line 3 and add the required input. Please, also remove "// INPUT_REQUIRED" comment and once you're done, press "continue".
from gpt-pilot.
You see how here it realizes that it created a bunch of unnecessary files, with duplicated code?
Dev step 206
After reviewing the task implementation, I found some issues that need to be addressed:
1. In `views/index.ejs`, the register and login tabs are still present, but they should be removed according to the colleague's input (point 2).
2. The `public/forms/registration.js` and `public/forms/login.js` files were created during this task, but they are not being used anywhere in the code.
3. There is some "dead code" in `views/ login.ejs`. The `<!-- Register form fields will be added here -->` comment indicates that the register form was supposed to be implemented, but it's still empty.
4. Duplicating code: In `routes/index.js`, the `/` route renders the `/auth/login` page, which is not necessary since the login functionality should be handled by a separate route.
To fix these issues, I recommend the following changes:
1. Remove the register and login tabs from `views/index.ejs`.
2. Delete the unused files `public/forms/registration.js` and `public/forms/login.js`.
3. Implement the register form fields in `views/login.ejs` or create a separate `views/register.ejs` file to handle registration.
4. Refactor the routes to handle login and registration separately.
After these changes, the implementation should be reviewed again to ensure everything is correct.
from gpt-pilot.
Related Issues (20)
- [Enhancement]: API Throttling
- [Bug]: Automated workspace Deletion and Continuous Loading Loop in VSCode Extension HOT 3
- [Bug]: Pythagora updating without permission
- [Enhancement]: Make API selectable in UI
- [Bug]: errors pop up and it is impossible to continue the process when you start with the current step HOT 1
- [Enhancement]: SPECIFICATION.md as source of truth and change HOT 1
- [Enhancement]: There is a need to be able to roll back changes step by step HOT 3
- [Enhancement]: Option for remote cli command execution HOT 1
- [Bug]: Pilot creates a dir, which existance make it crash HOT 2
- [Enhancement]: Generate project documentation for the project.
- [Enhancement]: Automatically check for changes in files when reloading the project HOT 2
- [Howto]: avoid prompts HOT 2
- I wanted to clean everything up and start from scratch.
- [Bug]: Discord-toy-pseudso-ticketsystem is driving away potential customers HOT 1
- [Enhancement]: Chunk & save task gen process? Auto execute option? #invalid JSON #local LLM HOT 7
- [Bug]: IGNORE_PATHS doesn't support nested path HOT 1
- [BUG]:A lot of times it adds lines to the beginning and the end of a source file, making it unuseable without manual editing. HOT 2
- [Howto]: Mitigate the "INFO: Received incomplete JSON response from LLM. Asking for the rest..." Loop? HOT 2
- [Please i'm stucked at the Tech Lead Agent try to create a development ]: HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt-pilot.