Skip to content

Commit d91bac5

Browse files
committed
fixes
1 parent e9bc5d6 commit d91bac5

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

agent-demo/app/document.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
getMessageWithToolCallId,
66
useChatContext,
77
} from "@/components/ChatContext";
8+
import { Chat } from "@ai-sdk/react";
89
import {
910
ActionBarPrimitive,
1011
makeAssistantTool,
@@ -50,6 +51,9 @@ const UndoActionBar = () => {
5051
<TooltipIconButton
5152
tooltip="Revert to before this change"
5253
className="aui-user-action-edit"
54+
onClick={() => {
55+
window.alert("Not implemented");
56+
}}
5357
>
5458
<UndoIcon className="size-4" />
5559
</TooltipIconButton>

agent-demo/components/BlockNoteChat.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { Chat } from "@ai-sdk/react";
22
import { BlockNoteEditor } from "@blocknote/core";
3-
import { ChatInit, UIMessage } from "ai";
4-
53
import {
64
aiDocumentFormats,
75
AIRequest,
86
buildAIRequest,
97
sendMessageWithAIRequest,
108
} from "@blocknote/xl-ai";
9+
import { ChatInit, UIMessage } from "ai";
1110

1211
// maybe better to use a custom transport for this?
1312
class BlockNoteAISDKChatRaw<
@@ -44,7 +43,7 @@ class BlockNoteAISDKChatRaw<
4443
aiDocumentFormats.html.defaultDocumentStateBuilder,
4544
}));
4645

47-
return sendMessageWithAIRequest(
46+
await sendMessageWithAIRequest(
4847
this as Chat<any>,
4948
aiRequest,
5049
message,

agent-demo/components/DocumentList.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ export const DocumentList: FC = () => {
2121

2222
const DocumentListNew: FC = () => {
2323
return (
24-
<ThreadListPrimitive.New asChild>
24+
<ThreadListPrimitive.New
25+
asChild
26+
onClick={() => {
27+
window.alert("Not implemented");
28+
}}
29+
>
2530
<Button
2631
className="aui-thread-list-new flex items-center justify-start gap-1 rounded-lg px-2.5 py-2 text-start hover:bg-muted data-active:bg-muted"
2732
variant="ghost"
@@ -79,7 +84,7 @@ const DocumentListItem: FC = () => {
7984
const DocumentListItemTitle: FC = () => {
8085
return (
8186
<span className="aui-thread-list-item-title text-sm">
82-
<ThreadListItemPrimitive.Title fallback="New Chat" />
87+
<ThreadListItemPrimitive.Title fallback="Sample Document" />
8388
</span>
8489
);
8590
};

agent-demo/components/assistant-ui/thread-list.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import type { FC } from "react";
21
import {
32
ThreadListItemPrimitive,
43
ThreadListPrimitive,
54
useAssistantState,
65
} from "@assistant-ui/react";
76
import { ArchiveIcon, PlusIcon } from "lucide-react";
7+
import type { FC } from "react";
88

9-
import { Button } from "@/components/ui/button";
109
import { TooltipIconButton } from "@/components/assistant-ui/tooltip-icon-button";
10+
import { Button } from "@/components/ui/button";
1111
import { Skeleton } from "@/components/ui/skeleton";
1212

1313
export const ThreadList: FC = () => {
@@ -75,7 +75,7 @@ const ThreadListItem: FC = () => {
7575
const ThreadListItemTitle: FC = () => {
7676
return (
7777
<span className="aui-thread-list-item-title text-sm">
78-
<ThreadListItemPrimitive.Title fallback="New Chat" />
78+
<ThreadListItemPrimitive.Title fallback="Sample Document" />
7979
</span>
8080
);
8181
};

packages/core/src/extensions/tiptap-extensions/Suggestions/SuggestionMarks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const SuggestionAddMark = Mark.create({
1212
excludes: "deletion modification insertion",
1313
addAttributes() {
1414
return {
15-
id: { default: null, validate: "number" }, // note: validate is supported in prosemirror but not in tiptap, so this doesn't actually work (considered not critical)
15+
id: { default: null, validate: "number|null" }, // note: validate is supported in prosemirror but not in tiptap, so this doesn't actually work (considered not critical)
1616
};
1717
},
1818
extendMarkSchema(extension) {
@@ -57,7 +57,7 @@ export const SuggestionDeleteMark = Mark.create({
5757
excludes: "insertion modification deletion",
5858
addAttributes() {
5959
return {
60-
id: { default: null, validate: "number" }, // note: validate is supported in prosemirror but not in tiptap
60+
id: { default: null, validate: "number|null" }, // note: validate is supported in prosemirror but not in tiptap
6161
};
6262
},
6363
extendMarkSchema(extension) {

0 commit comments

Comments
 (0)