Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Dec 14, 2024
1 parent 12d4a5d commit d94d4a4
Showing 1 changed file with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Badge } from "@fern-ui/components/badges";
import { useDebouncedCallback, useEventCallback } from "@fern-ui/react-commons";
import { composeEventHandlers } from "@radix-ui/primitive";
import { composeRefs } from "@radix-ui/react-compose-refs";
import { TooltipPortal } from "@radix-ui/react-tooltip";
import { TooltipPortal, TooltipProvider } from "@radix-ui/react-tooltip";
import { useControllableState } from "@radix-ui/react-use-controllable-state";
import { Message, useChat } from "ai/react";
import { useAtomValue } from "jotai";
Expand Down Expand Up @@ -261,24 +261,26 @@ const DesktopAskAIChat = ({
>
<headerActions.In>
{chat.messages.length > 0 && (
<Tooltip>
<TooltipTrigger asChild>
<Button
size="iconXs"
variant="outline"
onClick={() => {
chat.setMessages([]);
}}
>
<SquarePen />
</Button>
</TooltipTrigger>
<TooltipPortal>
<TooltipContent>
<p>New chat</p>
</TooltipContent>
</TooltipPortal>
</Tooltip>
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<Button
size="iconXs"
variant="outline"
onClick={() => {
chat.setMessages([]);
}}
>
<SquarePen />
</Button>
</TooltipTrigger>
<TooltipPortal>
<TooltipContent>
<p>New chat</p>
</TooltipContent>
</TooltipPortal>
</Tooltip>
</TooltipProvider>
)}
</headerActions.In>

Expand Down

0 comments on commit d94d4a4

Please sign in to comment.