This repository was archived by the owner on May 20, 2026. It is now read-only.
Repository navigation
Add Copilot Completions - #1493
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds Copilot Completions functionality to the extension by implementing a comprehensive completions system with prompt factory architecture, context management, and integration with OpenAI/Copilot services.
Key changes:
- Implements prompt factories for building completion prompts with workspace context and cascading allocation
- Adds networking infrastructure for communication with Copilot/OpenAI services
- Implements streaming completion processing with SSE support
- Adds language detection, file system utilities, and logging infrastructure
Reviewed Changes
Copilot reviewed 116 out of 275 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| workspaceContextPromptFactory.ts | Factory for building prompts with workspace context using virtual components |
| componentsCompletionsPromptFactory.tsx | Main declarative prompt factory with JSX-based prompt construction and context resolution |
| completionsPromptFactory.ts | Core factory interfaces and sequential/timeout handling wrappers |
| completionsPromptFactory.test.tsx | Comprehensive test suite for prompt factory functionality |
| cascadingPromptFactory.ts | Base class for cascading prompt allocation across components |
| asyncUtils.ts | Utilities for handling async operations with cancellation |
| stream.ts | SSE processor for streaming OpenAI/Copilot API responses |
| stream.test.ts | Test suite for SSE stream processing |
| openai.ts | OpenAI API integration with choice handling |
| model.ts | Model management and selection logic |
| fetch.ts | HTTP fetching infrastructure for OpenAI endpoints |
| fetch.test.ts | Tests for fetch and error handling |
| fetch.fake.ts | Test utilities for mocking fetch operations |
| config.ts | Configuration for engine/model selection |
| config.test.ts | Tests for configuration handling |
| progress.ts | Status reporting infrastructure |
| postInsertion.ts | Post-insertion tracking and telemetry |
| notificationSender.ts | User notification abstraction |
| networkingTypes.ts | Networking type definitions |
| networking.ts | Core networking fetcher abstraction |
| networkConfiguration.ts | Network endpoint configuration |
| logger.ts | Logging infrastructure with telemetry integration |
| localFileSystem.ts | Local file system implementation |
| languages.ts | Language definitions and template handling |
| languageDetection.ts | Language detection from file extensions/names |
| languageDetection.test.ts | Tests for language detection |
| generatedLanguages.ts | Generated language metadata from linguist |
| generatedLanguages.test.ts | Tests for generated languages |
| inlineCompletion.ts | Inline completion orchestration |
| radix.ts | LRU radix trie data structure |
| radix.test.ts | Tests for radix trie |
| iterableHelpers.ts | Async iterable utility functions |
| speculativeRequestCache.ts | Cache for speculative completion requests |
| telemetryNames.ts | Telemetry constant definitions |
| logging/util.ts | Logging utility functions |
| telemetryLogSender.ts | Telemetry log sender implementation |
Alexandru Dima (alexdima)
disabled auto-merge
October 22, 2025 08:30
Alexandru Dima (alexdima)
approved these changes
Oct 22, 2025
Benjamin Christopher Simmonds (benibenj)
pushed a commit
that referenced
this pull request
Oct 22, 2025
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 22, 2025
* Hello Copilot (#1493) Co-authored-by: kieferrm <4674940+kieferrm@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Fix applyPatch-tool emitting incorrect edits Started to use applyPatch in stests (`joh/slow-meerkat`) which resulted in corrected files because of bogous edits. The culprit is that the applyPatch-tool computes multiple text edits and then dispatches them to the stream via individual calls. The semantics of that is that call `N` knows new offsets after applying edits from the `N-1` call. Tho, the calls aren't made like that by the tool. Instead, it should dispatch its edit in a single call * fix windows tests --------- Co-authored-by: Benjamin Christopher Simmonds <44439583+benibenj@users.noreply.github.com> Co-authored-by: kieferrm <4674940+kieferrm@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
I am glad that you guys did this. I hope open sourcing it will bring greater improvement in less time. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes microsoft/vscode#272672