Skip to content

Conversation

@ulugbekna
Copy link
Contributor

this would sometimes prevent good NES edits from being shown

based on #2478

Copilot AI review requested due to automatic review settings December 8, 2025 11:26
@ulugbekna ulugbekna self-assigned this Dec 8, 2025
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 fixes a bug where the ghost-text provider (joint inline completion provider) was returning no-op edits to the UI, which could prevent good NES (Next Edit Suggestions) edits from being shown. The fix introduces filtering logic to detect and ignore completions/edits that don't actually change the document content.

Key Changes

  • Refactored in-flight request tracking from counters to Set-based tracking with proper cancellation token handling
  • Added retainOnlyMeaningfulEdits method to filter out no-op edits by comparing the original text with the proposed insertion
  • Updated _returnCompletionsOrOtherwiseNES to filter both completions and NES responses before returning them

chrmarti
chrmarti previously approved these changes Dec 8, 2025
@ulugbekna ulugbekna added this pull request to the merge queue Dec 8, 2025
@ulugbekna ulugbekna removed this pull request from the merge queue due to a manual request Dec 8, 2025
this would sometimes prevent good NES edits from being shown
@ulugbekna ulugbekna force-pushed the ulugbekna/nes-joint-ignore-noop-completions branch from 0c6e5cb to 48892af Compare December 8, 2025 11:50
@ulugbekna ulugbekna enabled auto-merge December 8, 2025 11:50
@ulugbekna ulugbekna added this pull request to the merge queue Dec 8, 2025
Merged via the queue into main with commit 7bc2873 Dec 8, 2025
16 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/nes-joint-ignore-noop-completions branch December 8, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants