Found the relevant code:
var c=this.jDiv.find(".comment-form");
c.find(".discussion-info").length ||
($("<div style='margin:12px 0 3px; font-weight:bold' class='discussion-info'>Please avoid extended discussions in comments. Would you like to <a href='#'>automatically move this discussion to chat?</a></div>")
.find("a").click(function(a){
$(this).unbind("click");
a.preventDefault();
b.ajax({url:"/posts/"+b.postId+"/move-discussion-to-chat", data:{fkey:StackExchange.options.user.fkey},type:"POST"},"when trying to move the discussion to chat",c).done(function(a){a.success?window.location.href=a.message:StackExchange.helpers.showErrorPopup(c,a.message)})}).end().prependTo(c),a.remove())}}});
So, we can see that it is doing a POST to /posts/{postId}/move-discussion-to-chat
and StackExchange.options.user.fkey
is passed along; this would require an user script to replicate. Simply because you can only make GET requests through your address bar...
Here are observations when reproducing this:
It does not work on Meta.SU, simply because there is no chat for Meta.SU.
This does not work on posts you are not involved in, luckily...