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