Skip to content

Commit 7f5d0e0

Browse files
committed
Syncing again
1 parent 2128d7e commit 7f5d0e0

File tree

111 files changed

+5684
-1104
lines changed

Some content is hidden

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

111 files changed

+5684
-1104
lines changed

agentex-sgp-app/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ out/
3030
ehthumbs.db
3131
Thumbs.db
3232

33+
# Claude
34+
.claude/
35+
3336
# Editor directories and files
3437
.vscode/
3538
.idea/

agentex-sgp-app/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# testing
1414
/coverage
1515

16+
# claude
17+
.claude/
18+
1619
# next.js
1720
/.next/
1821
/out/

agentex-sgp-app/.prettierrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"singleQuote": true,
55
"printWidth": 80,
66
"tabWidth": 2,
7-
"useTabs": false
7+
"bracketSameLine": false,
8+
"arrowParens": "avoid",
9+
10+
"plugins": ["prettier-plugin-tailwindcss"]
811
}

agentex-sgp-app/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Complex synchronization mechanism in `lib/pending-message.ts`:
6262
### Component Organization
6363

6464
- `components/agentex/*` — Domain-specific reusable components
65-
- `components/ui/*` — Generic UI components (shadcn/ui based)
65+
- `components/ui/*` — Generic UI components (shadcn/ui based) - only used by shadcn, do not add components to this directory unless they are shadcn
6666
- `entrypoints/*/` — Mode-specific page components and views
6767
- Follow pattern: **components should be presentational, controllers handle side effects**
6868

agentex-sgp-app/app/error.tsx

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
'use client';
2+
3+
import { AlertCircle } from 'lucide-react';
4+
5+
import { TaskTopBar } from '@/components/agentex/task-top-bar';
6+
import { Button } from '@/components/ui/button';
7+
8+
export default function Error({
9+
error,
10+
reset,
11+
}: {
12+
error: Error & { digest?: string };
13+
reset: () => void;
14+
}) {
15+
return (
16+
<div className="fixed inset-0 flex">
17+
{/* Main Content Area */}
18+
<div className="bg-task-background flex h-full flex-1 flex-col">
19+
<TaskTopBar taskId={null} />
20+
21+
{/* Error Message - Centered */}
22+
<div className="flex flex-1 flex-col items-center justify-center p-8">
23+
<div className="w-full max-w-md space-y-6 text-center">
24+
<div className="flex justify-center">
25+
<div className="bg-destructive/10 rounded-full p-4">
26+
<AlertCircle className="text-destructive h-12 w-12" />
27+
</div>
28+
</div>
29+
30+
<div className="space-y-2">
31+
<h1 className="text-2xl font-semibold">Something went wrong</h1>
32+
<p className="text-muted-foreground">
33+
We encountered an error while loading the agent.
34+
</p>
35+
</div>
36+
37+
{error.message && (
38+
<div className="bg-destructive/10 rounded-lg p-4 text-left text-sm">
39+
<p className="text-destructive font-mono break-words">
40+
{error.message}
41+
</p>
42+
</div>
43+
)}
44+
45+
<div className="flex justify-center gap-3">
46+
<Button onClick={reset} variant="default">
47+
Try again
48+
</Button>
49+
<Button
50+
onClick={() => (window.location.href = '/')}
51+
variant="outline"
52+
>
53+
Go home
54+
</Button>
55+
</div>
56+
</div>
57+
</div>
58+
</div>
59+
</div>
60+
);
61+
}

