Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[agent_farm] we are removing the last empty line in the file #2044

Open
theskcd opened this issue Feb 12, 2025 · 2 comments · May be fixed by #2045
Open

[agent_farm] we are removing the last empty line in the file #2044

theskcd opened this issue Feb 12, 2025 · 2 comments · May be fixed by #2045

Comments

@theskcd
Copy link
Contributor

theskcd commented Feb 12, 2025

Whenever the agent makes a change, we are removing the last \n on the line for some reason, I think its originating from the search_and_replace flow... what could be going wrong?
Add a test for this so you can test out your changes and use cargo check to additionally verify your work

@theskcd
Copy link
Contributor Author

theskcd commented Feb 12, 2025

ACK, on it!

@theskcd
Copy link
Contributor Author

theskcd commented Feb 12, 2025

Fixes: Preserve Final Newline in Search and Replace Editing

This commit resolves an issue where the final newline character was being removed during search and replace operations. The logic in update_code_lines was modified to correctly handle trailing newlines and new test cases were added to verify the fix. Please review the changes and provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant