chore: update to ai sdk v5 beta (#1074)
This commit is contained in:
parent
7d8e71383f
commit
4c281fe09d
54 changed files with 1372 additions and 1060 deletions
|
|
@ -2,11 +2,12 @@ import { codeDocumentHandler } from '@/artifacts/code/server';
|
|||
import { imageDocumentHandler } from '@/artifacts/image/server';
|
||||
import { sheetDocumentHandler } from '@/artifacts/sheet/server';
|
||||
import { textDocumentHandler } from '@/artifacts/text/server';
|
||||
import { ArtifactKind } from '@/components/artifact';
|
||||
import { DataStreamWriter } from 'ai';
|
||||
import { Document } from '../db/schema';
|
||||
import type { ArtifactKind } from '@/components/artifact';
|
||||
import type { Document } from '../db/schema';
|
||||
import { saveDocument } from '../db/queries';
|
||||
import { Session } from 'next-auth';
|
||||
import type { Session } from 'next-auth';
|
||||
import type { UIMessageStreamWriter } from 'ai';
|
||||
import type { ChatMessage } from '../types';
|
||||
|
||||
export interface SaveDocumentProps {
|
||||
id: string;
|
||||
|
|
@ -19,14 +20,14 @@ export interface SaveDocumentProps {
|
|||
export interface CreateDocumentCallbackProps {
|
||||
id: string;
|
||||
title: string;
|
||||
dataStream: DataStreamWriter;
|
||||
dataStream: UIMessageStreamWriter<ChatMessage>;
|
||||
session: Session;
|
||||
}
|
||||
|
||||
export interface UpdateDocumentCallbackProps {
|
||||
document: Document;
|
||||
description: string;
|
||||
dataStream: DataStreamWriter;
|
||||
dataStream: UIMessageStreamWriter<ChatMessage>;
|
||||
session: Session;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue