You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Property 'slice' does not exist on type 'string | boolean | { id: string; role: MessageRoles; content: string; }[]'.
Property 'slice' does not exist on type 'false'
Additional context
No response
The text was updated successfully, but these errors were encountered:
Description
useAIState with a key does not return the proper type
In this case chatId has a union type of any of the the properties of AIState.
The only workaround is to cast as unknown and type
Code example
When using useAIState with a key, the proper value is returned but the types are misunderstood. For the below example:
Gives the following error:
Property 'slice' does not exist on type 'string | boolean | { id: string; role: MessageRoles; content: string; }[]'.
Property 'slice' does not exist on type 'false'
Additional context
No response
The text was updated successfully, but these errors were encountered: