@cryptiklemur/lattice 4.0.2 → 5.0.1
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/bin/lattice +1 -9
- package/dist/client/assets/{angular-html-N8PCEquT.js → angular-html-DKTL-XDO.js} +1 -1
- package/dist/client/assets/{angular-ts-CJ8RJIPD.js → angular-ts-tvBzOwQR.js} +1 -1
- package/dist/client/assets/{apl-BD6tCLWN.js → apl-CCzl5qFl.js} +1 -1
- package/dist/client/assets/{astro-CpIIfBs6.js → astro-DNQTpO2Y.js} +1 -1
- package/dist/client/assets/{blade-D3qgnjiV.js → blade-CyJoIMeJ.js} +1 -1
- package/dist/client/assets/{c-Dr6ADN_t.js → c-OEwk5KN8.js} +1 -1
- package/dist/client/assets/{cobol-BIfDE0Hr.js → cobol-DpHyJzz2.js} +1 -1
- package/dist/client/assets/{coffee-DHQ57vfY.js → coffee-BX5dbDzZ.js} +1 -1
- package/dist/client/assets/{cpp-CEBY6JOp.js → cpp-BTBjNg2U.js} +1 -1
- package/dist/client/assets/{crystal-D125CSmP.js → crystal-CNzZd6DW.js} +1 -1
- package/dist/client/assets/{css-CBmrkYSr.js → css-BuKsNmms.js} +1 -1
- package/dist/client/assets/{dist-A_mCRD1f.js → dist-CKpDHMy6.js} +2 -2
- package/dist/client/assets/{edge-Ccsz7cJW.js → edge-DzhnGgJE.js} +1 -1
- package/dist/client/assets/{elixir-Do6gk14X.js → elixir-Dqs0waqF.js} +1 -1
- package/dist/client/assets/{elm-Db22zT4C.js → elm-BtWwjxWn.js} +1 -1
- package/dist/client/assets/{erb-MXVqAAJD.js → erb-iPD89b4v.js} +1 -1
- package/dist/client/assets/{git-rebase-B-LLWBOA.js → git-rebase-BxVNXJL4.js} +1 -1
- package/dist/client/assets/{glimmer-js-eWszRU73.js → glimmer-js-BlyCupwF.js} +1 -1
- package/dist/client/assets/{glimmer-ts-VQmwGqUp.js → glimmer-ts-DjIxWOS9.js} +1 -1
- package/dist/client/assets/{glsl-B8ilOfAl.js → glsl-CGIL-65r.js} +1 -1
- package/dist/client/assets/{graphql-DnTqxeOc.js → graphql-DeOn6mNV.js} +1 -1
- package/dist/client/assets/{hack-XJsHYSQb.js → hack-DVppeCmS.js} +1 -1
- package/dist/client/assets/{haml-CQ7Vqzwp.js → haml-WDhua0Mp.js} +1 -1
- package/dist/client/assets/{handlebars-C4szooBf.js → handlebars-i2Fu_9HI.js} +1 -1
- package/dist/client/assets/{html-B6EgAiSd.js → html-B1e6oxzK.js} +1 -1
- package/dist/client/assets/{html-derivative-DdinogQX.js → html-derivative-MofKXIVd.js} +1 -1
- package/dist/client/assets/{http-BSLxCgRq.js → http-Dk6S5pRD.js} +1 -1
- package/dist/client/assets/{hurl-pOsTwNfp.js → hurl-CroFYYJG.js} +1 -1
- package/dist/client/assets/{index-BHQ_8mvl.js → index-CVu-S6Yk.js} +2 -2
- package/dist/client/assets/{java-DRQLiiST.js → java-B89FYjqS.js} +1 -1
- package/dist/client/assets/{javascript-DvEK2-47.js → javascript-m6CO1Uiy.js} +1 -1
- package/dist/client/assets/{jinja-D2NYJ25y.js → jinja-DC9Wi41X.js} +1 -1
- package/dist/client/assets/{jison-DDZaLNAp.js → jison-6xiegwDk.js} +1 -1
- package/dist/client/assets/{json-TGR0NIWd.js → json-HA-96-qr.js} +1 -1
- package/dist/client/assets/{jsx-BjUoPYga.js → jsx-Wt1a8i8U.js} +1 -1
- package/dist/client/assets/{julia-C4gjSpFu.js → julia-7M93VBON.js} +1 -1
- package/dist/client/assets/{just-H351x5u_.js → just-CjfDLYLv.js} +1 -1
- package/dist/client/assets/{latex-BiTmf6gf.js → latex-CitsJ46x.js} +1 -1
- package/dist/client/assets/{liquid-86ufjRy-.js → liquid-C8VIFin8.js} +1 -1
- package/dist/client/assets/{lua-BNxR0F_8.js → lua-Ba2N7esc.js} +1 -1
- package/dist/client/assets/{marko-CvRxpRjM.js → marko-lTLvb2wu.js} +1 -1
- package/dist/client/assets/{mdc-CYbAIy2C.js → mdc-D6IV-8FD.js} +1 -1
- package/dist/client/assets/{nginx-egdgMq-F.js → nginx-Ch5AjE6S.js} +1 -1
- package/dist/client/assets/{nim-CXBJVz_w.js → nim-WmDDC6LW.js} +1 -1
- package/dist/client/assets/{perl-XRfMobzg.js → perl-CQv0gYuq.js} +1 -1
- package/dist/client/assets/{php-Br7a8uil.js → php-BJmH0qOB.js} +1 -1
- package/dist/client/assets/{pug-BVbbUVvy.js → pug-CsHPkzc9.js} +1 -1
- package/dist/client/assets/{qml-ByKvrL1j.js → qml-B36ecArG.js} +1 -1
- package/dist/client/assets/{r-mVoV0Ni6.js → r-D5Yi5Z4y.js} +1 -1
- package/dist/client/assets/{razor-T5O-9UJL.js → razor-CHAxVq4R.js} +1 -1
- package/dist/client/assets/{regexp-CioRuhuN.js → regexp-gfs--3M7.js} +1 -1
- package/dist/client/assets/{rst-V__uTudD.js → rst-ugdlp-hl.js} +1 -1
- package/dist/client/assets/{ruby-C_PuKPTI.js → ruby-CDRRW37j.js} +1 -1
- package/dist/client/assets/{sas-D_DqqQH4.js → sas-DZaNQaIP.js} +1 -1
- package/dist/client/assets/{scss-D-TjzZ4c.js → scss-CzWQEplj.js} +1 -1
- package/dist/client/assets/{shellscript-E5759VHu.js → shellscript-fgYvpu9N.js} +1 -1
- package/dist/client/assets/{shellsession-AESTM-Pv.js → shellsession-BoAohHh7.js} +1 -1
- package/dist/client/assets/{soy-QrbrrcDv.js → soy-DBzVgv9x.js} +1 -1
- package/dist/client/assets/{sql-0M8VcDHD.js → sql-BYXpAYTs.js} +1 -1
- package/dist/client/assets/{stata-CgeIpGtc.js → stata-I71MMY3p.js} +1 -1
- package/dist/client/assets/{surrealql-DBGwnZbw.js → surrealql-C9U8_1VO.js} +1 -1
- package/dist/client/assets/{svelte-Cv0PvUc_.js → svelte-VOFrPnWT.js} +1 -1
- package/dist/client/assets/{templ-B9t7xRE4.js → templ-BIaxAEtC.js} +1 -1
- package/dist/client/assets/{tex-DhZZ8dr2.js → tex-D1dwnBE5.js} +1 -1
- package/dist/client/assets/{ts-tags-BFv8sbnd.js → ts-tags-C0L2Q0r5.js} +1 -1
- package/dist/client/assets/{tsx-CXC9KSbY.js → tsx-BqcycEv1.js} +1 -1
- package/dist/client/assets/{twig-CM_OO66r.js → twig-vyWqOhpM.js} +1 -1
- package/dist/client/assets/{typescript-BdgOTaoD.js → typescript-B2YbovqG.js} +1 -1
- package/dist/client/assets/{vue-BnQhjnCm.js → vue-CbXxGdjo.js} +1 -1
- package/dist/client/assets/{vue-html-CNnGecRI.js → vue-html-DDX4KXW7.js} +1 -1
- package/dist/client/assets/{vue-vine-DCuMkRhK.js → vue-vine-DsyY1LR5.js} +1 -1
- package/dist/client/assets/{xml-CbTD7cB8.js → xml-Ddi0-r0D.js} +1 -1
- package/dist/client/assets/{xsl-uOqqo7cf.js → xsl-CsFcZHFS.js} +1 -1
- package/dist/client/assets/{yaml-BNrLoH59.js → yaml-tGJWoH6Y.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/sw.js +1 -1
- package/dist/server/analytics/engine.js +832 -0
- package/dist/server/assets.js +39 -0
- package/dist/server/auth/passphrase.js +70 -0
- package/dist/server/config.js +47 -0
- package/dist/server/daemon.js +533 -0
- package/dist/server/features/ralph-loop.js +138 -0
- package/dist/server/features/scheduler.js +260 -0
- package/dist/server/features/sticky-notes.js +99 -0
- package/dist/server/handlers/analytics.js +28 -0
- package/dist/server/handlers/attachment.js +158 -0
- package/dist/server/handlers/bookmarks.js +41 -0
- package/dist/server/handlers/chat.js +350 -0
- package/dist/server/handlers/editor.js +72 -0
- package/dist/server/handlers/fs.js +234 -0
- package/dist/server/handlers/loop.js +33 -0
- package/dist/server/handlers/memory.js +181 -0
- package/dist/server/handlers/mesh.js +322 -0
- package/dist/server/handlers/notes.js +36 -0
- package/dist/server/handlers/plugins.js +593 -0
- package/dist/server/handlers/project-settings.js +166 -0
- package/dist/server/handlers/scheduler.js +52 -0
- package/dist/server/handlers/session.js +194 -0
- package/dist/server/handlers/settings.js +148 -0
- package/dist/server/handlers/skills.js +360 -0
- package/dist/server/handlers/terminal.js +75 -0
- package/dist/server/handlers/themes.js +102 -0
- package/dist/server/handlers/update.js +124 -0
- package/dist/server/identity.js +45 -0
- package/dist/server/index.js +435 -0
- package/dist/server/logger.js +20 -0
- package/dist/server/mesh/connector.js +355 -0
- package/dist/server/mesh/crypto.js +88 -0
- package/dist/server/mesh/discovery.js +95 -0
- package/dist/server/mesh/pairing.js +104 -0
- package/dist/server/mesh/peers.js +54 -0
- package/dist/server/mesh/proxy.js +86 -0
- package/dist/server/mesh/session-sync.js +85 -0
- package/dist/server/project/bookmarks.js +77 -0
- package/dist/server/project/context-breakdown.js +279 -0
- package/dist/server/project/file-browser.js +97 -0
- package/dist/server/project/project-files.js +274 -0
- package/dist/server/project/registry.js +51 -0
- package/dist/server/project/sdk-bridge.js +960 -0
- package/dist/server/project/session.js +696 -0
- package/dist/server/project/terminal.js +87 -0
- package/dist/server/project/warmup.js +242 -0
- package/dist/server/push.js +87 -0
- package/dist/server/tls.js +50 -0
- package/dist/server/tui.js +83 -0
- package/dist/server/update-checker.js +119 -0
- package/dist/server/ws/broadcast.js +50 -0
- package/dist/server/ws/router.js +105 -0
- package/dist/server/ws/server.js +2 -0
- package/dist/shared/analytics.js +1 -0
- package/dist/shared/messages.js +1 -0
- package/dist/shared/models.js +1 -0
- package/dist/shared/project-settings.js +1 -0
- package/package.json +5 -8
- package/themes/alabaster.json +9 -0
- package/themes/amoled.json +20 -0
- package/themes/ayu-light.json +9 -0
- package/themes/catppuccin-latte.json +9 -0
- package/themes/catppuccin-mocha.json +9 -0
- package/themes/clay-light.json +10 -0
- package/themes/clay.json +10 -0
- package/themes/dracula.json +9 -0
- package/themes/everforest-light.json +9 -0
- package/themes/everforest.json +9 -0
- package/themes/github-light.json +9 -0
- package/themes/gruvbox-dark.json +9 -0
- package/themes/gruvbox-light.json +9 -0
- package/themes/horizon-light.json +9 -0
- package/themes/kanagawa-lotus.json +9 -0
- package/themes/kanagawa.json +9 -0
- package/themes/modus-operandi.json +9 -0
- package/themes/monokai.json +9 -0
- package/themes/nightfox.json +9 -0
- package/themes/nord-light.json +9 -0
- package/themes/nord.json +9 -0
- package/themes/one-dark.json +9 -0
- package/themes/one-light.json +9 -0
- package/themes/palenight.json +9 -0
- package/themes/paper.json +9 -0
- package/themes/penumbra-light.json +9 -0
- package/themes/poimandres.json +9 -0
- package/themes/quiet-light.json +9 -0
- package/themes/rose-pine-dawn.json +9 -0
- package/themes/rose-pine.json +9 -0
- package/themes/solarized-dark.json +9 -0
- package/themes/solarized-light.json +9 -0
- package/themes/synthwave84.json +9 -0
- package/themes/tokyo-night-light.json +9 -0
- package/themes/tokyo-night.json +9 -0
- package/themes/vesper.json +9 -0
- package/index.html +0 -20
- package/public/icons/icon-192.svg +0 -11
- package/public/icons/icon-512.svg +0 -11
- package/public/sw-push.js +0 -53
- package/src/client/App.tsx +0 -42
- package/src/client/commands.ts +0 -36
- package/src/client/components/analytics/AnalyticsView.tsx +0 -244
- package/src/client/components/analytics/ChartCard.tsx +0 -194
- package/src/client/components/analytics/PeriodSelector.tsx +0 -42
- package/src/client/components/analytics/QuickStats.tsx +0 -122
- package/src/client/components/analytics/chartTokens.ts +0 -188
- package/src/client/components/analytics/charts/ActivityCalendar.tsx +0 -204
- package/src/client/components/analytics/charts/CacheEfficiencyChart.tsx +0 -56
- package/src/client/components/analytics/charts/ContextUtilizationChart.tsx +0 -106
- package/src/client/components/analytics/charts/CostAreaChart.tsx +0 -79
- package/src/client/components/analytics/charts/CostDistributionChart.tsx +0 -59
- package/src/client/components/analytics/charts/CostDonutChart.tsx +0 -84
- package/src/client/components/analytics/charts/CumulativeCostChart.tsx +0 -59
- package/src/client/components/analytics/charts/DailySummaryCards.tsx +0 -86
- package/src/client/components/analytics/charts/HourlyHeatmap.tsx +0 -133
- package/src/client/components/analytics/charts/NodeFleetOverview.tsx +0 -89
- package/src/client/components/analytics/charts/PermissionBreakdown.tsx +0 -98
- package/src/client/components/analytics/charts/ProjectRadar.tsx +0 -126
- package/src/client/components/analytics/charts/ResponseTimeScatter.tsx +0 -96
- package/src/client/components/analytics/charts/SessionBubbleChart.tsx +0 -114
- package/src/client/components/analytics/charts/SessionComplexityList.tsx +0 -65
- package/src/client/components/analytics/charts/SessionTimeline.tsx +0 -107
- package/src/client/components/analytics/charts/TokenFlowChart.tsx +0 -78
- package/src/client/components/analytics/charts/TokenSankeyChart.tsx +0 -93
- package/src/client/components/analytics/charts/ToolSunburst.tsx +0 -123
- package/src/client/components/analytics/charts/ToolTreemap.tsx +0 -110
- package/src/client/components/auth/PassphrasePrompt.tsx +0 -70
- package/src/client/components/chat/AttachmentChips.tsx +0 -116
- package/src/client/components/chat/ChatInput.tsx +0 -533
- package/src/client/components/chat/ChatView.tsx +0 -1076
- package/src/client/components/chat/CommandPalette.tsx +0 -162
- package/src/client/components/chat/ElicitationCard.tsx +0 -238
- package/src/client/components/chat/Message.tsx +0 -825
- package/src/client/components/chat/ModelSelector.tsx +0 -108
- package/src/client/components/chat/PermissionModeSelector.tsx +0 -41
- package/src/client/components/chat/PromptQuestion.tsx +0 -271
- package/src/client/components/chat/StatusBar.tsx +0 -50
- package/src/client/components/chat/TodoCard.tsx +0 -57
- package/src/client/components/chat/ToolGroup.tsx +0 -129
- package/src/client/components/chat/ToolResultRenderer.tsx +0 -348
- package/src/client/components/chat/VoiceRecorder.tsx +0 -85
- package/src/client/components/chat/toolSummary.ts +0 -41
- package/src/client/components/dashboard/DashboardView.tsx +0 -200
- package/src/client/components/dashboard/ProjectDashboardView.tsx +0 -179
- package/src/client/components/mesh/NodeBadge.tsx +0 -24
- package/src/client/components/mesh/PairingDialog.tsx +0 -340
- package/src/client/components/project-settings/ProjectClaude.tsx +0 -318
- package/src/client/components/project-settings/ProjectEnvironment.tsx +0 -235
- package/src/client/components/project-settings/ProjectGeneral.tsx +0 -76
- package/src/client/components/project-settings/ProjectMcp.tsx +0 -232
- package/src/client/components/project-settings/ProjectMemory.tsx +0 -488
- package/src/client/components/project-settings/ProjectNotifications.tsx +0 -48
- package/src/client/components/project-settings/ProjectPermissions.tsx +0 -209
- package/src/client/components/project-settings/ProjectPlugins.tsx +0 -117
- package/src/client/components/project-settings/ProjectRules.tsx +0 -286
- package/src/client/components/project-settings/ProjectSettingsView.tsx +0 -117
- package/src/client/components/project-settings/ProjectSkills.tsx +0 -91
- package/src/client/components/settings/Appearance.tsx +0 -275
- package/src/client/components/settings/BudgetSettings.tsx +0 -165
- package/src/client/components/settings/ClaudeSettings.tsx +0 -175
- package/src/client/components/settings/Editor.tsx +0 -123
- package/src/client/components/settings/Environment.tsx +0 -185
- package/src/client/components/settings/GlobalMcp.tsx +0 -216
- package/src/client/components/settings/GlobalMemory.tsx +0 -19
- package/src/client/components/settings/GlobalPlugins.tsx +0 -806
- package/src/client/components/settings/GlobalRules.tsx +0 -149
- package/src/client/components/settings/GlobalSkills.tsx +0 -140
- package/src/client/components/settings/MeshStatus.tsx +0 -183
- package/src/client/components/settings/Notifications.tsx +0 -123
- package/src/client/components/settings/SettingsView.tsx +0 -75
- package/src/client/components/settings/SkillMarketplace.tsx +0 -175
- package/src/client/components/settings/ThemePreview.tsx +0 -140
- package/src/client/components/settings/ThemeWizard.tsx +0 -405
- package/src/client/components/settings/mcp-shared.tsx +0 -194
- package/src/client/components/settings/skill-shared.tsx +0 -186
- package/src/client/components/setup/SetupWizard.tsx +0 -755
- package/src/client/components/sidebar/AddProjectModal.tsx +0 -438
- package/src/client/components/sidebar/NodeSettingsModal.tsx +0 -206
- package/src/client/components/sidebar/ProjectDropdown.tsx +0 -211
- package/src/client/components/sidebar/ProjectRail.tsx +0 -353
- package/src/client/components/sidebar/SearchFilter.tsx +0 -52
- package/src/client/components/sidebar/SessionList.tsx +0 -599
- package/src/client/components/sidebar/SettingsSidebar.tsx +0 -139
- package/src/client/components/sidebar/Sidebar.tsx +0 -469
- package/src/client/components/sidebar/UserIsland.tsx +0 -282
- package/src/client/components/sidebar/UserMenu.tsx +0 -107
- package/src/client/components/ui/CommandPalette.tsx +0 -321
- package/src/client/components/ui/ContextMenu.tsx +0 -153
- package/src/client/components/ui/ErrorBoundary.tsx +0 -56
- package/src/client/components/ui/IconPicker.tsx +0 -184
- package/src/client/components/ui/KeyboardShortcuts.tsx +0 -129
- package/src/client/components/ui/LatticeLogomark.tsx +0 -19
- package/src/client/components/ui/NodeDisconnectedOverlay.tsx +0 -35
- package/src/client/components/ui/PopupMenu.tsx +0 -120
- package/src/client/components/ui/SaveFooter.tsx +0 -63
- package/src/client/components/ui/Toast.tsx +0 -132
- package/src/client/components/ui/UpdateBanner.tsx +0 -110
- package/src/client/components/ui/UpdatePrompt.tsx +0 -47
- package/src/client/components/workspace/BookmarksView.tsx +0 -156
- package/src/client/components/workspace/FileBrowser.tsx +0 -174
- package/src/client/components/workspace/FileTree.tsx +0 -129
- package/src/client/components/workspace/FileViewer.tsx +0 -211
- package/src/client/components/workspace/NoteCard.tsx +0 -120
- package/src/client/components/workspace/NotesView.tsx +0 -102
- package/src/client/components/workspace/ScheduledTasksView.tsx +0 -117
- package/src/client/components/workspace/SplitPane.tsx +0 -81
- package/src/client/components/workspace/TabBar.tsx +0 -170
- package/src/client/components/workspace/TaskCard.tsx +0 -159
- package/src/client/components/workspace/TaskEditModal.tsx +0 -129
- package/src/client/components/workspace/TerminalInstance.tsx +0 -171
- package/src/client/components/workspace/TerminalView.tsx +0 -110
- package/src/client/components/workspace/WorkspaceView.tsx +0 -141
- package/src/client/hooks/useAnalytics.ts +0 -84
- package/src/client/hooks/useAttachments.ts +0 -313
- package/src/client/hooks/useBookmarks.ts +0 -57
- package/src/client/hooks/useEditorConfig.ts +0 -28
- package/src/client/hooks/useFocusTrap.ts +0 -74
- package/src/client/hooks/useIdleDetection.ts +0 -50
- package/src/client/hooks/useInstallPrompt.ts +0 -53
- package/src/client/hooks/useMesh.ts +0 -89
- package/src/client/hooks/useNotifications.ts +0 -54
- package/src/client/hooks/useOnline.ts +0 -6
- package/src/client/hooks/useProjectSettings.ts +0 -56
- package/src/client/hooks/useProjects.ts +0 -98
- package/src/client/hooks/usePushNotifications.ts +0 -92
- package/src/client/hooks/useSaveState.ts +0 -65
- package/src/client/hooks/useSession.ts +0 -580
- package/src/client/hooks/useSidebar.ts +0 -90
- package/src/client/hooks/useSkills.ts +0 -30
- package/src/client/hooks/useSpinnerVerb.ts +0 -36
- package/src/client/hooks/useSwipeDrawer.ts +0 -299
- package/src/client/hooks/useTheme.ts +0 -114
- package/src/client/hooks/useTimeTick.ts +0 -35
- package/src/client/hooks/useVoiceRecorder.ts +0 -169
- package/src/client/hooks/useWebSocket.ts +0 -27
- package/src/client/hooks/useWorkspace.ts +0 -57
- package/src/client/lib/theme-derive.ts +0 -196
- package/src/client/lib/workspace-url.ts +0 -219
- package/src/client/main.tsx +0 -10
- package/src/client/providers/WebSocketProvider.tsx +0 -186
- package/src/client/router.tsx +0 -578
- package/src/client/stores/analytics.ts +0 -68
- package/src/client/stores/bookmarks.ts +0 -45
- package/src/client/stores/mesh.ts +0 -78
- package/src/client/stores/session.ts +0 -569
- package/src/client/stores/sidebar.ts +0 -530
- package/src/client/stores/theme.ts +0 -44
- package/src/client/stores/workspace.ts +0 -518
- package/src/client/styles/global.css +0 -391
- package/src/client/styles/theme-vars.css +0 -18
- package/src/client/themes/index.ts +0 -105
- package/src/client/utils/editorUrl.ts +0 -55
- package/src/client/utils/findDuplicateKeys.ts +0 -12
- package/src/client/utils/formatSessionTitle.ts +0 -17
- package/src/client/vite-env.d.ts +0 -6
- package/src/server/analytics/engine.ts +0 -920
- package/src/server/assets.ts +0 -45
- package/src/server/auth/passphrase.ts +0 -78
- package/src/server/config.ts +0 -55
- package/src/server/daemon.ts +0 -567
- package/src/server/features/ralph-loop.ts +0 -173
- package/src/server/features/scheduler.ts +0 -304
- package/src/server/features/sticky-notes.ts +0 -104
- package/src/server/handlers/analytics.ts +0 -39
- package/src/server/handlers/attachment.ts +0 -189
- package/src/server/handlers/bookmarks.ts +0 -50
- package/src/server/handlers/chat.ts +0 -381
- package/src/server/handlers/editor.ts +0 -76
- package/src/server/handlers/fs.ts +0 -251
- package/src/server/handlers/loop.ts +0 -37
- package/src/server/handlers/memory.ts +0 -182
- package/src/server/handlers/mesh.ts +0 -362
- package/src/server/handlers/notes.ts +0 -47
- package/src/server/handlers/plugins.ts +0 -655
- package/src/server/handlers/project-settings.ts +0 -180
- package/src/server/handlers/scheduler.ts +0 -64
- package/src/server/handlers/session.ts +0 -226
- package/src/server/handlers/settings.ts +0 -157
- package/src/server/handlers/skills.ts +0 -378
- package/src/server/handlers/terminal.ts +0 -88
- package/src/server/handlers/themes.ts +0 -121
- package/src/server/handlers/update.ts +0 -133
- package/src/server/identity.ts +0 -56
- package/src/server/index.ts +0 -457
- package/src/server/logger.ts +0 -21
- package/src/server/mesh/connector.ts +0 -419
- package/src/server/mesh/crypto.ts +0 -106
- package/src/server/mesh/discovery.ts +0 -126
- package/src/server/mesh/pairing.ts +0 -123
- package/src/server/mesh/peers.ts +0 -60
- package/src/server/mesh/proxy.ts +0 -106
- package/src/server/mesh/session-sync.ts +0 -107
- package/src/server/project/bookmarks.ts +0 -83
- package/src/server/project/context-breakdown.ts +0 -307
- package/src/server/project/file-browser.ts +0 -106
- package/src/server/project/project-files.ts +0 -267
- package/src/server/project/pty-worker.cjs +0 -83
- package/src/server/project/registry.ts +0 -57
- package/src/server/project/sdk-bridge.ts +0 -1100
- package/src/server/project/session.ts +0 -723
- package/src/server/project/terminal.ts +0 -111
- package/src/server/project/warmup.ts +0 -285
- package/src/server/push.ts +0 -121
- package/src/server/tls.ts +0 -65
- package/src/server/tui.ts +0 -103
- package/src/server/update-checker.ts +0 -147
- package/src/server/ws/broadcast.ts +0 -61
- package/src/server/ws/router.ts +0 -123
- package/src/server/ws/server.ts +0 -2
- package/src/shared/analytics.ts +0 -40
- package/src/shared/messages.ts +0 -1302
- package/src/shared/models.ts +0 -255
- package/src/shared/project-settings.ts +0 -45
- package/tsconfig.json +0 -25
- package/vite.config.ts +0 -71
- /package/{src/server/runtime.ts → dist/server/runtime.js} +0 -0
- /package/{src/shared/constants.ts → dist/shared/constants.js} +0 -0
- /package/{src/shared/index.ts → dist/shared/index.js} +0 -0
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import {
|
|
3
|
-
LineChart,
|
|
4
|
-
Line,
|
|
5
|
-
XAxis,
|
|
6
|
-
YAxis,
|
|
7
|
-
CartesianGrid,
|
|
8
|
-
Tooltip,
|
|
9
|
-
ResponsiveContainer,
|
|
10
|
-
} from "recharts";
|
|
11
|
-
import { useChartFullscreen } from "../ChartCard";
|
|
12
|
-
import { getChartColors, getTickStyle } from "../chartTokens";
|
|
13
|
-
|
|
14
|
-
interface ContextUtilDatum {
|
|
15
|
-
messageIndex: number;
|
|
16
|
-
contextPercent: number;
|
|
17
|
-
sessionId: string;
|
|
18
|
-
title: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface ContextUtilizationChartProps {
|
|
22
|
-
data: ContextUtilDatum[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function CustomTooltip({ active, payload }: { active?: boolean; payload?: Array<{ name: string; value: number; color: string }> }) {
|
|
26
|
-
if (!active || !payload || payload.length === 0) return null;
|
|
27
|
-
return (
|
|
28
|
-
<div className="rounded-lg border border-base-content/8 bg-base-200 px-3 py-2 shadow-lg">
|
|
29
|
-
{payload.map(function (entry) {
|
|
30
|
-
return (
|
|
31
|
-
<div key={entry.name} className="flex items-center gap-2 text-[11px] font-mono">
|
|
32
|
-
<span className="inline-block w-2 h-2 rounded-full" style={{ background: entry.color }} />
|
|
33
|
-
<span className="text-base-content/60 truncate max-w-[120px]">{entry.name}</span>
|
|
34
|
-
<span className="text-base-content ml-auto pl-4">{entry.value.toFixed(1)}%</span>
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
})}
|
|
38
|
-
</div>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function ContextUtilizationChart({ data }: ContextUtilizationChartProps) {
|
|
43
|
-
var fullscreenHeight = useChartFullscreen();
|
|
44
|
-
var colors = getChartColors();
|
|
45
|
-
|
|
46
|
-
var { sessions, merged } = useMemo(function () {
|
|
47
|
-
var sessionMap = new Map<string, { title: string; points: Array<{ messageIndex: number; contextPercent: number }> }>();
|
|
48
|
-
for (var i = 0; i < data.length; i++) {
|
|
49
|
-
var d = data[i];
|
|
50
|
-
var entry = sessionMap.get(d.sessionId);
|
|
51
|
-
if (!entry) {
|
|
52
|
-
entry = { title: d.title, points: [] };
|
|
53
|
-
sessionMap.set(d.sessionId, entry);
|
|
54
|
-
}
|
|
55
|
-
entry.points.push({ messageIndex: d.messageIndex, contextPercent: d.contextPercent });
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
var sessions = Array.from(sessionMap.entries()).slice(0, 5);
|
|
59
|
-
|
|
60
|
-
var maxIndex = 0;
|
|
61
|
-
for (var si = 0; si < sessions.length; si++) {
|
|
62
|
-
var pts = sessions[si][1].points;
|
|
63
|
-
for (var pi = 0; pi < pts.length; pi++) {
|
|
64
|
-
if (pts[pi].messageIndex > maxIndex) maxIndex = pts[pi].messageIndex;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var merged: Array<Record<string, number>> = [];
|
|
69
|
-
for (var mi = 0; mi <= maxIndex; mi++) {
|
|
70
|
-
var row: Record<string, number> = { messageIndex: mi };
|
|
71
|
-
for (var sj = 0; sj < sessions.length; sj++) {
|
|
72
|
-
var point = sessions[sj][1].points.find(function (p) { return p.messageIndex === mi; });
|
|
73
|
-
if (point) row[sessions[sj][0]] = point.contextPercent;
|
|
74
|
-
}
|
|
75
|
-
merged.push(row);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return { sessions, merged };
|
|
79
|
-
}, [data]);
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<ResponsiveContainer width="100%" height={fullscreenHeight || 200}>
|
|
83
|
-
<LineChart data={merged} margin={{ top: 4, right: 4, left: -20, bottom: 0 }}>
|
|
84
|
-
<CartesianGrid strokeDasharray="3 3" stroke={colors.gridStroke} vertical={false} />
|
|
85
|
-
<XAxis dataKey="messageIndex" tick={getTickStyle()} axisLine={false} tickLine={false} />
|
|
86
|
-
<YAxis domain={[0, 100]} tick={getTickStyle()} axisLine={false} tickLine={false} tickFormatter={function (v) { return v + "%"; }} />
|
|
87
|
-
<Tooltip content={<CustomTooltip />} />
|
|
88
|
-
{sessions.map(function (s, idx) {
|
|
89
|
-
return (
|
|
90
|
-
<Line
|
|
91
|
-
key={s[0]}
|
|
92
|
-
type="monotone"
|
|
93
|
-
dataKey={s[0]}
|
|
94
|
-
name={s[1].title.slice(0, 30)}
|
|
95
|
-
stroke={colors.palette[idx % colors.palette.length]}
|
|
96
|
-
strokeWidth={1.5}
|
|
97
|
-
dot={false}
|
|
98
|
-
connectNulls
|
|
99
|
-
isAnimationActive={false}
|
|
100
|
-
/>
|
|
101
|
-
);
|
|
102
|
-
})}
|
|
103
|
-
</LineChart>
|
|
104
|
-
</ResponsiveContainer>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AreaChart,
|
|
3
|
-
Area,
|
|
4
|
-
XAxis,
|
|
5
|
-
YAxis,
|
|
6
|
-
CartesianGrid,
|
|
7
|
-
Tooltip,
|
|
8
|
-
ResponsiveContainer,
|
|
9
|
-
} from "recharts";
|
|
10
|
-
import { useChartFullscreen } from "../ChartCard";
|
|
11
|
-
import { getChartColors, getTickStyle } from "../chartTokens";
|
|
12
|
-
|
|
13
|
-
interface CostAreaDatum {
|
|
14
|
-
date: string;
|
|
15
|
-
total: number;
|
|
16
|
-
opus: number;
|
|
17
|
-
sonnet: number;
|
|
18
|
-
haiku: number;
|
|
19
|
-
other: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface CostAreaChartProps {
|
|
23
|
-
data: CostAreaDatum[];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function CustomTooltip({ active, payload, label }: { active?: boolean; payload?: Array<{ name: string; value: number; color: string }>; label?: string }) {
|
|
27
|
-
if (!active || !payload || payload.length === 0) return null;
|
|
28
|
-
return (
|
|
29
|
-
<div className="rounded-lg border border-base-content/8 bg-base-200 px-3 py-2 shadow-lg">
|
|
30
|
-
<p className="text-[10px] font-mono text-base-content/50 mb-1">{label}</p>
|
|
31
|
-
{payload.map(function (entry) {
|
|
32
|
-
return (
|
|
33
|
-
<div key={entry.name} className="flex items-center gap-2 text-[11px] font-mono">
|
|
34
|
-
<span className="inline-block w-2 h-2 rounded-full" style={{ background: entry.color }} />
|
|
35
|
-
<span className="text-base-content/60 capitalize">{entry.name}</span>
|
|
36
|
-
<span className="text-base-content ml-auto pl-4">${entry.value.toFixed(4)}</span>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
})}
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function CostAreaChart({ data }: CostAreaChartProps) {
|
|
45
|
-
const fullscreenHeight = useChartFullscreen();
|
|
46
|
-
const colors = getChartColors();
|
|
47
|
-
return (
|
|
48
|
-
<ResponsiveContainer width="100%" height={fullscreenHeight || 200}>
|
|
49
|
-
<AreaChart data={data} margin={{ top: 4, right: 4, left: -15, bottom: 0 }}>
|
|
50
|
-
<defs>
|
|
51
|
-
<linearGradient id="opusGrad" x1="0" y1="0" x2="0" y2="1">
|
|
52
|
-
<stop offset="5%" stopColor={colors.secondary} stopOpacity={0.8} />
|
|
53
|
-
<stop offset="95%" stopColor={colors.secondary} stopOpacity={0.2} />
|
|
54
|
-
</linearGradient>
|
|
55
|
-
<linearGradient id="sonnetGrad" x1="0" y1="0" x2="0" y2="1">
|
|
56
|
-
<stop offset="5%" stopColor={colors.primary} stopOpacity={0.8} />
|
|
57
|
-
<stop offset="95%" stopColor={colors.primary} stopOpacity={0.2} />
|
|
58
|
-
</linearGradient>
|
|
59
|
-
<linearGradient id="haikuGrad" x1="0" y1="0" x2="0" y2="1">
|
|
60
|
-
<stop offset="5%" stopColor={colors.success} stopOpacity={0.8} />
|
|
61
|
-
<stop offset="95%" stopColor={colors.success} stopOpacity={0.2} />
|
|
62
|
-
</linearGradient>
|
|
63
|
-
<linearGradient id="otherGrad" x1="0" y1="0" x2="0" y2="1">
|
|
64
|
-
<stop offset="5%" stopColor={colors.warning} stopOpacity={0.8} />
|
|
65
|
-
<stop offset="95%" stopColor={colors.warning} stopOpacity={0.2} />
|
|
66
|
-
</linearGradient>
|
|
67
|
-
</defs>
|
|
68
|
-
<CartesianGrid strokeDasharray="3 3" stroke={colors.gridStroke} vertical={false} />
|
|
69
|
-
<XAxis dataKey="date" tick={getTickStyle()} axisLine={false} tickLine={false} />
|
|
70
|
-
<YAxis tick={getTickStyle()} axisLine={false} tickLine={false} tickFormatter={function (v) { return "$" + v.toFixed(2); }} />
|
|
71
|
-
<Tooltip content={<CustomTooltip />} />
|
|
72
|
-
<Area type="monotone" dataKey="opus" stackId="1" stroke={colors.secondary} fill="url(#opusGrad)" strokeWidth={1.5} isAnimationActive={false} />
|
|
73
|
-
<Area type="monotone" dataKey="sonnet" stackId="1" stroke={colors.primary} fill="url(#sonnetGrad)" strokeWidth={1.5} isAnimationActive={false} />
|
|
74
|
-
<Area type="monotone" dataKey="haiku" stackId="1" stroke={colors.success} fill="url(#haikuGrad)" strokeWidth={1.5} isAnimationActive={false} />
|
|
75
|
-
<Area type="monotone" dataKey="other" stackId="1" stroke={colors.warning} fill="url(#otherGrad)" strokeWidth={1.5} isAnimationActive={false} />
|
|
76
|
-
</AreaChart>
|
|
77
|
-
</ResponsiveContainer>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AreaChart,
|
|
3
|
-
Area,
|
|
4
|
-
XAxis,
|
|
5
|
-
YAxis,
|
|
6
|
-
CartesianGrid,
|
|
7
|
-
Tooltip,
|
|
8
|
-
ResponsiveContainer,
|
|
9
|
-
} from "recharts";
|
|
10
|
-
import { useChartFullscreen } from "../ChartCard";
|
|
11
|
-
import { getChartColors, getTickStyle } from "../chartTokens";
|
|
12
|
-
|
|
13
|
-
interface DistributionDatum {
|
|
14
|
-
bucket: string;
|
|
15
|
-
count: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface CostDistributionChartProps {
|
|
19
|
-
data: DistributionDatum[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function CustomTooltip({ active, payload, label }: { active?: boolean; payload?: Array<{ value: number }>; label?: string }) {
|
|
23
|
-
if (!active || !payload || payload.length === 0) return null;
|
|
24
|
-
return (
|
|
25
|
-
<div className="rounded-lg border border-base-content/8 bg-base-200 px-3 py-2 shadow-lg">
|
|
26
|
-
<p className="text-[10px] font-mono text-base-content/50 mb-1">{label}</p>
|
|
27
|
-
<p className="text-[11px] font-mono text-base-content">{payload[0].value} sessions</p>
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function CostDistributionChart({ data }: CostDistributionChartProps) {
|
|
33
|
-
const fullscreenHeight = useChartFullscreen();
|
|
34
|
-
const colors = getChartColors();
|
|
35
|
-
return (
|
|
36
|
-
<ResponsiveContainer width="100%" height={fullscreenHeight || 200}>
|
|
37
|
-
<AreaChart data={data} margin={{ top: 4, right: 4, left: -15, bottom: 0 }}>
|
|
38
|
-
<defs>
|
|
39
|
-
<linearGradient id="distGrad" x1="0" y1="0" x2="0" y2="1">
|
|
40
|
-
<stop offset="5%" stopColor={colors.primary} stopOpacity={0.8} />
|
|
41
|
-
<stop offset="95%" stopColor={colors.primary} stopOpacity={0.2} />
|
|
42
|
-
</linearGradient>
|
|
43
|
-
</defs>
|
|
44
|
-
<CartesianGrid strokeDasharray="3 3" stroke={colors.gridStroke} vertical={false} />
|
|
45
|
-
<XAxis dataKey="bucket" tick={getTickStyle()} axisLine={false} tickLine={false} />
|
|
46
|
-
<YAxis tick={getTickStyle()} axisLine={false} tickLine={false} allowDecimals={false} />
|
|
47
|
-
<Tooltip content={<CustomTooltip />} />
|
|
48
|
-
<Area
|
|
49
|
-
type="monotone"
|
|
50
|
-
dataKey="count"
|
|
51
|
-
stroke={colors.primary}
|
|
52
|
-
fill="url(#distGrad)"
|
|
53
|
-
strokeWidth={2}
|
|
54
|
-
isAnimationActive={false}
|
|
55
|
-
/>
|
|
56
|
-
</AreaChart>
|
|
57
|
-
</ResponsiveContainer>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { PieChart, Pie, Cell, Tooltip, ResponsiveContainer } from "recharts";
|
|
2
|
-
import { useChartFullscreen } from "../ChartCard";
|
|
3
|
-
import { getChartColors, getModelColor } from "../chartTokens";
|
|
4
|
-
|
|
5
|
-
interface ModelUsage {
|
|
6
|
-
model: string;
|
|
7
|
-
cost: number;
|
|
8
|
-
percentage: number;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface CostDonutChartProps {
|
|
12
|
-
modelUsage: ModelUsage[];
|
|
13
|
-
totalCost: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function CustomTooltip({ active, payload }: { active?: boolean; payload?: Array<{ name: string; value: number; payload: ModelUsage }> }) {
|
|
17
|
-
if (!active || !payload || payload.length === 0) return null;
|
|
18
|
-
var entry = payload[0];
|
|
19
|
-
return (
|
|
20
|
-
<div className="rounded-lg border border-base-content/8 bg-base-200 px-3 py-2 shadow-lg">
|
|
21
|
-
<p className="text-[10px] font-mono text-base-content/50 mb-1">{entry.name}</p>
|
|
22
|
-
<p className="text-[11px] font-mono text-base-content">${entry.value.toFixed(4)}</p>
|
|
23
|
-
<p className="text-[10px] font-mono text-base-content/50">{entry.payload.percentage.toFixed(1)}%</p>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function CenterLabel({ totalCost }: { totalCost: number }) {
|
|
29
|
-
var colors = getChartColors();
|
|
30
|
-
return (
|
|
31
|
-
<text x="50%" y="50%" textAnchor="middle" dominantBaseline="middle">
|
|
32
|
-
<tspan x="50%" dy="-0.4em" style={{ fontSize: 11, fontFamily: "var(--font-mono)", fill: colors.tickFill }}>
|
|
33
|
-
TOTAL
|
|
34
|
-
</tspan>
|
|
35
|
-
<tspan x="50%" dy="1.4em" style={{ fontSize: 14, fontFamily: "var(--font-mono)", fill: colors.tickFill, fontWeight: 700 }}>
|
|
36
|
-
${totalCost.toFixed(2)}
|
|
37
|
-
</tspan>
|
|
38
|
-
</text>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function CostDonutChart({ modelUsage, totalCost }: CostDonutChartProps) {
|
|
43
|
-
var fullscreenHeight = useChartFullscreen();
|
|
44
|
-
var colors = getChartColors();
|
|
45
|
-
return (
|
|
46
|
-
<div>
|
|
47
|
-
<ResponsiveContainer width="100%" height={fullscreenHeight || 200}>
|
|
48
|
-
<PieChart>
|
|
49
|
-
<Pie
|
|
50
|
-
data={modelUsage}
|
|
51
|
-
dataKey="cost"
|
|
52
|
-
nameKey="model"
|
|
53
|
-
innerRadius={50}
|
|
54
|
-
outerRadius={80}
|
|
55
|
-
paddingAngle={2}
|
|
56
|
-
startAngle={90}
|
|
57
|
-
endAngle={-270}
|
|
58
|
-
isAnimationActive={false}
|
|
59
|
-
>
|
|
60
|
-
{modelUsage.map(function (entry, index) {
|
|
61
|
-
return <Cell key={entry.model + index} fill={getModelColor(entry.model)} />;
|
|
62
|
-
})}
|
|
63
|
-
</Pie>
|
|
64
|
-
<Tooltip content={<CustomTooltip />} />
|
|
65
|
-
<CenterLabel totalCost={totalCost} />
|
|
66
|
-
</PieChart>
|
|
67
|
-
</ResponsiveContainer>
|
|
68
|
-
<div className="flex flex-wrap justify-center gap-3 mt-2">
|
|
69
|
-
{modelUsage.map(function (entry) {
|
|
70
|
-
return (
|
|
71
|
-
<div key={entry.model} className="flex items-center gap-1.5 text-[10px] font-mono text-base-content/50">
|
|
72
|
-
<span
|
|
73
|
-
className="inline-block w-2 h-2 rounded-full flex-shrink-0"
|
|
74
|
-
style={{ background: getModelColor(entry.model) }}
|
|
75
|
-
/>
|
|
76
|
-
<span className="capitalize">{entry.model}</span>
|
|
77
|
-
<span className="text-base-content/30">{entry.percentage.toFixed(1)}%</span>
|
|
78
|
-
</div>
|
|
79
|
-
);
|
|
80
|
-
})}
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
);
|
|
84
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AreaChart,
|
|
3
|
-
Area,
|
|
4
|
-
XAxis,
|
|
5
|
-
YAxis,
|
|
6
|
-
CartesianGrid,
|
|
7
|
-
Tooltip,
|
|
8
|
-
ResponsiveContainer,
|
|
9
|
-
} from "recharts";
|
|
10
|
-
import { useChartFullscreen } from "../ChartCard";
|
|
11
|
-
import { getChartColors, getTickStyle } from "../chartTokens";
|
|
12
|
-
|
|
13
|
-
interface CumulativeDatum {
|
|
14
|
-
date: string;
|
|
15
|
-
total: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface CumulativeCostChartProps {
|
|
19
|
-
data: CumulativeDatum[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function CustomTooltip({ active, payload, label }: { active?: boolean; payload?: Array<{ value: number }>; label?: string }) {
|
|
23
|
-
if (!active || !payload || payload.length === 0) return null;
|
|
24
|
-
return (
|
|
25
|
-
<div className="rounded-lg border border-base-content/8 bg-base-200 px-3 py-2 shadow-lg">
|
|
26
|
-
<p className="text-[10px] font-mono text-base-content/50 mb-1">{label}</p>
|
|
27
|
-
<p className="text-[11px] font-mono text-base-content">${payload[0].value.toFixed(4)}</p>
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function CumulativeCostChart({ data }: CumulativeCostChartProps) {
|
|
33
|
-
const fullscreenHeight = useChartFullscreen();
|
|
34
|
-
const colors = getChartColors();
|
|
35
|
-
return (
|
|
36
|
-
<ResponsiveContainer width="100%" height={fullscreenHeight || 200}>
|
|
37
|
-
<AreaChart data={data} margin={{ top: 4, right: 4, left: -15, bottom: 0 }}>
|
|
38
|
-
<defs>
|
|
39
|
-
<linearGradient id="cumulativeGrad" x1="0" y1="0" x2="0" y2="1">
|
|
40
|
-
<stop offset="5%" stopColor={colors.primary} stopOpacity={0.7} />
|
|
41
|
-
<stop offset="95%" stopColor={colors.primary} stopOpacity={0.15} />
|
|
42
|
-
</linearGradient>
|
|
43
|
-
</defs>
|
|
44
|
-
<CartesianGrid strokeDasharray="3 3" stroke={colors.gridStroke} vertical={false} />
|
|
45
|
-
<XAxis dataKey="date" tick={getTickStyle()} axisLine={false} tickLine={false} />
|
|
46
|
-
<YAxis tick={getTickStyle()} axisLine={false} tickLine={false} tickFormatter={function (v) { return "$" + v.toFixed(2); }} />
|
|
47
|
-
<Tooltip content={<CustomTooltip />} />
|
|
48
|
-
<Area
|
|
49
|
-
type="monotone"
|
|
50
|
-
dataKey="total"
|
|
51
|
-
stroke={colors.primary}
|
|
52
|
-
fill="url(#cumulativeGrad)"
|
|
53
|
-
strokeWidth={2}
|
|
54
|
-
isAnimationActive={false}
|
|
55
|
-
/>
|
|
56
|
-
</AreaChart>
|
|
57
|
-
</ResponsiveContainer>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { getChartColors } from "../chartTokens";
|
|
2
|
-
|
|
3
|
-
interface DailySummaryDatum {
|
|
4
|
-
date: string;
|
|
5
|
-
sessions: number;
|
|
6
|
-
cost: number;
|
|
7
|
-
tokens: number;
|
|
8
|
-
topTool: string;
|
|
9
|
-
modelMix: Record<string, number>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface DailySummaryCardsProps {
|
|
13
|
-
data: DailySummaryDatum[];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function formatCardDate(dateStr: string): string {
|
|
17
|
-
const d = new Date(dateStr + "T00:00:00");
|
|
18
|
-
const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
19
|
-
return days[d.getDay()] + " " + (d.getMonth() + 1) + "/" + d.getDate();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function DailySummaryCards({ data }: DailySummaryCardsProps) {
|
|
23
|
-
const colors = getChartColors();
|
|
24
|
-
const MODEL_COLORS: Record<string, string> = {
|
|
25
|
-
opus: colors.model.opus,
|
|
26
|
-
sonnet: colors.model.sonnet,
|
|
27
|
-
haiku: colors.model.haiku,
|
|
28
|
-
other: colors.model.other,
|
|
29
|
-
};
|
|
30
|
-
if (!data || data.length === 0) {
|
|
31
|
-
return (
|
|
32
|
-
<div className="flex flex-col items-center justify-center h-[100px] gap-1">
|
|
33
|
-
<span className="text-base-content/25 font-mono text-[11px]">No daily data</span>
|
|
34
|
-
<span className="text-base-content/15 text-[10px]">Day-by-day cost, session, and model breakdown</span>
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const reversed = data.slice().reverse();
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<div className="flex gap-3 overflow-x-auto snap-x snap-mandatory pb-2 scrollbar-thin">
|
|
43
|
-
{reversed.map(function (d) {
|
|
44
|
-
const mixEntries = Object.entries(d.modelMix);
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<div
|
|
48
|
-
key={d.date}
|
|
49
|
-
className="flex-shrink-0 snap-start rounded-lg bg-base-300 border border-base-content/5 px-3 py-2.5 w-[140px]"
|
|
50
|
-
>
|
|
51
|
-
<p className="text-[10px] font-mono font-bold uppercase tracking-wider text-base-content/40 mb-1.5">
|
|
52
|
-
{formatCardDate(d.date)}
|
|
53
|
-
</p>
|
|
54
|
-
|
|
55
|
-
<div className="text-[11px] font-mono text-base-content space-y-0.5">
|
|
56
|
-
<p><span className="text-base-content/30">sessions </span>{d.sessions}</p>
|
|
57
|
-
<p><span className="text-base-content/30">cost </span>${d.cost.toFixed(2)}</p>
|
|
58
|
-
{d.topTool && (
|
|
59
|
-
<p className="truncate"><span className="text-base-content/30">tool </span>{d.topTool}</p>
|
|
60
|
-
)}
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
{mixEntries.length > 0 && (
|
|
64
|
-
<div className="mt-2 h-[4px] rounded-full overflow-hidden flex bg-base-content/5">
|
|
65
|
-
{mixEntries.map(function (entry) {
|
|
66
|
-
const model = entry[0];
|
|
67
|
-
const pct = entry[1];
|
|
68
|
-
if (pct <= 0) return null;
|
|
69
|
-
return (
|
|
70
|
-
<div
|
|
71
|
-
key={model}
|
|
72
|
-
style={{
|
|
73
|
-
width: (pct * 100) + "%",
|
|
74
|
-
backgroundColor: MODEL_COLORS[model] || MODEL_COLORS.other,
|
|
75
|
-
}}
|
|
76
|
-
/>
|
|
77
|
-
);
|
|
78
|
-
})}
|
|
79
|
-
</div>
|
|
80
|
-
)}
|
|
81
|
-
</div>
|
|
82
|
-
);
|
|
83
|
-
})}
|
|
84
|
-
</div>
|
|
85
|
-
);
|
|
86
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { createPortal } from "react-dom";
|
|
3
|
-
import { getChartColors } from "../chartTokens";
|
|
4
|
-
|
|
5
|
-
interface HeatmapDatum {
|
|
6
|
-
day: number;
|
|
7
|
-
hour: number;
|
|
8
|
-
count: number;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface HourlyHeatmapProps {
|
|
12
|
-
data: HeatmapDatum[];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
var CELL_SIZE = 18;
|
|
16
|
-
var CELL_GAP = 2;
|
|
17
|
-
var CELL_STEP = CELL_SIZE + CELL_GAP;
|
|
18
|
-
var DAY_LABEL_WIDTH = 32;
|
|
19
|
-
var HOUR_LABEL_HEIGHT = 16;
|
|
20
|
-
|
|
21
|
-
var DAY_ORDER = [1, 2, 3, 4, 5, 6, 0];
|
|
22
|
-
var DAY_NAMES = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
23
|
-
var HOUR_LABELS = [0, 3, 6, 9, 12, 15, 18, 21];
|
|
24
|
-
|
|
25
|
-
export function HourlyHeatmap({ data }: HourlyHeatmapProps) {
|
|
26
|
-
var colors = getChartColors();
|
|
27
|
-
var PRIMARY_COLOR = colors.primary;
|
|
28
|
-
var [hover, setHover] = useState<{ x: number; y: number; day: string; hour: number; count: number } | null>(null);
|
|
29
|
-
|
|
30
|
-
if (!data || data.length === 0) {
|
|
31
|
-
return (
|
|
32
|
-
<div className="flex flex-col items-center justify-center h-[200px] gap-1">
|
|
33
|
-
<span className="text-base-content/25 font-mono text-[11px]">No activity in this period</span>
|
|
34
|
-
<span className="text-base-content/15 text-[10px]">Shows your busiest hours and days of the week</span>
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
var grid = new Map<string, number>();
|
|
40
|
-
var maxCount = 0;
|
|
41
|
-
for (var i = 0; i < data.length; i++) {
|
|
42
|
-
var key = data[i].day + ":" + data[i].hour;
|
|
43
|
-
grid.set(key, data[i].count);
|
|
44
|
-
if (data[i].count > maxCount) maxCount = data[i].count;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
var svgWidth = DAY_LABEL_WIDTH + 24 * CELL_STEP;
|
|
48
|
-
var svgHeight = HOUR_LABEL_HEIGHT + 7 * CELL_STEP;
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<div className="relative overflow-x-auto">
|
|
52
|
-
<svg width={svgWidth} height={svgHeight} className="block">
|
|
53
|
-
{HOUR_LABELS.map(function (h) {
|
|
54
|
-
return (
|
|
55
|
-
<text
|
|
56
|
-
key={h}
|
|
57
|
-
x={DAY_LABEL_WIDTH + h * CELL_STEP + CELL_SIZE / 2}
|
|
58
|
-
y={11}
|
|
59
|
-
textAnchor="middle"
|
|
60
|
-
className="fill-base-content/30"
|
|
61
|
-
style={{ fontSize: 10, fontFamily: "var(--font-mono)" }}
|
|
62
|
-
>
|
|
63
|
-
{h}
|
|
64
|
-
</text>
|
|
65
|
-
);
|
|
66
|
-
})}
|
|
67
|
-
|
|
68
|
-
{DAY_ORDER.map(function (dayIdx, row) {
|
|
69
|
-
return (
|
|
70
|
-
<text
|
|
71
|
-
key={dayIdx}
|
|
72
|
-
x={0}
|
|
73
|
-
y={HOUR_LABEL_HEIGHT + row * CELL_STEP + CELL_SIZE - 3}
|
|
74
|
-
className="fill-base-content/30"
|
|
75
|
-
style={{ fontSize: 10, fontFamily: "var(--font-mono)" }}
|
|
76
|
-
>
|
|
77
|
-
{DAY_NAMES[dayIdx]}
|
|
78
|
-
</text>
|
|
79
|
-
);
|
|
80
|
-
})}
|
|
81
|
-
|
|
82
|
-
{DAY_ORDER.map(function (dayIdx, row) {
|
|
83
|
-
return Array.from({ length: 24 }, function (_, h) {
|
|
84
|
-
var cellKey = dayIdx + ":" + h;
|
|
85
|
-
var count = grid.get(cellKey) || 0;
|
|
86
|
-
var opacity = maxCount > 0 && count > 0 ? Math.max(0.1, count / maxCount) : 0.05;
|
|
87
|
-
var x = DAY_LABEL_WIDTH + h * CELL_STEP;
|
|
88
|
-
var y = HOUR_LABEL_HEIGHT + row * CELL_STEP;
|
|
89
|
-
var dayName = DAY_NAMES[dayIdx];
|
|
90
|
-
|
|
91
|
-
return (
|
|
92
|
-
<rect
|
|
93
|
-
key={cellKey}
|
|
94
|
-
x={x}
|
|
95
|
-
y={y}
|
|
96
|
-
width={CELL_SIZE}
|
|
97
|
-
height={CELL_SIZE}
|
|
98
|
-
rx={2}
|
|
99
|
-
ry={2}
|
|
100
|
-
fill={count > 0 ? PRIMARY_COLOR : "currentColor"}
|
|
101
|
-
opacity={opacity}
|
|
102
|
-
className={count > 0 ? "" : "text-base-content/5"}
|
|
103
|
-
onMouseEnter={function (e) {
|
|
104
|
-
setHover({
|
|
105
|
-
x: e.clientX,
|
|
106
|
-
y: e.clientY,
|
|
107
|
-
day: dayName,
|
|
108
|
-
hour: h,
|
|
109
|
-
count: count,
|
|
110
|
-
});
|
|
111
|
-
}}
|
|
112
|
-
onMouseLeave={function () { setHover(null); }}
|
|
113
|
-
/>
|
|
114
|
-
);
|
|
115
|
-
});
|
|
116
|
-
})}
|
|
117
|
-
</svg>
|
|
118
|
-
|
|
119
|
-
{hover && createPortal(
|
|
120
|
-
<div
|
|
121
|
-
className="fixed z-[9999] rounded-lg border border-base-content/8 bg-base-200 px-3 py-2 shadow-lg pointer-events-none"
|
|
122
|
-
style={{ left: hover.x + 12, top: hover.y - 40 }}
|
|
123
|
-
>
|
|
124
|
-
<div className="text-[11px] font-mono text-base-content/70 space-y-0.5">
|
|
125
|
-
<p><span className="text-base-content/40">{hover.day} </span>{hover.hour}:00</p>
|
|
126
|
-
<p><span className="text-base-content/40">sessions </span>{hover.count}</p>
|
|
127
|
-
</div>
|
|
128
|
-
</div>,
|
|
129
|
-
document.body
|
|
130
|
-
)}
|
|
131
|
-
</div>
|
|
132
|
-
);
|
|
133
|
-
}
|