feat: add user-configurable fuzzy match threshold setting #11160
+65
−4
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.
Related GitHub Issue
Closes: #11087
Roo Code Task Context (Optional)
N/A
Description
This PR adds a user-configurable fuzzy match threshold setting to address the issue where models like
gemini-2-flash-previewproduce output with 89-96% similarity that fails with the hardcoded 100% exact match threshold.Key implementation details:
fuzzyMatchThresholdto the GlobalSettings schema inpackages/types/src/global-settings.ts(0-1 range, optional)TaskOptionsinterface andTaskconstructor to accept and pass the threshold toMultiSearchReplaceDiffStrategyContextManagementSettings.tsxallowing users to adjust the threshold from 80-100%Design choices:
Test Procedure
Pre-Submission Checklist
Screenshots / Videos
N/A - UI change is a simple slider control similar to existing sliders in the same settings panel.
Documentation Updates
Additional Notes
This implementation restores the ability to configure the fuzzy match threshold that was previously available but was removed/hardcoded to 100%. The setting allows models that produce minor formatting variations to still successfully edit files.
Get in Touch
N/A - automated PR
Important
Introduces a user-configurable fuzzy match threshold setting to allow flexible file edits, with schema, UI, and task handling updates.
fuzzyMatchThresholdtoglobal-settings.tsschema (0-1 range, optional).TaskOptionsandTaskconstructor inTask.tsto handlefuzzyMatchThreshold.ContextManagementSettings.tsxfor threshold adjustment (80-100%).settings.json.fuzzyMatchThresholdintoSettingsView.tsxandContextManagementSettings.tsx.This description was created by
for 27c47c0. You can customize this summary. It will automatically update as commits are pushed.