Merge pull request #4005 from ajshedivy/hotfix/reloadConfig-with-context-providers

Refactor reloadConfig method to reference additional context providers
This commit is contained in:
Patrick Erichsen 2025-02-06 18:19:28 -08:00 • committed by GitHub
commit fd6e9641e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -365,11 +365,11 @@ export class ConfigHandler {
this.updateListeners.push(listener);
}
async reloadConfig(additionalContextProviders: IContextProvider[] = []) {
async reloadConfig() {
// TODO: this isn't right, there are two different senses in which you want to "reload"
const { config, errors, configLoadInterrupted } =
await this.currentProfile.reloadConfig(additionalContextProviders);
await this.currentProfile.reloadConfig(this.additionalContextProviders);
if (config) {
this.inactiveProfiles.forEach((profile) => profile.clearConfig());
@ -419,6 +419,6 @@ export class ConfigHandler {
registerCustomContextProvider(contextProvider: IContextProvider) {
this.additionalContextProviders.push(contextProvider);
void this.reloadConfig(this.additionalContextProviders);
void this.reloadConfig();
}
}