vercel/ai-chatbot

chat history refresh regression

Opened this issue · 2 comments

Seems like there is a chat history refresh regression, currently the chat history does not refresh for new chat.

It was fixed here:
https://github.com/vercel/ai-chatbot/pull/161/files (I made this change locally and it fixes the bug).

Seems to have regressed here?:
c35fae4

specifically the change made to this file: components/chat.tsx

I think this had something to do with the NextJS 14.1 update. If you upgrade to 14.1, you get a Type error:

image

I think this had something to do with the NextJS 14.1 update. If you upgrade to 14.1, you get a Type error:

image

Solution that worked for me is to just use:

onFinish() {
        if (!path.includes('chat')) {
          router.replace(`/chat/${id}`)
        }
      }