Add support for CLS to setConfigs mid-runtime#308723
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a mid-runtime configuration override mechanism to the Copilot “chat lib” facades (NES + inline completions) so CLS can refresh settings without requiring an editor reload.
Changes:
- Added
setConfigs(overrides)toINESProviderandIInlineCompletionsProvider, and implemented it to apply overrides at runtime. - Enhanced
OverridableConfigurationServiceto support dynamicsetConfigupdates and emit configuration-change events. - Updated
DefaultsOnlyConfigurationService.setConfigsignature to matchIConfigurationService.
Show a summary per file
| File | Description |
|---|---|
| extensions/copilot/src/platform/configuration/common/defaultsOnlyConfigurationService.ts | Aligns setConfig override signature with IConfigurationService. |
| extensions/copilot/src/lib/node/chatLibMain.ts | Adds setConfigs APIs and runtime override propagation for NES + inline completions; updates config override plumbing/events. |
Copilot's findings
Comments suppressed due to low confidence (1)
extensions/copilot/src/lib/node/chatLibMain.ts:805
setConfigsinvokesthis._configurationService.setConfig(...)without awaiting/handling the returned Thenable. To avoid potential unhandled rejections and ensure determinism for callers, please either handle the promise (e.g.void ...catch(...)) or makesetConfigsreturn aPromise<void>and await the updates.
setConfigs(overrides: Map<string, unknown>) {
for (const [key, value] of overrides) {
const config = globalConfigRegistry.configs.get(`${CopilotConfigPrefix}.${key}`);
if (config) {
this._configurationService.setConfig(config, value);
}
}
if (this._completionsConfigProvider instanceof InMemoryConfigProvider) {
this._completionsConfigProvider.setCopilotSettings(Object.fromEntries(overrides));
}
- Files reviewed: 2/2 changed files
- Comments generated: 2
alexr00
approved these changes
Apr 9, 2026
joshspicer
pushed a commit
that referenced
this pull request
Apr 9, 2026
Co-authored-by: Andrea Mah <andreamah@microsoft.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.
Adds
setConfigstoINESProviderandIInlineCompletionsProviderto ensure that configs can be added. With this, editor reloads don't need to happen for config to refresh.