extensions/typescript-language-features/src/typescriptServiceClient.ts/getReportIssueArgsForError
function getReportIssueArgsForError(
	error: TypeScriptServerError,
	logPath: string | undefined,
): { extensionId: string, issueTitle: string, issueBody: string } | undefined {
	if (!error.serverStack || !error.serverMessage) {
		return undefined;
	}

	// Note these strings are intentionally not localized
	// as we want users to file issues in english

	const sections = [
		`❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️`,
		`**TypeScript Version:** ${error.version.apiVersion?.fullVersionString}`,
		`**Steps to reproduce crash**

1.
2.
3.`,
	];

	if (logPath) {
		sections.push(`**TS Server Log**

❗️ Please review and upload this log file to help us diagnose this crash:

\`${logPath}\`

The log file may contain personal data, including full paths and source code from your workspace. You can scrub the log file to remove paths or other personal information.
`);
	} else {

		sections.push(`**TS Server Log**

❗️Server logging disabled. To help us fix crashes like this, please enable logging by setting:

\`\`\`json
"typescript.tsserver.log": "verbose"
\`\`\`

After enabling this setting, future crash reports will include the server log.`);
	}

	sections.push(`**TS Server Error Stack**

Server: \`${error.serverId}\`

\`\`\`
${error.serverStack}
\`\`\``);

	return {
		extensionId: 'vscode.typescript-language-features',
		issueTitle: `TS Server fatal error:  ${error.serverMessage}`,

		issueBody: sections.join('\n\n')
	};
}