src/vs/workbench/api/common/extHostComments.ts/convertToModeComment
function convertToModeComment(thread: ExtHostCommentThread, commentController: ExtHostCommentController, vscodeComment: vscode.Comment, commentsMap: Map<vscode.Comment, number>): modes.Comment {
	let commentUniqueId = commentsMap.get(vscodeComment)!;
	if (!commentUniqueId) {
		commentUniqueId = ++thread.commentHandle;
		commentsMap.set(vscodeComment, commentUniqueId);
	}

	const iconPath = vscodeComment.author && vscodeComment.author.iconPath ? vscodeComment.author.iconPath.toString() : undefined;

	return {
		mode: vscodeComment.mode,
		contextValue: vscodeComment.contextValue,
		uniqueIdInThread: commentUniqueId,
		body: extHostTypeConverter.MarkdownString.from(vscodeComment.body),
		userName: vscodeComment.author.name,
		userIconPath: iconPath,
		label: vscodeComment.label,
		commentReactions: vscodeComment.reactions ? vscodeComment.reactions.map(reaction => convertToReaction(reaction)) : undefined
	};
}