Skip to content

Commit f262974

Browse files
committed
Merge branch 'main' of https://github.com/jaseci-labs/Agentic-AI into jac-gpt/feat_streaming
2 parents 94af4e6 + 83de854 commit f262974

53 files changed

Lines changed: 14387 additions & 10290 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

jac-gpt-fullstack/components/Sidebar.cl.jac

Lines changed: 52 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
"""Sidebar component with chat history and user actions using Mantine UI.
2-
Updated: sidebar is ALWAYS visible on desktop (>=1024px) and toggled only on mobile.
3-
Updated: uses /logo.png to match React JacGPT logo + alignment.
4-
Fix: New Chat (+) centered properly.
5-
Fix: Remove extra empty gap between Sign buttons and Help & FAQ (better layout).
6-
"""
7-
81
import from react { useState }
92
import from "@jac/runtime" { Link, jacIsLoggedIn, jacLogout, useNavigate }
103
import from "@mantine/core" {
@@ -83,6 +76,14 @@ def:pub Sidebar(
8376
navigate("/login");
8477
}
8578

79+
def handleLogoClick() -> None {
80+
# Reset chat state and navigate home
81+
if onNewChat {
82+
onNewChat();
83+
}
84+
navigate("/");
85+
}
86+
8687
def getUserInitials() -> str {
8788
if username and username != "Guest" {
8889
return username[0].toUpperCase();
@@ -131,16 +132,27 @@ def:pub Sidebar(
131132
<Group justify="space-between" align="center" wrap="nowrap">
132133
{(
133134
<Group gap="sm" align="center" wrap="nowrap">
134-
<Box style={{
135-
"width": "44px",
136-
"height": "44px",
137-
"borderRadius": "12px",
138-
"background": "rgba(249,115,22,0.12)",
139-
"display": "flex",
140-
"alignItems": "center",
141-
"justifyContent": "center",
142-
"boxShadow": "0 0 14px rgba(249,115,22,0.25)"
143-
}}>
135+
<Box
136+
onClick={handleLogoClick}
137+
style={{
138+
"width": "44px",
139+
"height": "44px",
140+
"borderRadius": "12px",
141+
"background": "rgba(249,115,22,0.12)",
142+
"display": "flex",
143+
"alignItems": "center",
144+
"justifyContent": "center",
145+
"boxShadow": "0 0 14px rgba(249,115,22,0.25)",
146+
"cursor": "pointer",
147+
"transition": "transform 0.2s ease"
148+
}}
149+
onMouseEnter={lambda e: any -> None {
150+
e.currentTarget.style.transform = "scale(1.05)";
151+
}}
152+
onMouseLeave={lambda e: any -> None {
153+
e.currentTarget.style.transform = "scale(1)";
154+
}}
155+
>
144156
<img
145157
src={LOGO_SRC}
146158
alt="Jaseci"
@@ -164,16 +176,28 @@ def:pub Sidebar(
164176
</Group>
165177
if isExpanded
166178
else
167-
<Box mx="auto" style={{
168-
"width": "44px",
169-
"height": "44px",
170-
"borderRadius": "12px",
171-
"background": "rgba(249,115,22,0.12)",
172-
"display": "flex",
173-
"alignItems": "center",
174-
"justifyContent": "center",
175-
"boxShadow": "0 0 14px rgba(249,115,22,0.25)"
176-
}}>
179+
<Box
180+
mx="auto"
181+
onClick={handleLogoClick}
182+
style={{
183+
"width": "44px",
184+
"height": "44px",
185+
"borderRadius": "12px",
186+
"background": "rgba(249,115,22,0.12)",
187+
"display": "flex",
188+
"alignItems": "center",
189+
"justifyContent": "center",
190+
"boxShadow": "0 0 14px rgba(249,115,22,0.25)",
191+
"cursor": "pointer",
192+
"transition": "transform 0.2s ease"
193+
}}
194+
onMouseEnter={lambda e: any -> None {
195+
e.currentTarget.style.transform = "scale(1.05)";
196+
}}
197+
onMouseLeave={lambda e: any -> None {
198+
e.currentTarget.style.transform = "scale(1)";
199+
}}
200+
>
177201
<img
178202
src={LOGO_SRC}
179203
alt="Jaseci"
@@ -541,4 +565,4 @@ def:pub Sidebar(
541565
# Desktop spacer so main content isn't under fixed sidebar
542566
<Box style={{"width": String(sidebarWidth) + "px", "flexShrink": "0"}} visibleFrom="lg" />
543567
</>;
544-
}
568+
}

jac-gpt-fullstack/frontend.cl.jac

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Main entry point for Jac GPT Client application."""
2-
2+
import from react { useEffect }
33
import from "@jac/runtime" { Router, Routes, Route }
44
import from "@mantine/core" { MantineProvider, createTheme }
55

@@ -9,11 +9,23 @@ import from .pages.RegisterPage { RegisterPage }
99
import from .pages.ForgotPasswordPage { ForgotPasswordPage }
1010
import from .pages.ResetPasswordPage { ResetPasswordPage }
1111

12+
import from ".utils.monaco_initializer" { initializeMonacoGlobally }
13+
1214
import "@mantine/core/styles.css";
1315
import ".global.css";
1416

1517
"""Main app component with routing."""
1618
def:pub app() -> any {
19+
useEffect(lambda {
20+
async def initMonaco() -> None {
21+
try {
22+
await initializeMonacoGlobally();
23+
} except Exception {
24+
}
25+
}
26+
27+
initMonaco();
28+
}, []);
1729
# Custom Mantine theme for dark mode
1830
theme = createTheme({
1931
"primaryColor": "violet",

jac-gpt-fullstack/global.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,14 @@ code {
175175
.hljs-params { color: #e4e4e7; }
176176
.hljs-literal { color: #f472b6; }
177177

178-
/* Selection colors */
178+
/* Selection colors - Orange theme */
179179
::selection {
180-
background-color: rgba(124, 58, 237, 0.3);
180+
background-color: rgba(249, 115, 22, 0.3);
181+
color: white;
182+
}
183+
184+
::-moz-selection {
185+
background-color: rgba(249, 115, 22, 0.3);
181186
color: white;
182187
}
183188

@@ -249,4 +254,4 @@ a:hover {
249254
.lg\:block {
250255
display: block;
251256
}
252-
}
257+
}
-90.9 KB
Binary file not shown.
-14.6 KB
Binary file not shown.
-15.4 KB
Binary file not shown.
-19.7 KB
Binary file not shown.
Binary file not shown.
-133 KB
Binary file not shown.
-34.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)