In a word? Do it cautiously!
The fact is that almost no one, not a single one of us, speaks perfectly when we’re speaking. “People don’t always talk good.” So when you’re editing dialogue, resist the urge to edit it to perfection! Make sure this isn’t a natural way of speaking or a character-specific style.
I apply this to journal entries, emails, and texts written out in a book.
I edit only as much as needed to make sure it’s not totally confusing for the reader, and even then, only if the author didn’t specifically say it was babbling! Context is important. Natural flow is important!