From 75b351d37978c88c62b1a5a12960528f6825a435 Mon Sep 17 00:00:00 2001 From: Simon Farshid Date: Tue, 2 Jul 2024 13:06:02 -0700 Subject: [PATCH] feat: styles revamp (#374) --- .../registry/assistant-ui/assistant-modal.tsx | 21 +- .../registry/assistant-ui/full/thread.tsx | 227 ++++++++++-------- .../registry/assistant-ui/markdown-text.tsx | 45 ++-- .../registry/assistant-ui/thread.tsx | 103 ++++---- 4 files changed, 212 insertions(+), 184 deletions(-) diff --git a/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx b/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx index 3766463ae..f8ddb2cbf 100644 --- a/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx +++ b/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx @@ -9,7 +9,6 @@ import { TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; -import { cn } from "@/lib/utils"; import { TooltipProvider } from "@radix-ui/react-tooltip"; import { type FC, forwardRef } from "react"; import { AssistantModalPrimitive } from "@assistant-ui/react"; @@ -17,16 +16,14 @@ import { AssistantModalPrimitive } from "@assistant-ui/react"; export const AssistantModal: FC = () => { return ( - + @@ -54,19 +51,13 @@ const FloatingAssistantButton = forwardRef< ref={ref} > {tooltip} diff --git a/packages/shadcn-registry/registry/assistant-ui/full/thread.tsx b/packages/shadcn-registry/registry/assistant-ui/full/thread.tsx index 1682e2b54..99271d598 100644 --- a/packages/shadcn-registry/registry/assistant-ui/full/thread.tsx +++ b/packages/shadcn-registry/registry/assistant-ui/full/thread.tsx @@ -3,6 +3,7 @@ import { ActionBarPrimitive, BranchPickerPrimitive, + BranchPickerPrimitiveRootProps, ComposerPrimitive, MessagePrimitive, ThreadPrimitive, @@ -33,11 +34,9 @@ import { MarkdownText } from "@/components/ui/assistant-ui/markdown-text"; export const Thread: FC = () => { return ( - - - - - + + + { }} /> - +
+ + +
- -
); }; -const ThreadEmpty: FC = () => { +const ThreadScrollToBottom: FC = () => { return ( -
- - C - -

How can I help you today?

-
+ + + + + ); }; -const ThreadScrollToBottom: FC = () => { +const ThreadWelcome: FC = () => { return ( -
- - - - - -
+ +
+ + C + +

How can I help you today?

+
+
); }; const Composer: FC = () => { return ( - + - - + + + + - -
+ + + + @@ -107,42 +120,38 @@ const Composer: FC = () => { const UserMessage: FC = () => { return ( - -
- - - - - - - - -
- -
+ + + + + + + + + +
+
- +
); }; const EditComposer: FC = () => { return ( - +
- + - +
@@ -152,72 +161,76 @@ const EditComposer: FC = () => { const AssistantMessage: FC = () => { return ( - - + + A -
- -
- -
+
+ +
-
- + - - - - - - - - - - - - - - - - - -
-
+ + + + + + + + + + + + + + + + +
); }; -const BranchPicker: FC = () => { +const BranchPicker: FC = ({ + className, + ...rest +}) => { return ( - - - + + + - / + + / + - - - + + + ); }; -type IconButton = ButtonProps & { tooltip: string }; +type TooltipIconButtonProps = ButtonProps & { tooltip: string }; -const IconButton: FC = ({ +const TooltipIconButton: FC = ({ children, tooltip, className, @@ -229,7 +242,7 @@ const IconButton: FC = ({