Skip to content

Commit 86610e6

Browse files
committed
rename function in chat-ui
1 parent 0e4ee4a commit 86610e6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

templates/types/streaming/nextjs/app/components/ui/chat/custom/deep-research-card.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { getCustomAnnotationData, useChatMessage } from "@llamaindex/chat-ui";
3+
import { getCustomAnnotation, useChatMessage } from "@llamaindex/chat-ui";
44
import {
55
AlertCircle,
66
CheckCircle2,
@@ -146,7 +146,7 @@ export function DeepResearchCard({ className }: DeepResearchCardProps) {
146146
const { message } = useChatMessage();
147147

148148
const state = useMemo(() => {
149-
const deepResearchEvents = getCustomAnnotationData<DeepResearchEvent>(
149+
const deepResearchEvents = getCustomAnnotation<DeepResearchEvent>(
150150
message.annotations,
151151
(annotation) => annotation?.type === "deep_research_event",
152152
);

templates/types/streaming/nextjs/app/components/ui/chat/tools/chat-tools.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
Message,
33
MessageAnnotation,
4-
getAnnotationData,
4+
getChatUIAnnotation,
55
useChatMessage,
66
useChatUI,
77
} from "@llamaindex/chat-ui";
@@ -22,7 +22,7 @@ export function ToolAnnotations() {
2222
// Get the tool data from the message annotations
2323
const annotations = message.annotations as MessageAnnotation[] | undefined;
2424
const toolData = annotations
25-
? (getAnnotationData(annotations, "tools") as unknown as ToolData[])
25+
? (getChatUIAnnotation(annotations, "tools") as unknown as ToolData[])
2626
: null;
2727
return toolData?.[0] ? (
2828
<ChatTools data={toolData[0]} artifactVersion={artifactVersion} />
@@ -89,7 +89,7 @@ function getArtifactVersion(
8989
let versionIndex = 1;
9090
for (const m of messages) {
9191
const toolData = m.annotations
92-
? (getAnnotationData(m.annotations, "tools") as unknown as ToolData[])
92+
? (getChatUIAnnotation(m.annotations, "tools") as unknown as ToolData[])
9393
: null;
9494

9595
if (toolData?.some((t) => t.toolCall.name === "artifact")) {

0 commit comments

Comments
 (0)