Skip to content

Commit ec84917

Browse files
Display "Manage Dynamic Auth Providers" in Account menu (microsoft#258879)
This seems like the best place for now. It either is shown: * Under an account if one is available * Top level if there are no accounts Fixes microsoft#258523
1 parent 6d27f12 commit ec84917

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/vs/workbench/browser/parts/globalCompositeBar.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,15 @@ export class AccountsActivityActionViewItem extends AbstractGlobalActivityAction
427427
for (const providerId of dynamicProviders) {
428428
const provider = this.authenticationService.getProvider(providerId);
429429
const accounts = this.groupedAccounts.get(providerId);
430+
// Provide _some_ discoverable way to manage dynamic authentication providers.
431+
// This will either show up inside the account submenu or as a top-level menu item if there
432+
// are no accounts.
433+
const manageDynamicAuthProvidersAction = toAction({
434+
id: 'manageDynamicAuthProviders',
435+
label: localize('manageDynamicAuthProviders', "Manage Dynamic Authentication Providers..."),
436+
enabled: true,
437+
run: () => this.commandService.executeCommand('workbench.action.removeDynamicAuthenticationProviders')
438+
});
430439
if (!accounts) {
431440
if (this.problematicProviders.has(providerId)) {
432441
const providerUnavailableAction = disposables.add(new Action('providerUnavailable', localize('authProviderUnavailable', '{0} is currently unavailable', provider.label), undefined, false));
@@ -438,6 +447,7 @@ export class AccountsActivityActionViewItem extends AbstractGlobalActivityAction
438447
this.logService.error(e);
439448
}
440449
}
450+
menus.push(manageDynamicAuthProvidersAction);
441451
continue;
442452
}
443453

@@ -458,6 +468,7 @@ export class AccountsActivityActionViewItem extends AbstractGlobalActivityAction
458468
run: () => this.commandService.executeCommand('_manageTrustedMCPServersForAccount', { providerId, accountLabel: account.label })
459469
});
460470
providerSubMenuActions.push(manageMCPAction);
471+
providerSubMenuActions.push(manageDynamicAuthProvidersAction);
461472
if (account.canSignOut) {
462473
providerSubMenuActions.push(toAction({
463474
id: 'signOut',

0 commit comments

Comments
 (0)