src/vs/platform/terminal/node/ptyService.ts/PtyService/reviveTerminalProcesses
class PtyService:	async reviveTerminalProcesses(state: ISerializedTerminalState[], dateTimeFormatLocale: string) {
		for (const terminal of state) {
			const restoreMessage = localize('terminal-history-restored', "History restored");
			// TODO: We may at some point want to show date information in a hover via a custom sequence:
			//   new Date(terminal.timestamp).toLocaleDateString(dateTimeFormatLocale)
			//   new Date(terminal.timestamp).toLocaleTimeString(dateTimeFormatLocale)
			const newId = await this.createProcess(
				{
					...terminal.shellLaunchConfig,
					cwd: terminal.processDetails.cwd,
					color: terminal.processDetails.color,
					icon: terminal.processDetails.icon,
					name: terminal.processDetails.titleSource === TitleEventSource.Api ? terminal.processDetails.title : undefined,
					initialText: terminal.replayEvent.events[0].data + formatMessageForTerminal(restoreMessage, { loudFormatting: true })
				},
				terminal.processDetails.cwd,
				terminal.replayEvent.events[0].cols,
				terminal.replayEvent.events[0].rows,
				terminal.unicodeVersion,
				terminal.processLaunchConfig.env,
				terminal.processLaunchConfig.executableEnv,
				terminal.processLaunchConfig.options,
				true,
				terminal.processDetails.workspaceId,
				terminal.processDetails.workspaceName,
				true,
				terminal.replayEvent.events[0].data
			);
			// Don't start the process here as there's no terminal to answer CPR
			this._revivedPtyIdMap.set(terminal.id, { newId, state: terminal });
		}
	}