extensions/notebook-renderers/src/textHelper.ts/truncatedArrayOfString
function truncatedArrayOfString(id: string, buffer: string[], linesLimit: number, container: HTMLElement) {
	const lineCount = buffer.length;
	container.appendChild(generateViewMoreElement(id, true));

	const div = document.createElement('div');
	container.appendChild(div);
	div.appendChild(handleANSIOutput(buffer.slice(0, linesLimit - 5).join('\n')));

	// view more ...
	const viewMoreSpan = document.createElement('span');
	viewMoreSpan.innerText = '...';
	container.appendChild(viewMoreSpan);

	const div2 = document.createElement('div');
	container.appendChild(div2);
	div2.appendChild(handleANSIOutput(buffer.slice(lineCount - 5).join('\n')));
}