feat: Add weighted threshold calculation for fuzzy search similarity #3207
+139
−77
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.
This pull request introduces several updates to the multi-search-replace strategy in
src/core/diff/strategies/multi-search-replace.ts
. Key changes include the addition of a weighted threshold for fuzzy matching, improvements to error reporting, and enhanced documentation for the diff format. These updates aim to make the fuzzy search more adaptive, improve error clarity, and ensure proper usage of the diff format.Enhancements to Fuzzy Matching:
getWeightedThreshold
function to dynamically adjust the fuzzy match threshold based on the text length, ensuring better adaptability for varying content sizes.Improvements to Error Reporting:
Documentation and Formatting Updates:
Minor Adjustments:
searchChunk
input by removing trailing newlines to prevent mismatches during fuzzy search.Important
Add weighted threshold for fuzzy matching in
multi-search-replace.ts
, enhance error reporting, and expand diff format documentation.getWeightedThreshold
fun 8000 ction inmulti-search-replace.ts
to adjust threshold based on text length.searchChunk
input by removing trailing newlines infuzzySearch()
.This description was created by
for 8df5d92. You can customize this summary. It will automatically update as commits are pushed.