-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkspace.html
More file actions
541 lines (512 loc) · 20 KB
/
Copy pathWorkspace.html
File metadata and controls
541 lines (512 loc) · 20 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Workspace · Cortex</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='22' cy='50' r='14' stroke='%23fb923c' stroke-width='7' fill='none'/><circle cx='22' cy='50' r='8' fill='%23fb923c'/><circle cx='78' cy='50' r='14' stroke='%23fb923c' stroke-width='7' fill='none'/><circle cx='78' cy='50' r='8' fill='%23fb923c'/><line x1='36' y1='50' x2='64' y2='50' stroke='%2322d3ee' stroke-width='6' stroke-linecap='round'/><circle cx='50' cy='50' r='7' fill='%2322d3ee'/></svg>">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<style>
:root {
--bg: #080808;
--bg-2: #0f0f0f;
--border: rgba(255,255,255,0.09);
--border-strong: rgba(255,255,255,0.14);
--text: #f0f0f0;
--text-2: rgba(240,240,240,0.5);
--text-3: rgba(240,240,240,0.28);
--amber: #fb923c;
--cyan: #22d3ee;
--green: #34d399;
--mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
--sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
--ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html, body {
margin: 0; padding: 0;
background: var(--bg);
color: var(--text);
font-family: var(--sans);
-webkit-font-smoothing: antialiased;
letter-spacing: -0.005em;
min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #1f1f1f; border-radius: 10px; border: 2px solid #0a0a0a; }
/* Film grain */
.grain {
position: fixed; inset: 0; pointer-events: none; z-index: 200;
opacity: 0.07; mix-blend-mode: overlay;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
background-size: 180px 180px;
}
/* Top bar */
.topbar {
height: 56px;
border-bottom: 1px solid var(--border);
display: flex; align-items: center;
padding: 0 22px;
background: rgba(8,8,8,0.85);
backdrop-filter: blur(10px);
position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.brand-mark {
width: 28px; height: 22px; flex: none;
display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 100%; height: 100%; overflow: visible; }
.brand-mark .syn-pip {
transform-origin: 50px 50px;
animation: synPip 2.4s ease-in-out infinite;
}
@keyframes synPip {
0%, 100% { opacity: 0.85; transform: scale(1); }
50% { opacity: 1; transform: scale(1.12); }
}
.brand-mark .syn-halo {
transform-origin: 50px 50px;
animation: synHalo 2.4s ease-in-out infinite;
}
@keyframes synHalo {
0%, 100% { opacity: 0.4; transform: scale(0.95); }
50% { opacity: 0.7; transform: scale(1.15); }
}
.crumb {
margin-left: 18px;
padding-left: 18px;
border-left: 1px solid var(--border);
font-family: var(--mono); font-size: 12px;
color: var(--text-2);
display: flex; align-items: center; gap: 8px;
}
.crumb .ws-tag {
display: inline-flex; align-items: center; gap: 6px;
padding: 4px 8px;
border-radius: 5px;
border: 1px solid var(--border);
background: rgba(255,255,255,0.02);
font-size: 11px;
color: var(--text);
}
.crumb .ws-tag .d { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px rgba(52,211,153,0.7); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.avatar {
width: 28px; height: 28px;
border-radius: 50%;
background: linear-gradient(135deg, #fb923c, #f59e0b);
color: #1a0a00;
display: grid; place-items: center;
font-size: 12px; font-weight: 600;
}
.right .signout {
font-size: 12px; color: var(--text-3); font-family: var(--mono);
transition: color .2s var(--ease);
}
.right .signout:hover { color: var(--text); }
/* Layout */
.layout {
display: grid;
grid-template-columns: 240px 1fr;
min-height: calc(100vh - 56px);
}
@media (max-width: 880px) { .layout { grid-template-columns: 1fr; } }
.sidebar {
border-right: 1px solid var(--border);
padding: 22px 14px;
}
.side-section { margin-bottom: 24px; }
.side-section h6 {
font-family: var(--mono); font-size: 10px;
color: var(--text-3);
letter-spacing: 0.12em; text-transform: uppercase;
margin: 0 8px 8px;
}
.side-item {
display: flex; align-items: center; gap: 10px;
height: 32px; padding: 0 8px;
border-radius: 6px;
font-size: 13px;
color: var(--text-2);
cursor: pointer;
transition: all .15s var(--ease);
}
.side-item:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.side-item.active { background: rgba(251,146,60,0.08); color: var(--amber); }
.side-item .ic { width: 14px; height: 14px; display: grid; place-items: center; color: currentColor; }
.side-item .ic svg { width: 100%; height: 100%; }
.side-item .count {
margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
}
.main {
padding: 40px 48px 80px;
max-width: 980px;
width: 100%;
}
@media (max-width: 660px) { .main { padding: 28px 22px 60px; } }
/* Welcome card */
.welcome {
border: 1px solid var(--border);
border-radius: 14px;
padding: 28px 30px;
background:
radial-gradient(ellipse at top right, rgba(251,146,60,0.07), transparent 55%),
linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
position: relative;
overflow: hidden;
margin-bottom: 36px;
}
.welcome::before {
content: ""; position: absolute; inset: 0;
background-image:
radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
background-size: 22px 22px;
mask-image: radial-gradient(ellipse at top right, black, transparent 60%);
-webkit-mask-image: radial-gradient(ellipse at top right, black, transparent 60%);
}
.welcome > * { position: relative; }
.welcome .eyebrow {
font-family: var(--mono); font-size: 11px; color: var(--amber);
letter-spacing: 0.12em; text-transform: uppercase;
}
.welcome h1 {
font-size: 30px;
font-weight: 600;
letter-spacing: -0.025em;
margin: 10px 0 8px;
line-height: 1.15;
}
.welcome p {
color: var(--text-2);
font-size: 14.5px;
max-width: 56ch;
margin: 0 0 22px;
line-height: 1.55;
}
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
display: inline-flex; align-items: center; gap: 8px;
height: 38px; padding: 0 16px;
border-radius: 8px;
font-size: 13.5px; font-weight: 500;
letter-spacing: -0.005em;
transition: all 0.2s var(--ease);
cursor: pointer;
font-family: var(--sans);
}
.btn-primary {
background: #fb923c;
color: #1a0a00;
font-weight: 600;
border: 1px solid rgba(251,146,60,0.6);
box-shadow: 0 0 18px rgba(251,146,60,0.35);
}
.btn-primary:hover { box-shadow: 0 0 26px rgba(251,146,60,0.55); transform: translateY(-1px); }
.btn-ghost {
color: var(--text);
border: 1px solid var(--border);
background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); border-color: var(--border-strong); }
/* Section heading */
.section-h {
display: flex; align-items: baseline; justify-content: space-between;
margin: 0 0 16px;
}
.section-h h2 {
font-size: 16px;
font-weight: 600;
letter-spacing: -0.01em;
margin: 0;
color: var(--text);
}
.section-h .count {
font-family: var(--mono); font-size: 11px; color: var(--text-3);
letter-spacing: 0.08em;
}
/* Templates grid */
.templates {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 14px;
margin-bottom: 40px;
}
@media (max-width: 880px) { .templates { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .templates { grid-template-columns: 1fr; } }
.tmpl {
border: 1px solid var(--border);
border-radius: 12px;
padding: 18px;
background: rgba(255,255,255,0.015);
cursor: pointer;
transition: all .2s var(--ease);
position: relative;
overflow: hidden;
}
.tmpl:hover {
border-color: var(--border-strong);
transform: translateY(-2px);
background: rgba(255,255,255,0.03);
}
.tmpl .pill {
display: inline-flex; align-items: center; gap: 6px;
height: 20px; padding: 0 8px;
border-radius: 4px;
background: rgba(34,211,238,0.08);
border: 1px solid rgba(34,211,238,0.25);
color: var(--cyan);
font-family: var(--mono); font-size: 9.5px;
letter-spacing: 0.08em; text-transform: uppercase;
margin-bottom: 14px;
}
.tmpl.amber .pill { background: rgba(251,146,60,0.08); border-color: rgba(251,146,60,0.25); color: var(--amber); }
.tmpl.green .pill { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.25); color: var(--green); }
.tmpl h3 {
font-size: 14px; font-weight: 600; margin: 0 0 4px;
letter-spacing: -0.01em;
}
.tmpl p {
margin: 0 0 12px; color: var(--text-2); font-size: 12.5px; line-height: 1.5;
}
.tmpl .agents {
display: flex; gap: 6px; flex-wrap: wrap;
}
.tmpl .agents .a {
font-family: var(--mono); font-size: 10px;
padding: 3px 6px;
border-radius: 4px;
background: rgba(255,255,255,0.03);
border: 1px solid var(--border);
color: var(--text-2);
}
/* Empty state */
.empty {
border: 1px dashed rgba(255,255,255,0.1);
border-radius: 12px;
padding: 36px;
text-align: center;
color: var(--text-2);
}
.empty .icon {
width: 36px; height: 36px;
margin: 0 auto 12px;
display: grid; place-items: center;
border-radius: 8px;
border: 1px solid var(--border);
background: rgba(255,255,255,0.02);
color: var(--text-3);
}
.empty .icon svg { width: 16px; height: 16px; }
.empty h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.empty p { font-size: 13px; margin: 0 0 16px; }
/* Coming soon banner */
.banner {
margin-top: 40px;
border: 1px solid rgba(34,211,238,0.2);
border-radius: 12px;
padding: 18px 22px;
background:
radial-gradient(ellipse at right, rgba(34,211,238,0.06), transparent 60%),
rgba(34,211,238,0.02);
display: flex; align-items: center; gap: 18px;
}
.banner .ic {
width: 32px; height: 32px;
border-radius: 8px;
border: 1px solid rgba(34,211,238,0.3);
background: rgba(34,211,238,0.08);
display: grid; place-items: center;
color: var(--cyan);
flex: none;
}
.banner .text { flex: 1; }
.banner h4 { margin: 0 0 2px; font-size: 13.5px; font-weight: 600; }
.banner p { margin: 0; color: var(--text-2); font-size: 12.5px; }
/* Editable name */
.editable-name {
cursor: text;
border-bottom: 1px dashed transparent;
transition: border-color .15s;
outline: none;
}
.editable-name:hover { border-bottom-color: rgba(255,255,255,0.25); }
.editable-name:focus { border-bottom-color: var(--amber); }
.edit-hint {
font-family: var(--mono); font-size: 10px; color: var(--text-3);
letter-spacing: 0.06em; margin-left: 10px;
opacity: 0; transition: opacity .2s;
vertical-align: middle;
}
h1:hover .edit-hint, h1:focus-within .edit-hint { opacity: 1; }
</style>
</head>
<body>
<div class="grain" aria-hidden="true"></div>
<div class="topbar">
<a class="brand" href="Cortex Landing.html">
<span class="brand-mark" aria-hidden="true">
<svg viewBox="0 0 100 100" fill="none">
<circle cx="22" cy="50" r="14" stroke="#fb923c" stroke-width="3" fill="none"/>
<circle cx="22" cy="50" r="5.5" fill="#fb923c"/>
<circle cx="78" cy="50" r="14" stroke="#fb923c" stroke-width="3" fill="none"/>
<circle cx="78" cy="50" r="5.5" fill="#fb923c"/>
<line x1="36" y1="50" x2="64" y2="50" stroke="#22d3ee" stroke-width="3" stroke-linecap="round"/>
<circle class="syn-pip" cx="50" cy="50" r="4.5" fill="#22d3ee"/>
<circle class="syn-halo" cx="50" cy="50" r="8" fill="none" stroke="#22d3ee" stroke-width="0.8" opacity="0.5"/>
</svg>
</span>
Cortex
</a>
<div class="crumb">
<span class="ws-tag"><span class="d"></span> <span id="wsName">Personal workspace</span></span>
<span style="color:var(--text-3)">/</span>
<span>Overview</span>
</div>
<div class="right">
<a class="signout" href="Cortex Landing.html" id="signoutBtn">SIGN OUT</a>
<div class="avatar" id="avatar">A</div>
</div>
</div>
<div class="layout">
<aside class="sidebar">
<div class="side-section">
<div class="side-item active">
<span class="ic"><svg viewBox="0 0 14 14" fill="none"><rect x="1.5" y="1.5" width="5" height="5" rx="1" stroke="currentColor"/><rect x="7.5" y="1.5" width="5" height="5" rx="1" stroke="currentColor"/><rect x="1.5" y="7.5" width="5" height="5" rx="1" stroke="currentColor"/><rect x="7.5" y="7.5" width="5" height="5" rx="1" stroke="currentColor"/></svg></span>
Overview
</div>
<a class="side-item" href="http://localhost:3003" style="text-decoration:none;">
<span class="ic"><svg viewBox="0 0 14 14" fill="none"><circle cx="3" cy="7" r="1.6" stroke="currentColor"/><circle cx="11" cy="3" r="1.6" stroke="currentColor"/><circle cx="11" cy="11" r="1.6" stroke="currentColor"/><path d="M4.5 6L9.5 4M4.5 8L9.5 10" stroke="currentColor"/></svg></span>
Canvas
</a>
</div>
</aside>
<main class="main">
<div class="welcome">
<div class="eyebrow">Welcome to Cortex</div>
<h1>Welcome, <span id="welcomeName" class="editable-name" contenteditable="true" spellcheck="false" title="Click to edit your name">there</span>.<span class="edit-hint">click to rename</span></h1>
<p>Your workspace is empty — that's the fun part. Spin up your first memory-aware pipeline from a template, or start with a blank canvas and drag in your own agents.</p>
<div class="welcome-actions">
<a class="btn btn-primary" href="http://localhost:3003">
Open Canvas
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 7h8m0 0L7.5 3.5M11 7l-3.5 3.5" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
</a>
<a class="btn btn-ghost" href="http://localhost:3003">New pipeline</a>
</div>
</div>
<div class="section-h">
<h2>Start from a template</h2>
<span class="count">3 templates</span>
</div>
<div class="templates">
<a class="tmpl amber" href="http://localhost:3003?template=customer-support" style="display:block; text-decoration:none;">
<span class="pill">Support</span>
<h3>Customer Support</h3>
<p>Triage reads history, Knowledge pulls KB, Resolution drafts a personalised reply — all via shared memory.</p>
<div class="agents">
<span class="a">triage</span><span class="a">knowledge</span><span class="a">resolution</span>
</div>
</a>
<a class="tmpl" href="http://localhost:3003?template=job-screener" style="display:block; text-decoration:none;">
<span class="pill">Hiring</span>
<h3>Job Screener</h3>
<p>Parse job + candidate, score fit, audit for bias, issue a final hire/no-hire recommendation.</p>
<div class="agents">
<span class="a">triage</span><span class="a">fit</span><span class="a">bias-check</span><span class="a">decision</span>
</div>
</a>
<a class="tmpl green" href="http://localhost:3003?template=codebase-qa" style="display:block; text-decoration:none;">
<span class="pill">Code</span>
<h3>Codebase Q&A</h3>
<p>Indexer maps the codebase to memory, planner picks the right files, answerer cites with function names.</p>
<div class="agents">
<span class="a">indexer</span><span class="a">planner</span><span class="a">answerer</span>
</div>
</a>
</div>
<div class="section-h">
<h2>Your pipelines</h2>
<span class="count">0 active</span>
</div>
<div class="empty">
<div class="icon">
<svg viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg>
</div>
<h3>No pipelines yet</h3>
<p>Create your first one to start chaining agents with shared memory.</p>
<a class="btn btn-ghost" href="http://localhost:3003" style="margin: 0 auto;">+ Open Canvas</a>
</div>
<div class="banner" style="cursor:pointer;" onclick="window.location.href='http://localhost:3003'">
<div class="ic">
<svg viewBox="0 0 16 16" fill="none"><rect x="2" y="2" width="12" height="12" rx="2" stroke="currentColor" stroke-width="1.2"/><path d="M5 8h6M8 5v6" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/></svg>
</div>
<div class="text">
<h4>Open the visual canvas →</h4>
<p>Drag agents onto the canvas, wire them to Mem0 pools, and run pipelines live with real-time streaming.</p>
</div>
<a class="btn btn-primary" href="http://localhost:3003" style="flex:none; white-space:nowrap;" onclick="event.stopPropagation()">
Launch Canvas
<svg width="12" height="12" viewBox="0 0 14 14" fill="none"><path d="M3 7h8m0 0L7.5 3.5M11 7l-3.5 3.5" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
</a>
</div>
</main>
</div>
<script>
(function () {
let session = null;
try { session = JSON.parse(localStorage.getItem('cortex.session') || 'null'); } catch (e) {}
const nameEl = document.getElementById('welcomeName');
const wsEl = document.getElementById('wsName');
const avatarEl = document.getElementById('avatar');
function applyName(name) {
const display = name.trim() || 'there';
nameEl.textContent = display;
wsEl.textContent = `${display}'s workspace`;
avatarEl.textContent = display.charAt(0).toUpperCase();
}
function saveName(name) {
try {
const s = JSON.parse(localStorage.getItem('cortex.session') || '{}');
s.displayName = name.trim();
localStorage.setItem('cortex.session', JSON.stringify(s));
} catch (e) {}
}
// Seed from session
if (session) {
const saved = session.displayName;
const fromEmail = (session.email || '').split('@')[0] || 'there';
const initial = saved || (fromEmail.charAt(0).toUpperCase() + fromEmail.slice(1));
applyName(initial);
}
// Inline editing
nameEl.addEventListener('keydown', (e) => {
if (e.key === 'Enter') { e.preventDefault(); nameEl.blur(); }
if (e.key === 'Escape') { e.preventDefault(); nameEl.blur(); }
});
nameEl.addEventListener('focus', () => {
// Select all text on focus for easy replace
const range = document.createRange();
range.selectNodeContents(nameEl);
const sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
});
nameEl.addEventListener('blur', () => {
const val = nameEl.textContent.trim();
if (!val) { nameEl.textContent = 'there'; }
applyName(nameEl.textContent);
saveName(nameEl.textContent);
});
})();
// Sign out clears session
document.getElementById('signoutBtn').addEventListener('click', () => {
try { localStorage.removeItem('cortex.session'); } catch (e) {}
});
</script>
</body>
</html>