feat: improve file diff for fs write#799
Merged
brandonskiser merged 3 commits intomainfrom Mar 12, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #799 +/- ##
==========================================
+ Coverage 13.42% 13.45% +0.03%
==========================================
Files 2359 2359
Lines 203091 203141 +50
Branches 183455 183505 +50
==========================================
+ Hits 27272 27342 +70
+ Misses 174417 174383 -34
- Partials 1402 1416 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
chaynabors
approved these changes
Mar 11, 2025
jlhood
pushed a commit
to jlhood/amazon-q-developer-cli
that referenced
this pull request
Mar 16, 2025
* feat: improve file diff for fs write * remove clean file, minor refactoring * refactoring, use shell_color to determine truecolor support
Contributor
|
Is there a way we could remove the trailing whitespace that the model generates? It results in several checkstyle/lint errors as well as some people have editors that highlight them as errors. |
Merged
This was referenced Apr 30, 2025
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes:
fs_writethat displays line numbers. This implementation needs to be improved for truecolor support - currently, we don't highlight the entire document which can result in lines being highlighted incorrectly, consequently impacting the diff.clean_file_contentfunction since it was resulting in a lot of errors with the model trying to use str_replace. Essentially, we were writing different content than the model was generating, which thus required it to constantly reread the file to see what we actually wrote.fs_writecommands.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.