Skip to content

fix: include generated edit command in error message for no changes made#189

Open
abuzarmahmood wants to merge 2 commits intomainfrom
188-when-returning-no-changes-made-by-aider-error-also-return-the-generate-edit-command-supplied-to-aider
Open

fix: include generated edit command in error message for no changes made#189
abuzarmahmood wants to merge 2 commits intomainfrom
188-when-returning-no-changes-made-by-aider-error-also-return-the-generate-edit-command-supplied-to-aider

Conversation

@abuzarmahmood
Copy link
Owner

No description provided.

@abuzarmahmood
Copy link
Owner Author

Generated edit command:

Summary of User's Issues and Requests

The user has requested that when the "no changes made by aider" error is returned, the generated edit command supplied to aider should also be included in the error message. This will provide more context for debugging and understanding what command was attempted.

Overview of Plan to Address the Issues

To address this issue, we need to modify the error handling logic in the run_aider function within the response_agent.py file. Specifically, we will update the error message to include the generated edit command when the "no changes made by aider" error occurs.

Specific Details of Changes to be Made

  1. Modify Error Handling in run_aider Function
    • File: src/response_agent.py
    • Line: 1126
    • Description of Change: Update the error message to include the generated edit command when no changes are made by aider.
    • Code Snippet of Edits:
      if current_commit == updated_commit:
          raise RuntimeError(f"No changes made by Aider. Command used: {message}")

These changes ensure that the generated edit command is returned with the error message, providing more context for debugging.


This response was automatically generated by blech_bot using model gpt-4o

Aider output:

View Aider Output
Aider v0.84.0
Main model: gpt-4o with diff edit format
Weak model: gpt-4o-mini
Git repo: .git with 19 files
Repo-map: using 4096 tokens, auto refresh


src/response_agent.py
To address your request, we need to modify the run_aider function in src/response_agent.py to include the generated edit command in
the error message when no changes are made by Aider. Here is the necessary change:                                                 

src/response_agent.py                                                                                                              

                                                                                                                                   
<<<<<<< SEARCH                                                                                                                     
        if current_commit == updated_commit:                                                                                       
            raise RuntimeError("No changes made by Aider")                                                                         
=======                                                                                                                            
        if current_commit == updated_commit:                                                                                       
            raise RuntimeError(f"No changes made by Aider. Command used: {message}")                                               
>>>>>>> REPLACE                                                                                                                    
                                                                                                                                   

Tokens: 14k sent, 108 received. Cost: $0.04 message, $0.04 session.
Applied edit to src/response_agent.py
Commit 05299bd fix: include generated edit command in error message for no changes made

@codecov
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.79%. Comparing base (fa2bb8d) to head (9684a63).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #189   +/-   ##
=======================================
  Coverage   41.79%   41.79%           
=======================================
  Files           4        4           
  Lines         579      579           
  Branches       66       66           
=======================================
  Hits          242      242           
  Misses        335      335           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When returning "no changes made by aider" error, also return the generate edit command supplied to aider

1 participant