Skip to content

Commit d1befb8

Browse files
authored
Merge pull request #353 from MatrixTerminal/develop
dev -> main
2 parents 728927e + 0ce03e6 commit d1befb8

20 files changed

Lines changed: 457 additions & 459 deletions

public/next.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/vercel.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/window.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/app/globals.css

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,33 @@
986986
/* indigo-500 */
987987
}
988988

989+
.markdown-content hr {
990+
border: none;
991+
height: 1px;
992+
background-color: rgba(0, 0, 0, 0.1);
993+
margin: 1.5rem 0;
994+
}
995+
996+
.dark .markdown-content hr {
997+
background-color: rgba(255, 255, 255, 0.1);
998+
}
999+
1000+
.markdown-content[data-message-mode="sentinel"] hr {
1001+
background-color: rgba(99, 102, 241, 0.3);
1002+
}
1003+
1004+
.dark .markdown-content[data-message-mode="sentinel"] hr {
1005+
background-color: rgba(99, 102, 241, 0.3);
1006+
}
1007+
1008+
.markdown-content[data-message-mode="morpheus"] hr {
1009+
background-color: rgba(71, 216, 163, 0.3);
1010+
}
1011+
1012+
.dark .markdown-content[data-message-mode="morpheus"] hr {
1013+
background-color: rgba(71, 216, 163, 0.3);
1014+
}
1015+
9891016
.markdown-content ul,
9901017
.markdown-content ul:first-child,
9911018
.markdown-content ul:last-child {
@@ -1014,7 +1041,7 @@
10141041
background-color: white !important;
10151042
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
10161043
}
1017-
1044+
10181045
.dark .header-transparent header {
10191046
background-color: black !important;
10201047
border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;

src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default function RootLayout({
6161
`}
6262
</Script>
6363
<body
64-
className={`${geistSans.variable} ${geistMono.variable} bg-gray-200 dark:bg-black dark:text-white`}
64+
className={`${geistSans.variable} ${geistMono.variable} bg-gray-100 dark:bg-neutral-900 dark:text-white`}
6565
>
6666
<ClientProviders>
6767
{children}

src/app/page.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { useDisconnectedDarkMode } from "@/hooks/useDisconnectedDarkMode";
1313
import { useChat } from "@/contexts/chat-context";
1414

1515
export default function HomePage() {
16-
const { isConnected, isConnecting, isReconnecting } = useAccount();
16+
const { isConnected } = useAccount();
1717
const { handleNavigateToRoot } = useChat();
1818

1919
React.useEffect(() => {
@@ -22,16 +22,18 @@ export default function HomePage() {
2222

2323
useDisconnectedDarkMode(isConnected);
2424

25-
if (!isConnected && !isConnecting && !isReconnecting) {
26-
return <DisconnectedMessage />;
27-
}
28-
2925
return (
3026
<>
31-
<div className="fixed inset-0 z-0">
32-
<MatrixCanvas />
33-
</div>
34-
<RootLayout />
27+
<div className="fixed inset-0 z-0"></div>
28+
29+
{!isConnected && (
30+
<>
31+
<MatrixCanvas />
32+
<DisconnectedMessage />
33+
</>
34+
)}
35+
36+
{isConnected && <RootLayout />}
3537
</>
3638
);
3739
}

src/app/template.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function AppTemplate({
2525
}, []);
2626

2727
return (
28-
<div className="h-screen flex bg-gray-200 dark:bg-black overflow-hidden w-full">
28+
<div className="h-screen flex overflow-hidden w-full">
2929
<SplitLayout>
3030
<div
3131
className={`relative flex flex-col w-full h-full ${!isChatActive ? "header-transparent" : ""}`}

src/components/chat/ChatLayout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export function ChatLayout() {
8181
) : (
8282
<>
8383
<Messages />
84+
<div className="mx-auto max-w-3xl absolute bottom-0 left-0 right-0 h-2 bg-gray-100 dark:bg-neutral-900 px-[2px] sm:px-0"></div>
8485
{showInput && (
8586
<motion.div
8687
ref={inputRef}
@@ -94,7 +95,7 @@ export function ChatLayout() {
9495
duration: 0.5,
9596
ease: "easeOut",
9697
}}
97-
className="absolute bottom-0 left-0 right-0 px-[2px] sm:px-0"
98+
className="absolute bottom-0 left-0 right-0 px-[2px] sm:px-0 pb-2 z-20"
9899
>
99100
<ChatInput
100101
input={input}

src/components/chat/RootLayout.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export function RootLayout() {
3939

4040
const modeTitleStyles =
4141
activeMode === "morpheus"
42-
? "text-emerald-800 dark:text-emerald-50 font-semibold"
43-
: "text-indigo-800 dark:text-indigo-50 font-bold";
42+
? "text-emerald-800 dark:text-emerald-50 font-light"
43+
: "text-indigo-800 dark:text-indigo-50 font-light";
4444

4545
if (!isConnected) {
4646
return (
@@ -68,7 +68,7 @@ export function RootLayout() {
6868
duration: 0.6,
6969
ease: "easeOut",
7070
}}
71-
className="flex-1 flex flex-col items-center justify-center gap-3 lg:gap-6 z-10 px-4 h-full"
71+
className="mx-auto mt-4 w-full flex-1 px-4 md:pl-8 lg:mt-6 max-w-7xl !mt-0 flex flex-col items-center gap-4 pt-12 md:pr-14 2xl:pr-20 pt-[10vh] md:pt-[30vh] max-sm:!px-1"
7272
>
7373
{/* Dynamic title */}
7474
<motion.h1
@@ -79,7 +79,7 @@ export function RootLayout() {
7979
duration: 0.35,
8080
ease: "easeOut",
8181
}}
82-
className={`text-2xl lg:text-4xl ${modeTitleStyles} drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)] mb-6 text-center`}
82+
className={`text-2xl lg:text-5xl ${modeTitleStyles} drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)] mb-7 text-center`}
8383
>
8484
{modeTitle}
8585
</motion.h1>
@@ -108,7 +108,6 @@ export function RootLayout() {
108108
/>
109109
</motion.div>
110110

111-
{/* Example queries */}
112111
<motion.div
113112
initial={{
114113
opacity: 0,
@@ -123,7 +122,7 @@ export function RootLayout() {
123122
duration: 0.6,
124123
ease: "easeOut",
125124
}}
126-
className="w-full max-w-2xl"
125+
className="w-full"
127126
>
128127
<ExampleQueries
129128
onSelect={handleExampleSelect}

src/components/chat/chat-input-base.tsx

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ interface BaseChatInputProps {
3939
initialMode?: ChatMode;
4040
onSubmitMessage?: () => void;
4141
onSubmit?: (e: FormEvent) => Promise<void>;
42-
isInChatMode?: boolean;
4342
showReloadButton?: boolean;
4443
className?: string;
4544
}
@@ -52,7 +51,6 @@ export default function BaseChatInput({
5251
initialMode = "morpheus",
5352
onSubmitMessage,
5453
onSubmit,
55-
isInChatMode = false,
5654
showReloadButton = false,
5755
className = "",
5856
}: BaseChatInputProps) {
@@ -232,7 +230,7 @@ export default function BaseChatInput({
232230
variants={containerVariants}
233231
initial="hidden"
234232
animate="visible"
235-
className={`relative ${isInChatMode ? "mb-[1px]" : ""} ${className}`}
233+
className={`relative ${className}`}
236234
>
237235
<div className="max-w-3xl mx-auto relative">
238236
{/* Action Buttons - Positioned inside the chat input */}
@@ -376,20 +374,19 @@ export default function BaseChatInput({
376374
<div className="flex flex-col">
377375
{/* Input field with glow effect */}
378376
<motion.div
379-
className={`w-full relative group transition-all duration-400 ease-in-out rounded-t-xl
377+
className={`w-full relative group transition-all duration-400 ease-in-out rounded-xl
380378
${
381-
!isInChatMode && !isBusy
382-
? `rounded-lg shadow-lg backdrop-blur-md bg-white/15 dark:bg-black/15 hover:backdrop-blur-lg hover:bg-white/10 dark:hover:bg-black/10
383-
${
384-
isMorpheusMode
385-
? "shadow-emerald-100/30 dark:shadow-emerald-900/10 border border-emerald-300/70 dark:border-emerald-500/20 hover:border-emerald-400/80 dark:hover:border-emerald-400/30"
386-
: "shadow-indigo-100/30 dark:shadow-indigo-900/10 border border-indigo-300/70 dark:border-indigo-500/20 hover:border-indigo-400/80 dark:hover:border-indigo-400/30"
387-
}`
388-
: `${
379+
isBusy
380+
? `${
389381
isMorpheusMode
390-
? "shadow-none border border-emerald-300/70 dark:border-emerald-800/30 rounded-b-none overflow-hidden bg-white/95 dark:bg-black/95 backdrop-blur-md"
391-
: "shadow-none border border-indigo-300/70 dark:border-indigo-800/30 rounded-b-none overflow-hidden bg-white/95 dark:bg-black/95 backdrop-blur-md"
382+
? "shadow-none border border-emerald-300/70 dark:border-emerald-800/30 overflow-hidden bg-white/95 dark:bg-neutral-800 backdrop-blur-md"
383+
: "shadow-none border border-indigo-300/70 dark:border-indigo-800/30 overflow-hidden bg-white/95 dark:bg-neutral-800 backdrop-blur-md"
392384
}`
385+
: `shadow-none border shadow-lg backdrop-blur-md bg-white/15 dark:bg-black/15 ${
386+
isMorpheusMode
387+
? "border-emerald-300/70 dark:border-emerald-800/30 dark:border-emerald-500/20 hover:border-emerald-400/80 dark:hover:border-emerald-400/30"
388+
: "border-indigo-300/70 dark:border-indigo-800/30 dark:border-indigo-500/20 hover:border-indigo-400/80 dark:hover:border-indigo-400/30"
389+
} overflow-hidden bg-white/95 dark:bg-neutral-800 backdrop-blur-md`
393390
}`}
394391
variants={inputVariants}
395392
initial="hidden"
@@ -415,17 +412,14 @@ export default function BaseChatInput({
415412
text-sm sm:text-base
416413
min-h-[50px] sm:min-h-[56px]
417414
bg-transparent
418-
${
419-
!isInChatMode && !isBusy
420-
? isMorpheusMode
421-
? "group-hover:bg-emerald-50/10 dark:group-hover:bg-emerald-950/10"
422-
: "group-hover:bg-indigo-50/10 dark:group-hover:bg-indigo-950/10"
423-
: ""
424-
}
425415
border-none
426416
border-b-0
427417
text-gray-800 dark:text-gray-100
428-
placeholder:text-gray-500 dark:placeholder:text-gray-500
418+
${
419+
isMorpheusMode
420+
? "placeholder:text-emerald-900/40 dark:placeholder:text-emerald-100/60"
421+
: "placeholder:text-indigo-900/40 dark:placeholder:text-indigo-100/60"
422+
}
429423
placeholder:text-sm
430424
focus:ring-0 focus:ring-offset-0
431425
focus:outline-none
@@ -444,33 +438,20 @@ export default function BaseChatInput({
444438
className={`
445439
w-full h-[36px]
446440
flex items-center
447-
${
448-
isInChatMode
449-
? showReloadButton
450-
? "rounded-b-none"
451-
: "rounded-b-xl"
452-
: "rounded-b-xl"
453-
} rounded-t-xl
441+
rounded-b-xl
454442
border-none
455443
border-t-0
456444
shadow-none
457445
pt-0
458446
mt-0
459-
bg-transparent
460-
${
461-
!isInChatMode && !isBusy
462-
? isMorpheusMode
463-
? "group-hover:bg-emerald-50/10 dark:group-hover:bg-emerald-950/10"
464-
: "group-hover:bg-indigo-50/10 dark:group-hover:bg-indigo-950/10"
465-
: ""
466-
} pb-1
447+
bg-transparent pb-1
467448
transition-all duration-200
468449
`}
469450
>
470451
<div className="ml-2 flex items-center gap-1">
471452
{/* Mode Toggle Buttons - Bottom left */}
472453
<motion.div
473-
className={`inline-flex rounded-lg p-0.5 bg-gray-100/70 dark:bg-gray-900/70 backdrop-blur-sm border border-gray-200 dark:border-gray-800
454+
className={`inline-flex rounded-lg p-0.5 bg-gray-100/70 dark:bg-neutral-900/70 backdrop-blur-sm border border-gray-200 dark:border-gray-800
474455
${isBusy ? "relative opacity-90" : ""}`}
475456
variants={toggleVariants}
476457
initial="hidden"

0 commit comments

Comments
 (0)