There is an indicator to the agent that stats the "visitor is typing".
The agent can see that a customer is typing in the chat window, but they won't be able "preview" the content.
Similarly the visitor will be informed that "agent is typing", nor will the visitor be able to preview the typed message.