src/vs/workbench/contrib/terminal/browser/terminalService.ts/TerminalService/_saveState
class TerminalService:	private _saveState(): void {
		if (!this.configHelper.config.enablePersistentSessions) {
			return;
		}
		const tabs = this._terminalGroupService.groups.map(g => g.getLayoutInfo(g === this._terminalGroupService.activeGroup));
		const state: ITerminalsLayoutInfoById = { tabs };
		this._primaryOffProcessTerminalService?.setTerminalLayoutInfo(state);
	}