-
Notifications
You must be signed in to change notification settings - Fork 1.5k
nes: joint: fix ghost-text provider returning no-op edits to UI #2479
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
Conversation
There was a problem hiding this 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
retainOnlyMeaningfulEditsmethod to filter out no-op edits by comparing the original text with the proposed insertion - Updated
_returnCompletionsOrOtherwiseNESto filter both completions and NES responses before returning them
src/extension/inlineEdits/vscode-node/jointInlineCompletionProvider.ts
Outdated
Show resolved
Hide resolved
src/extension/inlineEdits/vscode-node/jointInlineCompletionProvider.ts
Outdated
Show resolved
Hide resolved
this would sometimes prevent good NES edits from being shown
0c6e5cb to
48892af
Compare
this would sometimes prevent good NES edits from being shown
based on #2478