agentlytics 0.1.18 → 0.1.20

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.
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect, useMemo } from 'react'
2
2
  import { useSearchParams, useNavigate } from 'react-router-dom'
3
- import { ArrowLeft, Search, FolderOpen, Calendar, MessageSquare, Wrench, Cpu, Zap, AlertTriangle } from 'lucide-react'
3
+ import { ArrowLeft, Search, FolderOpen, Calendar, MessageSquare, Wrench, Cpu, Zap, AlertTriangle, ShieldCheck } from 'lucide-react'
4
4
  import { Chart as ChartJS, ArcElement, Tooltip, Legend, CategoryScale, LinearScale, BarElement } from 'chart.js'
5
5
  import { Doughnut, Bar } from 'react-chartjs-2'
6
6
  import { fetchProjects, fetchChats, fetchCosts } from '../lib/api'
@@ -10,6 +10,8 @@ import KpiCard from '../components/KpiCard'
10
10
  import EditorIcon from '../components/EditorIcon'
11
11
  import SectionTitle from '../components/SectionTitle'
12
12
  import ChatSidebar from '../components/ChatSidebar'
13
+ import AnimatedLoader from '../components/AnimatedLoader'
14
+ import AiAuditCard from '../components/AiAuditCard'
13
15
 
14
16
  ChartJS.register(ArcElement, Tooltip, Legend, CategoryScale, LinearScale, BarElement)
15
17
 
@@ -76,7 +78,7 @@ export default function ProjectDetail() {
76
78
  }
77
79
 
78
80
  if (!folder) return <div className="text-sm py-12 text-center" style={{ color: 'var(--c-text3)' }}>no project specified</div>
79
- if (loading) return <div className="text-sm py-12 text-center" style={{ color: 'var(--c-text2)' }}>loading project...</div>
81
+ if (loading) return <AnimatedLoader label="Loading project..." />
80
82
  if (!project) return <div className="text-sm py-12 text-center" style={{ color: 'var(--c-text3)' }}>project not found</div>
81
83
 
82
84
  const editorEntries = Object.entries(project.editors).sort((a, b) => b[1] - a[1])
@@ -233,6 +235,10 @@ export default function ProjectDetail() {
233
235
  </div>
234
236
  </div>
235
237
 
238
+ {/* AI Readiness Audit */}
239
+ {console.log('Rendering AiAuditCard, folder:', folder)}
240
+ <AiAuditCard folder={folder} />
241
+
236
242
  {/* Sessions */}
237
243
  <div>
238
244
  <div className="flex items-center gap-3 mb-2">
@@ -10,6 +10,7 @@ import KpiCard from '../components/KpiCard'
10
10
  import EditorIcon from '../components/EditorIcon'
11
11
  import DateRangePicker from '../components/DateRangePicker'
12
12
  import SectionTitle from '../components/SectionTitle'
13
+ import AnimatedLoader from '../components/AnimatedLoader'
13
14
 
14
15
  ChartJS.register(ArcElement, Tooltip, Legend, CategoryScale, LinearScale, BarElement)
15
16
 
@@ -37,7 +38,7 @@ export default function Projects({ overview }) {
37
38
  ]).then(([p, c]) => { setProjects(p); setCosts(c) })
38
39
  }, [dateRange])
39
40
 
40
- if (!projects) return <div className="text-sm py-12 text-center" style={{ color: 'var(--c-text2)' }}>loading projects...</div>
41
+ if (!projects) return <AnimatedLoader label="Loading projects..." />
41
42
 
42
43
  const filtered = projects.filter(p => {
43
44
  if (editorFilter && !p.editors[editorFilter]) return false
@@ -10,6 +10,7 @@ import ChatSidebar from '../components/ChatSidebar'
10
10
  import LiveFeed from '../components/LiveFeed'
11
11
  import { editorColor, editorLabel, formatNumber, formatDate } from '../lib/constants'
12
12
  import { fetchRelayTeamStats, fetchRelaySearch, fetchRelaySession, mergeRelayUsers } from '../lib/api'
13
+ import AnimatedLoader from '../components/AnimatedLoader'
13
14
  import { useTheme } from '../lib/theme'
14
15
 
15
16
  ChartJS.register(ArcElement, Tooltip, Legend, CategoryScale, LinearScale, BarElement)
@@ -291,7 +292,7 @@ export default function RelayDashboard() {
291
292
  return map
292
293
  }, [userList])
293
294
 
294
- if (!stats) return <div className="text-sm py-12 text-center" style={{ color: 'var(--c-text2)' }}>loading relay data...</div>
295
+ if (!stats) return <AnimatedLoader label="Loading relay data..." />
295
296
 
296
297
  const editorData = stats.editors || []
297
298
  const models = stats.topModels || []
@@ -4,6 +4,7 @@ import { fetchConfig, updateConfig, fetchAllProjects } from '../lib/api'
4
4
  import { editorLabel, formatNumber, formatDate } from '../lib/constants'
5
5
  import EditorIcon from '../components/EditorIcon'
6
6
  import SectionTitle from '../components/SectionTitle'
7
+ import AnimatedLoader from '../components/AnimatedLoader'
7
8
 
8
9
  export default function Settings() {
9
10
  const [config, setConfig] = useState(null)
@@ -21,7 +22,7 @@ export default function Settings() {
21
22
  }, [])
22
23
 
23
24
  if (loading || !config) {
24
- return <div className="text-sm py-12 text-center" style={{ color: 'var(--c-text2)' }}>loading settings...</div>
25
+ return <AnimatedLoader label="Loading settings..." />
25
26
  }
26
27
 
27
28
  const hiddenProjects = config.hiddenProjects || []
@@ -3,6 +3,7 @@ import { CreditCard, RefreshCw, Clock, Zap, Shield, ChevronDown, ChevronUp } fro
3
3
  import { fetchUsage } from '../lib/api'
4
4
  import { editorLabel, editorColor } from '../lib/constants'
5
5
  import EditorIcon from '../components/EditorIcon'
6
+ import AnimatedLoader from '../components/AnimatedLoader'
6
7
 
7
8
  function UsageBar({ value, max = 100, color, label }) {
8
9
  const pct = max > 0 ? Math.min((value / max) * 100, 100) : 0
@@ -386,7 +387,7 @@ export default function Subscriptions() {
386
387
  </div>
387
388
 
388
389
  {loading && !data && (
389
- <div className="text-sm py-12 text-center" style={{ color: 'var(--c-text2)' }}>loading subscriptions...</div>
390
+ <AnimatedLoader label="Loading subscriptions..." />
390
391
  )}
391
392
 
392
393
  {error && (