agentex-sgp-app/app/globals.css

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
--destructive: #7a1331;
115115
--destructive-foreground: #ffced5;
116116
--border: oklch(1 0 0 / 10%);
117-
--input: rgba(113, 77, 255, 0.15);
117+
--input: #28292a;
118118
--ring: #d1d5db;
119119
--chart-1: oklch(0.488 0.243 264.376);
120120
--chart-2: oklch(0.696 0.17 162.48);
@@ -154,85 +154,6 @@
154154
body {
155155
@apply bg-background text-foreground;
156156
}
157-
158-
textarea[data-slot='textarea'] {
159-
background-color: var(--textarea-input);
160-
color: var(--textarea-foreground);
161-
}
162-
163-
h1 {
164-
scroll-margin-top: 5rem;
165-
text-align: center;
166-
font-size: 2.25rem;
167-
line-height: 2.5rem;
168-
font-weight: 800;
169-
letter-spacing: -0.025em;
170-
text-wrap: balance;
171-
}
172-
173-
h2 {
174-
scroll-margin-top: 5rem;
175-
font-size: 1.875rem;
176-
line-height: 2.25rem;
177-
font-weight: 600;
178-
letter-spacing: -0.025em;
179-
}
180-
181-
h2:first-child {
182-
margin-top: 0;
183-
}
184-
185-
h3 {
186-
scroll-margin-top: 5rem;
187-
font-size: 1.5rem;
188-
line-height: 2rem;
189-
font-weight: 600;
190-
letter-spacing: -0.025em;
191-
}
192-
193-
h4 {
194-
scroll-margin-top: 5rem;
195-
font-size: 1.25rem;
196-
line-height: 1.75rem;
197-
font-weight: 600;
198-
letter-spacing: -0.025em;
199-
}
200-
201-
p {
202-
line-height: 1.75rem;
203-
}
204-
205-
blockquote {
206-
margin-top: 1.5rem;
207-
border-left: 2px solid;
208-
padding-left: 1.5rem;
209-
font-style: italic;
210-
}
211-
212-
ul {
213-
margin-top: 1.5rem;
214-
margin-bottom: 1.5rem;
215-
margin-left: 1.5rem;
216-
list-style-type: disc;
217-
}
218-
219-
ul > li {
220-
margin-top: 0.5rem;
221-
}
222-
}
223-
224-
.code-block {
225-
background-color: var(--color-muted);
226-
position: relative;
227-
border-radius: var(--radius-sm);
228-
padding-left: 0.3rem;
229-
padding-right: 0.3rem;
230-
padding-top: 0.2rem;
231-
padding-bottom: 0.2rem;
232-
font-family: var(--font-geist-mono);
233-
font-size: 0.875rem;
234-
line-height: 1.25rem;
235-
font-weight: 600;
236157
}
237158

