Previously the "Stop Generating" button would show when there wasn't a message being generated. This was cause by the logic check if cosmodb was loading.
Description
To address this we check if cosmodb isLoading and if there are messages in the messages array.
Contribution Checklist
[x] I have built and tested the code locally and in a deployed app
[x] For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
[x] This is a change for all users of this app. No code or asset is specific to my use case or my organization.
[x] I didn't break any existing functionality :smile:
Motivation and Context
Previously the "Stop Generating" button would show when there wasn't a message being generated. This was cause by the logic check if cosmodb was loading.
Description
To address this we check if cosmodb![Screenshot 2024-06-12 121349](https://github.com/microsoft/sample-app-aoai-chatGPT/assets/994856/95db8493-f157-4d5c-952a-2ffdc897244e)
isLoading
and if there are messages in the messages array.Contribution Checklist