agentlytics 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cache.js +7 -1
- package/index.js +78 -11
- package/package.json +2 -1
- package/ui/src/App.jsx +23 -21
- package/ui/src/components/ActivityHeatmap.jsx +3 -3
- package/ui/src/components/AnimatedLogo.jsx +96 -0
- package/ui/src/components/ChatSidebar.jsx +7 -7
- package/ui/src/components/DateRangePicker.jsx +5 -5
- package/ui/src/components/EditorBreakdown.jsx +2 -2
- package/ui/src/components/EditorDot.jsx +1 -1
- package/ui/src/components/KpiCard.jsx +2 -2
- package/ui/src/components/LiveFeed.jsx +8 -8
- package/ui/src/components/LoginScreen.jsx +8 -6
- package/ui/src/components/MessageRenderer.jsx +5 -5
- package/ui/src/components/ModelBreakdown.jsx +3 -3
- package/ui/src/components/SectionTitle.jsx +1 -1
- package/ui/src/index.css +1 -1
- package/ui/src/pages/Compare.jsx +18 -18
- package/ui/src/pages/Dashboard.jsx +14 -14
- package/ui/src/pages/DeepAnalysis.jsx +27 -27
- package/ui/src/pages/ProjectDetail.jsx +11 -11
- package/ui/src/pages/Projects.jsx +5 -5
- package/ui/src/pages/RelayDashboard.jsx +463 -257
- package/ui/src/pages/RelaySessionDetail.jsx +1 -1
- package/ui/src/pages/RelayUserDetail.jsx +374 -110
- package/ui/src/pages/Sessions.jsx +19 -19
- package/ui/src/pages/SqlViewer.jsx +14 -14
|
@@ -250,15 +250,15 @@ export default function Sessions({ overview }) {
|
|
|
250
250
|
<td className="py-2 px-3">
|
|
251
251
|
<span className="inline-flex items-center gap-1.5">
|
|
252
252
|
<EditorIcon source={c.source} size={12} />
|
|
253
|
-
<span className="text-[
|
|
253
|
+
<span className="text-[12px]" style={{ color: 'var(--c-text2)' }}>{editorLabel(c.source)}</span>
|
|
254
254
|
</span>
|
|
255
255
|
</td>
|
|
256
|
-
<td className="py-2 px-3 font-medium truncate max-w-[280px] text-[
|
|
256
|
+
<td className="py-2 px-3 font-medium truncate max-w-[280px] text-[12px]" style={{ color: 'var(--c-white)' }}>
|
|
257
257
|
{c.name || <span style={{ color: 'var(--c-text3)' }}>Untitled</span>}
|
|
258
|
-
{c.encrypted && <span className="ml-1.5 text-[
|
|
258
|
+
{c.encrypted && <span className="ml-1.5 text-[10px] text-yellow-500/60">locked</span>}
|
|
259
259
|
</td>
|
|
260
260
|
{!groupByProject && (
|
|
261
|
-
<td className="py-2 px-3 truncate max-w-[160px] text-[
|
|
261
|
+
<td className="py-2 px-3 truncate max-w-[160px] text-[12px]" style={{ color: 'var(--c-text2)' }} title={c.folder}>
|
|
262
262
|
{c.folder ? (
|
|
263
263
|
<span
|
|
264
264
|
className="cursor-pointer hover:underline"
|
|
@@ -268,11 +268,11 @@ export default function Sessions({ overview }) {
|
|
|
268
268
|
) : ''}
|
|
269
269
|
</td>
|
|
270
270
|
)}
|
|
271
|
-
<td className="py-2 px-3 text-[
|
|
272
|
-
<td className="py-2 px-3 text-[
|
|
271
|
+
<td className="py-2 px-3 text-[12px]" style={{ color: 'var(--c-text2)' }}>{c.mode || ''}</td>
|
|
272
|
+
<td className="py-2 px-3 text-[12px] font-mono truncate max-w-[150px]" style={{ color: 'var(--c-text2)' }} title={c.topModel || ''}>
|
|
273
273
|
{c.topModel || ''}
|
|
274
274
|
</td>
|
|
275
|
-
<td className="py-2 px-3 text-[
|
|
275
|
+
<td className="py-2 px-3 text-[12px]">
|
|
276
276
|
{c.bubbleCount >= 500 ? (
|
|
277
277
|
<span className="inline-flex items-center gap-0.5 font-bold" style={{ color: '#ef4444' }}>
|
|
278
278
|
<AlertTriangle size={9} />{c.bubbleCount}
|
|
@@ -285,7 +285,7 @@ export default function Sessions({ overview }) {
|
|
|
285
285
|
<span style={{ color: 'var(--c-text3)' }}>{c.bubbleCount || 0}</span>
|
|
286
286
|
)}
|
|
287
287
|
</td>
|
|
288
|
-
<td className="py-2 px-3 text-[
|
|
288
|
+
<td className="py-2 px-3 text-[12px] whitespace-nowrap" style={{ color: 'var(--c-text3)' }}>
|
|
289
289
|
{formatDate(c.lastUpdatedAt || c.createdAt)}
|
|
290
290
|
</td>
|
|
291
291
|
</tr>
|
|
@@ -342,7 +342,7 @@ export default function Sessions({ overview }) {
|
|
|
342
342
|
},
|
|
343
343
|
}}
|
|
344
344
|
/>
|
|
345
|
-
) : <div className="text-[
|
|
345
|
+
) : <div className="text-[11px] py-8 text-center" style={{ color: 'var(--c-text3)' }}>no model data</div>}
|
|
346
346
|
</div>
|
|
347
347
|
</div>
|
|
348
348
|
<div className="card p-3">
|
|
@@ -367,7 +367,7 @@ export default function Sessions({ overview }) {
|
|
|
367
367
|
plugins: { legend: { display: false }, tooltip: { bodyFont: { family: MONO, size: 10 }, titleFont: { family: MONO, size: 10 } } },
|
|
368
368
|
}}
|
|
369
369
|
/>
|
|
370
|
-
) : <div className="text-[
|
|
370
|
+
) : <div className="text-[11px] py-8 text-center" style={{ color: 'var(--c-text3)' }}>no mode data</div>}
|
|
371
371
|
</div>
|
|
372
372
|
</div>
|
|
373
373
|
</div>
|
|
@@ -379,12 +379,12 @@ export default function Sessions({ overview }) {
|
|
|
379
379
|
<div className="flex items-center justify-between mb-2">
|
|
380
380
|
<SectionTitle>
|
|
381
381
|
session timeline
|
|
382
|
-
<span className="ml-2 font-normal text-[
|
|
382
|
+
<span className="ml-2 font-normal text-[10px]" style={{ color: 'var(--c-text3)' }}>(drag to select range)</span>
|
|
383
383
|
</SectionTitle>
|
|
384
384
|
{dateRange && (
|
|
385
385
|
<button
|
|
386
386
|
onClick={() => setDateRange(null)}
|
|
387
|
-
className="flex items-center gap-1 text-[
|
|
387
|
+
className="flex items-center gap-1 text-[11px] px-2 py-0.5 transition"
|
|
388
388
|
style={{ color: 'var(--c-accent)', border: '1px solid var(--c-border)' }}
|
|
389
389
|
>
|
|
390
390
|
<X size={10} />
|
|
@@ -424,7 +424,7 @@ export default function Sessions({ overview }) {
|
|
|
424
424
|
<select
|
|
425
425
|
value={editor}
|
|
426
426
|
onChange={e => setEditor(e.target.value)}
|
|
427
|
-
className="pl-8 pr-3 py-1 text-[
|
|
427
|
+
className="pl-8 pr-3 py-1 text-[12px] outline-none appearance-none cursor-pointer"
|
|
428
428
|
style={{ background: 'var(--c-bg3)', color: 'var(--c-text)', border: '1px solid var(--c-border)' }}
|
|
429
429
|
>
|
|
430
430
|
<option value="">All Editors</option>
|
|
@@ -440,13 +440,13 @@ export default function Sessions({ overview }) {
|
|
|
440
440
|
placeholder="search sessions..."
|
|
441
441
|
value={search}
|
|
442
442
|
onChange={e => setSearch(e.target.value)}
|
|
443
|
-
className="w-full pl-8 pr-3 py-1 text-[
|
|
443
|
+
className="w-full pl-8 pr-3 py-1 text-[12px] outline-none"
|
|
444
444
|
style={{ background: 'var(--c-bg3)', color: 'var(--c-text)', border: '1px solid var(--c-border)' }}
|
|
445
445
|
/>
|
|
446
446
|
</div>
|
|
447
447
|
<button
|
|
448
448
|
onClick={() => setGroupByProject(!groupByProject)}
|
|
449
|
-
className="flex items-center gap-1.5 px-3 py-1 text-[
|
|
449
|
+
className="flex items-center gap-1.5 px-3 py-1 text-[12px] transition"
|
|
450
450
|
style={{
|
|
451
451
|
border: groupByProject ? '1px solid var(--c-accent)' : '1px solid var(--c-border)',
|
|
452
452
|
color: groupByProject ? 'var(--c-accent)' : 'var(--c-text2)',
|
|
@@ -456,7 +456,7 @@ export default function Sessions({ overview }) {
|
|
|
456
456
|
{groupByProject ? <FolderOpen size={13} /> : <List size={13} />}
|
|
457
457
|
{groupByProject ? 'grouped' : 'flat'}
|
|
458
458
|
</button>
|
|
459
|
-
<span className="text-[
|
|
459
|
+
<span className="text-[11px]" style={{ color: 'var(--c-text3)' }}>
|
|
460
460
|
{loading ? 'loading...' : `${filtered.length} of ${total}`}
|
|
461
461
|
</span>
|
|
462
462
|
{/* Server-side date range filter */}
|
|
@@ -468,7 +468,7 @@ export default function Sessions({ overview }) {
|
|
|
468
468
|
<div className="card overflow-hidden">
|
|
469
469
|
<table className="w-full text-sm">
|
|
470
470
|
<thead>
|
|
471
|
-
<tr className="text-[
|
|
471
|
+
<tr className="text-[10px] uppercase tracking-wider" style={{ borderBottom: '1px solid var(--c-border)', color: 'var(--c-text3)' }}>
|
|
472
472
|
<th className="text-left py-2 px-3 font-medium">editor</th>
|
|
473
473
|
<th className="text-left py-2 px-3 font-medium">name</th>
|
|
474
474
|
<th className="text-left py-2 px-3 font-medium">project</th>
|
|
@@ -500,12 +500,12 @@ export default function Sessions({ overview }) {
|
|
|
500
500
|
{isCollapsed ? <ChevronRight size={13} style={{ color: 'var(--c-text3)' }} /> : <ChevronDown size={13} style={{ color: 'var(--c-text3)' }} />}
|
|
501
501
|
<FolderOpen size={13} style={{ color: 'var(--c-text3)' }} />
|
|
502
502
|
<span className="text-xs font-medium" style={{ color: 'var(--c-white)' }}>{g.name}</span>
|
|
503
|
-
<span className="text-[
|
|
503
|
+
<span className="text-[11px] truncate max-w-[300px]" style={{ color: 'var(--c-text3)' }}>{g.folder !== g.name && g.folder !== '(no project)' ? g.folder : ''}</span>
|
|
504
504
|
<span className="ml-auto flex items-center gap-2">
|
|
505
505
|
{editorSet.slice(0, 5).map(e => (
|
|
506
506
|
<span key={e} className="w-2 h-2 rounded-full" style={{ background: editorColor(e) }} title={editorLabel(e)} />
|
|
507
507
|
))}
|
|
508
|
-
<span className="text-[
|
|
508
|
+
<span className="text-[11px]" style={{ color: 'var(--c-text3)' }}>{g.items.length}</span>
|
|
509
509
|
</span>
|
|
510
510
|
</div>
|
|
511
511
|
{!isCollapsed && (
|
|
@@ -138,11 +138,11 @@ export default function SqlViewer() {
|
|
|
138
138
|
<div className="flex items-center gap-2">
|
|
139
139
|
<Database size={16} style={txtStyle} />
|
|
140
140
|
<h1 className="text-sm font-semibold" style={txtStyle}>SQL Viewer</h1>
|
|
141
|
-
<span className="text-[
|
|
141
|
+
<span className="text-[11px] px-1.5 py-0.5 rounded" style={{ ...txt2Style, background: 'var(--c-bg2)' }}>cache.db</span>
|
|
142
142
|
</div>
|
|
143
143
|
<button
|
|
144
144
|
onClick={() => setShowSchema(!showSchema)}
|
|
145
|
-
className="flex items-center gap-1 text-[
|
|
145
|
+
className="flex items-center gap-1 text-[12px] px-2 py-1 rounded transition hover:bg-[var(--c-card)]"
|
|
146
146
|
style={txt2Style}
|
|
147
147
|
>
|
|
148
148
|
<Table2 size={12} />
|
|
@@ -153,7 +153,7 @@ export default function SqlViewer() {
|
|
|
153
153
|
|
|
154
154
|
{/* Schema panel */}
|
|
155
155
|
{showSchema && schema && (
|
|
156
|
-
<div className="rounded-lg p-3 space-y-2 text-[
|
|
156
|
+
<div className="rounded-lg p-3 space-y-2 text-[12px]" style={cardBg}>
|
|
157
157
|
<div className="flex flex-wrap gap-4">
|
|
158
158
|
{schema.tables.map(table => (
|
|
159
159
|
<div key={table} className="min-w-[180px]">
|
|
@@ -162,8 +162,8 @@ export default function SqlViewer() {
|
|
|
162
162
|
{schema.schema[table]?.map(col => (
|
|
163
163
|
<div key={col.name} className="flex gap-2" style={txt2Style}>
|
|
164
164
|
<span style={txtStyle}>{col.name}</span>
|
|
165
|
-
<span className="text-[
|
|
166
|
-
{col.pk ? <span className="text-[
|
|
165
|
+
<span className="text-[11px] opacity-60">{col.type}</span>
|
|
166
|
+
{col.pk ? <span className="text-[10px] px-1 rounded" style={{ background: '#6366f133', color: '#6366f1' }}>PK</span> : null}
|
|
167
167
|
</div>
|
|
168
168
|
))}
|
|
169
169
|
</div>
|
|
@@ -179,7 +179,7 @@ export default function SqlViewer() {
|
|
|
179
179
|
<button
|
|
180
180
|
key={i}
|
|
181
181
|
onClick={() => setSql(q.sql)}
|
|
182
|
-
className="text-[
|
|
182
|
+
className="text-[11px] px-2 py-0.5 rounded transition hover:bg-[var(--c-card)]"
|
|
183
183
|
style={{ ...txt2Style, border: '1px solid var(--c-border)' }}
|
|
184
184
|
>
|
|
185
185
|
{q.label}
|
|
@@ -190,9 +190,9 @@ export default function SqlViewer() {
|
|
|
190
190
|
{/* SQL editor */}
|
|
191
191
|
<div className="rounded-lg overflow-hidden" style={cardBg}>
|
|
192
192
|
<div className="flex items-center justify-between px-3 py-1.5" style={{ borderBottom: '1px solid var(--c-border)' }}>
|
|
193
|
-
<span className="text-[
|
|
193
|
+
<span className="text-[11px] font-mono" style={txt2Style}>SQL</span>
|
|
194
194
|
<div className="flex items-center gap-1">
|
|
195
|
-
<span className="text-[
|
|
195
|
+
<span className="text-[11px]" style={txt2Style}>⌘+Enter to run</span>
|
|
196
196
|
</div>
|
|
197
197
|
</div>
|
|
198
198
|
<textarea
|
|
@@ -209,14 +209,14 @@ export default function SqlViewer() {
|
|
|
209
209
|
<button
|
|
210
210
|
onClick={runQuery}
|
|
211
211
|
disabled={loading || !sql.trim()}
|
|
212
|
-
className="flex items-center gap-1.5 px-3 py-1 text-[
|
|
212
|
+
className="flex items-center gap-1.5 px-3 py-1 text-[12px] font-medium rounded transition"
|
|
213
213
|
style={{ background: '#6366f1', color: '#fff', opacity: loading ? 0.5 : 1 }}
|
|
214
214
|
>
|
|
215
215
|
<Play size={11} />
|
|
216
216
|
{loading ? 'Running...' : 'Run Query'}
|
|
217
217
|
</button>
|
|
218
218
|
{elapsed && result && (
|
|
219
|
-
<span className="text-[
|
|
219
|
+
<span className="text-[11px]" style={txt2Style}>
|
|
220
220
|
{result.count} row{result.count !== 1 ? 's' : ''} in {elapsed}ms
|
|
221
221
|
</span>
|
|
222
222
|
)}
|
|
@@ -235,7 +235,7 @@ export default function SqlViewer() {
|
|
|
235
235
|
|
|
236
236
|
{/* Error */}
|
|
237
237
|
{error && (
|
|
238
|
-
<div className="rounded-lg px-3 py-2 text-[
|
|
238
|
+
<div className="rounded-lg px-3 py-2 text-[12px]" style={{ background: '#ef444420', border: '1px solid #ef444440', color: '#ef4444' }}>
|
|
239
239
|
{error}
|
|
240
240
|
</div>
|
|
241
241
|
)}
|
|
@@ -244,7 +244,7 @@ export default function SqlViewer() {
|
|
|
244
244
|
{result && result.rows.length > 0 && (
|
|
245
245
|
<div className="rounded-lg overflow-hidden" style={cardBg}>
|
|
246
246
|
<div className="overflow-x-auto" style={{ maxHeight: 400 }}>
|
|
247
|
-
<table className="w-full text-[
|
|
247
|
+
<table className="w-full text-[12px]" style={{ borderCollapse: 'collapse' }}>
|
|
248
248
|
<thead>
|
|
249
249
|
<tr style={{ borderBottom: '1px solid var(--c-border)' }}>
|
|
250
250
|
{result.columns.map(col => (
|
|
@@ -271,7 +271,7 @@ export default function SqlViewer() {
|
|
|
271
271
|
)}
|
|
272
272
|
|
|
273
273
|
{result && result.rows.length === 0 && (
|
|
274
|
-
<div className="rounded-lg px-3 py-6 text-center text-[
|
|
274
|
+
<div className="rounded-lg px-3 py-6 text-center text-[12px]" style={{ ...cardBg, ...txt2Style }}>
|
|
275
275
|
Query returned 0 rows
|
|
276
276
|
</div>
|
|
277
277
|
)}
|
|
@@ -280,7 +280,7 @@ export default function SqlViewer() {
|
|
|
280
280
|
{chartData && (
|
|
281
281
|
<div className="rounded-lg p-4" style={cardBg}>
|
|
282
282
|
<div className="flex items-center gap-2 mb-3">
|
|
283
|
-
<span className="text-[
|
|
283
|
+
<span className="text-[12px] font-semibold" style={txtStyle}>Visualization</span>
|
|
284
284
|
<div className="flex gap-0.5 ml-2" style={{ border: '1px solid var(--c-border)', borderRadius: 6 }}>
|
|
285
285
|
{[
|
|
286
286
|
{ type: 'bar', icon: BarChart3 },
|