vercel / ai

Build AI-powered applications with React, Svelte, Vue, and Solid
https://sdk.vercel.ai/docs
Other
10.18k stars 1.53k forks source link

feat (ui/solid): useAssistant, useObject, fix deep object updating #3829

Closed lgrammel closed 18 hours ago

lgrammel commented 20 hours ago

Summary

Continues #3823 & fixes #3797

Tasks

socket-security[bot] commented 20 hours ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@solid-primitives/trigger@1.1.0 None +1 86.3 kB thetarnav.

View full report↗︎

lgrammel commented 19 hours ago

@ian-pascoe reverted a few changes around the api to prevent breakages and to keep the apis consistent between frameworks. please let me know if this addresses your issues or if i've reverted anything important that has unwanted side effects.

ian-pascoe commented 19 hours ago

@ian-pascoe reverted a few changes around the api to prevent breakages and to keep the apis consistent between frameworks. please let me know if this addresses your issues or if i've reverted anything important that has unwanted side effects.

https://github.com/vercel/ai/pull/3829/commits/b549bf2d786ab88c698e1ab737c57c6aaea4a859

These reverts are fine, but the reason I updated it is because when you use the accessor method, the options become reactive. With the current version, they are not.

Figured it was good to show the ability for reactive props in the examples

lgrammel commented 19 hours ago

@ian-pascoe fair point. I'll leave them as is, because I want to keep the examples between the frameworks as aligned as possible and this seems like additional SolidJS functionality.