File tree 2 files changed +5
-5
lines changed
templates/types/streaming/nextjs/app/components/ui/chat
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
"use client" ;
2
2
3
- import { getCustomAnnotationData , useChatMessage } from "@llamaindex/chat-ui" ;
3
+ import { getCustomAnnotation , useChatMessage } from "@llamaindex/chat-ui" ;
4
4
import {
5
5
AlertCircle ,
6
6
CheckCircle2 ,
@@ -146,7 +146,7 @@ export function DeepResearchCard({ className }: DeepResearchCardProps) {
146
146
const { message } = useChatMessage ( ) ;
147
147
148
148
const state = useMemo ( ( ) => {
149
- const deepResearchEvents = getCustomAnnotationData < DeepResearchEvent > (
149
+ const deepResearchEvents = getCustomAnnotation < DeepResearchEvent > (
150
150
message . annotations ,
151
151
( annotation ) => annotation ?. type === "deep_research_event" ,
152
152
) ;
Original file line number Diff line number Diff line change 1
1
import {
2
2
Message ,
3
3
MessageAnnotation ,
4
- getAnnotationData ,
4
+ getChatUIAnnotation ,
5
5
useChatMessage ,
6
6
useChatUI ,
7
7
} from "@llamaindex/chat-ui" ;
@@ -22,7 +22,7 @@ export function ToolAnnotations() {
22
22
// Get the tool data from the message annotations
23
23
const annotations = message . annotations as MessageAnnotation [ ] | undefined ;
24
24
const toolData = annotations
25
- ? ( getAnnotationData ( annotations , "tools" ) as unknown as ToolData [ ] )
25
+ ? ( getChatUIAnnotation ( annotations , "tools" ) as unknown as ToolData [ ] )
26
26
: null ;
27
27
return toolData ?. [ 0 ] ? (
28
28
< ChatTools data = { toolData [ 0 ] } artifactVersion = { artifactVersion } />
@@ -89,7 +89,7 @@ function getArtifactVersion(
89
89
let versionIndex = 1 ;
90
90
for ( const m of messages ) {
91
91
const toolData = m . annotations
92
- ? ( getAnnotationData ( m . annotations , "tools" ) as unknown as ToolData [ ] )
92
+ ? ( getChatUIAnnotation ( m . annotations , "tools" ) as unknown as ToolData [ ] )
93
93
: null ;
94
94
95
95
if ( toolData ?. some ( ( t ) => t . toolCall . name === "artifact" ) ) {
You can’t perform that action at this time.
0 commit comments