Skip to content

ghost: migrate to CompletionsFetchService#308494

Merged
ulugbekna merged 3 commits intomainfrom
ulugbekna/ghost-completionsfetchservice-as-default
Apr 9, 2026
Merged

ghost: migrate to CompletionsFetchService#308494
ulugbekna merged 3 commits intomainfrom
ulugbekna/ghost-completionsfetchservice-as-default

Conversation

@ulugbekna
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 8, 2026 12:47
@ulugbekna ulugbekna enabled auto-merge (squash) April 8, 2026 12:47
@ulugbekna ulugbekna self-assigned this Apr 8, 2026
Copy link
Copy Markdown
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 appears to advance the “ghost text” migration to CompletionsFetchService by changing the default for the internal experiment toggle that selects the new fetch path.

Changes:

  • Flips chat.advanced.ghostText.useCompletionsFetchService default from false to true (TeamInternal + ExperimentBased setting).
Show a summary per file
File Description
extensions/copilot/src/platform/configuration/common/configurationService.ts Enables the CompletionsFetchService-based ghost text fetch path by default via configuration.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread extensions/copilot/src/platform/configuration/common/configurationService.ts Outdated
jrieken
jrieken previously approved these changes Apr 8, 2026
@ulugbekna ulugbekna marked this pull request as draft April 8, 2026 13:11
auto-merge was automatically disabled April 8, 2026 13:11

Pull request was converted to draft

@ulugbekna ulugbekna force-pushed the ulugbekna/ghost-completionsfetchservice-as-default branch from f34d77b to d2c6698 Compare April 9, 2026 12:11
@ulugbekna ulugbekna force-pushed the ulugbekna/ghost-completionsfetchservice-as-default branch from d2c6698 to 3a9a872 Compare April 9, 2026 12:11
@ulugbekna ulugbekna marked this pull request as ready for review April 9, 2026 12:12
@ulugbekna ulugbekna enabled auto-merge (rebase) April 9, 2026 12:13
lszomoru
lszomoru previously approved these changes Apr 9, 2026
The v2 stream processor (convertStreamToApiChoices) was not setting
copilotAnnotations on the returned APIChoice objects, despite tracking
them in the CompletionAccumulator. This caused annotations (e.g., code
citations) to be lost.

Add accumulator.annotations.current to the createAPIChoice helper.
After migrating to CompletionsFetchService, LiveOpenAIFetcher no longer
calls ICompletionsFetcherService (via postRequest). Tests that mocked
the old low-level fetcher with StaticFetcher were silently bypassed.

Add StaticCompletionsFetchService adapter that bridges StaticFetcher
responses into ICompletionsFetchService by parsing SSE bodies through
jsonlStreamToCompletions. Wire it up in ghostText.test.ts and
inlineCompletion.test.ts setupCompletion helpers.
@ulugbekna ulugbekna disabled auto-merge April 9, 2026 12:56
@ulugbekna ulugbekna enabled auto-merge (squash) April 9, 2026 12:56
@ulugbekna ulugbekna merged commit 9f03a14 into main Apr 9, 2026
23 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/ghost-completionsfetchservice-as-default branch April 9, 2026 13:15
@vs-code-engineering vs-code-engineering bot added this to the 1.116.0 milestone Apr 9, 2026
joshspicer pushed a commit that referenced this pull request Apr 9, 2026
* ghost: debt: migrate to CompletionsFetchService and remove dead code

* ghost: propagate copilotAnnotations in convertStreamToApiChoices

The v2 stream processor (convertStreamToApiChoices) was not setting
copilotAnnotations on the returned APIChoice objects, despite tracking
them in the CompletionAccumulator. This caused annotations (e.g., code
citations) to be lost.

Add accumulator.annotations.current to the createAPIChoice helper.

* ghost: fix tests to mock ICompletionsFetchService for v2

After migrating to CompletionsFetchService, LiveOpenAIFetcher no longer
calls ICompletionsFetcherService (via postRequest). Tests that mocked
the old low-level fetcher with StaticFetcher were silently bypassed.

Add StaticCompletionsFetchService adapter that bridges StaticFetcher
responses into ICompletionsFetchService by parsing SSE bodies through
jsonlStreamToCompletions. Wire it up in ghostText.test.ts and
inlineCompletion.test.ts setupCompletion helpers.
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