in the folder named "07-streaming" code ,While using Chainlit with Runner.run_streamed() and msg.stream_token(token), the message keeps showing the loading spinner even after the response finishes streaming.
After some trial and error, I found that adding
await @msg.send()
after the streaming loop finalizes the message and stops the spinner.
Suggested improvement:
Consider documenting this in the streaming example.
Or better yet, automatically finalize the message when streaming ends, unless explicitly held open.