Skip to content

Fix import suggestions#2715

Merged
benibenj merged 1 commit intomainfrom
benibenj/slippery-leopon
Jan 5, 2026
Merged

Fix import suggestions#2715
benibenj merged 1 commit intomainfrom
benibenj/slippery-leopon

Conversation

@benibenj
Copy link
Collaborator

@benibenj benibenj commented Jan 5, 2026

Copilot Generated Description: Update import statements and enhance the DiagnosticsNextEditProvider class to improve handling of diagnostic edits, including better cancellation logic and state management. Add a toString method for DiagnosticCompletionItem.

Copilot AI review requested due to automatic review settings January 5, 2026 21:59
@benibenj benibenj self-assigned this Jan 5, 2026
@benibenj benibenj enabled auto-merge January 5, 2026 21:59
@vs-code-engineering vs-code-engineering bot added this to the December 2025 milestone Jan 5, 2026
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 refactors the diagnostics-based inline edit provider to improve state management and cancellation handling. The changes replace a polling-based approach with an event-driven model using workInProgress tracking and the raceCancellation utility.

Key Changes:

  • Introduced workInProgress field to track async operation state across the diagnostics completion system
  • Refactored runUntilNextEdit to use event-driven waiting instead of polling via getNextUpdatedState
  • Enhanced timeout logic for diagnostics provider to calculate remaining time dynamically

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
inlineCompletionProvider.ts Added clamp import and improved diagnostics timeout calculation to respect remaining request time
diagnosticsInlineEditProvider.ts Added workInProgress tracking, refactored runUntilNextEdit to use raceCancellation with event listeners, made getNextEdit throw error
diagnosticsCompletionProcessor.ts Added workInProgress field to state, simplified _getDiagnostics return type, removed getNextUpdatedState method, refactored AsyncWorker to track work-in-progress state
diagnosticsCompletions.ts Added toString method to DiagnosticCompletionItem for better debugging

@benibenj benibenj added this pull request to the merge queue Jan 5, 2026
Merged via the queue into main with commit 5733abc Jan 5, 2026
25 checks passed
@benibenj benibenj deleted the benibenj/slippery-leopon branch January 5, 2026 22:51
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.

2 participants