src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts/TerminalGroupService/showPanel
class TerminalGroupService:	async showPanel(focus?: boolean): Promise<void> {
		const pane = this._viewsService.getActiveViewWithId(TERMINAL_VIEW_ID)
			?? await this._viewsService.openView(TERMINAL_VIEW_ID, focus);
		pane?.setExpanded(true);

		if (focus) {
			// Do the focus call asynchronously as going through the
			// command palette will force editor focus
			await timeout(0);
			const instance = this.activeInstance;
			if (instance) {
				await instance.focusWhenReady(true);
				// HACK: as a workaround for https://github.com/microsoft/vscode/issues/134692,
				// this will trigger a forced refresh of the viewport to sync the viewport and scroll bar.
				// This can likely be removed after https://github.com/xtermjs/xterm.js/issues/291 is
				// fixed upstream.
				instance.setVisible(true);
			}
		}
		this._onDidShow.fire();
	}