ghost: migrate to CompletionsFetchService#308494
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.useCompletionsFetchServicedefault fromfalsetotrue(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
jrieken
previously approved these changes
Apr 8, 2026
auto-merge was automatically disabled
April 8, 2026 13:11
Pull request was converted to draft
f34d77b to
d2c6698
Compare
d2c6698 to
3a9a872
Compare
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.
lszomoru
approved these changes
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.