Skip to content

Commit 41cec08

Browse files
committed
fix typing
1 parent a3db073 commit 41cec08

File tree

1 file changed

+3
-3
lines changed
  • templates/types/streaming/nextjs/app/components/ui/chat/tools

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ function getArtifactVersion(
8787
let versionIndex = 1;
8888
for (const m of messages) {
8989
const toolData = m.annotations
90-
? getAnnotationData(m.annotations, "tools")
90+
? (getAnnotationData(m.annotations, "tools") as unknown as ToolData[])
9191
: null;
9292

93-
if (toolData?.some((t: any) => t.toolCall.name === "artifact")) {
94-
if (m.id === messageId) {
93+
if (toolData?.some((t) => t.toolCall.name === "artifact")) {
94+
if ("id" in m && m.id === messageId) {
9595
return versionIndex;
9696
}
9797
versionIndex++;

0 commit comments

Comments
 (0)