Skip to content

Conversation

@ulugbekna
Copy link
Contributor

No description provided.

@ulugbekna ulugbekna self-assigned this Dec 18, 2025
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 18, 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 refactors the ghost text completion system to remove the command-based approach for handling accepted/dismissed telemetry in favor of a more direct approach using the handleEndOfLifetime lifecycle method.

Key Changes

  • Removed the command-based acceptance flow (_github.copilot.ghostTextPostInsert2) in favor of handling acceptance directly in handleEndOfLifetime
  • Introduced typed interfaces (GhostTextCompletionItem, GhostTextCompletionList) to store completion metadata directly rather than in command arguments
  • Fixed the type signature for partial acceptance from the incorrect intersection type number & PartialAcceptInfo to the correct union type number | PartialAcceptInfo
  • Refactored survey signal usage to call ISurveyService.signalUsage() directly instead of via command execution
  • Improved error reporting by correcting exception handler method names

Reviewed changes

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

File Description
src/extension/survey/vscode-node/surveyCommands.ts Exported the survey command ID constant (no longer used elsewhere after refactoring)
src/extension/completions-core/vscode-node/extension/src/inlineCompletion.ts Updated to use new GhostTextCompletionItem type, fixed type signature for partial accept, and corrected error messages in exception handlers
src/extension/completions-core/vscode-node/extension/src/ghostText/ghostText.ts Major refactoring: removed command-based approach, added typed interfaces, moved telemetry handling to handleEndOfLifetime with a switch statement on reason kinds, and integrated direct survey service calls
src/extension/completions-core/vscode-node/completionsServiceBridges.ts Removed the now-obsolete registerGhostTextDependencies function call that was registering the command

@ulugbekna ulugbekna removed the request for review from benibenj December 18, 2025 23:09
@ulugbekna ulugbekna marked this pull request as draft December 18, 2025 23:09
@ulugbekna ulugbekna force-pushed the ulugbekna/productive-constrictor branch from 1f043d6 to 38debc5 Compare December 18, 2025 23:12
@joaomorenoalt joaomorenoalt removed this from the December / January 2026 milestone Jan 5, 2026
@ulugbekna ulugbekna force-pushed the ulugbekna/productive-constrictor branch from 38debc5 to 2eac99e Compare January 7, 2026 11:39
@ulugbekna ulugbekna marked this pull request as ready for review January 8, 2026 10:42
@ulugbekna ulugbekna force-pushed the ulugbekna/productive-constrictor branch from 2eac99e to 80f2773 Compare January 8, 2026 10:42
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 8, 2026
@ulugbekna ulugbekna enabled auto-merge January 8, 2026 10:46
@ulugbekna ulugbekna added this pull request to the merge queue Jan 8, 2026
Merged via the queue into main with commit 8cb88eb Jan 8, 2026
19 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/productive-constrictor branch January 8, 2026 11:11
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.

5 participants