chore: rename blocks to artifacts (#793)

This commit is contained in:
Jeremy 2025-02-13 08:25:57 -08:00 committed by GitHub
parent 01f589b603
commit 81f909ac3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 473 additions and 473 deletions

View file

@ -2,7 +2,7 @@ import { DataStreamWriter, tool } from 'ai';
import { Session } from 'next-auth';
import { z } from 'zod';
import { getDocumentById, saveDocument } from '@/lib/db/queries';
import { documentHandlersByBlockKind } from '@/lib/blocks/server';
import { documentHandlersByArtifactKind } from '@/lib/artifacts/server';
interface UpdateDocumentProps {
session: Session;
@ -32,9 +32,9 @@ export const updateDocument = ({ session, dataStream }: UpdateDocumentProps) =>
content: document.title,
});
const documentHandler = documentHandlersByBlockKind.find(
(documentHandlerByBlockKind) =>
documentHandlerByBlockKind.kind === document.kind,
const documentHandler = documentHandlersByArtifactKind.find(
(documentHandlerByArtifactKind) =>
documentHandlerByArtifactKind.kind === document.kind,
);
if (!documentHandler) {