src/vs/workbench/browser/parts/notifications/notificationsViewer.ts/NotificationTemplateRenderer/renderButtons
class NotificationTemplateRenderer:	private renderButtons(notification: INotificationViewItem): void {
		clearNode(this.template.buttonsContainer);

		const primaryActions = notification.actions ? notification.actions.primary : undefined;
		if (notification.expanded && isNonEmptyArray(primaryActions)) {
			const that = this;
			const actionRunner: IActionRunner = new class extends ActionRunner {
				protected override async runAction(action: IAction): Promise<void> {
					// Run action
					that.actionRunner.run(action, notification);

					// Hide notification (unless explicitly prevented)
					if (!(action instanceof ChoiceAction) || !action.keepOpen) {
						notification.close();
					}
				}
			}();
			const buttonToolbar = this.inputDisposables.add(new ButtonBar(this.template.buttonsContainer));
			for (const action of primaryActions) {
				const buttonOptions = { title: true, /* assign titles to buttons in case they overflow */ };
				const dropdownActions = action instanceof ChoiceAction ? action.menu : undefined;
				const button = this.inputDisposables.add(
					dropdownActions
						? buttonToolbar.addButtonWithDropdown({
							...buttonOptions,
							contextMenuProvider: this.contextMenuService,
							actions: dropdownActions,
							actionRunner
						})
						: buttonToolbar.addButton(buttonOptions));
				button.label = action.label;
				this.inputDisposables.add(button.onDidClick(e => {
					if (e) {
						EventHelper.stop(e, true);
					}
					actionRunner.run(action);
				}));

				this.inputDisposables.add(attachButtonStyler(button, this.themeService));
			}
		}
	}