-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Smart Edit Tool #6823
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
Smart Edit Tool #6823
Conversation
75df90f to
8e966e1
Compare
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
NTaylorMullen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some absolutely stellar results here. Left some key comments mostly around cross-plat capabilities and some general goodness factors.
a248893 to
2024ba3
Compare
8378bf6 to
93aa850
Compare
93aa850 to
95f34c6
Compare
|
Ta again, works fine after 3 days or more, see: #7758 (comment) |
(cherry picked from commit d0c781a)
TLDR
This is the Smart Edit tool, a potential replacement for the current 'replace/edit' tool.
The main differences:
2.1. It tries an exact match, if not succeed, continue
2.3 It tries a flexible match where we loose the constrains mostly on spaces. If not succeed, continues
2.4 It asks Gemini to Fix the old_string and potentially the new_string taking into consideration the instructions it received using gemini 2.5 flash
2.5 Tries the exact match and flexible match one last time.
I did some tests with the tool running it on swebench verify and swebench lite. The error rate for the editing action dropped from around 20% to 6%.
We are not making it the default tool yet. In order to run it, you have to enable it in your
.gemini/settings.jsonfile{ .... "useSmartEdit": true }Token usage.
The current EditTool can do up to two LLM calls, this new tool do only up to one. In experiments, we noticed a drop in input_token_count of about 30%.
Escaping characters
The current EditTool tries multiple character escaping strategies. We removed those strategies without harming the the performance.
Dive Deeper
Reviewer Test Plan
Testing Matrix
Linked issues / bugs