src/vs/workbench/api/common/extHostComments.ts/ExtHostComments/constructor
class ExtHostComments:	constructor(
		mainContext: IMainContext,
		commands: ExtHostCommands,
		private readonly _documents: ExtHostDocuments,
	) {
		this._proxy = mainContext.getProxy(MainContext.MainThreadComments);

		commands.registerArgumentProcessor({
			processArgument: arg => {
				if (arg && arg.$mid === MarshalledId.CommentController) {
					const commentController = this._commentControllers.get(arg.handle);

					if (!commentController) {
						return arg;
					}

					return commentController;
				} else if (arg && arg.$mid === MarshalledId.CommentThread) {
					const commentController = this._commentControllers.get(arg.commentControlHandle);

					if (!commentController) {
						return arg;
					}

					const commentThread = commentController.getCommentThread(arg.commentThreadHandle);

					if (!commentThread) {
						return arg;
					}

					return commentThread;
				} else if (arg && arg.$mid === MarshalledId.CommentThreadReply) {
					const commentController = this._commentControllers.get(arg.thread.commentControlHandle);

					if (!commentController) {
						return arg;
					}

					const commentThread = commentController.getCommentThread(arg.thread.commentThreadHandle);

					if (!commentThread) {
						return arg;
					}

					return {
						thread: commentThread,
						text: arg.text
					};
				} else if (arg && arg.$mid === MarshalledId.CommentNode) {
					const commentController = this._commentControllers.get(arg.thread.commentControlHandle);

					if (!commentController) {
						return arg;
					}

					const commentThread = commentController.getCommentThread(arg.thread.commentThreadHandle);

					if (!commentThread) {
						return arg;
					}

					let commentUniqueId = arg.commentUniqueId;

					let comment = commentThread.getCommentByUniqueId(commentUniqueId);

					if (!comment) {
						return arg;
					}

					return comment;

				} else if (arg && arg.$mid === MarshalledId.CommentThreadNode) {
					const commentController = this._commentControllers.get(arg.thread.commentControlHandle);

					if (!commentController) {
						return arg;
					}

					const commentThread = commentController.getCommentThread(arg.thread.commentThreadHandle);

					if (!commentThread) {
						return arg;
					}

					let body = arg.text;
					let commentUniqueId = arg.commentUniqueId;

					let comment = commentThread.getCommentByUniqueId(commentUniqueId);

					if (!comment) {
						return arg;
					}

					comment.body = body;
					return comment;
				}

				return arg;
			}
		});
	}