Skip to content

Conversation

@ulugbekna
Copy link
Contributor

No description provided.

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
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