This feature is available starting from Talk 2.4.0.

A long Talk comment gets collapsed automatically if it is:

To expand an inactive collapsed Talk comment or inactive collapsed discussions, which first or last comment is collapsed, select that Talk comment or discussion.

In active Talk comments and discussions you can use the 'Show less' and 'Show more' buttons to collapse and expand long comments.

When you click somewhere on the page or select another talk, your long comments get collapsed again.