@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,149 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from "react";
|
|
2
|
-
import { ChevronDown, ChevronRight, ExternalLink } from "lucide-react";
|
|
3
|
-
import { useWebSocket } from "../../hooks/useWebSocket";
|
|
4
|
-
import type { ServerMessage, SettingsDataMessage } from "#shared";
|
|
5
|
-
|
|
6
|
-
interface RuleEntry {
|
|
7
|
-
filename: string;
|
|
8
|
-
content: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function GlobalRules() {
|
|
12
|
-
var { send, subscribe, unsubscribe } = useWebSocket();
|
|
13
|
-
var [rules, setRules] = useState<RuleEntry[]>([]);
|
|
14
|
-
var [claudeMd, setClaudeMd] = useState("");
|
|
15
|
-
var [expanded, setExpanded] = useState<Set<number>>(new Set());
|
|
16
|
-
var [claudeMdExpanded, setClaudeMdExpanded] = useState(false);
|
|
17
|
-
|
|
18
|
-
useEffect(function () {
|
|
19
|
-
function handleMessage(msg: ServerMessage) {
|
|
20
|
-
if (msg.type !== "settings:data") return;
|
|
21
|
-
var data = msg as SettingsDataMessage;
|
|
22
|
-
var cfg = data.config as unknown as Record<string, unknown>;
|
|
23
|
-
setClaudeMd(cfg.claudeMd ? String(cfg.claudeMd) : "");
|
|
24
|
-
setRules(data.globalRules ?? []);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
subscribe("settings:data", handleMessage);
|
|
28
|
-
send({ type: "settings:get" });
|
|
29
|
-
|
|
30
|
-
return function () {
|
|
31
|
-
unsubscribe("settings:data", handleMessage);
|
|
32
|
-
};
|
|
33
|
-
}, []);
|
|
34
|
-
|
|
35
|
-
function toggle(idx: number) {
|
|
36
|
-
setExpanded(function (prev) {
|
|
37
|
-
var next = new Set(prev);
|
|
38
|
-
if (next.has(idx)) {
|
|
39
|
-
next.delete(idx);
|
|
40
|
-
} else {
|
|
41
|
-
next.add(idx);
|
|
42
|
-
}
|
|
43
|
-
return next;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function preview(content: string): string {
|
|
48
|
-
var trimmed = content.trim();
|
|
49
|
-
if (trimmed.length <= 80) return trimmed;
|
|
50
|
-
return trimmed.slice(0, 80) + "...";
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<div className="py-2">
|
|
55
|
-
<a
|
|
56
|
-
href="https://docs.anthropic.com/en/docs/claude-code/memory"
|
|
57
|
-
target="_blank"
|
|
58
|
-
rel="noopener noreferrer"
|
|
59
|
-
className="text-[11px] text-base-content/30 hover:text-primary/70 flex items-center gap-1 mb-4 transition-colors"
|
|
60
|
-
>
|
|
61
|
-
<ExternalLink size={11} />
|
|
62
|
-
Claude Code docs
|
|
63
|
-
</a>
|
|
64
|
-
<div className="mb-6">
|
|
65
|
-
<h2 className="text-[12px] font-semibold text-base-content/40 mb-3">
|
|
66
|
-
Global CLAUDE.md
|
|
67
|
-
</h2>
|
|
68
|
-
{!claudeMd && (
|
|
69
|
-
<div className="py-4 text-center text-[13px] text-base-content/30">
|
|
70
|
-
No global CLAUDE.md found.
|
|
71
|
-
</div>
|
|
72
|
-
)}
|
|
73
|
-
{claudeMd && (
|
|
74
|
-
<div className="border border-base-content/10 rounded-xl overflow-hidden">
|
|
75
|
-
<button
|
|
76
|
-
onClick={function () { setClaudeMdExpanded(!claudeMdExpanded); }}
|
|
77
|
-
className="w-full flex items-center gap-2 px-3 py-2 bg-base-300/50 hover:bg-base-300/70 transition-colors duration-[120ms] cursor-pointer text-left"
|
|
78
|
-
>
|
|
79
|
-
{claudeMdExpanded
|
|
80
|
-
? <ChevronDown size={12} className="text-base-content/40 flex-shrink-0" />
|
|
81
|
-
: <ChevronRight size={12} className="text-base-content/40 flex-shrink-0" />
|
|
82
|
-
}
|
|
83
|
-
<span className="font-mono text-[12px] text-base-content/40 flex-1 truncate">
|
|
84
|
-
~/.claude/CLAUDE.md
|
|
85
|
-
</span>
|
|
86
|
-
</button>
|
|
87
|
-
{!claudeMdExpanded && (
|
|
88
|
-
<div className="px-3 py-1.5 text-[11px] text-base-content/30 font-mono truncate">
|
|
89
|
-
{preview(claudeMd)}
|
|
90
|
-
</div>
|
|
91
|
-
)}
|
|
92
|
-
{claudeMdExpanded && (
|
|
93
|
-
<pre className="px-3 py-2 text-[12px] text-base-content/40 font-mono whitespace-pre-wrap break-words bg-base-300/30 max-h-[300px] overflow-auto">
|
|
94
|
-
{claudeMd}
|
|
95
|
-
</pre>
|
|
96
|
-
)}
|
|
97
|
-
</div>
|
|
98
|
-
)}
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<div>
|
|
102
|
-
<h2 className="text-[12px] font-semibold text-base-content/40 mb-3">
|
|
103
|
-
Global Rules
|
|
104
|
-
</h2>
|
|
105
|
-
<p className="text-[11px] text-base-content/30 mb-3">
|
|
106
|
-
Rules from ~/.claude/rules/ — read-only.
|
|
107
|
-
</p>
|
|
108
|
-
{rules.length === 0 && (
|
|
109
|
-
<div className="py-4 text-center text-[13px] text-base-content/30">
|
|
110
|
-
No global rules found.
|
|
111
|
-
</div>
|
|
112
|
-
)}
|
|
113
|
-
{rules.length > 0 && (
|
|
114
|
-
<div className="flex flex-col gap-1.5">
|
|
115
|
-
{rules.map(function (rule, idx) {
|
|
116
|
-
var isExpanded = expanded.has(idx);
|
|
117
|
-
return (
|
|
118
|
-
<div key={rule.filename + "-" + idx} className="border border-base-content/10 rounded-xl overflow-hidden">
|
|
119
|
-
<button
|
|
120
|
-
onClick={function () { toggle(idx); }}
|
|
121
|
-
className="w-full flex items-center gap-2 px-3 py-2 bg-base-300/50 hover:bg-base-300/70 transition-colors duration-[120ms] cursor-pointer text-left"
|
|
122
|
-
>
|
|
123
|
-
{isExpanded
|
|
124
|
-
? <ChevronDown size={12} className="text-base-content/40 flex-shrink-0" />
|
|
125
|
-
: <ChevronRight size={12} className="text-base-content/40 flex-shrink-0" />
|
|
126
|
-
}
|
|
127
|
-
<span className="font-mono text-[12px] text-base-content/40 flex-1 truncate">
|
|
128
|
-
{rule.filename}
|
|
129
|
-
</span>
|
|
130
|
-
</button>
|
|
131
|
-
{!isExpanded && (
|
|
132
|
-
<div className="px-3 py-1.5 text-[11px] text-base-content/30 font-mono truncate">
|
|
133
|
-
{preview(rule.content)}
|
|
134
|
-
</div>
|
|
135
|
-
)}
|
|
136
|
-
{isExpanded && (
|
|
137
|
-
<pre className="px-3 py-2 text-[12px] text-base-content/40 font-mono whitespace-pre-wrap break-words bg-base-300/30 max-h-[300px] overflow-auto">
|
|
138
|
-
{rule.content}
|
|
139
|
-
</pre>
|
|
140
|
-
)}
|
|
141
|
-
</div>
|
|
142
|
-
);
|
|
143
|
-
})}
|
|
144
|
-
</div>
|
|
145
|
-
)}
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
);
|
|
149
|
-
}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from "react";
|
|
2
|
-
import { ExternalLink } from "lucide-react";
|
|
3
|
-
import { useWebSocket } from "../../hooks/useWebSocket";
|
|
4
|
-
import { SkillMarketplace } from "./SkillMarketplace";
|
|
5
|
-
import { SkillItem, SkillActions, SkillViewModal } from "./skill-shared";
|
|
6
|
-
import type { ServerMessage, SkillInfo, SettingsDataMessage } from "#shared";
|
|
7
|
-
|
|
8
|
-
export function GlobalSkills() {
|
|
9
|
-
var { send, subscribe, unsubscribe } = useWebSocket();
|
|
10
|
-
var [skills, setSkills] = useState<SkillInfo[]>([]);
|
|
11
|
-
var [loaded, setLoaded] = useState(false);
|
|
12
|
-
var [viewContent, setViewContent] = useState<{ path: string; content: string } | null>(null);
|
|
13
|
-
var [deletingPath, setDeletingPath] = useState<string | null>(null);
|
|
14
|
-
var [updatingName, setUpdatingName] = useState<string | null>(null);
|
|
15
|
-
|
|
16
|
-
useEffect(function () {
|
|
17
|
-
function handleData(msg: ServerMessage) {
|
|
18
|
-
if (msg.type !== "settings:data") return;
|
|
19
|
-
var data = msg as SettingsDataMessage;
|
|
20
|
-
setSkills(data.globalSkills ?? []);
|
|
21
|
-
setLoaded(true);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function handleViewResult(msg: ServerMessage) {
|
|
25
|
-
if (msg.type !== "skills:view_result") return;
|
|
26
|
-
var data = msg as { type: "skills:view_result"; path: string; content: string };
|
|
27
|
-
setViewContent({ path: data.path, content: data.content });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function handleDeleteResult(msg: ServerMessage) {
|
|
31
|
-
if (msg.type !== "skills:delete_result") return;
|
|
32
|
-
setDeletingPath(null);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function handleInstallResult(msg: ServerMessage) {
|
|
36
|
-
if (msg.type !== "skills:install_result") return;
|
|
37
|
-
setUpdatingName(null);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
subscribe("settings:data", handleData);
|
|
41
|
-
subscribe("skills:view_result", handleViewResult);
|
|
42
|
-
subscribe("skills:delete_result", handleDeleteResult);
|
|
43
|
-
subscribe("skills:install_result", handleInstallResult);
|
|
44
|
-
send({ type: "settings:get" });
|
|
45
|
-
|
|
46
|
-
return function () {
|
|
47
|
-
unsubscribe("settings:data", handleData);
|
|
48
|
-
unsubscribe("skills:view_result", handleViewResult);
|
|
49
|
-
unsubscribe("skills:delete_result", handleDeleteResult);
|
|
50
|
-
unsubscribe("skills:install_result", handleInstallResult);
|
|
51
|
-
};
|
|
52
|
-
}, []);
|
|
53
|
-
|
|
54
|
-
function handleView(skill: SkillInfo) {
|
|
55
|
-
send({ type: "skills:view", path: skill.path } as any);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function handleDelete(skill: SkillInfo) {
|
|
59
|
-
setDeletingPath(skill.path);
|
|
60
|
-
send({ type: "skills:delete", path: skill.path } as any);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function handleUpdate(skill: SkillInfo) {
|
|
64
|
-
var source = guessSource(skill);
|
|
65
|
-
if (!source) return;
|
|
66
|
-
setUpdatingName(skill.name);
|
|
67
|
-
send({ type: "skills:update", source: source } as any);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function guessSource(skill: SkillInfo): string | null {
|
|
71
|
-
var pathParts = skill.path.split("/");
|
|
72
|
-
var skillsIdx = pathParts.lastIndexOf("skills");
|
|
73
|
-
if (skillsIdx >= 0 && skillsIdx + 1 < pathParts.length) {
|
|
74
|
-
return pathParts[skillsIdx + 1];
|
|
75
|
-
}
|
|
76
|
-
return skill.name;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (!loaded) {
|
|
80
|
-
return (
|
|
81
|
-
<div className="py-4 space-y-3 animate-pulse">
|
|
82
|
-
{[0, 1, 2].map(function (i) { return <div key={i} className="bg-base-content/[0.03] rounded-xl h-16" />; })}
|
|
83
|
-
</div>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<div className="py-2 space-y-6">
|
|
89
|
-
<a
|
|
90
|
-
href="https://docs.anthropic.com/en/docs/claude-code/slash-commands"
|
|
91
|
-
target="_blank"
|
|
92
|
-
rel="noopener noreferrer"
|
|
93
|
-
className="text-[11px] text-base-content/30 hover:text-primary/70 flex items-center gap-1 mb-4 transition-colors"
|
|
94
|
-
>
|
|
95
|
-
<ExternalLink size={11} />
|
|
96
|
-
Claude Code docs
|
|
97
|
-
</a>
|
|
98
|
-
<div>
|
|
99
|
-
<div className="text-[12px] font-semibold text-base-content/40 mb-2">Installed Skills</div>
|
|
100
|
-
{skills.length === 0 ? (
|
|
101
|
-
<div className="py-4 text-center">
|
|
102
|
-
<div className="text-[12px] text-base-content/30 mb-0.5">No skills installed</div>
|
|
103
|
-
<div className="text-[11px] text-base-content/20">Search the marketplace below to add skills.</div>
|
|
104
|
-
</div>
|
|
105
|
-
) : (
|
|
106
|
-
<div className="space-y-2">
|
|
107
|
-
{skills.map(function (skill) {
|
|
108
|
-
return (
|
|
109
|
-
<SkillItem
|
|
110
|
-
key={skill.path}
|
|
111
|
-
skill={skill}
|
|
112
|
-
onClick={function () { handleView(skill); }}
|
|
113
|
-
actions={
|
|
114
|
-
<SkillActions
|
|
115
|
-
skill={skill}
|
|
116
|
-
onDelete={function () { handleDelete(skill); }}
|
|
117
|
-
onUpdate={function () { handleUpdate(skill); }}
|
|
118
|
-
isDeleting={deletingPath === skill.path}
|
|
119
|
-
isUpdating={updatingName === skill.name}
|
|
120
|
-
/>
|
|
121
|
-
}
|
|
122
|
-
/>
|
|
123
|
-
);
|
|
124
|
-
})}
|
|
125
|
-
</div>
|
|
126
|
-
)}
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
<SkillMarketplace defaultScope="global" />
|
|
130
|
-
|
|
131
|
-
{viewContent && (
|
|
132
|
-
<SkillViewModal
|
|
133
|
-
path={viewContent.path}
|
|
134
|
-
content={viewContent.content}
|
|
135
|
-
onClose={function () { setViewContent(null); }}
|
|
136
|
-
/>
|
|
137
|
-
)}
|
|
138
|
-
</div>
|
|
139
|
-
);
|
|
140
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { useState, useCallback, memo } from "react";
|
|
2
|
-
import { Plus, CircleDot, Circle, RefreshCw, Loader2 } from "lucide-react";
|
|
3
|
-
import { useWebSocket } from "../../hooks/useWebSocket";
|
|
4
|
-
import { useMesh } from "../../hooks/useMesh";
|
|
5
|
-
import { PairingDialog } from "../mesh/PairingDialog";
|
|
6
|
-
import type { NodeInfo } from "#shared";
|
|
7
|
-
|
|
8
|
-
interface NodeRowProps {
|
|
9
|
-
node: NodeInfo;
|
|
10
|
-
onUnpair: (nodeId: string) => void;
|
|
11
|
-
onReconnect: (nodeId: string) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function NodeRow(props: NodeRowProps) {
|
|
15
|
-
var [confirming, setConfirming] = useState(false);
|
|
16
|
-
var [reconnecting, setReconnecting] = useState(false);
|
|
17
|
-
|
|
18
|
-
function handleUnpair() {
|
|
19
|
-
if (!confirming) {
|
|
20
|
-
setConfirming(true);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
props.onUnpair(props.node.id);
|
|
24
|
-
setConfirming(false);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<div className="flex items-center gap-3 p-3 sm:p-2.5 px-3.5 rounded-lg border border-base-content/15 bg-base-300 mb-2">
|
|
29
|
-
{props.node.online ? (
|
|
30
|
-
<CircleDot size={10} className="text-success flex-shrink-0" aria-label="Online" />
|
|
31
|
-
) : (
|
|
32
|
-
<Circle size={10} className="text-base-content/30 flex-shrink-0" aria-label="Offline" />
|
|
33
|
-
)}
|
|
34
|
-
|
|
35
|
-
<div className="flex-1 min-w-0">
|
|
36
|
-
<div className="text-[13px] font-medium text-base-content truncate">
|
|
37
|
-
{props.node.name}
|
|
38
|
-
{props.node.isLocal && (
|
|
39
|
-
<span className="ml-1.5 text-[10px] font-semibold text-primary uppercase tracking-[0.06em]">
|
|
40
|
-
local
|
|
41
|
-
</span>
|
|
42
|
-
)}
|
|
43
|
-
</div>
|
|
44
|
-
<div className="text-[11px] text-base-content/40 truncate">
|
|
45
|
-
{(props.node.addresses && props.node.addresses.length > 0
|
|
46
|
-
? props.node.addresses
|
|
47
|
-
: [props.node.address + (props.node.port ? ":" + props.node.port : "")]
|
|
48
|
-
).map(function (addr, i) {
|
|
49
|
-
return (
|
|
50
|
-
<span key={addr}>
|
|
51
|
-
{i > 0 && <span className="text-base-content/20 mx-1">/</span>}
|
|
52
|
-
{addr}
|
|
53
|
-
</span>
|
|
54
|
-
);
|
|
55
|
-
})}
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
{!props.node.isLocal && (
|
|
60
|
-
<div className="flex gap-1.5 flex-shrink-0">
|
|
61
|
-
{!props.node.online && (
|
|
62
|
-
reconnecting ? (
|
|
63
|
-
<span className="flex items-center gap-1 text-[11px] text-base-content/40">
|
|
64
|
-
<Loader2 size={10} className="animate-spin" />
|
|
65
|
-
Connecting...
|
|
66
|
-
</span>
|
|
67
|
-
) : (
|
|
68
|
-
<button
|
|
69
|
-
onClick={function () {
|
|
70
|
-
setReconnecting(true);
|
|
71
|
-
props.onReconnect(props.node.id);
|
|
72
|
-
setTimeout(function () { setReconnecting(false); }, 5000);
|
|
73
|
-
}}
|
|
74
|
-
className="btn btn-ghost btn-xs border border-base-content/20 hover:btn-info hover:border-info gap-1"
|
|
75
|
-
title="Attempt to reconnect"
|
|
76
|
-
>
|
|
77
|
-
<RefreshCw size={10} />
|
|
78
|
-
Reconnect
|
|
79
|
-
</button>
|
|
80
|
-
)
|
|
81
|
-
)}
|
|
82
|
-
{confirming ? (
|
|
83
|
-
<>
|
|
84
|
-
<button
|
|
85
|
-
onClick={handleUnpair}
|
|
86
|
-
className="btn btn-error btn-xs"
|
|
87
|
-
>
|
|
88
|
-
Confirm
|
|
89
|
-
</button>
|
|
90
|
-
<button
|
|
91
|
-
onClick={function () { setConfirming(false); }}
|
|
92
|
-
className="btn btn-ghost btn-xs"
|
|
93
|
-
>
|
|
94
|
-
Cancel
|
|
95
|
-
</button>
|
|
96
|
-
</>
|
|
97
|
-
) : (
|
|
98
|
-
<button
|
|
99
|
-
onClick={handleUnpair}
|
|
100
|
-
className="btn btn-ghost btn-xs border border-base-content/20 hover:btn-error hover:border-error"
|
|
101
|
-
>
|
|
102
|
-
Unpair
|
|
103
|
-
</button>
|
|
104
|
-
)}
|
|
105
|
-
</div>
|
|
106
|
-
)}
|
|
107
|
-
</div>
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export function MeshStatus() {
|
|
112
|
-
var ws = useWebSocket();
|
|
113
|
-
var { nodes } = useMesh();
|
|
114
|
-
var [pairingOpen, setPairingOpen] = useState(false);
|
|
115
|
-
|
|
116
|
-
var handleClosePairing = useCallback(function () { setPairingOpen(false); }, []);
|
|
117
|
-
|
|
118
|
-
function handleUnpair(nodeId: string) {
|
|
119
|
-
ws.send({ type: "mesh:unpair", nodeId });
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function handleReconnect(nodeId: string) {
|
|
123
|
-
ws.send({ type: "mesh:reconnect", nodeId } as any);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
var localNode = nodes.find(function (n) { return n.isLocal; });
|
|
127
|
-
var remoteNodes = nodes.filter(function (n) { return !n.isLocal; });
|
|
128
|
-
|
|
129
|
-
return (
|
|
130
|
-
<div className="py-2">
|
|
131
|
-
<div className="mb-5">
|
|
132
|
-
<div className="text-[12px] font-semibold text-base-content/40 mb-2 tracking-[0.06em]">
|
|
133
|
-
This Node
|
|
134
|
-
</div>
|
|
135
|
-
{localNode ? (
|
|
136
|
-
<NodeRow node={localNode} onUnpair={handleUnpair} onReconnect={handleReconnect} />
|
|
137
|
-
) : (
|
|
138
|
-
<div className="text-[12px] text-base-content/30">
|
|
139
|
-
Loading node information...
|
|
140
|
-
</div>
|
|
141
|
-
)}
|
|
142
|
-
</div>
|
|
143
|
-
|
|
144
|
-
<div className="mb-5">
|
|
145
|
-
<div className="flex items-center justify-between mb-2">
|
|
146
|
-
<div className="text-[12px] font-semibold text-base-content/40 tracking-[0.06em]">
|
|
147
|
-
Paired Nodes
|
|
148
|
-
</div>
|
|
149
|
-
<button
|
|
150
|
-
onClick={function () { setPairingOpen(true); }}
|
|
151
|
-
className="btn btn-primary btn-sm sm:btn-xs gap-1"
|
|
152
|
-
>
|
|
153
|
-
<Plus size={10} />
|
|
154
|
-
Pair New Node
|
|
155
|
-
</button>
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
{remoteNodes.length === 0 ? (
|
|
159
|
-
<div className="p-4 rounded-lg border border-dashed border-base-content/10 text-center">
|
|
160
|
-
<div className="text-[12px] text-base-content/30 mb-0.5">No paired nodes</div>
|
|
161
|
-
<div className="text-[11px] text-base-content/20">Connect another machine to view its projects and sessions here.</div>
|
|
162
|
-
</div>
|
|
163
|
-
) : (
|
|
164
|
-
remoteNodes.map(function (node) {
|
|
165
|
-
return (
|
|
166
|
-
<NodeRow
|
|
167
|
-
key={node.id}
|
|
168
|
-
node={node}
|
|
169
|
-
onUnpair={handleUnpair}
|
|
170
|
-
onReconnect={handleReconnect}
|
|
171
|
-
/>
|
|
172
|
-
);
|
|
173
|
-
})
|
|
174
|
-
)}
|
|
175
|
-
</div>
|
|
176
|
-
|
|
177
|
-
<PairingDialog
|
|
178
|
-
isOpen={pairingOpen}
|
|
179
|
-
onClose={handleClosePairing}
|
|
180
|
-
/>
|
|
181
|
-
</div>
|
|
182
|
-
);
|
|
183
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { useNotificationPreference } from "../../hooks/useNotifications";
|
|
3
|
-
import { usePushNotifications } from "../../hooks/usePushNotifications";
|
|
4
|
-
|
|
5
|
-
var NOTIFICATION_TYPES = [
|
|
6
|
-
{ key: "responses", label: "Claude responses", description: "When Claude finishes a response" },
|
|
7
|
-
{ key: "mesh", label: "Mesh node changes", description: "When nodes come online or go offline" },
|
|
8
|
-
{ key: "connection", label: "Connection events", description: "WebSocket connect and disconnect" },
|
|
9
|
-
] as const;
|
|
10
|
-
|
|
11
|
-
function loadTypePrefs(): Record<string, boolean> {
|
|
12
|
-
try {
|
|
13
|
-
var stored = localStorage.getItem("lattice-notification-types");
|
|
14
|
-
if (stored) return JSON.parse(stored);
|
|
15
|
-
} catch {}
|
|
16
|
-
return { responses: true, mesh: true, connection: true };
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function saveTypePrefs(prefs: Record<string, boolean>): void {
|
|
20
|
-
localStorage.setItem("lattice-notification-types", JSON.stringify(prefs));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function Notifications() {
|
|
24
|
-
var notifPref = useNotificationPreference();
|
|
25
|
-
var push = usePushNotifications();
|
|
26
|
-
var [typePrefs, setTypePrefs] = useState<Record<string, boolean>>(loadTypePrefs);
|
|
27
|
-
|
|
28
|
-
function toggleType(key: string) {
|
|
29
|
-
setTypePrefs(function (prev) {
|
|
30
|
-
var next = { ...prev, [key]: !prev[key] };
|
|
31
|
-
saveTypePrefs(next);
|
|
32
|
-
return next;
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<div className="py-2 space-y-6">
|
|
38
|
-
<div>
|
|
39
|
-
<h2 className="text-[12px] font-semibold text-base-content/40 mb-3">
|
|
40
|
-
Browser Notifications
|
|
41
|
-
</h2>
|
|
42
|
-
<div className="flex items-center justify-between py-2 px-3 bg-base-300 border border-base-content/15 rounded-xl">
|
|
43
|
-
<div>
|
|
44
|
-
<div className="text-[13px] text-base-content">Enable notifications</div>
|
|
45
|
-
<div className="text-[11px] text-base-content/30 mt-0.5">
|
|
46
|
-
{notifPref.permission === "denied"
|
|
47
|
-
? "Blocked by browser — update in browser settings"
|
|
48
|
-
: "Get notified about events in Lattice"}
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
<input
|
|
52
|
-
type="checkbox"
|
|
53
|
-
className="toggle toggle-sm toggle-primary"
|
|
54
|
-
checked={notifPref.enabled}
|
|
55
|
-
onChange={notifPref.toggle}
|
|
56
|
-
disabled={notifPref.permission === "denied"}
|
|
57
|
-
/>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
{push.status !== "unsupported" && (
|
|
62
|
-
<div>
|
|
63
|
-
<h2 className="text-[12px] font-semibold text-base-content/40 mb-3">
|
|
64
|
-
Push Notifications
|
|
65
|
-
</h2>
|
|
66
|
-
<div className="flex items-center justify-between py-2 px-3 bg-base-300 border border-base-content/15 rounded-xl">
|
|
67
|
-
<div>
|
|
68
|
-
<div className="text-[13px] text-base-content">Enable push notifications</div>
|
|
69
|
-
<div className="text-[11px] text-base-content/30 mt-0.5">
|
|
70
|
-
{push.status === "denied"
|
|
71
|
-
? "Blocked by browser — update in browser settings"
|
|
72
|
-
: push.status === "subscribed"
|
|
73
|
-
? "Receiving push notifications even when the tab is closed"
|
|
74
|
-
: "Get notified even when Lattice is not open"}
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
<input
|
|
78
|
-
type="checkbox"
|
|
79
|
-
className="toggle toggle-sm toggle-primary"
|
|
80
|
-
checked={push.status === "subscribed"}
|
|
81
|
-
onChange={function () {
|
|
82
|
-
if (push.status === "subscribed") {
|
|
83
|
-
void push.unsubscribe();
|
|
84
|
-
} else {
|
|
85
|
-
void push.subscribe();
|
|
86
|
-
}
|
|
87
|
-
}}
|
|
88
|
-
disabled={push.status === "denied"}
|
|
89
|
-
/>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
)}
|
|
93
|
-
|
|
94
|
-
<div>
|
|
95
|
-
<h2 className="text-[12px] font-semibold text-base-content/40 mb-3">
|
|
96
|
-
Notification Types
|
|
97
|
-
</h2>
|
|
98
|
-
<div className="flex flex-col gap-2">
|
|
99
|
-
{NOTIFICATION_TYPES.map(function (nt) {
|
|
100
|
-
return (
|
|
101
|
-
<div
|
|
102
|
-
key={nt.key}
|
|
103
|
-
className="flex items-center justify-between py-2 px-3 bg-base-300 border border-base-content/15 rounded-xl"
|
|
104
|
-
>
|
|
105
|
-
<div>
|
|
106
|
-
<div className="text-[13px] text-base-content">{nt.label}</div>
|
|
107
|
-
<div className="text-[11px] text-base-content/30 mt-0.5">{nt.description}</div>
|
|
108
|
-
</div>
|
|
109
|
-
<input
|
|
110
|
-
type="checkbox"
|
|
111
|
-
className="toggle toggle-sm toggle-primary"
|
|
112
|
-
checked={typePrefs[nt.key] !== false}
|
|
113
|
-
onChange={function () { toggleType(nt.key); }}
|
|
114
|
-
disabled={!notifPref.enabled}
|
|
115
|
-
/>
|
|
116
|
-
</div>
|
|
117
|
-
);
|
|
118
|
-
})}
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
);
|
|
123
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { useSidebar } from "../../hooks/useSidebar";
|
|
2
|
-
import { Menu } from "lucide-react";
|
|
3
|
-
import { Appearance } from "./Appearance";
|
|
4
|
-
import { ClaudeSettings } from "./ClaudeSettings";
|
|
5
|
-
import { Environment } from "./Environment";
|
|
6
|
-
import { MeshStatus } from "./MeshStatus";
|
|
7
|
-
import { GlobalMcp } from "./GlobalMcp";
|
|
8
|
-
import { GlobalSkills } from "./GlobalSkills";
|
|
9
|
-
import { Editor } from "./Editor";
|
|
10
|
-
import { GlobalRules } from "./GlobalRules";
|
|
11
|
-
import { GlobalMemory } from "./GlobalMemory";
|
|
12
|
-
import { GlobalPlugins } from "./GlobalPlugins";
|
|
13
|
-
import { Notifications } from "./Notifications";
|
|
14
|
-
import { BudgetSettings } from "./BudgetSettings";
|
|
15
|
-
import type { SettingsSection } from "../../stores/sidebar";
|
|
16
|
-
|
|
17
|
-
var SECTION_CONFIG: Record<string, { title: string }> = {
|
|
18
|
-
appearance: { title: "Appearance" },
|
|
19
|
-
notifications: { title: "Notifications" },
|
|
20
|
-
claude: { title: "Claude" },
|
|
21
|
-
budget: { title: "Budget" },
|
|
22
|
-
environment: { title: "Environment" },
|
|
23
|
-
mcp: { title: "MCP Servers" },
|
|
24
|
-
skills: { title: "Skills" },
|
|
25
|
-
plugins: { title: "Plugins" },
|
|
26
|
-
nodes: { title: "Mesh Nodes" },
|
|
27
|
-
editor: { title: "Editor" },
|
|
28
|
-
rules: { title: "Rules" },
|
|
29
|
-
memory: { title: "Memory" },
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
function renderSection(section: SettingsSection) {
|
|
33
|
-
if (section === "appearance") return <Appearance />;
|
|
34
|
-
if (section === "notifications") return <Notifications />;
|
|
35
|
-
if (section === "claude") return <ClaudeSettings />;
|
|
36
|
-
if (section === "budget") return <BudgetSettings />;
|
|
37
|
-
if (section === "environment") return <Environment />;
|
|
38
|
-
if (section === "mcp") return <GlobalMcp />;
|
|
39
|
-
if (section === "skills") return <GlobalSkills />;
|
|
40
|
-
if (section === "plugins") return <GlobalPlugins />;
|
|
41
|
-
if (section === "nodes") return <MeshStatus />;
|
|
42
|
-
if (section === "editor") return <Editor />;
|
|
43
|
-
if (section === "rules") return <GlobalRules />;
|
|
44
|
-
if (section === "memory") return <GlobalMemory />;
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function SettingsView() {
|
|
49
|
-
var { activeView, toggleDrawer } = useSidebar();
|
|
50
|
-
|
|
51
|
-
if (activeView.type !== "settings") {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
var section = activeView.section;
|
|
56
|
-
var config = SECTION_CONFIG[section];
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<section aria-label="Settings" className="flex-1 overflow-auto px-4 sm:px-8 py-4 sm:py-6 max-w-3xl">
|
|
60
|
-
{config && (
|
|
61
|
-
<div className="mb-6 flex items-center gap-3">
|
|
62
|
-
<button
|
|
63
|
-
className="btn btn-ghost btn-sm btn-square lg:hidden"
|
|
64
|
-
aria-label="Toggle sidebar"
|
|
65
|
-
onClick={toggleDrawer}
|
|
66
|
-
>
|
|
67
|
-
<Menu size={18} />
|
|
68
|
-
</button>
|
|
69
|
-
<h1 className="text-lg font-mono font-bold text-base-content">{config.title}</h1>
|
|
70
|
-
</div>
|
|
71
|
-
)}
|
|
72
|
-
{renderSection(section)}
|
|
73
|
-
</section>
|
|
74
|
-
);
|
|
75
|
-
}
|