feat: add artifact tests (#859)
This commit is contained in:
parent
9628c54755
commit
8e561dced4
13 changed files with 669 additions and 255 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue