diff --git a/.changeset/plenty-ants-exercise.md b/.changeset/plenty-ants-exercise.md new file mode 100644 index 0000000000..614dc0116e --- /dev/null +++ b/.changeset/plenty-ants-exercise.md @@ -0,0 +1,5 @@ +--- +"@assistant-ui/react": patch +--- + +feat: new default chat bubble design diff --git a/apps/www/components/shadcn/Shadcn.tsx b/apps/www/components/shadcn/Shadcn.tsx index 21da21b78a..75abfff374 100644 --- a/apps/www/components/shadcn/Shadcn.tsx +++ b/apps/www/components/shadcn/Shadcn.tsx @@ -7,7 +7,7 @@ import icon from "@/public/favicon/favicon.svg"; import type { TooltipContentProps } from "@radix-ui/react-tooltip"; import Image from "next/image"; import { type FC, forwardRef } from "react"; -import { Thread } from "assistant-ui/registry/assistant-ui/full/thread"; +import { Thread } from "@/components/ui/assistant-ui/thread"; import { Sheet, SheetContent, SheetTrigger } from "../ui/sheet"; import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip"; import { ModelPicker } from "./ModelPicker"; diff --git a/packages/cli/registry/assistant-ui/full/thread.tsx b/packages/cli/registry/assistant-ui/full/thread.tsx index 5d688f5365..7f5e2ac191 100644 --- a/packages/cli/registry/assistant-ui/full/thread.tsx +++ b/packages/cli/registry/assistant-ui/full/thread.tsx @@ -105,78 +105,59 @@ const Composer: FC = () => { const UserMessage: FC = () => { return ( - - - Y - - -
-

You

- -

+ +

+ + + + + + + + +

- -
- - - - - - - - - -
+ + ); }; const EditComposer: FC = () => { return ( - - - Y - - -
-

You

- - - - -
- - - - - - -
-
+ + + +
+ + + + + +
- +
); }; const AssistantMessage: FC = () => { return ( - + A -
-

Assistant

- +
-

+

@@ -187,7 +168,7 @@ const AssistantMessage: FC = () => { hideWhenRunning autohide="not-last" autohideFloat="single-branch" - className="flex items-center gap-1 rounded-lg data-[floating]:absolute data-[floating]:border data-[floating]:p-1" + className="flex items-center gap-1 rounded-lg data-[floating]:absolute data-[floating]:border data-[floating]:bg-background data-[floating]:p-1" > diff --git a/packages/cli/registry/assistant-ui/thread.tsx b/packages/cli/registry/assistant-ui/thread.tsx index 7ba01353d9..fd7498197d 100644 --- a/packages/cli/registry/assistant-ui/thread.tsx +++ b/packages/cli/registry/assistant-ui/thread.tsx @@ -8,26 +8,29 @@ import { import type { FC } from "react"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; +import { TooltipProvider } from "@radix-ui/react-tooltip"; import { SendHorizonalIcon } from "lucide-react"; export const Thread: FC = () => { return ( - - - - - + + + + + + - - + + - - + + + ); }; @@ -49,24 +52,25 @@ const Composer: FC = () => { placeholder="Write a message..." className="h-12 max-h-40 flex-grow resize-none bg-transparent p-3.5 text-sm outline-none placeholder:text-foreground/50" /> - - - + + + + + + + +
+ + ); }; const UserMessage: FC = () => { return ( - - - Y - - -
-

You

- -

+ +

+

@@ -76,15 +80,14 @@ const UserMessage: FC = () => { const AssistantMessage: FC = () => { return ( - + A -
-

Assistant

- -

+

+ +