Skip to content

Commit 75dcf10

Browse files
committed
fix build
1 parent b737ae5 commit 75dcf10

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

examples/09-ai/01-minimal/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function App() {
6464
// Register the AI extension
6565
extensions: [
6666
createAIExtension({
67-
model,
67+
executor: model as any, // TODO
6868
}),
6969
],
7070
// We set some initial content for demo purposes

examples/09-ai/02-playground/src/App.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {
3131
import { en as aiEn } from "@blocknote/xl-ai/locales";
3232
import "@blocknote/xl-ai/style.css";
3333
import { Fieldset, MantineProvider, Switch } from "@mantine/core";
34-
import { LanguageModelV1 } from "ai";
3534
import { useEffect, useMemo, useState } from "react";
3635
import { 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>

examples/09-ai/03-custom-ai-menu-items/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default function App() {
6767
// Register the AI extension
6868
extensions: [
6969
createAIExtension({
70-
model,
70+
executor: model as any, // TODO
7171
}),
7272
],
7373
// We set some initial content for demo purposes

examples/09-ai/04-with-collaboration/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default function App() {
109109
// Register the AI extension
110110
extensions: [
111111
createAIExtension({
112-
model,
112+
executor: model as any, // TODO
113113
}),
114114
],
115115
// We set some initial content for demo purposes

0 commit comments

Comments
 (0)