-
Notifications
You must be signed in to change notification settings - Fork 2k
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
In sveltekit, Chat
cannot switch content based on routing
#5259
Comments
Can you share code for Chat component ? |
Hi, hello, Do you have any solution for this problem? |
const chat = new Chat({
get id() {
return id;
}
});
$effect.pre(() => {
chat.messages = data.messages
})
I prefer the latter; the only downside is that creating a new chat instance will destroy the old one, so if you're relying on the |
Thank you very much, very useful! This is worth documenting. I won't close this issue. Maybe I will make a PR one day. But I'm busy recently. Thank you again. @elliott-with-the-longest-name-on-github |
Description
I use Svelte ai sdk 2.0 and I found
Chat
cannot switch content based on routing, I'm not sure it's a bug or there is a problem with my usage:Code example
+page.svlete:
+page.ts
and at first it load data well:
but go another page:
AI provider
No response
Additional context
No response
@elliott-with-the-longest-name-on-github Could you please check this?
The text was updated successfully, but these errors were encountered: