agentlytics 0.1.3 → 0.1.6
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/README.md +1 -1
- package/cache.js +420 -10
- package/editors/cursor.js +28 -6
- package/editors/vscode.js +6 -0
- package/index.js +78 -11
- package/package.json +2 -1
- package/server.js +27 -0
- package/ui/package-lock.json +60 -375
- package/ui/package.json +1 -1
- package/ui/src/App.jsx +22 -17
- 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/lib/api.js +20 -0
- package/ui/src/lib/constants.js +8 -0
- package/ui/src/pages/ChatDetail.jsx +5 -2
- package/ui/src/pages/Compare.jsx +18 -18
- package/ui/src/pages/CostAnalysis.jsx +356 -0
- package/ui/src/pages/Dashboard.jsx +39 -21
- package/ui/src/pages/DeepAnalysis.jsx +38 -31
- package/ui/src/pages/ProjectDetail.jsx +23 -15
- package/ui/src/pages/Projects.jsx +14 -8
- package/ui/src/pages/RelayDashboard.jsx +29 -29
- package/ui/src/pages/RelaySessionDetail.jsx +1 -1
- package/ui/src/pages/RelayUserDetail.jsx +18 -18
- package/ui/src/pages/Sessions.jsx +24 -20
- package/ui/src/pages/SqlViewer.jsx +14 -14
|
@@ -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 },
|