This commit is contained in:
parent
a4085bfc89
commit
42ab656ca3
|
|
@ -113,12 +113,23 @@ const initialUIState: {
|
||||||
}[] = []
|
}[] = []
|
||||||
|
|
||||||
// AI is a provider you wrap your application with so you can access AI and UI state in your components.
|
// AI is a provider you wrap your application with so you can access AI and UI state in your components.
|
||||||
export const AI = createAI({
|
// export const AI = createAI({
|
||||||
actions: {
|
// actions: {
|
||||||
submit
|
// submit
|
||||||
},
|
// },
|
||||||
// Each state can be any shape of object, but for chat applications
|
// // Each state can be any shape of object, but for chat applications
|
||||||
// it makes sense to have an array of messages. Or you may prefer something like { id: number, messages: Message[] }
|
// // it makes sense to have an array of messages. Or you may prefer something like { id: number, messages: Message[] }
|
||||||
|
// initialUIState,
|
||||||
|
// initialAIState
|
||||||
|
// })
|
||||||
|
|
||||||
|
export const {
|
||||||
|
AIProvider,
|
||||||
|
useUIState,
|
||||||
|
useAIState,
|
||||||
|
useActions
|
||||||
|
} = createAI({
|
||||||
|
actions: { submit },
|
||||||
initialUIState,
|
initialUIState,
|
||||||
initialAIState
|
initialAIState
|
||||||
})
|
})
|
||||||
|
|
@ -54,7 +54,7 @@ export default function RootLayout({
|
||||||
disableTransitionOnChange
|
disableTransitionOnChange
|
||||||
>
|
>
|
||||||
{/* <Header /> */}
|
{/* <Header /> */}
|
||||||
<AI.AIProvider>{children}</AI.AIProvider>
|
<AIProvider>{children}</AIProvider>
|
||||||
{/* <Footer /> */}
|
{/* <Footer /> */}
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue