src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.ts/parseSerializedSearchEditor
export const parseSerializedSearchEditor = (text: string) => {
	const headerlines = [];
	const bodylines = [];

	let inHeader = true;
	for (const line of text.split(/\r?\n/g)) {
		if (inHeader) {
			headerlines.push(line);
			if (line === '') {
				inHeader = false;
			}
		} else {
			bodylines.push(line);
		}
	}

	return { config: extractSearchQueryFromLines(headerlines), text: bodylines.join('\n') };
};