Comments (9)
Thanks for moving this from PR to issue @vgvishesh and providing the source file. Would be great if you could look into this @similato87 .
@ilutoo when did you have this problem? The improve workflow was changed completely only a few days ago, so you can expect it to work differently (but apparently not flawlessly yet).
from gpt-engineer.
This is the only problem I found yet.
from gpt-engineer.
Was testing the improvement flow, and found another problem:
input file:
import React from 'react';
export const SocialLinks: React.FC = () => {
const profiles = {
linkedIn: 'https://www.linkedin.com/in/guptavishesh/',
github: 'https://github.com/vgvishesh',
whatsapp: 'https://wa.me/1234567890',
twitter: 'https://twitter.com/__visheshgupta',
};
return (
<div className="social-links">
generated diff block:
--- src/components/SocialLinks.tsx
+++ src/components/SocialLinks.tsx
@@ -1,10 +1,11 @@
import React from 'react';
+export const profiles = {
- const profiles = {
linkedIn: 'https://www.linkedin.com/in/guptavishesh/',
github: 'https://github.com/vgvishesh',
whatsapp: 'https://wa.me/1234567890',
twitter: 'https://twitter.com/__visheshgupta',
- };
+};
export const SocialLinks: React.FC = () => {
output file:
import React from 'react';
export const profiles = {
export const SocialLinks: React.FC = () => {
linkedIn: 'https://www.linkedin.com/in/guptavishesh/',
github: 'https://github.com/vgvishesh',
whatsapp: 'https://wa.me/1234567890',
twitter: 'https://twitter.com/__visheshgupta',
};
return (
<div className="social-links">
<h2 className="text-xl font-semibold mb-3">My Social Links</h2>
<ul className="list-none">
{Object.entries(profiles).map(([key, value]) => (
<li key={key}>
<a href={value} target="_blank" rel="noopener noreferrer" className="text-blue-500 hover:text-blue-600 social-link">
{key.charAt(0).toUpperCase() + key.slice(1)}
</a>
</li>
))}
</ul>
</div>
);
};
Expected:
import React from 'react';
export const profiles = {
linkedIn: 'https://www.linkedin.com/in/guptavishesh/',
github: 'https://github.com/vgvishesh',
whatsapp: 'https://wa.me/1234567890',
twitter: 'https://twitter.com/__visheshgupta',
};
export const SocialLinks: React.FC = () => {
return (
<div className="social-links">
<h2 className="text-xl font-semibold mb-3">My Social Links</h2>
<ul className="list-none">
{Object.entries(profiles).map(([key, value]) => (
<li key={key}>
<a href={value} target="_blank" rel="noopener noreferrer" className="text-blue-500 hover:text-blue-600 social-link">
{key.charAt(0).toUpperCase() + key.slice(1)}
</a>
</li>
))}
</ul>
</div>
);
};
Ideally, this one should have been caught as a problem in the diff.validate_and_correct()
as the generated diff is not in the correct order with respect to the source code file.
from gpt-engineer.
@vgvishesh You're right. The validation and correction mechanism did not effectively manage the error diffs. Ideally, GPT-Engineer should have discarded such problematic sections. We will revise the logic to address this issue. Thank you for your feedback, which is invaluable in enhancing the system's reliability.
from gpt-engineer.
On debugging looks like this part of the code is causing the issue:
From ln 319-328. On replacing this snippet with below code, it works fine:
for file_name, diff in diffs.items():
# if diff is a new file, validation and correction is unnecessary
# if diff.is_new_file():
# files_dict = apply_diffs(diffs, files_dict)
# else:
if not diff.is_new_file():
problems = diff.validate_and_correct(
file_to_lines_dict(files_dict[diff.filename_pre])
)
error_message.extend(problems)
files_dict = apply_diffs(diffs, files_dict)
from gpt-engineer.
Is anyone also facing the same issue?
from gpt-engineer.
ye, i had that issue too many times and still dont know how to fix it.. so tired! maybe github help us
from gpt-engineer.
Thanks for posting here, we will take a look!
from gpt-engineer.
@vgvishesh Thank you for bringing this to our attention. I will prioritize investigating and resolving this issue promptly. To ensure we address all concerns, could you please confirm if the problem is solely related to the duplication of additions, or are there other anomalies we should be aware of? Your feedback is crucial for a comprehensive fix.
from gpt-engineer.
Related Issues (20)
- Applying diffs failing silently HOT 7
- keep getting error message when trying to run in terminal with all necessary items installed HOT 3
- The Video demo on the Main Repo is Corrupted HOT 4
- Docker build is broken HOT 30
- Add GPTE CLI argument to output system information HOT 10
- how to set gpt-4o HOT 4
- Can't run poetry install. Greenlet not supporting PEP 517 builds. HOT 1
- Azure Deployment Name Bug HOT 20
- Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects HOT 6
- Implement a Unified Configuration File for Project Settings HOT 4
- Editing a project: KeyError "src/index.js" HOT 3
- Creating new project: Hang at "npm start", crash if I say "y" HOT 4
- Gemini 1.5 pro/flash HOT 6
- INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 403 Forbidden" HOT 4
- TypeError: string indices must be integers HOT 4
- Can't edit files HOT 8
- Could not resolve authentication method. HOT 7
- Improve `--sysinfo` by providing version data and env variables insights HOT 2
- using with deepseek api problem HOT 3
- Failed to update new codes from gpte HOT 3
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-engineer.