Skip to content

Conversation

connor4312
Copy link
Member

@connor4312 connor4312 commented Aug 13, 2025

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:

  1. Prompt changes to reference the new tool when it's available (existing prompts are unchanged when the tool is not enabled)
  2. Enablement of the tool based on the setting/EXP
  3. A cleanup of the old Gemini replace_string experiment which is now at 100%
  4. Some refactor of replace_string to enable its use in multi_replace_string

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.

image

Yevhen Mohylevskyy and others added 30 commits July 24, 2025 13:59
…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
@connor4312 connor4312 added this pull request to the merge queue Aug 13, 2025
Merged via the queue into main with commit 539e01e Aug 13, 2025
6 checks passed
@connor4312 connor4312 deleted the connor4312/573 branch August 13, 2025 23:47
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 }
}
Copy link

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants