feat: add artifact tests (#859)

This commit is contained in:
Jeremy 2025-03-11 14:39:36 -07:00 committed by GitHub
parent 9628c54755
commit 8e561dced4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 669 additions and 255 deletions

View file

@ -1,5 +1,4 @@
import type { Message } from 'ai';
import { toast } from 'sonner';
import { useSWRConfig } from 'swr';
import { useCopyToClipboard } from 'usehooks-ts';
@ -15,6 +14,7 @@ import {
} from './ui/tooltip';
import { memo } from 'react';
import equal from 'fast-deep-equal';
import { toast } from 'sonner';
export function PureMessageActions({
chatId,
@ -57,6 +57,7 @@ export function PureMessageActions({
<Tooltip>
<TooltipTrigger asChild>
<Button
data-testid="message-upvote"
className="py-1 px-2 h-fit text-muted-foreground !pointer-events-auto"
disabled={vote?.isUpvoted}
variant="outline"
@ -109,6 +110,7 @@ export function PureMessageActions({
<Tooltip>
<TooltipTrigger asChild>
<Button
data-testid="message-downvote"
className="py-1 px-2 h-fit text-muted-foreground !pointer-events-auto"
variant="outline"
disabled={vote && !vote.isUpvoted}