Template
Improve chat navigation, model selection, and streaming
This commit is contained in:
@@ -14,11 +14,11 @@ import {
|
||||
import { cn } from "@/lib/utils";
|
||||
import type { FileUIPart, UIMessage } from "ai";
|
||||
import {
|
||||
ChevronLeftIcon,
|
||||
ChevronRightIcon,
|
||||
PaperclipIcon,
|
||||
XIcon,
|
||||
} from "lucide-react";
|
||||
RiArrowLeftSLine,
|
||||
RiArrowRightSLine,
|
||||
RiAttachment2,
|
||||
RiCloseLine,
|
||||
} from "@remixicon/react";
|
||||
import type { ComponentProps, HTMLAttributes, ReactElement, ReactNode } from "react";
|
||||
import {
|
||||
Children,
|
||||
@@ -267,7 +267,7 @@ export const MessageBranchPrevious = ({
|
||||
variant="ghost"
|
||||
{...props}
|
||||
>
|
||||
{children ?? <ChevronLeftIcon size={14} />}
|
||||
{children ?? <RiArrowLeftSLine size={14} />}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
@@ -291,7 +291,7 @@ export const MessageBranchNext = ({
|
||||
variant="ghost"
|
||||
{...props}
|
||||
>
|
||||
{children ?? <ChevronRightIcon size={14} />}
|
||||
{children ?? <RiArrowRightSLine size={14} />}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
@@ -338,8 +338,7 @@ export const MessageResponse = memo(
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
),
|
||||
(prevProps, nextProps) => prevProps.children === nextProps.children
|
||||
)
|
||||
);
|
||||
|
||||
MessageResponse.displayName = "MessageResponse";
|
||||
@@ -390,7 +389,7 @@ export function MessageAttachment({
|
||||
type="button"
|
||||
variant="ghost"
|
||||
>
|
||||
<XIcon />
|
||||
<RiCloseLine />
|
||||
<span className="sr-only">Remove</span>
|
||||
</Button>
|
||||
)}
|
||||
@@ -400,7 +399,7 @@ export function MessageAttachment({
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<div className="flex size-full shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
|
||||
<PaperclipIcon className="size-4" />
|
||||
<RiAttachment2 className="size-4" />
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
@@ -418,7 +417,7 @@ export function MessageAttachment({
|
||||
type="button"
|
||||
variant="ghost"
|
||||
>
|
||||
<XIcon />
|
||||
<RiCloseLine />
|
||||
<span className="sr-only">Remove</span>
|
||||
</Button>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user