@polderlabs/bizar 7.0.2 → 8.0.0
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/.claude/settings.local.json +8 -0
- package/bizar-dash/DESIGN.md +729 -969
- package/bizar-dash/GLYPH.md +418 -0
- package/bizar-dash/PLAN.md +1135 -0
- package/bizar-dash/dist/assets/ActivityFeed-BRBtQOHB.js +6 -0
- package/bizar-dash/dist/assets/ActivityFeed-BRBtQOHB.js.map +1 -0
- package/bizar-dash/dist/assets/ActivityView-CwqhxBfh.js +1 -0
- package/bizar-dash/dist/assets/ActivityView-CwqhxBfh.js.map +1 -0
- package/bizar-dash/dist/assets/AgentActivity-6MxU-a9F.js +1 -0
- package/bizar-dash/dist/assets/AgentActivity-6MxU-a9F.js.map +1 -0
- package/bizar-dash/dist/assets/AgentsView-BYrOFdwl.js +8 -0
- package/bizar-dash/dist/assets/AgentsView-BYrOFdwl.js.map +1 -0
- package/bizar-dash/dist/assets/Badge-Cd61wsBa.js +1 -0
- package/bizar-dash/dist/assets/Badge-Cd61wsBa.js.map +1 -0
- package/bizar-dash/dist/assets/Card-C_bvqXdQ.js +1 -0
- package/bizar-dash/dist/assets/Card-C_bvqXdQ.js.map +1 -0
- package/bizar-dash/dist/assets/EmptyState-BWQuKnk9.js +1 -0
- package/bizar-dash/dist/assets/EmptyState-BWQuKnk9.js.map +1 -0
- package/bizar-dash/dist/assets/GoalsView-Dok0yt9S.js +11 -0
- package/bizar-dash/dist/assets/GoalsView-Dok0yt9S.js.map +1 -0
- package/bizar-dash/dist/assets/Grid-C62gCPqt.js +1 -0
- package/bizar-dash/dist/assets/Grid-C62gCPqt.js.map +1 -0
- package/bizar-dash/dist/assets/KanbanCard-CtTKP6ZX.js +21 -0
- package/bizar-dash/dist/assets/KanbanCard-CtTKP6ZX.js.map +1 -0
- package/bizar-dash/dist/assets/LibrariesView-BcyBQXiY.js +67 -0
- package/bizar-dash/dist/assets/LibrariesView-BcyBQXiY.js.map +1 -0
- package/bizar-dash/dist/assets/MemoryView-49wR4u-y.js +13 -0
- package/bizar-dash/dist/assets/MemoryView-49wR4u-y.js.map +1 -0
- package/bizar-dash/dist/assets/OverviewView-BtQ_UWYj.js +1 -0
- package/bizar-dash/dist/assets/OverviewView-BtQ_UWYj.js.map +1 -0
- package/bizar-dash/dist/assets/ProgressBar-CpvDeq9F.js +1 -0
- package/bizar-dash/dist/assets/ProgressBar-CpvDeq9F.js.map +1 -0
- package/bizar-dash/dist/assets/SettingsRow-DmIe5OUu.js +30 -0
- package/bizar-dash/dist/assets/SettingsRow-DmIe5OUu.js.map +1 -0
- package/bizar-dash/dist/assets/SettingsView-D1KmGWbi.js +48 -0
- package/bizar-dash/dist/assets/SettingsView-D1KmGWbi.js.map +1 -0
- package/bizar-dash/dist/assets/StatTile-BkIP32gG.js +11 -0
- package/bizar-dash/dist/assets/StatTile-BkIP32gG.js.map +1 -0
- package/bizar-dash/dist/assets/TasksView-Cba3GJ42.js +1 -0
- package/bizar-dash/dist/assets/TasksView-Cba3GJ42.js.map +1 -0
- package/bizar-dash/dist/assets/ViewHeader-D6c2cw1b.js +6 -0
- package/bizar-dash/dist/assets/ViewHeader-D6c2cw1b.js.map +1 -0
- package/bizar-dash/dist/assets/brain-DeoXNDE2.js +6 -0
- package/bizar-dash/dist/assets/brain-DeoXNDE2.js.map +1 -0
- package/bizar-dash/dist/assets/calendar-DRlQkGJc.js +6 -0
- package/bizar-dash/dist/assets/calendar-DRlQkGJc.js.map +1 -0
- package/bizar-dash/dist/assets/circle-check-DmYQ3vGp.js +6 -0
- package/bizar-dash/dist/assets/circle-check-DmYQ3vGp.js.map +1 -0
- package/bizar-dash/dist/assets/cmdk-BwN8hcKQ.js +80 -0
- package/bizar-dash/dist/assets/cmdk-BwN8hcKQ.js.map +1 -0
- package/bizar-dash/dist/assets/dnd-kit-DR2Qzzxk.js +5 -0
- package/bizar-dash/dist/assets/dnd-kit-DR2Qzzxk.js.map +1 -0
- package/bizar-dash/dist/assets/git-merge-OoqBKQer.js +6 -0
- package/bizar-dash/dist/assets/git-merge-OoqBKQer.js.map +1 -0
- package/bizar-dash/dist/assets/git-pull-request-CXBQTR2f.js +6 -0
- package/bizar-dash/dist/assets/git-pull-request-CXBQTR2f.js.map +1 -0
- package/bizar-dash/dist/assets/main-COdgjqbZ.css +1 -0
- package/bizar-dash/dist/assets/main-Cw6gybzS.js +109 -0
- package/bizar-dash/dist/assets/main-Cw6gybzS.js.map +1 -0
- package/bizar-dash/dist/assets/message-square-DUTeIQAR.js +6 -0
- package/bizar-dash/dist/assets/message-square-DUTeIQAR.js.map +1 -0
- package/bizar-dash/dist/assets/minus-CrStJTZ7.js +6 -0
- package/bizar-dash/dist/assets/minus-CrStJTZ7.js.map +1 -0
- package/bizar-dash/dist/assets/wrench-BJ1WIC4u.js +6 -0
- package/bizar-dash/dist/assets/wrench-BJ1WIC4u.js.map +1 -0
- package/bizar-dash/dist/{mobile.html → v8.html} +6 -9
- package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/bizar-dash/src/server/server.mjs +1 -57
- package/bizar-dash/src/web/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/bizar-dash/src/web/v8/App.tsx +188 -0
- package/bizar-dash/src/web/v8/__tests__/App.test.tsx +102 -0
- package/bizar-dash/src/web/v8/__tests__/AppShell.test.tsx +79 -0
- package/bizar-dash/src/web/v8/__tests__/PageSkeleton.test.tsx +12 -0
- package/bizar-dash/src/web/v8/__tests__/SettingsView.test.tsx +84 -0
- package/bizar-dash/src/web/v8/__tests__/Sidebar.test.tsx +95 -0
- package/bizar-dash/src/web/v8/__tests__/activity.test.tsx +63 -0
- package/bizar-dash/src/web/v8/__tests__/agents.test.tsx +90 -0
- package/bizar-dash/src/web/v8/__tests__/controls.test.tsx +135 -0
- package/bizar-dash/src/web/v8/__tests__/cx.test.ts +25 -0
- package/bizar-dash/src/web/v8/__tests__/data.test.tsx +293 -0
- package/bizar-dash/src/web/v8/__tests__/feedback.test.tsx +213 -0
- package/bizar-dash/src/web/v8/__tests__/goals.test.tsx +105 -0
- package/bizar-dash/src/web/v8/__tests__/kanban.test.tsx +176 -0
- package/bizar-dash/src/web/v8/__tests__/libraries.test.tsx +70 -0
- package/bizar-dash/src/web/v8/__tests__/memory.test.tsx +60 -0
- package/bizar-dash/src/web/v8/__tests__/navigation.test.tsx +137 -0
- package/bizar-dash/src/web/v8/__tests__/settings.test.tsx +104 -0
- package/bizar-dash/src/web/v8/__tests__/theme.test.tsx +98 -0
- package/bizar-dash/src/web/v8/__tests__/views.test.tsx +112 -0
- package/bizar-dash/src/web/v8/main.tsx +28 -0
- package/bizar-dash/src/web/v8/shell/AppShell.tsx +90 -0
- package/bizar-dash/src/web/v8/shell/PageSkeleton.tsx +29 -0
- package/bizar-dash/src/web/v8/shell/Sidebar.tsx +361 -0
- package/bizar-dash/src/web/v8/shell/StatusBar.tsx +63 -0
- package/bizar-dash/src/web/v8/shell/Topbar.tsx +113 -0
- package/bizar-dash/src/web/v8/shell/index.ts +15 -0
- package/bizar-dash/src/web/v8/ui/activity/ActivityFeed.tsx +137 -0
- package/bizar-dash/src/web/v8/ui/agents/AgentActivity.tsx +101 -0
- package/bizar-dash/src/web/v8/ui/agents/AgentCard.tsx +158 -0
- package/bizar-dash/src/web/v8/ui/controls/Button.tsx +141 -0
- package/bizar-dash/src/web/v8/ui/controls/ButtonGroup.tsx +32 -0
- package/bizar-dash/src/web/v8/ui/controls/Checkbox.tsx +49 -0
- package/bizar-dash/src/web/v8/ui/controls/Field.tsx +78 -0
- package/bizar-dash/src/web/v8/ui/controls/Form.tsx +23 -0
- package/bizar-dash/src/web/v8/ui/controls/IconButton.tsx +112 -0
- package/bizar-dash/src/web/v8/ui/controls/Input.tsx +94 -0
- package/bizar-dash/src/web/v8/ui/controls/RadioGroup.tsx +74 -0
- package/bizar-dash/src/web/v8/ui/controls/Select.tsx +171 -0
- package/bizar-dash/src/web/v8/ui/controls/Slider.tsx +68 -0
- package/bizar-dash/src/web/v8/ui/controls/Switch.tsx +56 -0
- package/bizar-dash/src/web/v8/ui/controls/Textarea.tsx +64 -0
- package/bizar-dash/src/web/v8/ui/controls/Toggle.tsx +36 -0
- package/bizar-dash/src/web/v8/ui/controls/ToggleGroup.tsx +85 -0
- package/bizar-dash/src/web/v8/ui/data/Accordion.tsx +134 -0
- package/bizar-dash/src/web/v8/ui/data/Avatar.tsx +175 -0
- package/bizar-dash/src/web/v8/ui/data/Badge.tsx +93 -0
- package/bizar-dash/src/web/v8/ui/data/BarList.tsx +101 -0
- package/bizar-dash/src/web/v8/ui/data/Card.tsx +140 -0
- package/bizar-dash/src/web/v8/ui/data/Chip.tsx +96 -0
- package/bizar-dash/src/web/v8/ui/data/Kbd.tsx +42 -0
- package/bizar-dash/src/web/v8/ui/data/ProgressBar.tsx +93 -0
- package/bizar-dash/src/web/v8/ui/data/Sparkline.tsx +98 -0
- package/bizar-dash/src/web/v8/ui/data/StatTile.tsx +150 -0
- package/bizar-dash/src/web/v8/ui/data/Table.tsx +170 -0
- package/bizar-dash/src/web/v8/ui/data/Timeline.tsx +130 -0
- package/bizar-dash/src/web/v8/ui/data/ViewHeader.tsx +122 -0
- package/bizar-dash/src/web/v8/ui/feedback/Alert.tsx +95 -0
- package/bizar-dash/src/web/v8/ui/feedback/Banner.tsx +39 -0
- package/bizar-dash/src/web/v8/ui/feedback/ContextMenu.tsx +143 -0
- package/bizar-dash/src/web/v8/ui/feedback/Dialog.tsx +149 -0
- package/bizar-dash/src/web/v8/ui/feedback/Drawer.tsx +8 -0
- package/bizar-dash/src/web/v8/ui/feedback/DropdownMenu.tsx +231 -0
- package/bizar-dash/src/web/v8/ui/feedback/EmptyState.tsx +48 -0
- package/bizar-dash/src/web/v8/ui/feedback/Popover.tsx +56 -0
- package/bizar-dash/src/web/v8/ui/feedback/Sheet.tsx +103 -0
- package/bizar-dash/src/web/v8/ui/feedback/Skeleton.tsx +67 -0
- package/bizar-dash/src/web/v8/ui/feedback/Spinner.tsx +30 -0
- package/bizar-dash/src/web/v8/ui/feedback/Toast.tsx +66 -0
- package/bizar-dash/src/web/v8/ui/feedback/Tooltip.tsx +89 -0
- package/bizar-dash/src/web/v8/ui/goals/GoalCard.tsx +176 -0
- package/bizar-dash/src/web/v8/ui/goals/KeyResult.tsx +115 -0
- package/bizar-dash/src/web/v8/ui/index.ts +322 -0
- package/bizar-dash/src/web/v8/ui/kanban/KanbanBoard.tsx +80 -0
- package/bizar-dash/src/web/v8/ui/kanban/KanbanCard.tsx +247 -0
- package/bizar-dash/src/web/v8/ui/kanban/KanbanColumn.tsx +181 -0
- package/bizar-dash/src/web/v8/ui/kanban/KanbanContextMenu.tsx +122 -0
- package/bizar-dash/src/web/v8/ui/kanban/KanbanQuickAdd.tsx +141 -0
- package/bizar-dash/src/web/v8/ui/libraries/LibraryGrid.tsx +30 -0
- package/bizar-dash/src/web/v8/ui/libraries/LibraryItem.tsx +161 -0
- package/bizar-dash/src/web/v8/ui/memory/MemoryVault.tsx +144 -0
- package/bizar-dash/src/web/v8/ui/navigation/CommandPalette.tsx +224 -0
- package/bizar-dash/src/web/v8/ui/navigation/NavLink.tsx +81 -0
- package/bizar-dash/src/web/v8/ui/navigation/Pagination.tsx +164 -0
- package/bizar-dash/src/web/v8/ui/navigation/Tabs.tsx +128 -0
- package/bizar-dash/src/web/v8/ui/navigation/useCommandPaletteHotkey.test.ts +79 -0
- package/bizar-dash/src/web/v8/ui/primitives/Box.tsx +144 -0
- package/bizar-dash/src/web/v8/ui/primitives/Center.tsx +40 -0
- package/bizar-dash/src/web/v8/ui/primitives/Cluster.tsx +67 -0
- package/bizar-dash/src/web/v8/ui/primitives/Grid.tsx +104 -0
- package/bizar-dash/src/web/v8/ui/primitives/Inline.tsx +77 -0
- package/bizar-dash/src/web/v8/ui/primitives/Portal.tsx +33 -0
- package/bizar-dash/src/web/v8/ui/primitives/ScrollArea.tsx +62 -0
- package/bizar-dash/src/web/v8/ui/primitives/Separator.tsx +42 -0
- package/bizar-dash/src/web/v8/ui/primitives/Stack.tsx +73 -0
- package/bizar-dash/src/web/v8/ui/primitives/VisuallyHidden.tsx +49 -0
- package/bizar-dash/src/web/v8/ui/settings/SettingsNav.tsx +91 -0
- package/bizar-dash/src/web/v8/ui/settings/SettingsRow.tsx +88 -0
- package/bizar-dash/src/web/v8/ui/settings/SettingsSection.tsx +109 -0
- package/bizar-dash/src/web/v8/ui/styles/globals.css +220 -0
- package/bizar-dash/src/web/v8/ui/styles/reset.css +57 -0
- package/bizar-dash/src/web/v8/ui/styles/tokens.css +217 -0
- package/bizar-dash/src/web/v8/ui/theme/DensityProvider.test.tsx +74 -0
- package/bizar-dash/src/web/v8/ui/theme/DensityProvider.tsx +66 -0
- package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.test.tsx +86 -0
- package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.tsx +94 -0
- package/bizar-dash/src/web/v8/ui/theme/ThemeToggle.tsx +88 -0
- package/bizar-dash/src/web/v8/ui/theme/useDensity.ts +15 -0
- package/bizar-dash/src/web/v8/ui/theme/useTheme.ts +16 -0
- package/bizar-dash/src/web/v8/ui/utils/cx.ts +19 -0
- package/bizar-dash/src/web/v8/views/Activity/ActivityView.tsx +33 -0
- package/bizar-dash/src/web/v8/views/Agents/AgentsView.tsx +108 -0
- package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.test.tsx +142 -0
- package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.tsx +144 -0
- package/bizar-dash/src/web/v8/views/Goals/GoalsView.tsx +84 -0
- package/bizar-dash/src/web/v8/views/Libraries/LibrariesView.tsx +41 -0
- package/bizar-dash/src/web/v8/views/Memory/MemoryView.tsx +61 -0
- package/bizar-dash/src/web/v8/views/Overview/OverviewView.tsx +92 -0
- package/bizar-dash/src/web/v8/views/Router.tsx +96 -0
- package/bizar-dash/src/web/v8/views/Settings/SettingsView.tsx +305 -0
- package/bizar-dash/src/web/v8/views/Tasks/CommandPalettePlaceholder.tsx +106 -0
- package/bizar-dash/src/web/v8/views/Tasks/TasksKanbanPlaceholder.tsx +62 -0
- package/bizar-dash/src/web/v8/views/Tasks/TasksView.tsx +74 -0
- package/bizar-dash/src/web/v8/vite-env.d.ts +15 -0
- package/bizar-dash/src/web/{mobile.html → v8.html} +4 -7
- package/bizar-dash/tests/settings-layout.test.tsx +2 -2
- package/bizar-dash/tests/settings-nav.test.tsx +6 -6
- package/bizar-dash/tests/setup.ts +26 -0
- package/bizar-dash/vite.config.ts +26 -2
- package/bizar-dash/vitest.config.ts +5 -3
- package/cli/provision-claude.mjs +108 -5
- package/package.json +36 -3
- package/bizar-dash/dist/assets/EnvVarsSection-BfhAz3ax.js +0 -114
- package/bizar-dash/dist/assets/EnvVarsSection-BfhAz3ax.js.map +0 -1
- package/bizar-dash/dist/assets/MobileChat-DLWdv6tQ.js +0 -1
- package/bizar-dash/dist/assets/MobileChat-DLWdv6tQ.js.map +0 -1
- package/bizar-dash/dist/assets/MobileSettings-Bxv62uPY.js +0 -1
- package/bizar-dash/dist/assets/MobileSettings-Bxv62uPY.js.map +0 -1
- package/bizar-dash/dist/assets/Toast-ATSAmbdi.js +0 -26
- package/bizar-dash/dist/assets/Toast-ATSAmbdi.js.map +0 -1
- package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js +0 -1
- package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js.map +0 -1
- package/bizar-dash/dist/assets/main-306CZfn6.js +0 -430
- package/bizar-dash/dist/assets/main-306CZfn6.js.map +0 -1
- package/bizar-dash/dist/assets/main-G3bNDpY3.css +0 -1
- package/bizar-dash/dist/assets/mobile-C_naUN91.js +0 -1
- package/bizar-dash/dist/assets/mobile-C_naUN91.js.map +0 -1
- package/bizar-dash/dist/assets/mobile-layout-BWLtwtfQ.css +0 -1
- package/bizar-dash/dist/assets/mobile-layout-GZ3bE8L6.js +0 -211
- package/bizar-dash/dist/assets/mobile-layout-GZ3bE8L6.js.map +0 -1
- package/bizar-dash/dist/assets/useSlashCommands-BOwD7lNb.js +0 -65
- package/bizar-dash/dist/assets/useSlashCommands-BOwD7lNb.js.map +0 -1
- package/bizar-dash/dist/index.html +0 -43
- package/bizar-dash/src/web/App.tsx +0 -915
- package/bizar-dash/src/web/MobileApp.tsx +0 -414
- package/bizar-dash/src/web/components/ArtifactCreateDialog.tsx +0 -95
- package/bizar-dash/src/web/components/ArtifactListDialog.tsx +0 -55
- package/bizar-dash/src/web/components/ArtifactViewer.tsx +0 -144
- package/bizar-dash/src/web/components/AuditDialog.tsx +0 -79
- package/bizar-dash/src/web/components/AutosaveField.tsx +0 -50
- package/bizar-dash/src/web/components/BackupRestore.tsx +0 -330
- package/bizar-dash/src/web/components/BgStatusBadge.tsx +0 -32
- package/bizar-dash/src/web/components/Button.tsx +0 -56
- package/bizar-dash/src/web/components/CanvasContextMenu.tsx +0 -68
- package/bizar-dash/src/web/components/Card.tsx +0 -40
- package/bizar-dash/src/web/components/CollapsibleSection.tsx +0 -72
- package/bizar-dash/src/web/components/CommandDialog.tsx +0 -66
- package/bizar-dash/src/web/components/DoctorPanel.tsx +0 -160
- package/bizar-dash/src/web/components/EmptyState.tsx +0 -30
- package/bizar-dash/src/web/components/EnvVarManager.tsx +0 -430
- package/bizar-dash/src/web/components/EvalDiff.tsx +0 -157
- package/bizar-dash/src/web/components/EvalExportButton.tsx +0 -27
- package/bizar-dash/src/web/components/EvalRunCard.tsx +0 -78
- package/bizar-dash/src/web/components/FileBrowser.tsx +0 -633
- package/bizar-dash/src/web/components/HeadroomSettings.tsx +0 -418
- package/bizar-dash/src/web/components/HeadroomStatus.tsx +0 -158
- package/bizar-dash/src/web/components/HelpDialog.tsx +0 -55
- package/bizar-dash/src/web/components/InviteDialog.tsx +0 -205
- package/bizar-dash/src/web/components/KillConfirmDialog.tsx +0 -88
- package/bizar-dash/src/web/components/MobileBottomNav.tsx +0 -38
- package/bizar-dash/src/web/components/MobileDrawer.tsx +0 -68
- package/bizar-dash/src/web/components/MobileHeader.tsx +0 -50
- package/bizar-dash/src/web/components/MobileLayout.tsx +0 -63
- package/bizar-dash/src/web/components/Modal.tsx +0 -215
- package/bizar-dash/src/web/components/Notifications.tsx +0 -242
- package/bizar-dash/src/web/components/ScheduleTemplateCard.tsx +0 -72
- package/bizar-dash/src/web/components/ScreenshotCapture.tsx +0 -138
- package/bizar-dash/src/web/components/ScreenshotOCR.tsx +0 -42
- package/bizar-dash/src/web/components/SearchModal.tsx +0 -227
- package/bizar-dash/src/web/components/SettingsNav.tsx +0 -112
- package/bizar-dash/src/web/components/SettingsSearch.tsx +0 -328
- package/bizar-dash/src/web/components/Sidebar.tsx +0 -89
- package/bizar-dash/src/web/components/Spinner.tsx +0 -19
- package/bizar-dash/src/web/components/StatusBadge.tsx +0 -56
- package/bizar-dash/src/web/components/Tag.tsx +0 -41
- package/bizar-dash/src/web/components/TailscaleSettings.tsx +0 -161
- package/bizar-dash/src/web/components/TaskCard.tsx +0 -69
- package/bizar-dash/src/web/components/TaskCreateSheet.tsx +0 -76
- package/bizar-dash/src/web/components/Toast.tsx +0 -150
- package/bizar-dash/src/web/components/Toggle.tsx +0 -31
- package/bizar-dash/src/web/components/Topbar.tsx +0 -410
- package/bizar-dash/src/web/components/UsageChart.tsx +0 -250
- package/bizar-dash/src/web/components/UsageTable.tsx +0 -90
- package/bizar-dash/src/web/components/VirtualList.tsx +0 -53
- package/bizar-dash/src/web/components/VisualPlanDialog.tsx +0 -58
- package/bizar-dash/src/web/components/VoiceNotesPanel.tsx +0 -211
- package/bizar-dash/src/web/components/VoiceRecorder.tsx +0 -105
- package/bizar-dash/src/web/components/WorkspaceSelector.tsx +0 -158
- package/bizar-dash/src/web/components/agents/CommunicationLog.tsx +0 -126
- package/bizar-dash/src/web/components/agents/DependencyGraph.tsx +0 -163
- package/bizar-dash/src/web/components/agents/QualityGates.tsx +0 -123
- package/bizar-dash/src/web/components/agents/RealTimeEventLog.tsx +0 -127
- package/bizar-dash/src/web/components/agents/RoutingDecisions.test.tsx +0 -148
- package/bizar-dash/src/web/components/agents/RoutingDecisions.tsx +0 -160
- package/bizar-dash/src/web/components/background/AttachButton.tsx +0 -96
- package/bizar-dash/src/web/components/background/TmuxAttachCard.tsx +0 -122
- package/bizar-dash/src/web/components/chat/AgentChip.tsx +0 -68
- package/bizar-dash/src/web/components/chat/AgentNode.tsx +0 -127
- package/bizar-dash/src/web/components/chat/AgentTree.tsx +0 -80
- package/bizar-dash/src/web/components/chat/ChatBubble.tsx +0 -60
- package/bizar-dash/src/web/components/chat/ChatComposer.tsx +0 -72
- package/bizar-dash/src/web/components/chat/ChatInfoPanel.tsx +0 -370
- package/bizar-dash/src/web/components/chat/ChatRail.tsx +0 -387
- package/bizar-dash/src/web/components/chat/ChatThread.tsx +0 -127
- package/bizar-dash/src/web/components/chat/ChatTopBar.tsx +0 -50
- package/bizar-dash/src/web/components/chat/Composer.tsx +0 -166
- package/bizar-dash/src/web/components/chat/ConfirmModal.tsx +0 -54
- package/bizar-dash/src/web/components/chat/EmptyState.tsx +0 -21
- package/bizar-dash/src/web/components/chat/FirstRunGreeting.tsx +0 -18
- package/bizar-dash/src/web/components/chat/FloatingComposer.tsx +0 -38
- package/bizar-dash/src/web/components/chat/InfoPanel.tsx +0 -184
- package/bizar-dash/src/web/components/chat/JumpToLatest.tsx +0 -58
- package/bizar-dash/src/web/components/chat/LoadingSkeleton.tsx +0 -19
- package/bizar-dash/src/web/components/chat/MessageBlock.tsx +0 -260
- package/bizar-dash/src/web/components/chat/MessageBubble.tsx +0 -60
- package/bizar-dash/src/web/components/chat/SessionList.tsx +0 -163
- package/bizar-dash/src/web/components/chat/SessionRowMenu.tsx +0 -206
- package/bizar-dash/src/web/components/chat/StreamingIndicator.tsx +0 -37
- package/bizar-dash/src/web/components/chat/SuggestionCards.tsx +0 -55
- package/bizar-dash/src/web/components/chat/WelcomeScreen.tsx +0 -36
- package/bizar-dash/src/web/components/chat/_legacy.ts +0 -30
- package/bizar-dash/src/web/components/chat/index.ts +0 -31
- package/bizar-dash/src/web/components/chat/useAutoGrowTextarea.ts +0 -18
- package/bizar-dash/src/web/components/chat/useChat.ts +0 -1190
- package/bizar-dash/src/web/components/chat/useSlashCommands.ts +0 -47
- package/bizar-dash/src/web/components/goals/GoalInput.tsx +0 -86
- package/bizar-dash/src/web/components/goals/PlanVisualization.tsx +0 -111
- package/bizar-dash/src/web/components/tasks/BacklogPanel.css +0 -109
- package/bizar-dash/src/web/components/tasks/BacklogPanel.tsx +0 -209
- package/bizar-dash/src/web/hooks/useAutosave.ts +0 -107
- package/bizar-dash/src/web/hooks/useI18n.ts +0 -13
- package/bizar-dash/src/web/index.html +0 -37
- package/bizar-dash/src/web/lib/api.ts +0 -237
- package/bizar-dash/src/web/lib/goapPlanner.ts +0 -614
- package/bizar-dash/src/web/lib/i18n.ts +0 -25
- package/bizar-dash/src/web/lib/logger.ts +0 -30
- package/bizar-dash/src/web/lib/markdown.tsx +0 -59
- package/bizar-dash/src/web/lib/search.ts +0 -115
- package/bizar-dash/src/web/lib/types.ts +0 -894
- package/bizar-dash/src/web/lib/utils.ts +0 -114
- package/bizar-dash/src/web/lib/ws.ts +0 -177
- package/bizar-dash/src/web/locales/en.json +0 -52
- package/bizar-dash/src/web/main.tsx +0 -43
- package/bizar-dash/src/web/mobile/MobileApp.tsx +0 -309
- package/bizar-dash/src/web/mobile/MobileBottomNav.tsx +0 -38
- package/bizar-dash/src/web/mobile/MobileChat.tsx +0 -138
- package/bizar-dash/src/web/mobile/MobileDoctor.tsx +0 -80
- package/bizar-dash/src/web/mobile/MobileEval.tsx +0 -167
- package/bizar-dash/src/web/mobile/MobileMemory.tsx +0 -108
- package/bizar-dash/src/web/mobile/MobileOverview.tsx +0 -213
- package/bizar-dash/src/web/mobile/MobileSettings.tsx +0 -251
- package/bizar-dash/src/web/mobile/MobileTasks.tsx +0 -94
- package/bizar-dash/src/web/mobile/MobileTopbar.tsx +0 -115
- package/bizar-dash/src/web/mobile/components/MobileBottomSheet.tsx +0 -182
- package/bizar-dash/src/web/mobile/components/MobileListItem.tsx +0 -64
- package/bizar-dash/src/web/mobile/components/MobileModal.tsx +0 -123
- package/bizar-dash/src/web/mobile/views/MobileActivity.tsx +0 -273
- package/bizar-dash/src/web/mobile/views/MobileAgents.tsx +0 -374
- package/bizar-dash/src/web/mobile/views/MobileArtifactCanvas.tsx +0 -439
- package/bizar-dash/src/web/mobile/views/MobileArtifacts.tsx +0 -143
- package/bizar-dash/src/web/mobile/views/MobileChat.tsx +0 -257
- package/bizar-dash/src/web/mobile/views/MobileConfig.tsx +0 -175
- package/bizar-dash/src/web/mobile/views/MobileHistory.tsx +0 -191
- package/bizar-dash/src/web/mobile/views/MobileMods.tsx +0 -149
- package/bizar-dash/src/web/mobile/views/MobileMore.tsx +0 -121
- package/bizar-dash/src/web/mobile/views/MobileNotifications.tsx +0 -137
- package/bizar-dash/src/web/mobile/views/MobilePlans.tsx +0 -26
- package/bizar-dash/src/web/mobile/views/MobileSchedules.tsx +0 -685
- package/bizar-dash/src/web/mobile/views/MobileSearchModal.tsx +0 -172
- package/bizar-dash/src/web/mobile/views/MobileSettings.tsx +0 -363
- package/bizar-dash/src/web/mobile/views/MobileSkills.tsx +0 -153
- package/bizar-dash/src/web/mobile/views/MobileTasks.tsx +0 -564
- package/bizar-dash/src/web/mobile/views/QrCodePanel.tsx +0 -69
- package/bizar-dash/src/web/mobile.tsx +0 -14
- package/bizar-dash/src/web/styles/agents-redesign.css +0 -311
- package/bizar-dash/src/web/styles/chat.css +0 -1740
- package/bizar-dash/src/web/styles/glyphs.css +0 -960
- package/bizar-dash/src/web/styles/main.css +0 -10391
- package/bizar-dash/src/web/styles/memory.css +0 -1182
- package/bizar-dash/src/web/styles/minimax-usage.css +0 -842
- package/bizar-dash/src/web/styles/mobile-chat.css +0 -5
- package/bizar-dash/src/web/styles/mobile-layout.css +0 -233
- package/bizar-dash/src/web/styles/mobile.css +0 -2181
- package/bizar-dash/src/web/styles/settings.css +0 -795
- package/bizar-dash/src/web/styles/skills.css +0 -302
- package/bizar-dash/src/web/styles/tasks-redesign.css +0 -253
- package/bizar-dash/src/web/styles/tasks.css +0 -605
- package/bizar-dash/src/web/ui/controls/Button.tsx +0 -77
- package/bizar-dash/src/web/ui/controls/Checkbox.tsx +0 -95
- package/bizar-dash/src/web/ui/controls/IconButton.tsx +0 -66
- package/bizar-dash/src/web/ui/controls/Kbd.tsx +0 -24
- package/bizar-dash/src/web/ui/controls/NumberInput.tsx +0 -77
- package/bizar-dash/src/web/ui/controls/RadioGroup.tsx +0 -109
- package/bizar-dash/src/web/ui/controls/SearchInput.tsx +0 -91
- package/bizar-dash/src/web/ui/controls/Select.tsx +0 -92
- package/bizar-dash/src/web/ui/controls/Slider.tsx +0 -70
- package/bizar-dash/src/web/ui/controls/TextInput.tsx +0 -67
- package/bizar-dash/src/web/ui/controls/Textarea.tsx +0 -56
- package/bizar-dash/src/web/ui/controls/Toggle.tsx +0 -79
- package/bizar-dash/src/web/ui/controls/controls.css +0 -476
- package/bizar-dash/src/web/ui/controls/index.ts +0 -35
- package/bizar-dash/src/web/ui/data/BarChart.tsx +0 -60
- package/bizar-dash/src/web/ui/data/DataTable.tsx +0 -216
- package/bizar-dash/src/web/ui/data/EmptyState.tsx +0 -60
- package/bizar-dash/src/web/ui/data/ErrorState.tsx +0 -56
- package/bizar-dash/src/web/ui/data/KeyValueList.tsx +0 -106
- package/bizar-dash/src/web/ui/data/LoadingState.tsx +0 -65
- package/bizar-dash/src/web/ui/data/Sparkline.tsx +0 -87
- package/bizar-dash/src/web/ui/data/StatTile.tsx +0 -87
- package/bizar-dash/src/web/ui/data/data.css +0 -535
- package/bizar-dash/src/web/ui/data/index.ts +0 -31
- package/bizar-dash/src/web/ui/feedback/Badge.tsx +0 -49
- package/bizar-dash/src/web/ui/feedback/Dialog.tsx +0 -209
- package/bizar-dash/src/web/ui/feedback/ProgressBar.tsx +0 -69
- package/bizar-dash/src/web/ui/feedback/StatusDot.tsx +0 -50
- package/bizar-dash/src/web/ui/feedback/Toast.tsx +0 -200
- package/bizar-dash/src/web/ui/feedback/Tooltip.tsx +0 -126
- package/bizar-dash/src/web/ui/feedback/feedback.css +0 -314
- package/bizar-dash/src/web/ui/feedback/index.ts +0 -43
- package/bizar-dash/src/web/ui/index.ts +0 -56
- package/bizar-dash/src/web/ui/layout/AppShell.tsx +0 -51
- package/bizar-dash/src/web/ui/layout/Breadcrumbs.tsx +0 -97
- package/bizar-dash/src/web/ui/layout/Panel.tsx +0 -73
- package/bizar-dash/src/web/ui/layout/PanelHeader.tsx +0 -39
- package/bizar-dash/src/web/ui/layout/Sidebar.tsx +0 -131
- package/bizar-dash/src/web/ui/layout/Tabs.tsx +0 -133
- package/bizar-dash/src/web/ui/layout/Topbar.tsx +0 -42
- package/bizar-dash/src/web/ui/layout/ViewHeader.tsx +0 -48
- package/bizar-dash/src/web/ui/layout/index.ts +0 -34
- package/bizar-dash/src/web/ui/layout/layout.css +0 -464
- package/bizar-dash/src/web/ui/navigation/CommandPalette.tsx +0 -199
- package/bizar-dash/src/web/ui/navigation/NavGroup.tsx +0 -95
- package/bizar-dash/src/web/ui/navigation/NavLink.tsx +0 -93
- package/bizar-dash/src/web/ui/navigation/index.ts +0 -17
- package/bizar-dash/src/web/ui/navigation/navigation.css +0 -343
- package/bizar-dash/src/web/ui/primitives/Box.tsx +0 -91
- package/bizar-dash/src/web/ui/primitives/Grid.tsx +0 -49
- package/bizar-dash/src/web/ui/primitives/Inline.tsx +0 -55
- package/bizar-dash/src/web/ui/primitives/Separator.tsx +0 -46
- package/bizar-dash/src/web/ui/primitives/Stack.tsx +0 -54
- package/bizar-dash/src/web/ui/primitives/VisuallyHidden.tsx +0 -26
- package/bizar-dash/src/web/ui/primitives/index.ts +0 -23
- package/bizar-dash/src/web/ui/primitives/primitives.css +0 -183
- package/bizar-dash/src/web/ui/styles/globals.css +0 -86
- package/bizar-dash/src/web/ui/styles/reset.css +0 -125
- package/bizar-dash/src/web/ui/styles/tokens.css +0 -208
- package/bizar-dash/src/web/ui/theme/ThemeProvider.tsx +0 -142
- package/bizar-dash/src/web/ui/theme/tokens.ts +0 -131
- package/bizar-dash/src/web/ui/theme/useTheme.ts +0 -22
- package/bizar-dash/src/web/ui/utils/cx.ts +0 -42
- package/bizar-dash/src/web/views/Activity.tsx +0 -1221
- package/bizar-dash/src/web/views/Agents.tsx +0 -964
- package/bizar-dash/src/web/views/Artifacts.tsx +0 -1494
- package/bizar-dash/src/web/views/BackgroundAgents.tsx +0 -822
- package/bizar-dash/src/web/views/Chat.tsx +0 -532
- package/bizar-dash/src/web/views/Config.tsx +0 -3
- package/bizar-dash/src/web/views/Doctor.tsx +0 -317
- package/bizar-dash/src/web/views/Eval.tsx +0 -372
- package/bizar-dash/src/web/views/EvalReport.tsx +0 -353
- package/bizar-dash/src/web/views/GoalPlanner.tsx +0 -158
- package/bizar-dash/src/web/views/Harness.tsx +0 -306
- package/bizar-dash/src/web/views/History.tsx +0 -353
- package/bizar-dash/src/web/views/Memory.tsx +0 -161
- package/bizar-dash/src/web/views/MiniMaxUsage.tsx +0 -942
- package/bizar-dash/src/web/views/ModView.tsx +0 -207
- package/bizar-dash/src/web/views/Mods.tsx +0 -706
- package/bizar-dash/src/web/views/Overview.tsx +0 -1364
- package/bizar-dash/src/web/views/Providers.tsx +0 -302
- package/bizar-dash/src/web/views/Schedules.tsx +0 -902
- package/bizar-dash/src/web/views/Settings.tsx +0 -308
- package/bizar-dash/src/web/views/Skills.tsx +0 -383
- package/bizar-dash/src/web/views/SpawnAgentModal.tsx +0 -221
- package/bizar-dash/src/web/views/Tasks.tsx +0 -789
- package/bizar-dash/src/web/views/Workspace.tsx +0 -294
- package/bizar-dash/src/web/views/glyphs/GlyphRenderer.tsx +0 -844
- package/bizar-dash/src/web/views/glyphs/components.tsx +0 -1098
- package/bizar-dash/src/web/views/memory/ConfigPanel.tsx +0 -426
- package/bizar-dash/src/web/views/memory/FromScreenshotPanel.tsx +0 -23
- package/bizar-dash/src/web/views/memory/GitSyncPanel.tsx +0 -220
- package/bizar-dash/src/web/views/memory/LightragPanel.tsx +0 -310
- package/bizar-dash/src/web/views/memory/MemoryGraphLegend.tsx +0 -29
- package/bizar-dash/src/web/views/memory/MemoryGraphPanel.tsx +0 -192
- package/bizar-dash/src/web/views/memory/MemoryGraphView.tsx +0 -336
- package/bizar-dash/src/web/views/memory/MemoryOverview.tsx +0 -367
- package/bizar-dash/src/web/views/memory/MemoryStatusCard.tsx +0 -160
- package/bizar-dash/src/web/views/memory/ObsidianPanel.tsx +0 -650
- package/bizar-dash/src/web/views/memory/SemanticSearchPanel.tsx +0 -197
- package/bizar-dash/src/web/views/memory/VaultFromClipboardPanel.tsx +0 -101
- package/bizar-dash/src/web/views/settings/ActivitySection.tsx +0 -205
- package/bizar-dash/src/web/views/settings/AgentSection.tsx +0 -305
- package/bizar-dash/src/web/views/settings/AuthSection.tsx +0 -159
- package/bizar-dash/src/web/views/settings/EnvVarsSection.tsx +0 -15
- package/bizar-dash/src/web/views/settings/GeneralSection.tsx +0 -128
- package/bizar-dash/src/web/views/settings/HeadroomSection.tsx +0 -39
- package/bizar-dash/src/web/views/settings/MemorySection.tsx +0 -154
- package/bizar-dash/src/web/views/settings/NetworkSection.tsx +0 -87
- package/bizar-dash/src/web/views/settings/NotificationsSection.tsx +0 -34
- package/bizar-dash/src/web/views/settings/SystemLlmSection.tsx +0 -81
- package/bizar-dash/src/web/views/settings/ThemeSection.tsx +0 -168
- package/bizar-dash/src/web/views/settings/UpdatesSection.tsx +0 -256
- package/bizar-dash/src/web/views/settings/WorkspacesSection.tsx +0 -189
|
@@ -1,706 +0,0 @@
|
|
|
1
|
-
// src/views/Mods.tsx — list, install, enable/disable mods + mod views.
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
Puzzle,
|
|
5
|
-
Plus,
|
|
6
|
-
Trash2,
|
|
7
|
-
Power,
|
|
8
|
-
RefreshCw,
|
|
9
|
-
Folder,
|
|
10
|
-
FileText,
|
|
11
|
-
FileCode,
|
|
12
|
-
User,
|
|
13
|
-
Terminal,
|
|
14
|
-
BookOpen,
|
|
15
|
-
X,
|
|
16
|
-
ExternalLink,
|
|
17
|
-
Globe,
|
|
18
|
-
LayoutTemplate,
|
|
19
|
-
Download,
|
|
20
|
-
ChevronDown,
|
|
21
|
-
ChevronRight,
|
|
22
|
-
ShieldCheck,
|
|
23
|
-
} from 'lucide-react';
|
|
24
|
-
import { Card, CardTitle, CardMeta } from '../components/Card';
|
|
25
|
-
import { Button } from '../components/Button';
|
|
26
|
-
import { EmptyState } from '../components/EmptyState';
|
|
27
|
-
import { Spinner } from '../components/Spinner';
|
|
28
|
-
import { useToast } from '../components/Toast';
|
|
29
|
-
import { useModal } from '../components/Modal';
|
|
30
|
-
import { api } from '../lib/api';
|
|
31
|
-
import { cn } from '../lib/utils';
|
|
32
|
-
import type { Mod, Settings, Snapshot } from '../lib/types';
|
|
33
|
-
|
|
34
|
-
type Props = {
|
|
35
|
-
snapshot: Snapshot;
|
|
36
|
-
settings: Settings;
|
|
37
|
-
activeTab: string;
|
|
38
|
-
setActiveTab: (id: string) => void;
|
|
39
|
-
refreshSnapshot: () => Promise<void>;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
type ModView = {
|
|
43
|
-
id: string;
|
|
44
|
-
modId: string;
|
|
45
|
-
kind: 'iframe' | 'tab';
|
|
46
|
-
label: string;
|
|
47
|
-
description?: string;
|
|
48
|
-
path?: string;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export function Mods({ snapshot, refreshSnapshot }: Props) {
|
|
52
|
-
const toast = useToast();
|
|
53
|
-
const modal = useModal();
|
|
54
|
-
// v3.3.0 — Always start by loading from the server, not just the
|
|
55
|
-
// snapshot. The snapshot can be stale if the user installed a mod
|
|
56
|
-
// from the CLI or added files directly to ~/.config/bizar/mods.
|
|
57
|
-
// We seed the initial state from the snapshot for instant paint
|
|
58
|
-
// but always re-fetch on mount and after every mutation.
|
|
59
|
-
const [mods, setMods] = useState<Mod[]>(Array.isArray(snapshot.mods) ? snapshot.mods : []);
|
|
60
|
-
const [loading, setLoading] = useState(true);
|
|
61
|
-
const [selected, setSelected] = useState<string | null>(null);
|
|
62
|
-
const [modViews, setModViews] = useState<ModView[]>([]);
|
|
63
|
-
const [iframeUrl, setIframeUrl] = useState<string | null>(null);
|
|
64
|
-
// v3.16.0 — Registry browser
|
|
65
|
-
const [registryOpen, setRegistryOpen] = useState(false);
|
|
66
|
-
const [registry, setRegistry] = useState<{
|
|
67
|
-
source: string;
|
|
68
|
-
version?: number;
|
|
69
|
-
updatedAt?: string;
|
|
70
|
-
mods: Array<{
|
|
71
|
-
id: string;
|
|
72
|
-
name: string;
|
|
73
|
-
latest?: string;
|
|
74
|
-
description?: string;
|
|
75
|
-
author?: string;
|
|
76
|
-
tags?: string[];
|
|
77
|
-
permissions?: string[];
|
|
78
|
-
homepage?: string;
|
|
79
|
-
installed?: boolean;
|
|
80
|
-
installedVersion?: string | null;
|
|
81
|
-
upgradeAvailable?: string | null;
|
|
82
|
-
}>;
|
|
83
|
-
error?: string;
|
|
84
|
-
} | null>(null);
|
|
85
|
-
const [registryLoading, setRegistryLoading] = useState(false);
|
|
86
|
-
const [installing, setInstalling] = useState<Record<string, boolean>>({});
|
|
87
|
-
|
|
88
|
-
const loadRegistry = async () => {
|
|
89
|
-
setRegistryLoading(true);
|
|
90
|
-
try {
|
|
91
|
-
const r = await api.get<{
|
|
92
|
-
registry?: { source?: string; version?: number; updatedAt?: string };
|
|
93
|
-
mods?: Array<{
|
|
94
|
-
id: string;
|
|
95
|
-
name: string;
|
|
96
|
-
latest?: string;
|
|
97
|
-
description?: string;
|
|
98
|
-
author?: string;
|
|
99
|
-
tags?: string[];
|
|
100
|
-
permissions?: string[];
|
|
101
|
-
homepage?: string;
|
|
102
|
-
installed?: boolean;
|
|
103
|
-
installedVersion?: string | null;
|
|
104
|
-
upgradeAvailable?: string | null;
|
|
105
|
-
}>;
|
|
106
|
-
}>('/mods/registry');
|
|
107
|
-
setRegistry({
|
|
108
|
-
source: r.registry?.source || '',
|
|
109
|
-
version: r.registry?.version,
|
|
110
|
-
updatedAt: r.registry?.updatedAt,
|
|
111
|
-
mods: r.mods || [],
|
|
112
|
-
});
|
|
113
|
-
} catch (err) {
|
|
114
|
-
setRegistry({ source: '', mods: [], error: (err as Error).message });
|
|
115
|
-
} finally {
|
|
116
|
-
setRegistryLoading(false);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const onInstallFromRegistry = async (id: string) => {
|
|
121
|
-
setInstalling((cur) => ({ ...cur, [id]: true }));
|
|
122
|
-
try {
|
|
123
|
-
const m = await api.post<Mod>('/mods', { id });
|
|
124
|
-
setMods((cur) => [...cur.filter((x) => x.id !== m.id), m]);
|
|
125
|
-
toast.success(`Mod "${m.id}" installed from registry.`);
|
|
126
|
-
await refreshSnapshot();
|
|
127
|
-
} catch (err) {
|
|
128
|
-
toast.error(`Install failed: ${(err as Error).message}`);
|
|
129
|
-
} finally {
|
|
130
|
-
setInstalling((cur) => ({ ...cur, [id]: false }));
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
// v3.20.5 — Upgrade handler. Calls the dedicated `/mods/:id/upgrade`
|
|
135
|
-
// endpoint (the install endpoint refuses if the mod is already on disk).
|
|
136
|
-
// Reports oldVersion → newVersion in the success toast.
|
|
137
|
-
const onUpgradeFromRegistry = async (id: string, backup = false) => {
|
|
138
|
-
setInstalling((cur) => ({ ...cur, [id]: true }));
|
|
139
|
-
try {
|
|
140
|
-
const r = await api.post<{
|
|
141
|
-
ok: boolean;
|
|
142
|
-
from: string;
|
|
143
|
-
to: string;
|
|
144
|
-
backupPath: string | null;
|
|
145
|
-
mod: Mod;
|
|
146
|
-
}>(`/mods/${encodeURIComponent(id)}/upgrade`, { backup });
|
|
147
|
-
setMods((cur) => [...cur.filter((x) => x.id !== r.mod.id), r.mod]);
|
|
148
|
-
const backupNote = r.backupPath ? ` (backup at ${r.backupPath})` : '';
|
|
149
|
-
toast.success(`Mod "${id}" upgraded v${r.from} → v${r.to}${backupNote}.`);
|
|
150
|
-
await refreshSnapshot();
|
|
151
|
-
} catch (err) {
|
|
152
|
-
toast.error(`Upgrade failed: ${(err as Error).message}`);
|
|
153
|
-
} finally {
|
|
154
|
-
setInstalling((cur) => ({ ...cur, [id]: false }));
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
const reload = async () => {
|
|
159
|
-
try {
|
|
160
|
-
// Always pull fresh from the server. snapshot is fine for
|
|
161
|
-
// optimistic initial render, but a fresh fetch makes the page
|
|
162
|
-
// behave correctly even if the snapshot was empty or stale.
|
|
163
|
-
const r = await api.get<{ mods: Mod[] }>('/mods');
|
|
164
|
-
setMods(r.mods || []);
|
|
165
|
-
try {
|
|
166
|
-
const v = await api.get<{ views: ModView[] }>('/mods/views');
|
|
167
|
-
setModViews(v.views || []);
|
|
168
|
-
} catch {
|
|
169
|
-
setModViews([]);
|
|
170
|
-
}
|
|
171
|
-
} catch (err) {
|
|
172
|
-
toast.error(`Mods load failed: ${(err as Error).message}`);
|
|
173
|
-
} finally {
|
|
174
|
-
// v3.3.0 — Always clear loading even on failure so the empty
|
|
175
|
-
// state can render. Without this, a network blip would leave
|
|
176
|
-
// the user staring at a spinner forever.
|
|
177
|
-
setLoading(false);
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
// Initial load — runs once on mount.
|
|
182
|
-
useEffect(() => {
|
|
183
|
-
reload();
|
|
184
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
185
|
-
}, []);
|
|
186
|
-
|
|
187
|
-
// Re-sync from snapshot when it changes (other tabs may have
|
|
188
|
-
// triggered a refreshSnapshot that updated the mod list).
|
|
189
|
-
useEffect(() => {
|
|
190
|
-
if (Array.isArray(snapshot.mods) && snapshot.mods !== mods) {
|
|
191
|
-
setMods(snapshot.mods);
|
|
192
|
-
}
|
|
193
|
-
// eslint-disable-next-line react-hooks-exhaustive-deps
|
|
194
|
-
}, [snapshot.mods]);
|
|
195
|
-
|
|
196
|
-
const onInstall = () => {
|
|
197
|
-
let pathEl: HTMLInputElement | null = null;
|
|
198
|
-
modal.open({
|
|
199
|
-
title: 'Install mod',
|
|
200
|
-
children: (
|
|
201
|
-
<div>
|
|
202
|
-
<p className="muted">
|
|
203
|
-
Provide the absolute path to a mod folder (one that contains
|
|
204
|
-
a <code>mod.json</code>). The folder will be copied to
|
|
205
|
-
{' '}<code>~/.config/bizar/mods/<id>/</code>.
|
|
206
|
-
</p>
|
|
207
|
-
<label className="field-label" htmlFor="install-mod-path">Path</label>
|
|
208
|
-
<input
|
|
209
|
-
id="install-mod-path"
|
|
210
|
-
ref={(el) => (pathEl = el)}
|
|
211
|
-
className="input"
|
|
212
|
-
type="text"
|
|
213
|
-
placeholder="/path/to/my-mod"
|
|
214
|
-
autoFocus
|
|
215
|
-
/>
|
|
216
|
-
</div>
|
|
217
|
-
),
|
|
218
|
-
footer: (
|
|
219
|
-
<div className="modal-footer-actions">
|
|
220
|
-
<Button variant="ghost" onClick={() => modal.close()}>Cancel</Button>
|
|
221
|
-
<Button
|
|
222
|
-
variant="primary"
|
|
223
|
-
onClick={async () => {
|
|
224
|
-
const path = (pathEl?.value || '').trim();
|
|
225
|
-
if (!path) {
|
|
226
|
-
toast.warning('Path is required.');
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
try {
|
|
230
|
-
const m = await api.post<Mod>('/mods', { path });
|
|
231
|
-
setMods((cur) => [...cur, m]);
|
|
232
|
-
toast.success(`Mod "${m.id}" installed.`);
|
|
233
|
-
modal.close();
|
|
234
|
-
await refreshSnapshot();
|
|
235
|
-
} catch (err) {
|
|
236
|
-
toast.error(`Install failed: ${(err as Error).message}`);
|
|
237
|
-
}
|
|
238
|
-
}}
|
|
239
|
-
>
|
|
240
|
-
Install
|
|
241
|
-
</Button>
|
|
242
|
-
</div>
|
|
243
|
-
),
|
|
244
|
-
});
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
const onUninstall = async (id: string) => {
|
|
248
|
-
if (!confirm(`Uninstall mod "${id}"? This removes the folder from ~/.config/bizar/mods/.`)) return;
|
|
249
|
-
try {
|
|
250
|
-
await api.del(`/mods/${encodeURIComponent(id)}`);
|
|
251
|
-
setMods((cur) => cur.filter((m) => m.id !== id));
|
|
252
|
-
if (selected === id) setSelected(null);
|
|
253
|
-
toast.success('Mod uninstalled.');
|
|
254
|
-
} catch (err) {
|
|
255
|
-
toast.error(`Uninstall failed: ${(err as Error).message}`);
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
const onToggleEnabled = async (mod: Mod) => {
|
|
260
|
-
try {
|
|
261
|
-
const next = await api.put<Mod>(`/mods/${encodeURIComponent(mod.id)}`, { enabled: !mod.enabled });
|
|
262
|
-
setMods((cur) => cur.map((m) => (m.id === mod.id ? next : m)));
|
|
263
|
-
toast.success(`Mod ${next.enabled ? 'enabled' : 'disabled'}.`);
|
|
264
|
-
} catch (err) {
|
|
265
|
-
toast.error(`Toggle failed: ${(err as Error).message}`);
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
const sel = mods.find((m) => m.id === selected) || null;
|
|
270
|
-
|
|
271
|
-
if (loading) {
|
|
272
|
-
return (
|
|
273
|
-
<div className="view-loading">
|
|
274
|
-
<Spinner size="lg" />
|
|
275
|
-
</div>
|
|
276
|
-
);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return (
|
|
280
|
-
<div className="view view-mods">
|
|
281
|
-
<header className="view-header">
|
|
282
|
-
<div className="view-header-text">
|
|
283
|
-
<h2 className="view-title">
|
|
284
|
-
<Puzzle size={18} /> Mods ({mods.length})
|
|
285
|
-
</h2>
|
|
286
|
-
<p className="view-subtitle">
|
|
287
|
-
Extensions installed in <code>~/.config/bizar/mods/</code>.
|
|
288
|
-
Mods can add agents, commands, routes, and views.
|
|
289
|
-
</p>
|
|
290
|
-
</div>
|
|
291
|
-
<div className="view-actions">
|
|
292
|
-
<Button variant="secondary" size="sm" onClick={reload}>
|
|
293
|
-
<RefreshCw size={14} /> Refresh
|
|
294
|
-
</Button>
|
|
295
|
-
<Button variant="primary" size="sm" onClick={onInstall}>
|
|
296
|
-
<Plus size={14} /> Install mod
|
|
297
|
-
</Button>
|
|
298
|
-
</div>
|
|
299
|
-
</header>
|
|
300
|
-
|
|
301
|
-
{mods.length === 0 ? (
|
|
302
|
-
<EmptyState
|
|
303
|
-
icon={<Puzzle size={32} />}
|
|
304
|
-
title="No mods installed"
|
|
305
|
-
message="Mods are folders with a mod.json. Install one to extend Bizar with custom agents, commands, and views."
|
|
306
|
-
/>
|
|
307
|
-
) : (
|
|
308
|
-
<div className="mods-layout">
|
|
309
|
-
<div className="mods-list">
|
|
310
|
-
{mods.map((m) => (
|
|
311
|
-
<div
|
|
312
|
-
key={m.id}
|
|
313
|
-
className={cn('mod-list-item', selected === m.id && 'mod-list-item-active')}
|
|
314
|
-
onClick={() => setSelected(m.id)}
|
|
315
|
-
>
|
|
316
|
-
<div className="mod-list-item-head">
|
|
317
|
-
<div>
|
|
318
|
-
<div className="mod-list-item-name">{m.name}</div>
|
|
319
|
-
<div className="mod-list-item-meta">v{m.version} · {m.type} · {m.author}</div>
|
|
320
|
-
</div>
|
|
321
|
-
<div className="mod-list-item-actions" onClick={(e) => e.stopPropagation()}>
|
|
322
|
-
<button
|
|
323
|
-
type="button"
|
|
324
|
-
className="icon-btn"
|
|
325
|
-
aria-label="Toggle enabled"
|
|
326
|
-
title={m.enabled ? 'Disable' : 'Enable'}
|
|
327
|
-
onClick={() => onToggleEnabled(m)}
|
|
328
|
-
>
|
|
329
|
-
<Power size={12} />
|
|
330
|
-
</button>
|
|
331
|
-
<button
|
|
332
|
-
type="button"
|
|
333
|
-
className="icon-btn icon-btn-danger"
|
|
334
|
-
aria-label="Uninstall"
|
|
335
|
-
title="Uninstall"
|
|
336
|
-
onClick={() => onUninstall(m.id)}
|
|
337
|
-
>
|
|
338
|
-
<Trash2 size={12} />
|
|
339
|
-
</button>
|
|
340
|
-
</div>
|
|
341
|
-
</div>
|
|
342
|
-
<div className="mod-list-item-desc ellipsis-2" title={m.description}>
|
|
343
|
-
{m.description}
|
|
344
|
-
</div>
|
|
345
|
-
<div className="mod-list-item-status">
|
|
346
|
-
<span className={`mod-mini-pill ${m.enabled ? 'mod-mini-pill-on' : 'mod-mini-pill-off'}`}>
|
|
347
|
-
{m.enabled ? 'enabled' : 'disabled'}
|
|
348
|
-
</span>
|
|
349
|
-
</div>
|
|
350
|
-
</div>
|
|
351
|
-
))}
|
|
352
|
-
</div>
|
|
353
|
-
{sel && <ModDetails mod={sel} />}
|
|
354
|
-
</div>
|
|
355
|
-
)}
|
|
356
|
-
|
|
357
|
-
{/* v3.16.0 — Registry browser */}
|
|
358
|
-
<Card className="mods-registry-card">
|
|
359
|
-
<button
|
|
360
|
-
type="button"
|
|
361
|
-
className="mods-registry-head"
|
|
362
|
-
aria-expanded={registryOpen}
|
|
363
|
-
aria-controls="mods-registry-body"
|
|
364
|
-
onClick={() => {
|
|
365
|
-
if (!registry && !registryLoading) loadRegistry();
|
|
366
|
-
setRegistryOpen((v) => !v);
|
|
367
|
-
}}
|
|
368
|
-
>
|
|
369
|
-
<Globe size={14} aria-hidden />
|
|
370
|
-
<span className="mods-registry-title">Mod registry</span>
|
|
371
|
-
<span className="muted" style={{ fontSize: 11 }}>
|
|
372
|
-
{registry?.mods ? `${registry.mods.length} available` : 'click to browse'}
|
|
373
|
-
</span>
|
|
374
|
-
<span className="mods-registry-spacer" />
|
|
375
|
-
{registryOpen ? <ChevronDown size={14} aria-hidden /> : <ChevronRight size={14} aria-hidden />}
|
|
376
|
-
</button>
|
|
377
|
-
{registryOpen && (
|
|
378
|
-
<div id="mods-registry-body" className="mods-registry-body">
|
|
379
|
-
{registryLoading ? (
|
|
380
|
-
<div className="muted" style={{ padding: 12, fontSize: 12 }}>Loading registry…</div>
|
|
381
|
-
) : registry?.error ? (
|
|
382
|
-
<div className="mods-registry-error">
|
|
383
|
-
<ShieldCheck size={12} /> Could not load registry: {registry.error}
|
|
384
|
-
</div>
|
|
385
|
-
) : !registry || registry.mods.length === 0 ? (
|
|
386
|
-
<div className="muted" style={{ padding: 12, fontSize: 12 }}>
|
|
387
|
-
No mods listed in the registry yet.
|
|
388
|
-
</div>
|
|
389
|
-
) : (
|
|
390
|
-
<>
|
|
391
|
-
{registry.source && (
|
|
392
|
-
<div className="muted" style={{ fontSize: 11, marginBottom: 8 }}>
|
|
393
|
-
Source: <code>{registry.source}</code>
|
|
394
|
-
</div>
|
|
395
|
-
)}
|
|
396
|
-
<div className="mods-registry-grid">
|
|
397
|
-
{registry.mods.map((rm) => {
|
|
398
|
-
const installed = mods.some((m) => m.id === rm.id);
|
|
399
|
-
const isInstalling = !!installing[rm.id];
|
|
400
|
-
return (
|
|
401
|
-
<div key={rm.id} className="mod-registry-card">
|
|
402
|
-
<div className="mod-registry-card-head">
|
|
403
|
-
<div className="mod-registry-card-name">{rm.name}</div>
|
|
404
|
-
{rm.latest && (
|
|
405
|
-
<span className={cn('mod-registry-version', rm.upgradeAvailable && 'mod-registry-version-upgrade')}>
|
|
406
|
-
v{rm.latest}{rm.upgradeAvailable ? ' ↑' : ''}
|
|
407
|
-
</span>
|
|
408
|
-
)}
|
|
409
|
-
</div>
|
|
410
|
-
{rm.description && (
|
|
411
|
-
<div className="mod-registry-card-desc">{rm.description}</div>
|
|
412
|
-
)}
|
|
413
|
-
<div className="mod-registry-card-meta">
|
|
414
|
-
{rm.author && <span className="muted">by {rm.author}</span>}
|
|
415
|
-
{rm.homepage && (
|
|
416
|
-
<a href={rm.homepage} target="_blank" rel="noopener noreferrer" className="mod-registry-link">
|
|
417
|
-
homepage
|
|
418
|
-
</a>
|
|
419
|
-
)}
|
|
420
|
-
</div>
|
|
421
|
-
{(rm.permissions || []).length > 0 && (
|
|
422
|
-
<div className="mod-registry-perms">
|
|
423
|
-
<ShieldCheck size={10} />
|
|
424
|
-
{(rm.permissions || []).slice(0, 4).map((p) => (
|
|
425
|
-
<span key={p} className="mod-registry-perm">{p}</span>
|
|
426
|
-
))}
|
|
427
|
-
{(rm.permissions || []).length > 4 && (
|
|
428
|
-
<span className="mod-registry-perm-more">+{rm.permissions!.length - 4}</span>
|
|
429
|
-
)}
|
|
430
|
-
</div>
|
|
431
|
-
)}
|
|
432
|
-
<div className="mod-registry-card-actions">
|
|
433
|
-
{!installed && (
|
|
434
|
-
<Button
|
|
435
|
-
variant="primary"
|
|
436
|
-
size="sm"
|
|
437
|
-
disabled={isInstalling}
|
|
438
|
-
onClick={() => onInstallFromRegistry(rm.id)}
|
|
439
|
-
title="Install from registry"
|
|
440
|
-
>
|
|
441
|
-
{isInstalling ? <Spinner size="sm" /> : (<><Download size={12} /> Install</>)}
|
|
442
|
-
</Button>
|
|
443
|
-
)}
|
|
444
|
-
{installed && rm.upgradeAvailable && (
|
|
445
|
-
<Button
|
|
446
|
-
variant="primary"
|
|
447
|
-
size="sm"
|
|
448
|
-
disabled={isInstalling}
|
|
449
|
-
onClick={() => onUpgradeFromRegistry(rm.id)}
|
|
450
|
-
title={`Upgrade from v${rm.installedVersion || '?'} to v${rm.upgradeAvailable}`}
|
|
451
|
-
>
|
|
452
|
-
{isInstalling ? <Spinner size="sm" /> : (<><Download size={12} /> Upgrade to v{rm.upgradeAvailable}</>)}
|
|
453
|
-
</Button>
|
|
454
|
-
)}
|
|
455
|
-
{installed && !rm.upgradeAvailable && (
|
|
456
|
-
<Button
|
|
457
|
-
variant="ghost"
|
|
458
|
-
size="sm"
|
|
459
|
-
disabled
|
|
460
|
-
title={`Installed v${rm.installedVersion || '?'}`}
|
|
461
|
-
>
|
|
462
|
-
Installed v{rm.installedVersion || '?'}
|
|
463
|
-
</Button>
|
|
464
|
-
)}
|
|
465
|
-
</div>
|
|
466
|
-
</div>
|
|
467
|
-
);
|
|
468
|
-
})}
|
|
469
|
-
</div>
|
|
470
|
-
</>
|
|
471
|
-
)}
|
|
472
|
-
</div>
|
|
473
|
-
)}
|
|
474
|
-
</Card>
|
|
475
|
-
|
|
476
|
-
{/* v3.20.3 — Mod views now appear in the sidebar nav as first-class
|
|
477
|
-
tabs (handled by App.tsx), so this section is a hint pointing
|
|
478
|
-
users to the sidebar. */}
|
|
479
|
-
{modViews.length > 0 && (
|
|
480
|
-
<Card className="mod-views-hint">
|
|
481
|
-
<CardTitle><Globe size={14} /> Mod views</CardTitle>
|
|
482
|
-
<CardMeta>
|
|
483
|
-
{modViews.length} mod-supplied view{modViews.length === 1 ? '' : 's'} are now available in the sidebar navigation.
|
|
484
|
-
Look for the <strong>Mods</strong> section at the bottom of the sidebar.
|
|
485
|
-
</CardMeta>
|
|
486
|
-
</Card>
|
|
487
|
-
)}
|
|
488
|
-
|
|
489
|
-
{/* Iframe panel for mod web views */}
|
|
490
|
-
{iframeUrl && (
|
|
491
|
-
<div className="mod-iframe-panel">
|
|
492
|
-
<div className="mod-iframe-header">
|
|
493
|
-
<span>Mod view — <a href={iframeUrl} target="_blank" rel="noreferrer">{iframeUrl}</a></span>
|
|
494
|
-
<button
|
|
495
|
-
type="button"
|
|
496
|
-
className="icon-btn"
|
|
497
|
-
aria-label="Close iframe"
|
|
498
|
-
onClick={() => setIframeUrl(null)}
|
|
499
|
-
>
|
|
500
|
-
<X size={14} />
|
|
501
|
-
</button>
|
|
502
|
-
</div>
|
|
503
|
-
<iframe
|
|
504
|
-
src={iframeUrl}
|
|
505
|
-
className="mod-iframe"
|
|
506
|
-
title="Mod view"
|
|
507
|
-
sandbox="allow-scripts allow-same-origin allow-forms allow-popups"
|
|
508
|
-
/>
|
|
509
|
-
</div>
|
|
510
|
-
)}
|
|
511
|
-
</div>
|
|
512
|
-
);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
function ModDetails({ mod }: { mod: Mod }) {
|
|
516
|
-
const toast = useToast();
|
|
517
|
-
const [instructions, setInstructions] = useState<{
|
|
518
|
-
modId: string;
|
|
519
|
-
modName: string;
|
|
520
|
-
total: number;
|
|
521
|
-
agents: Array<{ filename: string; path: string; fullPath: string; content: string | null }>;
|
|
522
|
-
commands: Array<{ filename: string; path: string; fullPath: string; content: string | null }>;
|
|
523
|
-
skills: Array<{ name: string; fullPath: string; content: string | null }>;
|
|
524
|
-
} | null>(null);
|
|
525
|
-
const [instructionsLoading, setInstructionsLoading] = useState(false);
|
|
526
|
-
const [instructionsOpen, setInstructionsOpen] = useState(false);
|
|
527
|
-
const [expandedFile, setExpandedFile] = useState<string | null>(null);
|
|
528
|
-
|
|
529
|
-
const loadInstructions = async () => {
|
|
530
|
-
setInstructionsLoading(true);
|
|
531
|
-
try {
|
|
532
|
-
const r = await api.get<typeof instructions>(`/mods/${mod.id}/instructions`);
|
|
533
|
-
setInstructions(r);
|
|
534
|
-
setInstructionsOpen(true);
|
|
535
|
-
} catch (err) {
|
|
536
|
-
toast.error(`Failed to load instructions: ${(err as Error).message}`);
|
|
537
|
-
} finally {
|
|
538
|
-
setInstructionsLoading(false);
|
|
539
|
-
}
|
|
540
|
-
};
|
|
541
|
-
|
|
542
|
-
const onReinstallInstructions = async () => {
|
|
543
|
-
try {
|
|
544
|
-
const r = await api.post<{ ok: boolean; counts: { agents: number; commands: number; skills: number; instructions: number } }>(
|
|
545
|
-
`/mods/${mod.id}/instructions/reinstall`,
|
|
546
|
-
{},
|
|
547
|
-
);
|
|
548
|
-
toast.success(`Reinstalled: ${r.counts.agents} agents, ${r.counts.commands} commands, ${r.counts.skills} skills, ${r.counts.instructions} instructions.`);
|
|
549
|
-
await loadInstructions();
|
|
550
|
-
} catch (err) {
|
|
551
|
-
toast.error(`Reinstall failed: ${(err as Error).message}`);
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
return (
|
|
556
|
-
<Card className="mod-details">
|
|
557
|
-
<CardTitle><FileText size={14} /> Mod details — {mod.name}</CardTitle>
|
|
558
|
-
<CardMeta>
|
|
559
|
-
<code>{mod.path}</code>
|
|
560
|
-
</CardMeta>
|
|
561
|
-
<dl className="env-table">
|
|
562
|
-
<dt>ID</dt>
|
|
563
|
-
<dd className="mono">{mod.id}</dd>
|
|
564
|
-
<dt>Version</dt>
|
|
565
|
-
<dd className="mono">{mod.version}</dd>
|
|
566
|
-
<dt>Type</dt>
|
|
567
|
-
<dd className="mono">{mod.type}</dd>
|
|
568
|
-
<dt>Author</dt>
|
|
569
|
-
<dd className="mono">{mod.author || '—'}</dd>
|
|
570
|
-
<dt>Bizar</dt>
|
|
571
|
-
<dd className="mono">{mod.bizar || '*'}</dd>
|
|
572
|
-
<dt>Enabled</dt>
|
|
573
|
-
<dd>{mod.enabled ? 'yes' : 'no'}</dd>
|
|
574
|
-
<dt>Permissions</dt>
|
|
575
|
-
<dd>
|
|
576
|
-
{(mod.permissions || []).map((p) => (
|
|
577
|
-
<span key={p} className="tag">{p}</span>
|
|
578
|
-
))}
|
|
579
|
-
{(mod.permissions || []).length === 0 && <span className="muted">(none)</span>}
|
|
580
|
-
</dd>
|
|
581
|
-
</dl>
|
|
582
|
-
<div className="mod-files">
|
|
583
|
-
<div className="muted">Files</div>
|
|
584
|
-
<ul>
|
|
585
|
-
{(mod.files || []).map((f) => (
|
|
586
|
-
<li key={f.path}>
|
|
587
|
-
<span className="mod-file-cat">{f.category}</span>
|
|
588
|
-
<span className="mono">{f.path}</span>
|
|
589
|
-
</li>
|
|
590
|
-
))}
|
|
591
|
-
</ul>
|
|
592
|
-
</div>
|
|
593
|
-
|
|
594
|
-
{/* v3.20 — Installed instructions (agents / commands / skills) */}
|
|
595
|
-
<div className="mod-instructions">
|
|
596
|
-
<button
|
|
597
|
-
type="button"
|
|
598
|
-
className="mod-instructions-head"
|
|
599
|
-
aria-expanded={instructionsOpen}
|
|
600
|
-
aria-controls={`mod-instructions-body-${mod.id}`}
|
|
601
|
-
onClick={() => {
|
|
602
|
-
if (!instructions && !instructionsLoading) loadInstructions();
|
|
603
|
-
setInstructionsOpen((v) => !v);
|
|
604
|
-
}}
|
|
605
|
-
>
|
|
606
|
-
<FileCode size={14} aria-hidden />
|
|
607
|
-
<span>Installed instructions</span>
|
|
608
|
-
<span className="muted" style={{ fontSize: 11 }}>
|
|
609
|
-
{instructions ? `${instructions.total} files` : 'click to view'}
|
|
610
|
-
</span>
|
|
611
|
-
<span className="mod-instructions-spacer" />
|
|
612
|
-
{instructionsOpen ? <ChevronDown size={14} aria-hidden /> : <ChevronRight size={14} aria-hidden />}
|
|
613
|
-
</button>
|
|
614
|
-
{instructionsOpen && instructions && (
|
|
615
|
-
<div id={`mod-instructions-body-${mod.id}`} className="mod-instructions-body">
|
|
616
|
-
{instructions.agents.length > 0 && (
|
|
617
|
-
<div className="mod-instructions-section">
|
|
618
|
-
<div className="mod-instructions-section-title">
|
|
619
|
-
<User size={11} /> Agents ({instructions.agents.length})
|
|
620
|
-
</div>
|
|
621
|
-
{instructions.agents.map((f) => (
|
|
622
|
-
<div key={f.filename} className="mod-instructions-file">
|
|
623
|
-
<div
|
|
624
|
-
className="mod-instructions-file-head"
|
|
625
|
-
onClick={() => setExpandedFile((cur) => cur === f.filename ? null : f.filename)}
|
|
626
|
-
>
|
|
627
|
-
<span className="mono">{f.filename}</span>
|
|
628
|
-
<span className="muted" style={{ fontSize: 10 }}>
|
|
629
|
-
installed at {f.fullPath}
|
|
630
|
-
</span>
|
|
631
|
-
</div>
|
|
632
|
-
{expandedFile === f.filename && (
|
|
633
|
-
<pre className="mod-instructions-content">
|
|
634
|
-
{f.content || <em className="muted">(file missing on disk)</em>}
|
|
635
|
-
</pre>
|
|
636
|
-
)}
|
|
637
|
-
</div>
|
|
638
|
-
))}
|
|
639
|
-
</div>
|
|
640
|
-
)}
|
|
641
|
-
{instructions.commands.length > 0 && (
|
|
642
|
-
<div className="mod-instructions-section">
|
|
643
|
-
<div className="mod-instructions-section-title">
|
|
644
|
-
<Terminal size={11} /> Commands ({instructions.commands.length})
|
|
645
|
-
</div>
|
|
646
|
-
{instructions.commands.map((f) => (
|
|
647
|
-
<div key={f.filename} className="mod-instructions-file">
|
|
648
|
-
<div
|
|
649
|
-
className="mod-instructions-file-head"
|
|
650
|
-
onClick={() => setExpandedFile((cur) => cur === f.filename ? null : f.filename)}
|
|
651
|
-
>
|
|
652
|
-
<span className="mono">{f.filename}</span>
|
|
653
|
-
<span className="muted" style={{ fontSize: 10 }}>
|
|
654
|
-
installed at {f.fullPath}
|
|
655
|
-
</span>
|
|
656
|
-
</div>
|
|
657
|
-
{expandedFile === f.filename && (
|
|
658
|
-
<pre className="mod-instructions-content">
|
|
659
|
-
{f.content || <em className="muted">(file missing on disk)</em>}
|
|
660
|
-
</pre>
|
|
661
|
-
)}
|
|
662
|
-
</div>
|
|
663
|
-
))}
|
|
664
|
-
</div>
|
|
665
|
-
)}
|
|
666
|
-
{instructions.skills.length > 0 && (
|
|
667
|
-
<div className="mod-instructions-section">
|
|
668
|
-
<div className="mod-instructions-section-title">
|
|
669
|
-
<BookOpen size={11} /> Skills ({instructions.skills.length})
|
|
670
|
-
</div>
|
|
671
|
-
{instructions.skills.map((s) => (
|
|
672
|
-
<div key={s.name} className="mod-instructions-file">
|
|
673
|
-
<div
|
|
674
|
-
className="mod-instructions-file-head"
|
|
675
|
-
onClick={() => setExpandedFile((cur) => cur === s.name ? null : s.name)}
|
|
676
|
-
>
|
|
677
|
-
<span className="mono">{s.name}</span>
|
|
678
|
-
<span className="muted" style={{ fontSize: 10 }}>
|
|
679
|
-
installed at {s.fullPath}
|
|
680
|
-
</span>
|
|
681
|
-
</div>
|
|
682
|
-
{expandedFile === s.name && (
|
|
683
|
-
<pre className="mod-instructions-content">
|
|
684
|
-
{s.content || <em className="muted">(file missing on disk)</em>}
|
|
685
|
-
</pre>
|
|
686
|
-
)}
|
|
687
|
-
</div>
|
|
688
|
-
))}
|
|
689
|
-
</div>
|
|
690
|
-
)}
|
|
691
|
-
{instructions.total === 0 && (
|
|
692
|
-
<div className="muted" style={{ padding: 8, fontSize: 12 }}>
|
|
693
|
-
This mod did not install any instruction files. Mods install instructions by shipping a top-level <code>INSTRUCTIONS.md</code>, an <code>agents/</code> directory, a <code>commands/</code> directory, or a <code>skills/</code> directory.
|
|
694
|
-
</div>
|
|
695
|
-
)}
|
|
696
|
-
<div className="mod-instructions-actions">
|
|
697
|
-
<Button variant="ghost" size="sm" onClick={onReinstallInstructions}>
|
|
698
|
-
<RefreshCw size={11} /> Reinstall from mod folder
|
|
699
|
-
</Button>
|
|
700
|
-
</div>
|
|
701
|
-
</div>
|
|
702
|
-
)}
|
|
703
|
-
</div>
|
|
704
|
-
</Card>
|
|
705
|
-
);
|
|
706
|
-
}
|