Skip to content

Conversation

@eidriahn
Copy link
Contributor

@eidriahn eidriahn commented Dec 30, 2025

Fixes #284229

Previously, the fuzzy scoring algorithm applied a penalty for every character skipped before the match started. This caused exact substring matches that appeared deep within a long string (e.g., matching "joint" in "github.copilot.chat.advanced.inlineEdits.jointCompletionsProvider") to be ranked lower than weaker fuzzy matches that appeared earlier (e.g., "json.maxItemsComputed").

This change modifies fuzzyScore to skip this penalty if the search pattern exists as a contiguous substring within the target word.

Copilot AI review requested due to automatic review settings December 30, 2025 17:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the fuzzy scoring algorithm to better rank exact substring matches. Previously, matches appearing deep in long strings were penalized for each skipped character before the match, causing them to rank lower than weaker fuzzy matches appearing earlier. The change modifies the penalty logic to skip it when the pattern exists as a contiguous substring.

Key Changes

  • Modified penalty calculation in fuzzyScore to conditionally apply skipped character penalties
  • Added logic to detect when a pattern exists as an exact substring within the target word
  • Improved scoring for exact substring matches that appear later in long identifiers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants