-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
When requesting small modifications to a specific component within a file—such as updating the title, changing the background color, or adjusting styles—the AI engine tends to rewrite the entire code block. This often disrupts previously established dependencies, leading to changes in behavior, appearance, and potentially introducing errors. As a result, the application may malfunction, sometimes requiring a rollback to a previous stable version.
To Reproduce
- Have a project with a medium code base (>50k tokens)
- Ask to edit a specific part. Better if you use the cursor selection for the area to edit, that will bring even more problems.
- Wait for the result.
Expected behavior
The AI engine should apply only the requested changes in a minimal and targeted way, preserving the existing structure, logic, and dependencies of the component. Instead of rewriting entire blocks of code, it should update only the relevant lines—such as modifying a property, class, or style—while maintaining the integrity and functionality of the surrounding code. This ensures consistency in behavior, reduces the risk of introducing bugs, and avoids the need for rollbacks or manual corrections.
Desktop (please complete the following information):
- OS: Windows 11 Pro
- Browser Chrome, Firefox, Edge
- Version 0.14.0 stable
Additional context
A possible workaround is to copy the specific code block from the original file and paste it into the prompt when requesting changes—clearly instructing the AI to make minimal edits and preserve the existing structure. This approach can sometimes reduce the risk of unintended disruptions, as the AI is more likely to focus only on the provided code. However, this method is not foolproof and may still result in broader modifications than intended.