comment-anything rewritten in functional style (client part)