Prevent sending messages in chat if the previous response hasn't finished
Right now, if the user calls sendMessage or sendMessageStream before the last exchange has completed, we just put it in a queue (promise chain) and send it when the last response completes. This can cause unexpected output, as the user perceives that they sent two messages in a row with no response in between (history is user-user-model), whereas the backend actually responded to the first user message before seeing the second one (user-model-user). We should throw an error (or no-op and warn) to let the user know they are trying to send a message before the last response completed, and may get unexpected results.
@IvanLH Can you please assign me this issue? So I can look on the issue.