feat: add user-configurable fuzzy match threshold setting#11160
Draft
roomote[bot] wants to merge 1 commit intomainfrom
Draft
feat: add user-configurable fuzzy match threshold setting#11160roomote[bot] wants to merge 1 commit intomainfrom
roomote[bot] wants to merge 1 commit intomainfrom
Conversation
- Add fuzzyMatchThreshold to GlobalSettings schema (0-1 range, optional) - Update Task class to accept and pass threshold to MultiSearchReplaceDiffStrategy - Add UI slider control in ContextManagementSettings (80-100% range) - Add English translations for the new setting This allows users to adjust how strictly search content must match when editing files, addressing issues where models like gemini-2-flash-preview produce output with 89-96% similarity that fails with 100% exact match. Fixes #11087
Contributor
Author
Review complete. No issues identified. The implementation correctly adds a user-configurable fuzzy match threshold setting with proper type definitions, state management, and UI controls. The code follows established patterns in the codebase. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
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
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.
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.