Editing chat window to reduce data losd stored

Hi! Is there a way that I can cut text from a longrunning chst window? I want to reduce the amount of data that is accumulating over time, to prevent a crash.