Skip to content

fix: fail on multiple matches by default and add replaceAll option for bulk replacement#77

Merged
hashemix merged 3 commits intomainfrom
fix/issue-76-edit_file-multiple-match
Mar 15, 2026
Merged

fix: fail on multiple matches by default and add replaceAll option for bulk replacement#77
hashemix merged 3 commits intomainfrom
fix/issue-76-edit_file-multiple-match

Conversation

@hashemix
Copy link
Copy Markdown
Member

📌 Summary

updates the edit_file tool to fail on multiple matches by default , and adds a replaceAll parameter to the edit_file tool that allows replacing all occurrences of oldText when multiple matches are found in a file.

🔍 Related Issues

✨ Changes Made

  • Added error handling when multiple matches found by default
  • Added replaceAll optional parameter to apply_file_edits function
  • Updated EditFile tool schema to include replaceAll option
  • Added 5 new test cases for multiple match scenarios

🛠️ Testing Steps

cargo make check

OR run the test suite: cargo test

@hashemix hashemix merged commit 8f1e2a3 into main Mar 15, 2026
10 checks passed
@hashemix hashemix mentioned this pull request Mar 15, 2026
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.

1 participant