Changed user message to show files
This commit is contained in:
parent
4e677d0b08
commit
1e3d9a14fc
1 changed files with 9 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import { User } from "lucide-react";
|
import { FileText, User } from "lucide-react";
|
||||||
import { motion } from "motion/react";
|
import { motion } from "motion/react";
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||||
import { useAuth } from "@/contexts/auth-context";
|
import { useAuth } from "@/contexts/auth-context";
|
||||||
|
|
@ -9,12 +9,12 @@ interface UserMessageProps {
|
||||||
content: string;
|
content: string;
|
||||||
isCompleted?: boolean;
|
isCompleted?: boolean;
|
||||||
animate?: boolean;
|
animate?: boolean;
|
||||||
|
files?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function UserMessage({ content, isCompleted, animate = true }: UserMessageProps) {
|
export function UserMessage({ content, isCompleted, animate = true, files }: UserMessageProps) {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
|
|
||||||
console.log("animate", animate);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|
@ -38,6 +38,12 @@ export function UserMessage({ content, isCompleted, animate = true }: UserMessag
|
||||||
</Avatar>
|
</Avatar>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
{files && (
|
||||||
|
<p className="text-muted-foreground flex items-center gap-2 font-normal text-mmd py-1.5 whitespace-pre-wrap break-words overflow-wrap-anywhere transition-colors duration-300">
|
||||||
|
<FileText className="h-4 w-4" />
|
||||||
|
{files}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
<p
|
<p
|
||||||
className={cn(
|
className={cn(
|
||||||
"text-foreground text-sm py-1.5 whitespace-pre-wrap break-words overflow-wrap-anywhere transition-colors duration-300",
|
"text-foreground text-sm py-1.5 whitespace-pre-wrap break-words overflow-wrap-anywhere transition-colors duration-300",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue