chore: update to ai sdk v5 beta (#1074)

This commit is contained in:
Jeremy 2025-07-03 02:26:34 -07:00 committed by GitHub
parent 7d8e71383f
commit 4c281fe09d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
54 changed files with 1372 additions and 1060 deletions

View file

@ -7,10 +7,10 @@ export const imageArtifact = new Artifact({
kind: 'image',
description: 'Useful for image generation',
onStreamPart: ({ streamPart, setArtifact }) => {
if (streamPart.type === 'image-delta') {
if (streamPart.type === 'data-imageDelta') {
setArtifact((draftArtifact) => ({
...draftArtifact,
content: streamPart.content as string,
content: streamPart.data,
isVisible: true,
status: 'streaming',
}));

View file

@ -15,9 +15,10 @@ export const imageDocumentHandler = createDocumentHandler<'image'>({
draftContent = image.base64;
dataStream.writeData({
type: 'image-delta',
content: image.base64,
dataStream.write({
type: 'data-imageDelta',
data: image.base64,
transient: true,
});
return draftContent;
@ -33,9 +34,10 @@ export const imageDocumentHandler = createDocumentHandler<'image'>({
draftContent = image.base64;
dataStream.writeData({
type: 'image-delta',
content: image.base64,
dataStream.write({
type: 'data-imageDelta',
data: image.base64,
transient: true,
});
return draftContent;