We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3db073 commit 41cec08Copy full SHA for 41cec08
templates/types/streaming/nextjs/app/components/ui/chat/tools/chat-tools.tsx
@@ -87,11 +87,11 @@ function getArtifactVersion(
87
let versionIndex = 1;
88
for (const m of messages) {
89
const toolData = m.annotations
90
- ? getAnnotationData(m.annotations, "tools")
+ ? (getAnnotationData(m.annotations, "tools") as unknown as ToolData[])
91
: null;
92
93
- if (toolData?.some((t: any) => t.toolCall.name === "artifact")) {
94
- if (m.id === messageId) {
+ if (toolData?.some((t) => t.toolCall.name === "artifact")) {
+ if ("id" in m && m.id === messageId) {
95
return versionIndex;
96
}
97
versionIndex++;
0 commit comments