@kabmo-labs/kabmo 0.17.0 → 0.19.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/README.md +10 -7
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +523 -441
- package/dist/client/static/js/{index-rerjq5th.js → index-fcee4c13.js} +828 -818
- package/dist/client/static/js/index-sxdw908m.css +1 -0
- package/marketplace/plugins/command-runner/package.json +3 -2
- package/marketplace/plugins/git-forge/package.json +3 -2
- package/marketplace/plugins/session-info/package.json +3 -2
- package/marketplace/plugins/stats/package.json +3 -2
- package/package.json +3 -1
- package/src/client/components/auth/login-screen/index.tsx +2 -1
- package/src/client/components/common/ComposerPicker.tsx +1 -1
- package/src/client/components/common/FolderPicker.tsx +2 -2
- package/src/client/components/common/MarkdownRenderer.tsx +136 -89
- package/src/client/components/common/Modal.tsx +2 -2
- package/src/client/components/common/PWAInstallButton.tsx +2 -2
- package/src/client/components/common/ViewportSelector.tsx +1 -1
- package/src/client/components/common/anchored-menu/index.test.tsx +141 -0
- package/src/client/components/common/anchored-menu/index.tsx +147 -0
- package/src/client/components/common/batch-selection/SelectionCheckbox.tsx +2 -1
- package/src/client/components/common/brand-wordmark/index.test.tsx +13 -2
- package/src/client/components/common/brand-wordmark/index.tsx +13 -2
- package/src/client/components/common/checkbox/style.test.ts +139 -0
- package/src/client/components/common/checkbox/style.ts +51 -0
- package/src/client/components/common/context-usage-button/index.tsx +2 -2
- package/src/client/components/common/file-icon/index.tsx +23 -9
- package/src/client/components/common/header-controls/MoreMenu.tsx +1 -1
- package/src/client/components/common/markdown-review/ReviewPopover.tsx +144 -0
- package/src/client/components/common/markdown-review/ReviewSummary.tsx +108 -0
- package/src/client/components/common/markdown-review/index.tsx +129 -0
- package/src/client/components/common/panel-mark/index.tsx +97 -0
- package/src/client/components/common/provider-icon/glyphs.test.ts +1 -1
- package/src/client/components/common/provider-icon/index.test.ts +14 -0
- package/src/client/components/common/provider-icon/index.tsx +4 -0
- package/src/client/components/common/provider-icon/resolve.test.ts +8 -7
- package/src/client/components/common/provider-icon/resolve.ts +16 -3
- package/src/client/components/common/server-control/Panel.tsx +33 -23
- package/src/client/components/common/server-control/index.test.tsx +11 -5
- package/src/client/components/common/server-control/index.tsx +10 -8
- package/src/client/components/common/session-actions-menu/index.tsx +1 -1
- package/src/client/components/common/toolbar-row/index.tsx +1 -1
- package/src/client/components/layout/ActivityBar.tsx +22 -3
- package/src/client/components/layout/LeftDock.tsx +9 -2
- package/src/client/components/layout/PanelVisibilityMenu.tsx +1 -1
- package/src/client/components/layout/WindowAura.tsx +27 -0
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +1 -1
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +2 -2
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +11 -2
- package/src/client/components/layout/desktop-layout/index.tsx +3 -1
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +44 -23
- package/src/client/components/layout/session-sidebar/CategoryHeader.worktree.test.tsx +36 -17
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +8 -7
- package/src/client/components/layout/session-sidebar/Header.tsx +1 -1
- package/src/client/components/layout/session-sidebar/OverflowMenu.tsx +1 -1
- package/src/client/components/layout/session-sidebar/Toolbar.tsx +1 -1
- package/src/client/components/layout/session-sidebar/about-modal/NotesDialog.tsx +94 -0
- package/src/client/components/layout/session-sidebar/about-modal/VersionLine.test.tsx +68 -0
- package/src/client/components/layout/session-sidebar/about-modal/VersionLine.tsx +36 -0
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +57 -34
- package/src/client/components/layout/session-sidebar/modern/ActionRow.tsx +1 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +40 -14
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +7 -6
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +1 -1
- package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +2 -2
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +2 -1
- package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +2 -2
- package/src/client/components/layout/update-popup/ReleaseNotes.tsx +8 -3
- package/src/client/components/layout/update-popup/index.tsx +5 -1
- package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
- package/src/client/components/mobile/mobile-main-view/Header.tsx +2 -2
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +13 -15
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +23 -1
- package/src/client/components/mobile/mobile-right-sidebar/MissingFileBanner.tsx +30 -0
- package/src/client/components/mobile/mobile-right-sidebar/PreviewScroller.tsx +18 -2
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +22 -67
- package/src/client/components/mobile/mobile-session-sidebar/ItemMenu.tsx +110 -0
- package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +1 -1
- package/src/client/components/mobile/panel-chips.tsx +10 -2
- package/src/client/components/settings/Modal.tsx +4 -4
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +2 -2
- package/src/client/components/settings/SettingsSidebarList.tsx +20 -0
- package/src/client/components/settings/apply-side-effects.test.ts +30 -0
- package/src/client/components/settings/apply-side-effects.ts +14 -0
- package/src/client/components/settings/categories/AgentSettings.tsx +23 -50
- package/src/client/components/settings/categories/AppearanceSettings.tsx +6 -0
- package/src/client/components/settings/categories/CommandSettings.tsx +2 -2
- package/src/client/components/settings/categories/McpSettings.tsx +4 -21
- package/src/client/components/settings/categories/OmpSettings.tsx +147 -194
- package/src/client/components/settings/categories/SkillSettings.tsx +2 -2
- package/src/client/components/settings/categories/TokenUsageSettings.tsx +211 -229
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +229 -237
- package/src/client/components/settings/categories/agent-settings/ModelPicker.tsx +71 -0
- package/src/client/components/settings/categories/agent-settings/SidebarList.tsx +9 -2
- package/src/client/components/settings/categories/agent-settings/levels.ts +38 -0
- package/src/client/components/settings/categories/appearance-settings/EditorBlameSection.tsx +2 -1
- package/src/client/components/settings/categories/appearance-settings/EditorTypingSection.tsx +2 -1
- package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +144 -0
- package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.test.tsx +120 -0
- package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.tsx +180 -0
- package/src/client/components/settings/categories/behavior-settings/Editor.tsx +27 -7
- package/src/client/components/settings/categories/chat-settings/ToolRenderSection.tsx +23 -5
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +75 -33
- package/src/client/components/settings/categories/command-settings/SidebarList.tsx +7 -0
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +93 -77
- package/src/client/components/settings/categories/mcp-settings/EnvVarsSection.tsx +83 -0
- package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +28 -15
- package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +20 -0
- package/src/client/components/settings/categories/omp-settings/ConfigTabs.tsx +97 -36
- package/src/client/components/settings/categories/omp-settings/EngineHeader.tsx +151 -0
- package/src/client/components/settings/categories/omp-settings/ExtensionsPanel.tsx +68 -32
- package/src/client/components/settings/categories/omp-settings/OrderedChips.tsx +119 -0
- package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +14 -7
- package/src/client/components/settings/categories/omp-settings/RoleEditor.tsx +15 -6
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +165 -226
- package/src/client/components/settings/categories/omp-settings/types.ts +28 -0
- package/src/client/components/settings/categories/panel-plugins/AvailableList.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/BuiltinList.tsx +21 -3
- package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/PluginMark.test.ts +51 -2
- package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +43 -10
- package/src/client/components/settings/categories/plugin-settings/DetailPane.tsx +2 -1
- package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +2 -1
- package/src/client/components/settings/categories/project-settings/ModelDropdown.tsx +1 -1
- package/src/client/components/settings/categories/project-settings/WorktreeSettings.tsx +2 -1
- package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +3 -2
- package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +2 -2
- package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +3 -2
- package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +37 -8
- package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +34 -14
- package/src/client/components/settings/categories/skill-settings/SidebarList.tsx +21 -0
- package/src/client/components/settings/categories/skill-settings/pane.test.tsx +15 -6
- package/src/client/components/settings/categories/token-usage-settings/Breakdown.tsx +242 -102
- package/src/client/components/settings/categories/token-usage-settings/Chart.tsx +130 -56
- package/src/client/components/settings/categories/token-usage-settings/Controls.tsx +135 -0
- package/src/client/components/settings/categories/token-usage-settings/MetricsGrid.tsx +55 -33
- package/src/client/components/settings/categories/token-usage-settings/Provenance.tsx +59 -0
- package/src/client/components/settings/categories/token-usage-settings/panel.test.tsx +239 -0
- package/src/client/components/workspace/browser-panel/Screencast.test.ts +1 -0
- package/src/client/components/workspace/browser-panel/Screencast.tsx +17 -22
- package/src/client/components/workspace/browser-panel/TabStrip.test.tsx +158 -0
- package/src/client/components/workspace/browser-panel/TabStrip.tsx +90 -0
- package/src/client/components/workspace/browser-panel/index.tsx +50 -4
- package/src/client/components/workspace/browser-toolbar/index.tsx +41 -1
- package/src/client/components/workspace/btw-panel/TopicMenu.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +2 -0
- package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +13 -2
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +4 -3
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/index.tsx +2 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.test.ts +88 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +24 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.test.ts +34 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +5 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +7 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +237 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +191 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +1 -1
- package/src/client/components/workspace/context-panel/CostBreakdownPopover.tsx +1 -1
- package/src/client/components/workspace/diff-panel/MergeDiffView.tsx +21 -7
- package/src/client/components/workspace/diff-panel/changes.test.ts +51 -0
- package/src/client/components/workspace/diff-panel/changes.ts +28 -12
- package/src/client/components/workspace/diff-panel/index.tsx +2 -2
- package/src/client/components/workspace/diff-panel/merge.test.ts +28 -0
- package/src/client/components/workspace/diff-panel/merge.ts +21 -1
- package/src/client/components/workspace/editor/Body.tsx +7 -0
- package/src/client/components/workspace/editor/FileDocument.tsx +15 -21
- package/src/client/components/workspace/editor/FilePane.tsx +12 -0
- package/src/client/components/workspace/editor/PluginRail.tsx +1 -1
- package/src/client/components/workspace/editor/PreviewPane.tsx +70 -0
- package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +2 -2
- package/src/client/components/workspace/editor/TabContextMenu.tsx +1 -1
- package/src/client/components/workspace/editor/Tabs.tsx +1 -1
- package/src/client/components/workspace/editor/Toolbar.tsx +17 -1
- package/src/client/components/workspace/editor/index.tsx +25 -22
- package/src/client/components/workspace/editor/toolbar-clusters.test.ts +14 -0
- package/src/client/components/workspace/editor/toolbar-clusters.tsx +12 -86
- package/src/client/components/workspace/editor/toolbar-toggle.tsx +53 -0
- package/src/client/components/workspace/editor/toolbar-write-clusters.tsx +112 -0
- package/src/client/components/workspace/file-explorer/ContextMenu.tsx +1 -1
- package/src/client/components/workspace/file-explorer/Modals.tsx +10 -10
- package/src/client/components/workspace/file-explorer/RootMenu.tsx +1 -1
- package/src/client/components/workspace/git-panel/BranchToolbar.test.tsx +130 -0
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +21 -11
- package/src/client/components/workspace/git-panel/CommitBox.tsx +2 -1
- package/src/client/components/workspace/git-panel/Modals.tsx +2 -2
- package/src/client/components/workspace/git-panel/StashSection.tsx +2 -1
- package/src/client/components/workspace/git-panel/branch-modal/DeleteDialog.tsx +2 -1
- package/src/client/components/workspace/git-panel/branch-modal/RenameDialog.tsx +2 -1
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -2
- package/src/client/components/workspace/git-panel/commit-modal.test.ts +5 -3
- package/src/client/components/workspace/git-panel/index.tsx +7 -0
- package/src/client/components/workspace/model-dropdown/Panel.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
- package/src/client/components/workspace/plugin-panel/catalog.tsx +7 -0
- package/src/client/components/workspace/plugin-panel/resolve.tsx +4 -0
- package/src/client/components/workspace/search-panel/Body.tsx +1 -1
- package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +1 -1
- package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +5 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateBar.test.tsx +201 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateBar.tsx +112 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateLayer.test.tsx +225 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateLayer.tsx +217 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateTarget.tsx +99 -0
- package/src/client/components/workspace/user-browser-panel/Frame.tsx +30 -1
- package/src/client/components/workspace/user-browser-panel/index.tsx +81 -2
- package/src/client/data/agent-data/builtin.ts +0 -10
- package/src/client/data/agent-data/orchestrator.ts +0 -45
- package/src/client/data/agent-data/specialist.ts +0 -100
- package/src/client/data/mock/token-usage.ts +170 -120
- package/src/client/data/settings/omp-schema.json +33 -1
- package/src/client/glass.css +785 -0
- package/src/client/glass.test.ts +346 -0
- package/src/client/hooks/browser/use-annotate.test.ts +143 -0
- package/src/client/hooks/browser/use-annotate.ts +98 -0
- package/src/client/hooks/browser/use-close-tab.test.ts +148 -0
- package/src/client/hooks/browser/use-close-tab.ts +67 -0
- package/src/client/hooks/browser/use-screencast.ts +13 -1
- package/src/client/hooks/chat/composer/browser-context.test.ts +117 -0
- package/src/client/hooks/chat/composer/browser-context.ts +40 -16
- package/src/client/hooks/chat/composer/items.test.ts +1 -1
- package/src/client/hooks/chat/composer/review-context.ts +38 -0
- package/src/client/hooks/chat/composer/use-draft.test.ts +132 -0
- package/src/client/hooks/chat/composer/use-draft.ts +31 -2
- package/src/client/hooks/chat/timeline/row-window.test.ts +15 -2
- package/src/client/hooks/editor/use-document-annotations.ts +124 -0
- package/src/client/hooks/editor/use-editor-panel-ui.ts +52 -0
- package/src/client/hooks/editor/use-file-review-mode.ts +35 -0
- package/src/client/hooks/editor/use-preview-review.ts +148 -0
- package/src/client/hooks/settings/agents.ts +149 -0
- package/src/client/hooks/settings/crud-list.test.ts +28 -6
- package/src/client/hooks/settings/crud-list.ts +96 -57
- package/src/client/hooks/settings/omp-config.ts +164 -0
- package/src/client/hooks/settings/useTokenUsage.ts +125 -0
- package/src/client/hooks/settings/write-feedback.test.ts +104 -0
- package/src/client/hooks/settings/write-feedback.ts +63 -0
- package/src/client/hooks/ui/glass-support.ts +57 -0
- package/src/client/hooks/ui/icon-style.ts +59 -0
- package/src/client/hooks/ui/markdown-hydration.ts +125 -0
- package/src/client/hooks/ui/stuck-header.test.ts +188 -0
- package/src/client/hooks/ui/stuck-header.ts +91 -0
- package/src/client/hooks/ui/style-attributes.test.ts +120 -0
- package/src/client/hooks/ui/surface-style.ts +56 -0
- package/src/client/hooks/ui/updates/index.test.ts +100 -1
- package/src/client/hooks/ui/updates/index.ts +50 -0
- package/src/client/hooks/ui/updates/notes.test.ts +138 -0
- package/src/client/hooks/ui/updates/notes.ts +57 -0
- package/src/client/hooks/workspace/panel-hues.ts +23 -0
- package/src/client/lib/browser/element-at.test.ts +229 -0
- package/src/client/lib/browser/element-at.ts +139 -0
- package/src/client/lib/review/client.ts +73 -0
- package/src/client/lib/router/search-params.ts +42 -20
- package/src/client/main.tsx +10 -0
- package/src/client/tailwind.css +329 -11
- package/src/server/lib/assets/shell-attributes.server.ts +80 -0
- package/src/server/lib/assets/shell-attributes.test.ts +86 -0
- package/src/server/lib/btw/lifecycle.server.ts +2 -2
- package/src/server/lib/db/schema.ts +7 -0
- package/src/server/lib/db/seed-terminal.test.ts +4 -0
- package/src/server/lib/omp/config/agent-definitions.test.ts +273 -0
- package/src/server/lib/omp/config/agents.ts +231 -61
- package/src/server/lib/omp/config/definitions.test.ts +9 -105
- package/src/server/lib/omp/config/extensions.ts +16 -7
- package/src/server/lib/omp/config/omp-config-files.test.ts +27 -0
- package/src/server/lib/omp/rpc/constants.test.ts +11 -0
- package/src/server/lib/omp/rpc/constants.ts +15 -0
- package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +1 -0
- package/src/server/lib/omp/rpc/frame-fold-signals.test.ts +2 -30
- package/src/server/lib/omp/rpc/frame-fold.test.ts +55 -0
- package/src/server/lib/omp/rpc/frame-fold.ts +4 -0
- package/src/server/lib/omp/rpc/manager.ts +2 -2
- package/src/server/lib/omp/rpc/process-helpers.ts +11 -0
- package/src/server/lib/omp/rpc/process.test.ts +106 -0
- package/src/server/lib/omp/rpc/process.ts +39 -18
- package/src/server/lib/omp/rpc/run-settle.server.ts +12 -0
- package/src/server/lib/omp/rpc/run-settle.test.ts +22 -0
- package/src/server/lib/omp/rpc/session-command-guards.ts +5 -0
- package/src/server/lib/omp/rpc/session-commands.test.ts +9 -1
- package/src/server/lib/omp/rpc/session-commands.ts +17 -3
- package/src/server/lib/omp/rpc/terminal-settle.ts +29 -7
- package/src/server/lib/omp/rpc/utility-agent-dir.test.ts +134 -0
- package/src/server/lib/omp/rpc/utility-agent-dir.ts +138 -0
- package/src/server/lib/omp/rpc/utility.ts +12 -0
- package/src/server/lib/panels/bundled-catalog.server.ts +1 -0
- package/src/server/lib/panels/manifest.test.ts +20 -0
- package/src/server/lib/panels/manifest.ts +12 -0
- package/src/server/lib/panels/scan.server.ts +4 -0
- package/src/server/lib/queue/delivery-dispatch.server.test.ts +48 -0
- package/src/server/lib/queue/delivery-harness.ts +8 -4
- package/src/server/lib/queue/delivery.server.test.ts +29 -0
- package/src/server/lib/queue/delivery.server.ts +39 -0
- package/src/server/lib/queue/store.server.test.ts +22 -2
- package/src/server/lib/queue/store.server.ts +33 -11
- package/src/server/lib/review/schema.server.ts +45 -0
- package/src/server/lib/review/store.server.ts +138 -0
- package/src/server/lib/terminal/attach-replay.test.ts +132 -0
- package/src/server/lib/terminal/output.test.ts +166 -0
- package/src/server/lib/terminal/output.ts +104 -0
- package/src/server/lib/terminal/runtime.server.ts +5 -0
- package/src/server/lib/terminal/send-result.test.ts +33 -0
- package/src/server/lib/terminal/send-result.ts +32 -0
- package/src/server/lib/terminal/session.server.ts +45 -11
- package/src/server/lib/terminal/store-liveness.test.ts +4 -0
- package/src/server/lib/updates/active-notes.test.ts +149 -0
- package/src/server/lib/updates/active-notes.ts +75 -0
- package/src/server/lib/updates/changelog-file.ts +42 -11
- package/src/server/lib/updates/changelog.test.ts +15 -1
- package/src/server/lib/updates/omp.ts +42 -15
- package/src/server/lib/updates/release-url.ts +27 -1
- package/src/server/lib/usage/index-parse.test.ts +200 -0
- package/src/server/lib/usage/index-parse.ts +178 -0
- package/src/server/lib/usage/index-query.server.ts +248 -0
- package/src/server/lib/usage/index-scan.server.ts +343 -0
- package/src/server/lib/usage/index-schema.server.ts +82 -0
- package/src/server/lib/usage/index.test.ts +234 -0
- package/src/server/lib/usage/providers.server.ts +4 -53
- package/src/server/plugins/ssr.ts +22 -5
- package/src/server/routes/browser/index.ts +3 -0
- package/src/server/routes/browser/stream.ts +31 -2
- package/src/server/routes/browser/tabs.test.ts +94 -0
- package/src/server/routes/browser/tabs.ts +85 -0
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/review/bindings.ts +11 -0
- package/src/server/routes/review/index.ts +127 -0
- package/src/server/routes/review/routes.test.ts +191 -0
- package/src/server/routes/settings/agents.test.ts +180 -0
- package/src/server/routes/settings/agents.ts +95 -102
- package/src/server/routes/settings/mcp.test.ts +135 -0
- package/src/server/routes/settings/mcp.ts +14 -6
- package/src/server/routes/settings/settings-store-routes.test.ts +6 -113
- package/src/server/routes/telemetry/tokens.test.ts +145 -0
- package/src/server/routes/telemetry/tokens.ts +70 -149
- package/src/server/routes/terminal/ws.ts +6 -5
- package/src/server/routes/updates/index.ts +2 -0
- package/src/server/routes/updates/notes.ts +34 -0
- package/src/server/routes/updates/routes.test.ts +49 -0
- package/src/shared/lib/browser/annotate.test.ts +283 -0
- package/src/shared/lib/browser/annotate.ts +231 -0
- package/src/shared/lib/browser/browser-viewer.test.ts +26 -4
- package/src/shared/lib/browser/frame-gate.test.ts +91 -0
- package/src/shared/lib/browser/frame-gate.ts +69 -0
- package/src/shared/lib/browser/frame-params.test.ts +43 -0
- package/src/shared/lib/browser/frame-params.ts +60 -0
- package/src/shared/lib/browser/frame-pipeline.test.ts +132 -0
- package/src/shared/lib/browser/frame-pipeline.ts +80 -0
- package/src/shared/lib/browser/page-context.ts +60 -4
- package/src/shared/lib/browser/snapshot.test.ts +115 -0
- package/src/shared/lib/browser/snapshot.ts +112 -0
- package/src/shared/lib/browser/tab-close.test.ts +74 -0
- package/src/shared/lib/browser/tab-close.ts +77 -0
- package/src/shared/lib/browser/viewer.ts +45 -26
- package/src/shared/lib/chat/timeline/block-chrome.ts +19 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +17 -4
- package/src/shared/lib/chat/tool/artifact.ts +55 -20
- package/src/shared/lib/chat/tool/bash-facts.ts +96 -0
- package/src/shared/lib/chat/tool/minimized.test.ts +98 -0
- package/src/shared/lib/chat/tool/minimized.ts +64 -0
- package/src/shared/lib/chat/tool/summary.test.ts +28 -8
- package/src/shared/lib/chat/tool/summary.ts +3 -32
- package/src/shared/lib/icons/file-brand-color.ts +38 -0
- package/src/shared/lib/icons/icon-paint-css.test.ts +234 -0
- package/src/shared/lib/icons/icon-paint-css.ts +284 -0
- package/src/shared/lib/icons/icon-paint-panel.ts +100 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +230 -0
- package/src/shared/lib/icons/tint.test.ts +273 -0
- package/src/shared/lib/icons/tint.ts +219 -0
- package/src/shared/lib/markdown/blocks/anchor.ts +63 -0
- package/src/shared/lib/markdown/blocks/blocks.test.ts +141 -0
- package/src/shared/lib/markdown/blocks/renderer.ts +120 -0
- package/src/shared/lib/markdown/blocks/scan.ts +100 -0
- package/src/shared/lib/markdown/blocks/types.ts +62 -0
- package/src/shared/lib/markdown/marked.ts +58 -147
- package/src/shared/lib/markdown/math-extensions.ts +168 -0
- package/src/shared/lib/markdown/review/prompt.ts +77 -0
- package/src/shared/lib/markdown/review/reconcile.ts +55 -0
- package/src/shared/lib/markdown/review/review.test.ts +96 -0
- package/src/shared/lib/markdown/xml-sections.test.ts +140 -0
- package/src/shared/lib/markdown/xml-sections.ts +139 -0
- package/src/shared/lib/models/provider/brand-color.test.ts +116 -0
- package/src/shared/lib/models/provider/brand-color.ts +103 -0
- package/src/shared/lib/models/provider/label.ts +57 -0
- package/src/shared/lib/omp/config/agent-file.test.ts +54 -0
- package/src/shared/lib/omp/config/agent-file.ts +43 -0
- package/src/shared/lib/omp/config/row-value.test.ts +95 -0
- package/src/shared/lib/omp/config/row-value.ts +97 -0
- package/src/shared/lib/omp/config/schema.test.ts +31 -0
- package/src/shared/lib/omp/config/schema.ts +6 -0
- package/src/shared/lib/omp/rpc/frame.test.ts +113 -47
- package/src/shared/lib/omp/rpc/frame.ts +107 -43
- package/src/shared/lib/settings/defaults.ts +4 -0
- package/src/shared/lib/theme/catalog.test.ts +5 -4
- package/src/shared/lib/theme/catalog.ts +18 -3
- package/src/shared/lib/theme/glass-support.test.ts +38 -0
- package/src/shared/lib/theme/glass-support.ts +73 -0
- package/src/shared/lib/theme/icon-style.test.ts +74 -0
- package/src/shared/lib/theme/icon-style.ts +90 -0
- package/src/shared/lib/theme/legibility.ts +91 -0
- package/src/shared/lib/theme/palettes/dark-extended.ts +152 -0
- package/src/shared/lib/theme/palettes/light-extended.ts +157 -0
- package/src/shared/lib/theme/surface-style.test.ts +68 -0
- package/src/shared/lib/theme/surface-style.ts +91 -0
- package/src/shared/lib/theme/theme.test.ts +11 -7
- package/src/shared/lib/ui/menu-anchor.test.ts +69 -0
- package/src/shared/lib/ui/menu-anchor.ts +89 -0
- package/src/shared/lib/usage/breakdown.test.ts +197 -0
- package/src/shared/lib/usage/breakdown.ts +241 -0
- package/src/shared/lib/usage/range.test.ts +204 -0
- package/src/shared/lib/usage/range.ts +240 -0
- package/src/shared/lib/usage/view.test.ts +85 -0
- package/src/shared/lib/usage/view.ts +74 -0
- package/src/shared/lib/workspace/panel-hues.test.ts +68 -0
- package/src/shared/lib/workspace/panel-hues.ts +57 -0
- package/src/shared/types/browser.ts +78 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/panels-registry.ts +6 -0
- package/src/shared/types/panels.ts +14 -0
- package/src/shared/types/settings/agent.ts +28 -6
- package/src/shared/types/settings/state.ts +30 -3
- package/src/shared/types/settings/write.ts +6 -0
- package/src/shared/types/tokenUsage.ts +128 -21
- package/src/shared/types/updates.ts +20 -0
- package/src/test-support/fake-omp-frames.ts +163 -0
- package/dist/client/static/js/index-3ve31rzx.css +0 -1
- package/src/server/lib/omp/session/usage/aggregate-shaping.test.ts +0 -149
- package/src/server/lib/omp/session/usage/aggregate.test.ts +0 -243
- package/src/server/lib/omp/session/usage/aggregate.ts +0 -330
- package/src/server/lib/omp/session/usage/shaping.ts +0 -130
- /package/src/{client/components/common/file-icon/brand-paths.ts → shared/lib/icons/file-brand-paths.ts} +0 -0
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { useState } from 'preact/hooks';
|
|
1
2
|
import { createPortal } from 'preact/compat';
|
|
2
3
|
import { Heart, X } from 'lucide-preact';
|
|
3
4
|
import packageJson from '@/../package.json';
|
|
4
5
|
import type { UseUpdatesResult } from '@/client/hooks/ui/updates';
|
|
5
6
|
import { BrandWordmark } from '@/client/components/common/brand-wordmark';
|
|
7
|
+
import { NotesDialog } from '@/client/components/layout/session-sidebar/about-modal/NotesDialog';
|
|
6
8
|
import { SocialLinks } from '@/client/components/layout/session-sidebar/about-modal/SocialLinks';
|
|
7
9
|
import { UpdateSection } from '@/client/components/layout/session-sidebar/about-modal/UpdateSection';
|
|
10
|
+
import { VersionLine } from '@/client/components/layout/session-sidebar/about-modal/VersionLine';
|
|
8
11
|
import { useKabmoEvent } from '@/client/hooks/ui/window-event';
|
|
9
12
|
import { UPDATE_POPUP_OPEN_EVENT } from '@/shared/lib/updates/popup-state';
|
|
13
|
+
import type { UpdateTarget } from '@/shared/types/updates';
|
|
10
14
|
|
|
11
15
|
export interface AboutModalProps {
|
|
12
16
|
isOpen: boolean;
|
|
@@ -16,6 +20,10 @@ export interface AboutModalProps {
|
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
export function AboutModal({ isOpen, onClose, updates, onToast }: AboutModalProps) {
|
|
23
|
+
// Which product's "what am I running" notes are open. The dialog draws above
|
|
24
|
+
// this panel instead of replacing it, so closing it returns here.
|
|
25
|
+
const [notesTarget, setNotesTarget] = useState<UpdateTarget | null>(null);
|
|
26
|
+
|
|
19
27
|
// "What's new" opens the popup, which draws at a higher layer: leaving this
|
|
20
28
|
// dialog mounted would stack two modals over the same subject, and its
|
|
21
29
|
// backdrop would swallow the popup's clicks.
|
|
@@ -34,50 +42,65 @@ export function AboutModal({ isOpen, onClose, updates, onToast }: AboutModalProp
|
|
|
34
42
|
// handing its run over to this dialog: it opens over the chat, with the drawer
|
|
35
43
|
// closed, and was invisible.
|
|
36
44
|
return createPortal(
|
|
37
|
-
|
|
38
|
-
className="fixed inset-0 bg-ink/40 backdrop-blur-[2px] z-50 flex items-center justify-center p-4 animate-in fade-in duration-200"
|
|
39
|
-
onClick={onClose}
|
|
40
|
-
>
|
|
45
|
+
<>
|
|
41
46
|
<div
|
|
42
|
-
className="
|
|
43
|
-
onClick={
|
|
47
|
+
className="fixed inset-0 modal-scrim backdrop-blur-[2px] z-50 flex items-center justify-center p-4 animate-in fade-in duration-200"
|
|
48
|
+
onClick={onClose}
|
|
44
49
|
>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
onClick={
|
|
48
|
-
className="absolute top-4 right-4 text-ink/40 hover:text-ink transition-colors p-1 rounded-md"
|
|
49
|
-
aria-label="Close"
|
|
50
|
+
<div
|
|
51
|
+
className="glass-overlay relative bg-paper border border-ink/15 rounded-2xl shadow-2xl w-full max-w-[340px] p-6 text-center text-ink select-none"
|
|
52
|
+
onClick={(e) => e.stopPropagation()}
|
|
50
53
|
>
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
{/* Close Button */}
|
|
55
|
+
<button
|
|
56
|
+
onClick={onClose}
|
|
57
|
+
className="absolute top-4 right-4 text-ink/40 hover:text-ink transition-colors p-1 rounded-md"
|
|
58
|
+
aria-label="Close"
|
|
59
|
+
>
|
|
60
|
+
<X size={18} className="stroke-[2.5]" />
|
|
61
|
+
</button>
|
|
53
62
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
{/* Brand mark */}
|
|
64
|
+
<div className="flex justify-center pt-2 pb-1">
|
|
65
|
+
<img src="/icon.svg" alt="Kabmo" width={96} height={96} draggable={false} />
|
|
66
|
+
</div>
|
|
58
67
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
{/* Title */}
|
|
69
|
+
<h2 className="text-xl font-bold tracking-tight mt-3 flex items-center justify-center">
|
|
70
|
+
<BrandWordmark className="text-2xl" />
|
|
71
|
+
</h2>
|
|
63
72
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
|
|
73
|
+
{/* App & Agent Versions. Each line's circle-i opens the release notes
|
|
74
|
+
for the version that is RUNNING; the updates section below answers
|
|
75
|
+
the other question — what an update would install. */}
|
|
76
|
+
<div className="text-xs text-ink/60 space-y-1 mt-1.5 font-mono">
|
|
77
|
+
<VersionLine
|
|
78
|
+
label={`Kabmo v${packageJson.version}`}
|
|
79
|
+
notesLabel="What's new in Kabmo"
|
|
80
|
+
onNotes={() => setNotesTarget('kabmo')}
|
|
81
|
+
/>
|
|
82
|
+
<VersionLine
|
|
83
|
+
label={`Oh-My-Pi ${updates.info?.omp.current ?? '…'}`}
|
|
84
|
+
notesLabel="What's new in Oh-My-Pi"
|
|
85
|
+
onNotes={() => setNotesTarget('omp')}
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
69
88
|
|
|
70
|
-
|
|
89
|
+
<UpdateSection updates={updates} onToast={onToast} />
|
|
71
90
|
|
|
72
|
-
|
|
91
|
+
<SocialLinks />
|
|
73
92
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
93
|
+
{/* Footer */}
|
|
94
|
+
<p className="text-[11px] text-ink/50 font-normal mt-8 flex items-center justify-center gap-1.5">
|
|
95
|
+
<Heart size={12} className="fill-current text-error shrink-0" aria-hidden="true" />
|
|
96
|
+
Made with love for the community
|
|
97
|
+
</p>
|
|
98
|
+
</div>
|
|
79
99
|
</div>
|
|
80
|
-
|
|
100
|
+
{/* Sibling of the About backdrop, not a child: an event inside the portal
|
|
101
|
+
would otherwise bubble to that backdrop's `onClick` and close About. */}
|
|
102
|
+
{notesTarget && <NotesDialog target={notesTarget} onClose={() => setNotesTarget(null)} />}
|
|
103
|
+
</>,
|
|
81
104
|
document.body,
|
|
82
105
|
);
|
|
83
106
|
}
|
|
@@ -136,7 +136,7 @@ export function SidebarActionRow({
|
|
|
136
136
|
</button>
|
|
137
137
|
{optionsOpen && (
|
|
138
138
|
<div
|
|
139
|
-
className="absolute right-0 top-full z-50 mt-1 w-48 rounded-lg border border-ink/15 bg-paper py-1 shadow-lg"
|
|
139
|
+
className="glass-popover absolute right-0 top-full z-50 mt-1 w-48 rounded-lg border border-ink/15 bg-paper py-1 shadow-lg"
|
|
140
140
|
onMouseLeave={onCloseOptions}
|
|
141
141
|
>
|
|
142
142
|
<SortMenu variant="desktop" sortOption={sortOption} onSortChange={onSortChange} />
|
|
@@ -46,8 +46,12 @@
|
|
|
46
46
|
* behind it are canvas.
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
|
+
import { useRef, useState } from 'preact/hooks';
|
|
50
|
+
import { useStuckHeader } from '@/client/hooks/ui/stuck-header';
|
|
49
51
|
import type { ReactNode } from 'preact/compat';
|
|
50
52
|
import { ChevronDown, ChevronRight, MoreHorizontal, Pin, Plus } from 'lucide-preact';
|
|
53
|
+
import { AnchoredMenu } from '@/client/components/common/anchored-menu';
|
|
54
|
+
import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
|
|
51
55
|
import { SelectionCheckbox } from '@/client/components/common/batch-selection/SelectionCheckbox';
|
|
52
56
|
import type { CategoryHeaderCheckbox } from '@/client/components/layout/session-sidebar/CategoryHeader';
|
|
53
57
|
import { getProjectIcon } from '@/shared/lib/workspace/project-icon';
|
|
@@ -61,11 +65,12 @@ export interface WorkspaceHeaderProps {
|
|
|
61
65
|
sessionCount: number;
|
|
62
66
|
checkbox: CategoryHeaderCheckbox | null;
|
|
63
67
|
batchActive: boolean;
|
|
64
|
-
menuRef: { current: HTMLDivElement | null };
|
|
65
68
|
showMenu: boolean;
|
|
66
69
|
onToggleMenu: () => void;
|
|
70
|
+
/** The `⋯` menu, dismissed by its own backdrop, Escape, or this call. */
|
|
71
|
+
onCloseMenu: () => void;
|
|
67
72
|
onNewSession: () => void;
|
|
68
|
-
/** The menu body, drawn in
|
|
73
|
+
/** The menu body, drawn in a portalled panel while open. */
|
|
69
74
|
menu?: ReactNode;
|
|
70
75
|
/** Taller row and larger tap targets for the phone drawer. */
|
|
71
76
|
touch?: boolean;
|
|
@@ -78,20 +83,32 @@ export function WorkspaceHeader({
|
|
|
78
83
|
sessionCount,
|
|
79
84
|
checkbox,
|
|
80
85
|
batchActive,
|
|
81
|
-
menuRef,
|
|
82
86
|
showMenu,
|
|
83
87
|
onToggleMenu,
|
|
88
|
+
onCloseMenu,
|
|
84
89
|
onNewSession,
|
|
85
90
|
menu,
|
|
86
91
|
touch = false,
|
|
87
92
|
}: WorkspaceHeaderProps) {
|
|
88
93
|
const ProjectIcon = getProjectIcon(folder.icon);
|
|
89
94
|
const accent = folder.accentColor || undefined;
|
|
95
|
+
const triggerRef = useRef<HTMLButtonElement>(null);
|
|
96
|
+
// Captured when the menu OPENS, not while it is open: the list scrolls under
|
|
97
|
+
// it, so a rectangle read on every render would drag the panel along with the
|
|
98
|
+
// rows instead of leaving it where the click put it.
|
|
99
|
+
const [anchor, setAnchor] = useState<AnchorRect | null>(null);
|
|
100
|
+
// A surface only while PINNED: at rest the header is the first line of the
|
|
101
|
+
// list and any fill is a band across a uniform sidebar. Once rows slide under
|
|
102
|
+
// it, it needs a field of its own — that is the state `data-stuck` marks.
|
|
103
|
+
const headerRef = useRef<HTMLDivElement>(null);
|
|
104
|
+
const stuck = useStuckHeader(headerRef);
|
|
90
105
|
|
|
91
106
|
return (
|
|
92
107
|
<div
|
|
108
|
+
ref={headerRef}
|
|
109
|
+
data-stuck={stuck ? '' : undefined}
|
|
93
110
|
className={`group/ws sticky top-0 z-10 -mx-1 flex items-center gap-1 rounded-md px-1 text-xs font-semibold text-ink ${
|
|
94
|
-
touch ? 'h-8 bg-canvas' : 'h-[26px] bg-paper'
|
|
111
|
+
touch ? 'h-8 bg-canvas glass-sticky' : 'h-[26px] bg-paper glass-sticky'
|
|
95
112
|
}`}
|
|
96
113
|
>
|
|
97
114
|
<button
|
|
@@ -119,12 +136,12 @@ export function WorkspaceHeader({
|
|
|
119
136
|
referrerPolicy="no-referrer"
|
|
120
137
|
/>
|
|
121
138
|
) : (
|
|
122
|
-
<ProjectIcon size={15} className="text-ink/70" style={{
|
|
139
|
+
<ProjectIcon size={15} className="project-accent-mark text-ink/70" style={accent ? { '--project-accent': accent } : undefined} />
|
|
123
140
|
)}
|
|
124
141
|
</span>
|
|
125
142
|
)}
|
|
126
143
|
|
|
127
|
-
<span className="truncate text-[13px] font-semibold tracking-tight">{folder.name}</span>
|
|
144
|
+
<span className="glass-sticky-label truncate text-[13px] font-semibold tracking-tight">{folder.name}</span>
|
|
128
145
|
{folder.isPinned && <Pin size={10} className="shrink-0 text-ink/45" />}
|
|
129
146
|
|
|
130
147
|
{/* The accent as a dot: the icon column keeps the chevron's slot, so the
|
|
@@ -133,7 +150,7 @@ export function WorkspaceHeader({
|
|
|
133
150
|
<span aria-hidden="true" className="h-1.5 w-1.5 shrink-0 rounded-full" style={{ backgroundColor: accent }} />
|
|
134
151
|
)}
|
|
135
152
|
|
|
136
|
-
<span className="shrink-0 font-mono text-[10px] font-normal tabular-nums text-ink/35">{sessionCount}</span>
|
|
153
|
+
<span className="glass-sticky-label shrink-0 font-mono text-[10px] font-normal tabular-nums text-ink/35">{sessionCount}</span>
|
|
137
154
|
|
|
138
155
|
<span className="ml-auto shrink-0 text-ink/40">
|
|
139
156
|
{isOpen ? <ChevronDown size={touch ? 14 : 12} /> : <ChevronRight size={touch ? 14 : 12} />}
|
|
@@ -161,8 +178,9 @@ export function WorkspaceHeader({
|
|
|
161
178
|
<Plus size={touch ? 15 : 12} />
|
|
162
179
|
</button>
|
|
163
180
|
|
|
164
|
-
<div className="relative flex items-center"
|
|
181
|
+
<div className="relative flex items-center">
|
|
165
182
|
<button
|
|
183
|
+
ref={triggerRef}
|
|
166
184
|
type="button"
|
|
167
185
|
title={`Options for ${folder.name}`}
|
|
168
186
|
aria-label={`Options for ${folder.name}`}
|
|
@@ -170,6 +188,7 @@ export function WorkspaceHeader({
|
|
|
170
188
|
aria-expanded={showMenu}
|
|
171
189
|
onClick={(event) => {
|
|
172
190
|
event.stopPropagation();
|
|
191
|
+
if (triggerRef.current) setAnchor(anchorRectOf(triggerRef.current));
|
|
173
192
|
onToggleMenu();
|
|
174
193
|
}}
|
|
175
194
|
className={`flex items-center justify-center rounded text-ink/40 transition-colors cursor-pointer hover:bg-ink/10 hover:text-ink ${
|
|
@@ -179,12 +198,19 @@ export function WorkspaceHeader({
|
|
|
179
198
|
<MoreHorizontal size={touch ? 15 : 12} />
|
|
180
199
|
</button>
|
|
181
200
|
{/* The menu body is the caller's: it owns the state the menu acts
|
|
182
|
-
on (pin, delete confirmation, the worktree dialog).
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
201
|
+
on (pin, delete confirmation, the worktree dialog). The PANEL is
|
|
202
|
+
this file's, portalled and measured, because the header is a
|
|
203
|
+
`sticky z-10` stacking context — a `z-50` child of it still
|
|
204
|
+
painted under the NEXT workspace's sticky header. */}
|
|
205
|
+
<AnchoredMenu
|
|
206
|
+
anchor={showMenu && menu ? anchor : null}
|
|
207
|
+
align="end"
|
|
208
|
+
ariaLabel={`Options for ${folder.name}`}
|
|
209
|
+
className="glass-popover w-44 rounded-md border border-ink/15 bg-paper py-1 text-xs shadow-lg"
|
|
210
|
+
onClose={onCloseMenu}
|
|
211
|
+
>
|
|
212
|
+
{menu}
|
|
213
|
+
</AnchoredMenu>
|
|
188
214
|
</div>
|
|
189
215
|
</div>
|
|
190
216
|
)}
|
|
@@ -24,11 +24,10 @@
|
|
|
24
24
|
* is not silently hidden.
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
import { useEffect,
|
|
27
|
+
import { useEffect, useState } from 'preact/hooks';
|
|
28
28
|
import { ChevronDown, ChevronUp } from 'lucide-preact';
|
|
29
29
|
import { useSearchParams } from '@/client/lib/router/search-params';
|
|
30
30
|
import { useFetcher } from '@/client/lib/router/fetcher';
|
|
31
|
-
import { useOnClickOutside } from '@/client/hooks/ui/on-click-outside';
|
|
32
31
|
import { useShowMore } from '@/client/hooks/ui/show-more';
|
|
33
32
|
import { useWorkspaceFolderActions } from '@/client/hooks/workspace/workspace-folder-actions';
|
|
34
33
|
import { useSessionDelete } from '@/client/hooks/workspace/session-delete';
|
|
@@ -87,7 +86,6 @@ export function WorkspaceSection({
|
|
|
87
86
|
const urlSubagentId = searchParams.get('subagent');
|
|
88
87
|
const urlSessionId = searchParams.get('sessionId');
|
|
89
88
|
const { expandedSessionIds, toggleSession } = useExpandedSessions();
|
|
90
|
-
const menuRef = useRef<HTMLDivElement>(null);
|
|
91
89
|
const { refresh } = useSidebarData();
|
|
92
90
|
const toggleFetcher = useFetcher<{ success?: boolean }>();
|
|
93
91
|
const {
|
|
@@ -110,10 +108,13 @@ export function WorkspaceSection({
|
|
|
110
108
|
if (typeof folder.isExpanded === 'boolean') setIsOpen(folder.isExpanded);
|
|
111
109
|
}, [folder.isExpanded]);
|
|
112
110
|
|
|
113
|
-
|
|
111
|
+
// ONE dismissal path for the `⋯` menu: its own backdrop (in the header's
|
|
112
|
+
// portalled panel) is the click that closes it, so the sidebar no longer
|
|
113
|
+
// listens for outside clicks that the portal would read as "outside" anyway.
|
|
114
|
+
const closeMenu = () => {
|
|
114
115
|
setShowMenu(false);
|
|
115
116
|
cancelDelete();
|
|
116
|
-
}
|
|
117
|
+
};
|
|
117
118
|
|
|
118
119
|
const toggleFolder = () => {
|
|
119
120
|
const next = !isOpen;
|
|
@@ -169,9 +170,9 @@ export function WorkspaceSection({
|
|
|
169
170
|
: null
|
|
170
171
|
}
|
|
171
172
|
batchActive={Boolean(batch)}
|
|
172
|
-
menuRef={menuRef}
|
|
173
173
|
showMenu={showMenu}
|
|
174
174
|
onToggleMenu={() => setShowMenu((open) => !open)}
|
|
175
|
+
onCloseMenu={closeMenu}
|
|
175
176
|
onNewSession={() => onNewSessionForFolder(folder.id)}
|
|
176
177
|
touch={density === 'touch'}
|
|
177
178
|
menu={
|
|
@@ -75,9 +75,9 @@ function mount(overrides: Partial<WorkspaceHeaderProps> = {}) {
|
|
|
75
75
|
sessionCount: 0,
|
|
76
76
|
checkbox: null,
|
|
77
77
|
batchActive: false,
|
|
78
|
-
menuRef: { current: null },
|
|
79
78
|
showMenu: false,
|
|
80
79
|
onToggleMenu: () => {},
|
|
80
|
+
onCloseMenu: () => {},
|
|
81
81
|
onNewSession: () => {},
|
|
82
82
|
...overrides,
|
|
83
83
|
}),
|
|
@@ -136,8 +136,8 @@ function NewWorkspaceForm({
|
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
return (
|
|
139
|
-
<div className="fixed inset-0
|
|
140
|
-
<div className="bg-paper border border-ink/10 rounded-lg shadow-xl w-[30rem] max-w-full max-h-full overflow-y-auto flex flex-col">
|
|
139
|
+
<div className="fixed inset-0 modal-scrim z-50 flex items-center justify-center p-4">
|
|
140
|
+
<div className="glass-overlay bg-paper border border-ink/10 rounded-lg shadow-xl w-[30rem] max-w-full max-h-full overflow-y-auto flex flex-col">
|
|
141
141
|
<div className="flex justify-between items-center px-4 pt-4 pb-2 border-b border-ink/10">
|
|
142
142
|
<h3 className="font-semibold text-sm">New Workspace</h3>
|
|
143
143
|
<button
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* refuses.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
|
|
16
17
|
import { useEffect, useState } from 'preact/hooks';
|
|
17
18
|
import { Loader2 } from 'lucide-preact';
|
|
18
19
|
import { validateSchedule } from '@/shared/lib/schedule/parse';
|
|
@@ -185,7 +186,7 @@ export function TaskForm({
|
|
|
185
186
|
checked={useActiveSession}
|
|
186
187
|
disabled={!activeSessionId}
|
|
187
188
|
onChange={(e) => setUseActiveSession(e.currentTarget.checked)}
|
|
188
|
-
className=
|
|
189
|
+
className={`${CHECKBOX_CLASS} accent-ink`}
|
|
189
190
|
/>
|
|
190
191
|
<span>Resume the open session each run</span>
|
|
191
192
|
</label>
|
|
@@ -127,14 +127,14 @@ export function SchedulerModal({
|
|
|
127
127
|
|
|
128
128
|
return (
|
|
129
129
|
<div
|
|
130
|
-
className="fixed inset-0
|
|
130
|
+
className="fixed inset-0 modal-scrim backdrop-blur-[2px] z-50 flex items-center justify-center p-4"
|
|
131
131
|
onClick={busy ? undefined : onClose}
|
|
132
132
|
role="dialog"
|
|
133
133
|
aria-modal="true"
|
|
134
134
|
aria-label="Scheduled tasks"
|
|
135
135
|
>
|
|
136
136
|
<div
|
|
137
|
-
className="bg-paper border border-ink/15 rounded-xl shadow-2xl w-[min(94vw,640px)] max-h-[88vh] flex flex-col overflow-hidden text-ink"
|
|
137
|
+
className="glass-overlay bg-paper border border-ink/15 rounded-xl shadow-2xl w-[min(94vw,640px)] max-h-[88vh] flex flex-col overflow-hidden text-ink"
|
|
138
138
|
onClick={(e) => e.stopPropagation()}
|
|
139
139
|
>
|
|
140
140
|
<div className="flex items-center justify-between px-4 py-3 border-b border-ink/10">
|
|
@@ -20,8 +20,11 @@ const LINK_CLASS = 'inline-flex items-center gap-1 text-[10px] font-medium text-
|
|
|
20
20
|
* A changelog body is full of links — commits, compare ranges, pull requests.
|
|
21
21
|
* Without this, one click navigates the console away from the user's session;
|
|
22
22
|
* a release note is a reference, so every link leaves in a new tab.
|
|
23
|
+
*
|
|
24
|
+
* Exported because the About modal's per-target dialog renders a single section
|
|
25
|
+
* through the same handler; a second copy would let one path navigate in place.
|
|
23
26
|
*/
|
|
24
|
-
function openLinksExternally(event: TargetedMouseEvent<HTMLDivElement>) {
|
|
27
|
+
export function openLinksExternally(event: TargetedMouseEvent<HTMLDivElement>) {
|
|
25
28
|
const link = (event.target as HTMLElement).closest<HTMLAnchorElement>('a[href]');
|
|
26
29
|
if (!link) return;
|
|
27
30
|
event.preventDefault();
|
|
@@ -29,7 +32,7 @@ function openLinksExternally(event: TargetedMouseEvent<HTMLDivElement>) {
|
|
|
29
32
|
window.open(link.href, '_blank', 'noopener,noreferrer');
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
function ReleaseSection({ note }: { note: ReleaseNote }) {
|
|
35
|
+
export function ReleaseSection({ note }: { note: ReleaseNote }) {
|
|
33
36
|
return (
|
|
34
37
|
<article className="border-t border-ink/10 pt-4 first:border-t-0 first:pt-0">
|
|
35
38
|
<header className="flex items-baseline justify-between gap-3">
|
|
@@ -44,8 +47,10 @@ function ReleaseSection({ note }: { note: ReleaseNote }) {
|
|
|
44
47
|
</a>
|
|
45
48
|
)}
|
|
46
49
|
</header>
|
|
50
|
+
{/* `text-[13px]`, not the 12px a narrow column needed: at this width the
|
|
51
|
+
smaller size left lines too short to read as prose. */}
|
|
47
52
|
{note.body ? (
|
|
48
|
-
<MarkdownRenderer content={note.body} className="mt-2 text-[
|
|
53
|
+
<MarkdownRenderer content={note.body} className="mt-2 text-[13px]" />
|
|
49
54
|
) : (
|
|
50
55
|
<p className="mt-2 text-[11px] text-ink/40">This release was published without notes.</p>
|
|
51
56
|
)}
|
|
@@ -94,7 +94,11 @@ export function UpdatePopup({ updates }: UpdatePopupProps) {
|
|
|
94
94
|
<Modal
|
|
95
95
|
onClose={close}
|
|
96
96
|
zClass="z-[65]"
|
|
97
|
-
|
|
97
|
+
// Same width as the About modal's per-version notes: both render release
|
|
98
|
+
// prose through `ReleaseNotes`, and a panel that fits a commit subject
|
|
99
|
+
// once at 768px takes three lines for it at 560px. This dialog is the one
|
|
100
|
+
// with the MOST of that prose — up to 20 releases in one scroll.
|
|
101
|
+
maxWidthClass="max-w-3xl"
|
|
98
102
|
header={
|
|
99
103
|
<div className="flex items-center gap-3 min-w-0">
|
|
100
104
|
<Sparkles size={16} className="shrink-0 text-ink/70" />
|
|
@@ -4,6 +4,7 @@ import { useKabmoEvent } from '@/client/hooks/ui/window-event';
|
|
|
4
4
|
import { registerBackHandler } from '@/client/lib/native/back';
|
|
5
5
|
import type { SettingsCategoryId } from '@/shared/types';
|
|
6
6
|
import { MobileMainView } from '@/client/components/mobile/MainView';
|
|
7
|
+
import { WindowAura } from '@/client/components/layout/WindowAura';
|
|
7
8
|
import { MobileSessionSidebar } from '@/client/components/mobile/SessionSidebar';
|
|
8
9
|
import { MobileRightSidebar } from '@/client/components/mobile/RightSidebar';
|
|
9
10
|
import { MobileFullEditor } from '@/client/components/mobile/mobile-right-sidebar/FullEditor';
|
|
@@ -242,8 +243,9 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
242
243
|
return (
|
|
243
244
|
<div
|
|
244
245
|
data-testid="app-root"
|
|
245
|
-
className="flex flex-col h-dvh w-screen overflow-hidden bg-canvas text-ink font-sans selection:bg-ink selection:text-canvas relative"
|
|
246
|
+
className="app-window flex flex-col h-dvh w-screen overflow-hidden bg-canvas text-ink font-sans selection:bg-ink selection:text-canvas relative"
|
|
246
247
|
>
|
|
248
|
+
<WindowAura />
|
|
247
249
|
{/* The plugin system's boot, on the PHONE too. It is mounted at the top of
|
|
248
250
|
the workspace on the desktop (`desktop-layout/index.tsx`), and without
|
|
249
251
|
it here a phone had no plugin CONTEXT (so `usePanelInfo()` answered
|
|
@@ -138,7 +138,7 @@ export function MobileHeader({
|
|
|
138
138
|
into the `⋯` menu (`HeaderControls`), which is what pays for the
|
|
139
139
|
wordmark plus the slash beside it. */}
|
|
140
140
|
<span className="relative font-bold text-sm tracking-tight flex items-center flex-shrink-0">
|
|
141
|
-
<BrandWordmark />
|
|
141
|
+
<BrandWordmark glow />
|
|
142
142
|
<span className="absolute -top-0.5 -right-1.5 flex">
|
|
143
143
|
<StreamStatusDot status={streamStatus} />
|
|
144
144
|
</span>
|
|
@@ -181,7 +181,7 @@ export function MobileHeader({
|
|
|
181
181
|
to state them separately and drifted. */}
|
|
182
182
|
{showSessionPicker && (
|
|
183
183
|
<div
|
|
184
|
-
className="fixed z-50 bg-paper border border-ink/15 rounded-xl shadow-lg p-2 text-xs"
|
|
184
|
+
className="glass-popover fixed z-50 bg-paper border border-ink/15 rounded-xl shadow-lg p-2 text-xs"
|
|
185
185
|
style={mobileOverlayStyle()}
|
|
186
186
|
>
|
|
187
187
|
<button
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useCallback, useRef, useState } from 'preact/hooks';
|
|
2
|
-
import { AlertTriangle } from 'lucide-preact';
|
|
3
2
|
import { CodeSurface, type CodeSurfaceHandle } from '@/client/components/common/code-surface';
|
|
4
3
|
import { countConflicts } from '@/client/components/common/code-surface/conflict-markers';
|
|
5
4
|
import { ImageViewer } from '@/client/components/common/image-viewer';
|
|
6
5
|
import { EditorHeader } from '@/client/components/mobile/mobile-right-sidebar/Header';
|
|
7
6
|
import { PreviewScroller } from '@/client/components/mobile/mobile-right-sidebar/PreviewScroller';
|
|
8
7
|
import { SaveDeletedFileModal } from '@/client/components/workspace/editor/SaveDeletedFileModal';
|
|
8
|
+
import { MissingFileBanner } from '@/client/components/mobile/mobile-right-sidebar/MissingFileBanner';
|
|
9
9
|
import { EditorStatusBar } from '@/client/components/mobile/mobile-right-sidebar/StatusBar';
|
|
10
10
|
import { EditorDropOverlay } from '@/client/components/workspace/editor/EditorDropOverlay';
|
|
11
11
|
import { useEditorDrop } from '@/client/hooks/editor/use-editor-drop';
|
|
@@ -28,6 +28,7 @@ import { useEditorFontStack } from '@/client/hooks/editor/font';
|
|
|
28
28
|
import { useEditorTheme } from '@/client/hooks/editor/theme';
|
|
29
29
|
import { indentUnitFor, useEditorIndent } from '@/client/hooks/editor/indent-settings';
|
|
30
30
|
import { useEditorTyping } from '@/client/hooks/editor/typing-settings';
|
|
31
|
+
import { useFileReviewMode } from '@/client/hooks/editor/use-file-review-mode';
|
|
31
32
|
import { MOBILE_SCROLL_POSITIONS_KEY } from '@/shared/lib/workspace/scroll-positions';
|
|
32
33
|
import { ViewerSurface, hasViewerSurface } from '@/client/components/workspace/editor/viewers/dispatch';
|
|
33
34
|
import { BINARY_VIEWERS, RENDERED_VIEWERS, VIEWER_LABELS, viewerKindFor } from '@/shared/lib/fs/document-kind';
|
|
@@ -60,6 +61,11 @@ export function MobileFullEditor({ file, missing = false, onClose, onFileSaved,
|
|
|
60
61
|
// The picture/grid/prose is what the file was opened to read, so a rendered
|
|
61
62
|
// kind defaults to its preview and only a user's own toggle moves it.
|
|
62
63
|
const isPreview = previewOverrides[fileKey] ?? hasPreview;
|
|
64
|
+
// Review mode is the same per-tab toggle the desktop pane uses (one key, one
|
|
65
|
+
// rule), and it exists only where a rendered markdown document is on screen —
|
|
66
|
+
// a CSV grid and an SVG picture have no markdown blocks to judge.
|
|
67
|
+
const review = useFileReviewMode(String(fileKey));
|
|
68
|
+
const hasReview = isMd && isPreview;
|
|
63
69
|
const togglePreview = () => setPreviewOverrides((prev) => ({ ...prev, [fileKey]: !isPreview }));
|
|
64
70
|
|
|
65
71
|
// The full-screen editor is the phone's editor panel, so it is a drop target
|
|
@@ -191,6 +197,9 @@ export function MobileFullEditor({ file, missing = false, onClose, onFileSaved,
|
|
|
191
197
|
onSave={editor.saveNow}
|
|
192
198
|
onClose={onClose}
|
|
193
199
|
onTogglePreview={togglePreview}
|
|
200
|
+
hasReview={hasReview}
|
|
201
|
+
isReviewing={hasReview && review.active}
|
|
202
|
+
onToggleReview={review.toggle}
|
|
194
203
|
onToggleFind={() => (find.open ? find.close() : find.openFind())}
|
|
195
204
|
findOpen={find.open}
|
|
196
205
|
onToggleWrap={() => setWordWrap(!wordWrap)}
|
|
@@ -200,20 +209,7 @@ export function MobileFullEditor({ file, missing = false, onClose, onFileSaved,
|
|
|
200
209
|
onDownload={editor.download}
|
|
201
210
|
/>
|
|
202
211
|
|
|
203
|
-
|
|
204
|
-
the state has to be stated where the user is looking, and the Save
|
|
205
|
-
that recreates it has to be confirmed. Same rule as the desktop pane. */}
|
|
206
|
-
{missing && (
|
|
207
|
-
<div className="flex items-start gap-2 px-3 py-2 border-b border-error/30 bg-error/10 text-error shrink-0">
|
|
208
|
-
<AlertTriangle size={14} className="shrink-0 mt-0.5" />
|
|
209
|
-
<div className="min-w-0">
|
|
210
|
-
<div className="text-[11.5px] font-sans">This file was deleted from disk.</div>
|
|
211
|
-
<div className="text-[11px] font-sans text-error/80">
|
|
212
|
-
The buffer is still here. Saving recreates the file — autosave is off until then.
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
216
|
-
)}
|
|
212
|
+
{missing && <MissingFileBanner />}
|
|
217
213
|
|
|
218
214
|
{/* Find/replace, as a ROW under the header rather than a floating card: the
|
|
219
215
|
desktop bar is 330px wide, and on a 390px screen a floating card would cover
|
|
@@ -266,6 +262,8 @@ export function MobileFullEditor({ file, missing = false, onClose, onFileSaved,
|
|
|
266
262
|
isLoading={editor.isLoading}
|
|
267
263
|
unsupported={editor.unsupported}
|
|
268
264
|
loadError={editor.loadError}
|
|
265
|
+
reviewActive={hasReview && review.active}
|
|
266
|
+
onExitReview={review.toggle}
|
|
269
267
|
/>
|
|
270
268
|
) : (
|
|
271
269
|
/* The code surface owns its own scroller (CodeMirror's), so it is NOT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArrowLeft, Check, Copy, Download, Eye, EyeOff, Save, Search, WrapText, ZoomIn, ZoomOut } from 'lucide-preact';
|
|
1
|
+
import { ArrowLeft, Check, Copy, Download, Eye, EyeOff, MessageSquare, Save, Search, WrapText, ZoomIn, ZoomOut } from 'lucide-preact';
|
|
2
2
|
import { FileIcon } from '@/client/components/common/file-icon';
|
|
3
3
|
import { titlebarPaddingLeft, titlebarPaddingRight } from '@/shared/lib/ui/titlebar';
|
|
4
4
|
|
|
@@ -7,6 +7,10 @@ interface EditorHeaderProps {
|
|
|
7
7
|
/** The file has a rendered form (markdown prose, CSV grid, SVG), so the eye toggles. */
|
|
8
8
|
hasPreview: boolean;
|
|
9
9
|
isPreview: boolean;
|
|
10
|
+
/** A rendered markdown document is on screen, so its blocks can be judged. */
|
|
11
|
+
hasReview: boolean;
|
|
12
|
+
isReviewing: boolean;
|
|
13
|
+
onToggleReview: () => void;
|
|
10
14
|
wordWrap: boolean;
|
|
11
15
|
copied: boolean;
|
|
12
16
|
/** A byte-drawing viewer (image, PDF, DOCX, workbook): wrap and zoom are text-only, so both are hidden. */
|
|
@@ -33,6 +37,9 @@ export function EditorHeader({
|
|
|
33
37
|
fileName,
|
|
34
38
|
hasPreview,
|
|
35
39
|
isPreview,
|
|
40
|
+
hasReview,
|
|
41
|
+
isReviewing,
|
|
42
|
+
onToggleReview,
|
|
36
43
|
wordWrap,
|
|
37
44
|
copied,
|
|
38
45
|
byteViewer = false,
|
|
@@ -106,6 +113,21 @@ export function EditorHeader({
|
|
|
106
113
|
</button>
|
|
107
114
|
)}
|
|
108
115
|
|
|
116
|
+
{/* Beside the eye, and only while the RENDERED document is on screen:
|
|
117
|
+
reviewing the source has no blocks to judge. */}
|
|
118
|
+
{hasReview && (
|
|
119
|
+
<button
|
|
120
|
+
type="button"
|
|
121
|
+
onClick={onToggleReview}
|
|
122
|
+
className={`p-1.5 rounded hover:bg-ink/10 transition-colors cursor-pointer ${isReviewing ? 'bg-ink text-canvas' : ''}`}
|
|
123
|
+
title={isReviewing ? 'Exit review mode' : 'Review this document'}
|
|
124
|
+
aria-label={isReviewing ? 'Exit review mode' : 'Review this document'}
|
|
125
|
+
aria-pressed={isReviewing}
|
|
126
|
+
>
|
|
127
|
+
<MessageSquare size={15} />
|
|
128
|
+
</button>
|
|
129
|
+
)}
|
|
130
|
+
|
|
109
131
|
{hasPreview && (
|
|
110
132
|
<button
|
|
111
133
|
type="button"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The phone editor's "this file was deleted from disk" strip.
|
|
8
|
+
*
|
|
9
|
+
* Extracted from `FullEditor` for the per-file ceiling. It is a banner rather
|
|
10
|
+
* than a dialog because the buffer is still on screen and still editable: the
|
|
11
|
+
* user has to be able to see, and act on, the file they are editing while the
|
|
12
|
+
* fact sits above it. The desktop pane says the same thing in the same words —
|
|
13
|
+
* the two layouts are one product.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { AlertTriangle } from 'lucide-preact';
|
|
17
|
+
|
|
18
|
+
export function MissingFileBanner() {
|
|
19
|
+
return (
|
|
20
|
+
<div className="flex items-start gap-2 px-3 py-2 border-b border-error/30 bg-error/10 text-error shrink-0">
|
|
21
|
+
<AlertTriangle size={14} className="shrink-0 mt-0.5" />
|
|
22
|
+
<div className="min-w-0">
|
|
23
|
+
<div className="text-[11.5px] font-sans">This file was deleted from disk.</div>
|
|
24
|
+
<div className="text-[11px] font-sans text-error/80">
|
|
25
|
+
The buffer is still here. Saving recreates the file — autosave is off until then.
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
}
|