src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts/LocalTerminalBackend/persistTerminalState
class LocalTerminalBackend:	async persistTerminalState(): Promise<void> {
		const ids = Array.from(this._ptys.keys());
		const serialized = await this._localPtyService.serializeTerminalState(ids);
		this._storageService.store(TerminalStorageKeys.TerminalBufferState, serialized, StorageScope.WORKSPACE, StorageTarget.MACHINE);
	}