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

@ -9,11 +9,11 @@ import { ChatHeader } from '@/components/chat-header';
import type { Vote } from '@/lib/db/schema';
import { fetcher, generateUUID } from '@/lib/utils';
import { Block } from './block';
import { Artifact } from './artifact';
import { MultimodalInput } from './multimodal-input';
import { Messages } from './messages';
import { VisibilityType } from './visibility-selector';
import { useBlockSelector } from '@/hooks/use-block';
import { useArtifactSelector } from '@/hooks/use-artifact';
import { toast } from 'sonner';
export function Chat({
@ -62,7 +62,7 @@ export function Chat({
);
const [attachments, setAttachments] = useState<Array<Attachment>>([]);
const isBlockVisible = useBlockSelector((state) => state.isVisible);
const isArtifactVisible = useArtifactSelector((state) => state.isVisible);
return (
<>
@ -82,7 +82,7 @@ export function Chat({
setMessages={setMessages}
reload={reload}
isReadonly={isReadonly}
isBlockVisible={isBlockVisible}
isArtifactVisible={isArtifactVisible}
/>
<form className="flex mx-auto px-4 bg-background pb-4 md:pb-6 gap-2 w-full md:max-w-3xl">
@ -104,7 +104,7 @@ export function Chat({
</form>
</div>
<Block
<Artifact
chatId={id}
input={input}
setInput={setInput}