Skip to content

Commit

Permalink
feat: restructure Chat components and update metadata for improved cl…
Browse files Browse the repository at this point in the history
…arity
  • Loading branch information
mrsamirr committed Oct 2, 2024
1 parent d4712c7 commit 3100bdc
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/[...url]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChatWrapper } from "@/components/ChatWrapper";
import { ChatWrapper } from "@/components/ChatParams/ChatWrapper";
import { ragChat } from "@/lib/rag-chat";
import { redis } from "@/lib/redis";
import { cookies } from "next/headers";
Expand Down
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { Providers } from "@/components/Providers";
const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "Ask This Website",
description: "Generated by create next app",
title: "Aurora Ai",
description: "A User Friendly Ai Chatbot",
};

export default function RootLayout({
Expand Down
3 changes: 1 addition & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

import Bento from "@/components/ui/bento";
import Footer from "@/components/ui/Footer";
import GridPattern from "@/components/ui/grid-pattern";
import GridPattern from "@/components/ui/GridBackground/grid-pattern";
import HeroSection from "@/components/ui/Hero/HeroSection";
import Navbar from "@/components/ui/Navbar";
import { cn } from "@/lib/utils";
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 6 additions & 5 deletions components/Message.tsx → components/ChatParams/Message.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { cn } from "@/lib/utils";
import { Bot, User } from "lucide-react";
import Image from "next/image";

interface MessageProps {
content: string
Expand All @@ -8,10 +9,10 @@ interface MessageProps {


export const Message = ({ content, isUserMessage }: MessageProps) => {
return <div
return <div
className={cn({
"bg-zinc-800": isUserMessage,
"bg-zinc-900/25": !isUserMessage
"bg-zinc-800/15": isUserMessage,
"bg-black": !isUserMessage
})}
>
<div className="p-6">
Expand All @@ -23,12 +24,12 @@ export const Message = ({ content, isUserMessage }: MessageProps) => {
}
)}
>
{isUserMessage ? <User className="size-5" /> : <Bot className="size-5 text-white" />}
{isUserMessage ? <User className="size-5" /> : <Image src="/favicon.ico" width={22} height={22} alt={"aurora-ai"} />}
</div>

<div className="flex flex-col ml-6 w-full">
<div className="flex items-center space-x-2">
<span className="text-sm font-semibold text-gray-900 dark:text-white"> {isUserMessage ? "You" : "Website"}</span>
<span className="text-sm font-semibold text-gray-900 dark:text-white"> {isUserMessage ? "You" : "Aurora ai"}</span>
</div>

<p className="text-sm font-normal py-2.5 text-gray-900 dark:text-white ">{content}</p>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3100bdc

Please sign in to comment.