Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (ui/svelte): use instance-specific generateId for user messages #5252

Merged
merged 6 commits into from
Mar 20, 2025

Conversation

marwhyte
Copy link
Contributor

Fixed a bug by using the instance-specific this.#generateId() for message ID generation instead of the global generateId(). Fixes #5249.

@NeroBlackstone
Copy link

NeroBlackstone commented Mar 17, 2025

😭 Thank you very much, I hope this fix will merge soon..

@NeroBlackstone
Copy link

NeroBlackstone commented Mar 18, 2025

wait... when use I this fix, it still generate default id.

Use same code as here:
#5249

user: hello
a5EbWaoelVoPfgTw text
hello
assistant: Hello 👋! I'm ChatGLM(智谱清言), the artificial intelligence assistant, nice to meet you. Feel free to ask me any questions.
6d26ae3c-ff2d-4c7f-b3e7-e43775663c78 text
Hello 👋! I'm ChatGLM(智谱清言), the artificial intelligence assistant, nice to meet you. Feel free to ask me any questions.

Why....

@marwhyte
Copy link
Contributor Author

@NeroBlackstone Turns out there were two places that needed this fix, the append and handleSubmit methods. Should work now, I tested with your code 👍

@NeroBlackstone
Copy link

NeroBlackstone commented Mar 18, 2025

@NeroBlackstone Turns out there were two places that needed this fix, the append and handleSubmit methods. Should work now, I tested with your code 👍

YES, THIS FIX WORKED!!!

Bro, you are a hero you know???

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lgrammel
Copy link
Collaborator

Please add a patch changeset for ai/svelte with the PR title

@marwhyte
Copy link
Contributor Author

All set! @lgrammel

@lgrammel lgrammel merged commit 62b327e into vercel:main Mar 20, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

svelte Chat generateId not work?
4 participants