@@ -31,7 +31,6 @@ import {
3131import { en as aiEn } from "@blocknote/xl-ai/locales" ;
3232import "@blocknote/xl-ai/style.css" ;
3333import { Fieldset , MantineProvider , Switch } from "@mantine/core" ;
34- import { LanguageModelV1 } from "ai" ;
3534import { useEffect , useMemo , useState } from "react" ;
3635import { useStore } from "zustand" ;
3736
@@ -101,7 +100,8 @@ export default function App() {
101100 // Register the AI extension
102101 extensions : [
103102 createAIExtension ( {
104- model : model as LanguageModelV1 , // (type because initially it's valid)
103+ executor : model as any , // TODO
104+ // model: model as LanguageModelV1, // (type because initially it's valid)
105105 } ) ,
106106 ] ,
107107 // We set some initial content for demo purposes
@@ -136,13 +136,13 @@ export default function App() {
136136 useEffect ( ( ) => {
137137 // update the default model in the extension
138138 if ( model !== "unknown-model" ) {
139- ai . options . setState ( { model } ) ;
139+ ai . options . setState ( { executor : model as any } ) ; // TODO
140140 }
141141 } , [ model , ai . options ] ) ;
142142
143143 const [ dataFormat , setDataFormat ] = useState ( "html" ) ;
144144
145- const stream = useStore ( ai . options , ( state ) => state . stream ) ;
145+ const stream = useStore ( ai . options , ( state : any ) => state . stream ) ; // TODO
146146
147147 const themePreference = usePrefersColorScheme ( ) ;
148148 const existingContext = useBlockNoteContext ( ) ;
@@ -196,9 +196,10 @@ export default function App() {
196196
197197 < Switch
198198 checked = { stream }
199- onChange = { ( e ) =>
200- ai . options . setState ( { stream : e . target . checked } )
201- }
199+ onChange = { ( e ) => {
200+ // TODO
201+ // ai.options.setState({ stream: e.target.checked })
202+ } }
202203 label = "Streaming"
203204 />
204205 </ Fieldset >
0 commit comments