Add support for organization custom instructions#2310
Merged
Conversation
6 tasks
…com/microsoft/vscode-copilot-chat into pawang/customAgentProviderFollowups
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for organization-level custom instructions in GitHub Copilot, allowing organizations to provide centralized instruction prompts that can be used across their repositories. The implementation follows a similar pattern to the existing organization/enterprise custom agents feature.
Key Changes
- Added a new VS Code API for instructions providers (
InstructionsProviderinterface) - Implemented
OrganizationInstructionsProviderthat fetches and caches organization-level custom instructions from GitHub - Added configuration setting
github.copilot.chat.customInstructions.showOrganizationInstructionsto enable/disable the feature
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/extension/vscode.proposed.chatParticipantPrivate.d.ts |
Added InstructionsProvider interface and registerInstructionsProvider API |
src/platform/github/common/githubService.ts |
Added getOrgCustomInstructions method to IOctoKitService interface |
src/platform/github/common/octoKitServiceImpl.ts |
Implemented getOrgCustomInstructions to fetch instructions from GitHub API |
src/extension/agents/vscode-node/organizationInstructionsProvider.ts |
New provider implementation that manages caching and retrieval of org instructions |
src/extension/agents/vscode-node/organizationInstructionsContrib.ts |
New contribution that registers the instructions provider when enabled |
src/extension/extension/vscode-node/contributions.ts |
Registered the new OrganizationInstructionsContribution |
src/platform/configuration/common/configurationService.ts |
Added ShowOrganizationInstructions configuration key |
package.json |
Added activation event, configuration setting definition |
package.nls.json |
Added localization string for the new setting |
src/extension/agents/vscode-node/test/organizationAndEnterpriseAgentProvider.spec.ts |
Updated mock to include getOrgCustomInstructions method (with type mismatch issue) |
src/extension/agents/vscode-node/organizationInstructionsProvider.ts
Outdated
Show resolved
Hide resolved
src/extension/agents/vscode-node/test/organizationAndEnterpriseAgentProvider.spec.ts
Outdated
Show resolved
Hide resolved
src/extension/agents/vscode-node/organizationInstructionsProvider.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…der.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…com/microsoft/vscode-copilot-chat into pawang/customAgentProviderFollowups
…pawang/customAgentProviderFollowups
…pawang/customAgentProviderFollowups
src/extension/agents/vscode-node/test/githubOrgCustomAgentProvider.spec.ts
Dismissed
Show dismissed
Hide dismissed
mjbvz
approved these changes
Jan 22, 2026
eleanorjboyd
pushed a commit
to eleanorjboyd/vscode-copilot-chat
that referenced
this pull request
Jan 23, 2026
* PR * activation * fix test * wip * update * tests * Update src/platform/github/common/githubService.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/extension/agents/vscode-node/organizationInstructionsProvider.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/platform/github/common/octoKitServiceImpl.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * update * update setting name * wip * fix * use enum * PR * nit * add polling * tests * cleanup * use helper * remove instructions * clean * Revert "clean" This reverts commit d00db38. * Revert "remove instructions" This reverts commit 24f3e2e. * update * update per discussion * clean * update * update * Update * update * update * clean * test * test * fixes * fixes * fix tests * update test * yaml * fix * config update * clean * fix --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Fixes microsoft/vscode#276636