experimental_streamdata cannot be reset/cleared from the useChat hook
We use the experimental_streamdata to generate dynamic user response options to each chat message. So when the user manually clears chat history, we would like to be able to clear the streamed data and reset everything. If there is no way to do that now, could we have a setData function so that we can reset data?
@dilanustek for a temporary hotfix i think you can manually mutate the useSWR hook take a look here: https://github.com/vercel/ai/blob/2309a24bfd02e4bcef81e3f9984c7724c67f674c/packages/core/react/use-chat.ts#L362 or if you want you can just create your own useChat and export the mutateStreamData :)
const { data: streamData, mutate: mutateStreamData } = useSWR<any>(
[chatId, 'streamData'],
null,
);
https://github.com/vercel/ai/pull/3271