ai-chatbot icon indicating copy to clipboard operation
ai-chatbot copied to clipboard

chat history refresh regression

Open joshweir opened this issue 1 year ago • 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?: https://github.com/vercel/ai-chatbot/commit/c35fae4489e156ca945900784c9f09a6d67a9fa9

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

joshweir avatar Jan 29 '24 03:01 joshweir

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

brianprost avatar Feb 08 '24 15:02 brianprost

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}`)
        }
      }

mrmps avatar Feb 13 '24 00:02 mrmps