_isAgent was a const inside the try block of handleChatSubmit, but the
catch block reads it to pick the timeout message, so a client timeout
threw a ReferenceError and left the reply bubble empty. Declare it next
to the other catch-visible variables and assign it where it is computed.