Closed
Description
Description
When there is an ongoing AI streaming, switching the chat ID and causing a re-render of useChat can lead to some abnormal situations.
The data from the ongoing AI stream will overwrite the data of the newly switched chat ID.
Code example
<ParentComponent /> (useChat)
<FirstChild messages={messages} />
<Button>Swtich Chat ID</Button>
<SecondChild />
Additional context
All client components, and all the data have been fully loaded on client.
No response