-
Notifications
You must be signed in to change notification settings - Fork 1.2k
tools: add multi-replace-string tool #593
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
Merged
Merged
+835
β382
Conversation
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
β¦mohyle/vscode-copilot-chat into yemohyle/multi_replace_string
β¦mohyle/vscode-copilot-chat into yemohyle/multi_replace_string
β¦mohyle/vscode-copilot-chat into yemohyle/multi_replace_string
TylerLeonhardt
approved these changes
Aug 13, 2025
OrenMe
reviewed
Aug 14, 2025
Comment on lines
+44
to
+54
/* __GDPR__ | ||
"multiStringReplaceCall" : { | ||
"owner": "connor4312", | ||
"comment": "Tracks how much percent of the AI edits survived after 5 minutes of accepting", | ||
"requestId": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The id of the current request turn." }, | ||
"model": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The model used for the request." }, | ||
"successes": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The number of successful edits.", "isMeasurement": true }, | ||
"failures": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The number of failed edits.", "isMeasurement": true }, | ||
"uniqueUris": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The number of unique URIs edited.", "isMeasurement": true }, | ||
"individualEdits": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The number of individual text edits made.", "isMeasurement": true } | ||
} |
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.
@connor4312 did u mean to leave this here?
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.
Builds on #573, reopening here due to LFS issues in forks π΅βπ«
This adds a multi-replace-string tool which is enabled via a setting
"github.copilot.chat.advanced.multiReplaceString.enabled": true,
, or via EXP. Benchmarks show this reduces turn count and cost (increasing speed) without reducing benchmark score, solving Sonnet's habit of making a bunch of small edits when refactoring. This PR includes:The tool previously just returned a success or error for an edit. We now prepare edits ahead of time, and in the multi case we merge them (so that text and notebook edits get applied in the right order) and then apply them. Edit telemetry is generally the same but it gets a new
isMulti
boolean that indicates whether it came from a multi-string-replace call, and there is a new event for the multi tool as well.