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
We are using the styled components, and trying to create a Suggestions for the ThreadWelcome. We are following the directions here: https://www.assistant-ui.com/docs/ui/styled/Decomposition#threadwelcomesuggestions. The relevant code snippet is below. We can't get this to work (we have used decomposition on other components successfully). But when we try the code below, we get the following error: "TypeError: Cannot read properties of undefined (reading 'text')" and the page won't build. We also get the following typescript error: "Type '{ prompt: string; }' is not assignable to type 'IntrinsicAttributes & ThreadWelcomeSuggestionProps'.
Property 'prompt' does not exist on type 'IntrinsicAttributes & ThreadWelcomeSuggestionProps'.ts(2322)". Any ideas on what we are doing wrong?
exportconstMyThread: FC<ThreadConfig>=(config)=>{return(<Thread.Rootconfig={config}><Thread.Viewport><MyThreadWelcome/><Thread.Messagescomponents={{UserMessage: MyUserMessage2,AssistantMessage: MyAssistantMessage2}}/><Thread.FollowupSuggestions/><Thread.ViewportFooter><Thread.ScrollToBottom/><Composer/></Thread.ViewportFooter></Thread.Viewport></Thread.Root>);};constMyThreadWelcome: FC=()=>{return(<ThreadWelcome.Root><ThreadWelcome.Center><ThreadWelcome.Avatar/>{/*<ThreadWelcome.Message />*/}<div>How can we help you today?</div></ThreadWelcome.Center><MyThreadWelcomeSuggestions/></ThreadWelcome.Root>);};constMyThreadWelcomeSuggestions: FC=()=>{return(<divclassName="aui-thread-welcome-suggestion-container"><ThreadWelcome.Suggestionprompt="Write me a poem about the weather"/><ThreadWelcome.Suggestionprompt="What is assistant-ui?"/></div>);};
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We are using the styled components, and trying to create a Suggestions for the ThreadWelcome. We are following the directions here: https://www.assistant-ui.com/docs/ui/styled/Decomposition#threadwelcomesuggestions. The relevant code snippet is below. We can't get this to work (we have used decomposition on other components successfully). But when we try the code below, we get the following error: "TypeError: Cannot read properties of undefined (reading 'text')" and the page won't build. We also get the following typescript error: "Type '{ prompt: string; }' is not assignable to type 'IntrinsicAttributes & ThreadWelcomeSuggestionProps'.
Property 'prompt' does not exist on type 'IntrinsicAttributes & ThreadWelcomeSuggestionProps'.ts(2322)". Any ideas on what we are doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions