Skip to content

Commit

Permalink
UI update
Browse files Browse the repository at this point in the history
  • Loading branch information
lucamazzasette committed Nov 20, 2024
1 parent c781c87 commit e0ae9f4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
5 changes: 4 additions & 1 deletion src/features/chat-page/chat-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
import MessageContent from "./message-content";
import Disclaimer from "../ui/chat/disclaimer";
import { AlignCenter } from "lucide-react";
import { useTheme } from "next-themes";

interface ChatPageProps {
messages: Array<ChatMessageModel>;
Expand All @@ -29,6 +30,7 @@ interface ChatPageProps {

export const ChatPage: FC<ChatPageProps> = (props) => {
const { data: session } = useSession();
const { theme } = useTheme();

useEffect(() => {
chatStore.initChatSession({
Expand Down Expand Up @@ -64,9 +66,10 @@ export const ChatPage: FC<ChatPageProps> = (props) => {
}}
profilePicture={
message.role === "assistant"
? "/aiko.png"
? theme === 'dark' ? "/logo-COMAU-white.png" : "/logo-COMAU.png"
: session?.user?.image
}
theme={theme}
>
<MessageContent message={message} />
</ChatMessageArea>
Expand Down
13 changes: 7 additions & 6 deletions src/features/main-menu/main-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,22 @@ import Image from "next/image";




export const MainMenu = async () => {
const user = await getCurrentUser();


return (
<Menu>
<MenuBar>
<MenuItemContainer>
<MenuItem tooltip="Home" asChild>
<MenuLink href="https://www.comau.com/en/" ariaLabel="Go to the Home page">
<Home {...menuIconProps} />

<MenuItem tooltip="Corporate" asChild>
<MenuLink href="https://www.comau.com/en/" ariaLabel="Go to the Corporate Site">
<Home/>
<Image
src="/ai-icon.png"
width={50}
height={50}
width={80}
height={80}
quality={100}
alt="ai-icon"
/>
Expand Down
6 changes: 4 additions & 2 deletions src/features/ui/chat/chat-message-area/chat-message-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const ChatMessageArea = (props: {
profilePicture?: string | null;
profileName?: string;
role: "function" | "user" | "assistant" | "system" | "tool";
theme?: string;
onCopy: () => void;
}) => {
const [isIconChecked, setIsIconChecked] = useState(false);
Expand Down Expand Up @@ -74,10 +75,11 @@ export const ChatMessageArea = (props: {
{profile}
<div
className={cn(
"text-primary capitalize items-center flex",
"text-primary capitalize items-center flex text-muted-foreground",
props.role === "function" || props.role === "tool"
? "text-muted-foreground text-sm"
: ""
: "",
props.theme === "dark" ? "text-white" : "text-black"
)}
>
{props.profileName}
Expand Down

0 comments on commit e0ae9f4

Please sign in to comment.