src/vs/workbench/contrib/terminal/browser/terminalView.ts/SingleTerminalTabActionViewItem/constructor
class SingleTerminalTabActionViewItem:	constructor(
		action: IAction,
		private readonly _actions: IAction[],
		@IKeybindingService keybindingService: IKeybindingService,
		@INotificationService notificationService: INotificationService,
		@IContextKeyService contextKeyService: IContextKeyService,
		@ITerminalService private readonly _terminalService: ITerminalService,
		@ITerminalGroupService private readonly _terminalGroupService: ITerminalGroupService,
		@IThemeService private readonly _themeService: IThemeService,
		@IContextMenuService private readonly _contextMenuService: IContextMenuService,
		@ICommandService private readonly _commandService: ICommandService,
	) {
		super(new MenuItemAction(
			{
				id: action.id,
				title: getSingleTabLabel(_terminalService.activeInstance),
				tooltip: getSingleTabTooltip(_terminalService.activeInstance)
			},
			{
				id: TerminalCommandId.Split,
				title: terminalStrings.split.value,
				icon: Codicon.splitHorizontal
			},
			undefined,
			contextKeyService,
			_commandService
		), keybindingService, notificationService);

		// Register listeners to update the tab
		this._register(this._terminalService.onInstancePrimaryStatusChanged(e => this.updateLabel(e)));
		this._register(_terminalGroupService.onDidChangeActiveInstance(() => this.updateLabel()));
		this._register(this._terminalService.onInstanceIconChanged(e => this.updateLabel(e)));
		this._register(this._terminalService.onInstanceTitleChanged(e => {
			if (e === this._terminalService.activeInstance) {
				this._action.tooltip = getSingleTabTooltip(e);
				this.updateLabel();
			}
		}));

		// Clean up on dispose
		this._register(toDisposable(() => dispose(this._elementDisposables)));
	}