238159
.hide-scrollbar {

agentex-sgp-app/app/layout.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { ThemeProvider } from '@/components/agentex/theme-provider';
2-
import type { Metadata } from 'next';
31
import { Geist, Geist_Mono } from 'next/font/google';
2+
3+
import { QueryProvider, ThemeProvider } from '@/components/providers';
4+
5+
import type { Metadata } from 'next';
46
import './globals.css';
57

68
const geistSans = Geist({
@@ -28,14 +30,16 @@ export default function RootLayout({
2830
<body
2931
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
3032
>
31-
<ThemeProvider
32-
attribute="class"
33-
defaultTheme="dark"
34-
enableSystem={false}
35-
disableTransitionOnChange
36-
>
37-
{children}
38-
</ThemeProvider>
33+
<QueryProvider>
34+
<ThemeProvider
35+
attribute="class"
36+
defaultTheme="dark"
37+
enableSystem={false}
38+
disableTransitionOnChange
39+
>
40+
{children}
41+
</ThemeProvider>
42+
</QueryProvider>
3943
</body>
4044
</html>
4145
);

agentex-sgp-app/app/loading.tsx

Lines changed: 122 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,128 @@
1+
'use client';
2+
3+
import { Suspense } from 'react';
4+
5+
import { ArrowUp } from 'lucide-react';
6+
7+
import { IconButton } from '@/components/agentex/icon-button';
18
import { Skeleton } from '@/components/ui/skeleton';
9+
import { useSafeSearchParams } from '@/hooks/use-safe-search-params';
10+
11+
function LoadingContent() {
12+
const { taskID } = useSafeSearchParams();
13+
14+
// If there's a task ID, show the task/chat loading state
15+
if (taskID) {
16+
return (
17+
<div className="fixed inset-0 flex w-full">
18+
{/* Sidebar Skeleton */}
19+
<div className="bg-sidebar border-sidebar-border flex h-full w-64 flex-col border-r">
20+
{/* Header Section */}
21+
<div className="border-sidebar-border border-b pt-4 pr-4 pb-6 pl-2">
22+
<div className="flex items-center gap-2 pb-4 pl-2">
23+
<Skeleton className="h-6 w-24" />
24+
</div>
25+
<Skeleton className="h-10 w-full" />
26+
</div>
27+
28+
{/* Task List */}
29+
<div className="flex flex-col gap-5 overflow-y-auto py-4 pr-2 pl-4">
30+
{[...Array(8)].map((_, i) => (
31+
<Skeleton key={i} className="h-5 w-full" />
32+
))}
33+
</div>
34+
</div>
35+
36+
{/* Main Content Area Skeleton */}
37+
<div className="bg-task-background flex h-full flex-1 flex-col">
38+
{/* Top Bar */}
39+
<div className="border-border border-b px-4 py-3">
40+
<Skeleton className="h-8 w-48" />
41+
</div>
42+
43+
{/* Messages Area */}
44+
<div className="flex flex-1 flex-col items-center overflow-y-auto px-4 pt-4">
45+
<div className="flex w-full max-w-[800px] flex-col gap-4">
46+
{/* User Message Skeleton */}
47+
<div className="flex justify-end">
48+
<Skeleton className="h-15 w-1/4 rounded-lg" />
49+
</div>
50+
51+
{/* Agent Message Skeleton */}
52+
<div className="flex flex-col justify-start gap-3">
53+
<Skeleton className="h-4 w-5/6" />
54+
<Skeleton className="h-4 w-7/8" />
55+
<Skeleton className="h-4 w-5/8" />
56+
</div>
57+
58+
{/* User Message Skeleton */}
59+
<div className="flex justify-end">
60+
<Skeleton className="h-15 w-1/4 rounded-lg" />
61+
</div>
62+
63+
{/* Agent Message Skeleton */}
64+
<div className="flex flex-col justify-start gap-3">
65+
<Skeleton className="h-4 w-5/6" />
66+
<Skeleton className="h-4 w-7/8" />
67+
<Skeleton className="h-4 w-5/8" />
68+
</div>
69+
</div>
70+
</div>
71+
72+
{/* Input Form Skeleton */}
73+
<div className="flex w-full justify-center px-4 py-8 sm:px-6 md:px-8">
74+
<div className="w-full max-w-3xl">
75+
<Skeleton className="h-[58px] w-full rounded-full" />
76+
</div>
77+
</div>
78+
</div>
79+
</div>
80+
);
81+
}
282

3-
export default function Loading() {
483
return (
5-
<>
6-
<header className="w-full md:sticky mt-4 md:top-0 md:z-10 bg-background">
7-
<div className="mx-auto max-w-[min(100%-var(--spacing)*4,var(--max-page-content-width))]">
8-
<h1>Agentex: loading...</h1>
84+
<div className="fixed inset-0 flex w-full">
85+
<div className="flex h-full flex-1 flex-col justify-center">
86+
<div className="flex items-center justify-center">
87+
<div className="flex flex-col items-center justify-center gap-6 px-4">
88+
<div className="text-2xl font-bold">Select an Agent:</div>
89+
<div className="flex max-w-4xl flex-wrap items-center justify-center gap-2">
90+
{[...Array(6)].map((_, i) => (
91+
<Skeleton key={i} className="h-9.5 w-32 rounded-full" />
92+
))}
93+
</div>
94+
</div>
95+
</div>
96+
<div className="flex w-full justify-center px-4 py-8 sm:px-6 md:px-8">
97+
<div className="w-full max-w-3xl">
98+
<div className="w-full opacity-50">
99+
<div className="border-input dark:bg-input/30 disabled:bg-muted flex w-full justify-between rounded-full border bg-transparent py-2 pr-2 pl-6 disabled:cursor-not-allowed">
100+
<input
101+
type="text"
102+
value=""
103+
disabled
104+
placeholder="Select an agent to start"
105+
className="mr-2 flex-1 outline-none focus:ring-0 focus:outline-none"
106+
readOnly
107+
/>
108+
<IconButton
109+
className="pointer-events-auto size-10 rounded-full"
110+
disabled
111+
icon={ArrowUp}
112+
/>
113+
</div>
114+
</div>
115+
</div>
9116
</div>
10-
</header>
11-
<main className="w-full">
12-
<Skeleton className="mx-auto w-[min(100%-var(--spacing)*4,var(--max-page-content-width))] h-96 animate-pulse" />
13-
</main>
14-
</>
117+
</div>
118+
</div>
119+
);
120+
}
121+
122+
export default function Loading() {
123+
return (
124+
<Suspense fallback={<div>Loading...</div>}>
125+
<LoadingContent />
126+
</Suspense>
15127
);
16128
}

0 commit comments

Comments
 (0)