This pull request fixes the issue with the chat window losing focus. The previous implementation had a listener for loss of focus that refocused the user input after a small delay. However, this caused the input to be refocused multiple times, leading to unexpected behavior. This pull request removes the listener and adds a new useEffect hook to refocus the user input whenever a new response is returned from the LLM.
This pull request fixes the issue with the chat window losing focus. The previous implementation had a listener for loss of focus that refocused the user input after a small delay. However, this caused the input to be refocused multiple times, leading to unexpected behavior. This pull request removes the listener and adds a new useEffect hook to refocus the user input whenever a new response is returned from the LLM.