8000 feat: Add weighted threshold calculation for fuzzy search similarity by fede-ciliberti · Pull Request #3207 · RooVetGit/Roo-Code · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Add weighted threshold calculation for fuzzy search similarity #3207

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

Open
wants to merge 5 commits into
base: main 8000
Choose a base branch
from

Conversation

fede-ciliberti
Copy link
@fede-ciliberti fede-ciliberti commented May 6, 2025

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:

  • Added a new getWeightedThreshold function to dynamically adjust the fuzzy match threshold based on the text length, ensuring better adaptability for varying content sizes.
  • Updated fuzzy matching logic to use the weighted threshold instead of a static threshold, improving the accuracy of match detection. [1] [2]

Improvements to Error Reporting:

  • Enhanced error messages to include the dynamically calculated weighted threshold, providing more context for debugging insufficient similarity matches.

Documentation and Formatting Updates:

  • Expanded the diff format documentation with detailed rules, examples, and common errors to avoid, ensuring users adhere to the correct format. [1] [2] [3] [4]
  • Refactored regex patterns for parsing diff content into a more modular and readable structure, improving maintainability.

Minor Adjustments:

  • Normalized the 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.

  • Fuzzy Matching:
    • Add getWeightedThreshold fun 8000 ction in multi-search-replace.ts to adjust threshold based on text length.
    • Update fuzzy matching logic to use weighted threshold, improving match accuracy.
  • Error Reporting:
    • Enhance error messages to include weighted threshold for better debugging.
  • Documentation:
    • Expand diff format documentation with rules, examples, and common errors.
    • Refactor regex patterns for parsing diff content for readability.
  • Misc:
    • Normalize searchChunk input by removing trailing newlines in fuzzySearch().

This description was created by Ellipsis for 8df5d92. You can customize this summary. It will automatically update as commits are pushed.

Copy link
changeset-bot bot commented May 6, 2025

⚠️ No Changeset found

Latest commit: d1281f0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels May 6, 2025
fede-ciliberti and others added 4 commits May 6, 2025 12:10
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
…ance getWeightedThreshold logic and add tests
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval 8841 Review] in Roo Code Roadmap May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: PR [Pre Approval Review]
Development

Successfully merging this pull request may close these issues.

1 participant
0