@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
package/src/client/tailwind.css
CHANGED
|
@@ -92,6 +92,209 @@
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
/* The veil behind a dialog.
|
|
96
|
+
*
|
|
97
|
+
* It must DARKEN the app in both variants, and `bg-ink/40` cannot: `ink` is the
|
|
98
|
+
* foreground, so it is dark on a light theme and LIGHT on a dark one — measured
|
|
99
|
+
* on `one-dark-pro-soft`, every dialog sat in a `rgb(127,136,149)` field, i.e.
|
|
100
|
+
* lit from behind, and a dialog then read as a dark hole. One class, one fact:
|
|
101
|
+
* the ink on light, black on dark. */
|
|
102
|
+
.modal-scrim {
|
|
103
|
+
background-color: color-mix(in srgb, var(--theme-ink) 40%, transparent);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-theme-variant='dark'] .modal-scrim {
|
|
107
|
+
/* 58% black put the dialog at 1.01:1 against its own scrim — measured, the
|
|
108
|
+
* panel disappeared into the veil. The veil's job is to recede, not to match:
|
|
109
|
+
* 42% leaves the paper visibly above it while still dimming the app. */
|
|
110
|
+
background-color: color-mix(in srgb, #000 42%, transparent);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Under the glass surface the veil is FROSTED, not just dimmed.
|
|
114
|
+
*
|
|
115
|
+
* A dialog's own 96% tint contributes almost nothing of what is behind it, so
|
|
116
|
+
* the material has to be legible in the margin AROUND the panel — and there a
|
|
117
|
+
* flat wash reads as "the app is off", not as glass. Blurring the veil is what
|
|
118
|
+
* turns that margin into a pane: the app stays in place, its detail goes soft,
|
|
119
|
+
* and the panel's edge sits on a field that is visibly blurred rather than
|
|
120
|
+
* merely dark. The tint is NOT touched, so the panel's own luminance and every
|
|
121
|
+
* text contrast on it are exactly what they were measured at.
|
|
122
|
+
*
|
|
123
|
+
* One blur pass, only while a modal is open — a modal is exclusive, so this
|
|
124
|
+
* never stacks with a streaming transcript. */
|
|
125
|
+
[data-surface='glass'] .modal-scrim {
|
|
126
|
+
backdrop-filter: blur(20px) saturate(120%);
|
|
127
|
+
-webkit-backdrop-filter: blur(20px) saturate(120%);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* The checkbox, drawn here rather than by the engine.
|
|
131
|
+
*
|
|
132
|
+
* A native `<input type="checkbox">` is the right CONTROL and the wrong
|
|
133
|
+
* RENDERING. The engine paints an unchecked box that is barely there and a
|
|
134
|
+
* checked one in its own accent; measured in the session sidebar, the unchecked
|
|
135
|
+
* box composited to `(236,238,235)` on a `(250,248,242)` row — **1.10:1** —
|
|
136
|
+
* against 10.84:1 for the checked one, which is "checkbox gk kelihatan on off
|
|
137
|
+
* nya". The input stays (semantics, keyboard, `indeterminate`); its box is
|
|
138
|
+
* replaced.
|
|
139
|
+
*
|
|
140
|
+
* Three numbers here, each a budget:
|
|
141
|
+
*
|
|
142
|
+
* - **The ring is `ink 75%`.** WCAG's non-text floor is 3:1, and across all 43
|
|
143
|
+
* palettes `ink 75%` is the first alpha whose worst case clears it (3.02:1 on
|
|
144
|
+
* `solarized-light`). 60% is 2.34:1; the `border-ink/30` these shipped with is
|
|
145
|
+
* 1.71:1 — the bug.
|
|
146
|
+
* - **The checked fill is the full ink**, so the tick is `paper` and the pair is
|
|
147
|
+
* the palette's own ink/paper contrast: 17.5:1 on `paper`, 4.85:1 worst case.
|
|
148
|
+
* - **The dash uses the same ink**, because indeterminate is a THIRD state and
|
|
149
|
+
* has to read as "on, partly" rather than as "off with a line in it".
|
|
150
|
+
*
|
|
151
|
+
* `accent-color` stays set at the call sites: an engine that cannot draw the
|
|
152
|
+
* pseudo-element falls back to the platform control instead of a blank square.
|
|
153
|
+
*
|
|
154
|
+
* The pseudo-elements only carry `content`, so the shared `box-sizing` and the
|
|
155
|
+
* palette tokens do the rest; `:disabled` dims instead of changing colour, so a
|
|
156
|
+
* disabled checked box still reads as checked.
|
|
157
|
+
*/
|
|
158
|
+
@layer components {
|
|
159
|
+
.kabmo-checkbox {
|
|
160
|
+
appearance: none;
|
|
161
|
+
-webkit-appearance: none;
|
|
162
|
+
position: relative;
|
|
163
|
+
display: inline-block;
|
|
164
|
+
flex-shrink: 0;
|
|
165
|
+
/* A DEFAULT size, because `appearance: none` removes the intrinsic one: a
|
|
166
|
+
* call site that never passed `w-3.5` (the settings rows relied on the
|
|
167
|
+
* engine's 13px box) measured **4x4px** — the border box with nothing
|
|
168
|
+
* inside. This sits in `@layer components`, so a call site's `w-4`/`size-3.5`
|
|
169
|
+
* utility still wins. */
|
|
170
|
+
width: 0.875rem;
|
|
171
|
+
height: 0.875rem;
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
/* 2px, not 1.5px: at a device pixel ratio of 1 a 1.5px border lands on a
|
|
174
|
+
* half pixel and antialiases into a ~50% blend, so the intended
|
|
175
|
+
* `ink 75%` ring rendered as `(166,169,166)` on a `(223,229,220)` row — 1.85:1,
|
|
176
|
+
* below the floor the alpha was chosen for. 2px gives two full device pixels
|
|
177
|
+
* with no partial coverage in the middle. */
|
|
178
|
+
border: 2px solid color-mix(in srgb, var(--theme-ink) 75%, transparent);
|
|
179
|
+
border-radius: 3px;
|
|
180
|
+
background-color: transparent;
|
|
181
|
+
transition: background-color 120ms ease, border-color 120ms ease;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.kabmo-checkbox:hover:not(:disabled) {
|
|
185
|
+
border-color: var(--theme-ink);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.kabmo-checkbox::after {
|
|
189
|
+
content: '';
|
|
190
|
+
position: absolute;
|
|
191
|
+
/* 1px, not 3px: `inset` is measured from the PADDING box, so on a 14px
|
|
192
|
+
* control with a 2px ring the interior is 10px — a 3px inset left a 4px
|
|
193
|
+
* mark, which renders as a blob rather than a tick. 1px leaves 8px, the
|
|
194
|
+
* size a checkmark needs at this scale. */
|
|
195
|
+
inset: 1px;
|
|
196
|
+
transform: scale(0);
|
|
197
|
+
transition: transform 100ms ease;
|
|
198
|
+
/* The tick is a mask, not a glyph: an SVG path in `currentColor` would inherit
|
|
199
|
+
* whatever the caller's text colour is, and these controls sit in rows that
|
|
200
|
+
* set `text-ink/NN` for their own reasons. A masked box paints `paper`, which
|
|
201
|
+
* is the pair the fill guarantees. */
|
|
202
|
+
background-color: var(--theme-paper);
|
|
203
|
+
mask: center / contain no-repeat
|
|
204
|
+
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E");
|
|
205
|
+
-webkit-mask: center / contain no-repeat
|
|
206
|
+
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E");
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.kabmo-checkbox:checked,
|
|
210
|
+
.kabmo-checkbox:indeterminate {
|
|
211
|
+
background-color: var(--theme-ink);
|
|
212
|
+
border-color: var(--theme-ink);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.kabmo-checkbox:checked::after {
|
|
216
|
+
transform: scale(1);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Indeterminate is a DASH: the tick is replaced, not overlaid, so the two states
|
|
220
|
+
* cannot be confused at 14px. */
|
|
221
|
+
.kabmo-checkbox:indeterminate::after {
|
|
222
|
+
inset: auto 2px;
|
|
223
|
+
top: calc(50% - 1px);
|
|
224
|
+
height: 2px;
|
|
225
|
+
border-radius: 1px;
|
|
226
|
+
transform: scale(1);
|
|
227
|
+
mask: none;
|
|
228
|
+
-webkit-mask: none;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* No `opacity` here: the call sites already say `disabled:opacity-60` /
|
|
232
|
+
* `disabled:opacity-50`, and an unlayered declaration would beat every one of
|
|
233
|
+
* them — a control that dims to 0.45 no matter what its owner asked for. */
|
|
234
|
+
.kabmo-checkbox:disabled {
|
|
235
|
+
cursor: not-allowed;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* FULL COLOUR MODE: on is GREEN, off is RED.
|
|
240
|
+
*
|
|
241
|
+
* The colour mode is the one place a user asks for chroma, so the checkbox
|
|
242
|
+
* answers it: a checked box fills with the palette's success colour and an
|
|
243
|
+
* unchecked one shows the error colour in its ring. Monochrome — the absence of
|
|
244
|
+
* the attribute — keeps the ink-based pair, because that mode has no colour to
|
|
245
|
+
* state a state with.
|
|
246
|
+
*
|
|
247
|
+
* Both are MIXED TOWARD THE INK, and that is a contrast budget, not taste. At
|
|
248
|
+
* full strength the ring measures 2.73:1 worst case (`mono-light`) and the fill
|
|
249
|
+
* 1.75:1 (`nord-light`) against the surface they sit on — both below the 3:1
|
|
250
|
+
* non-text floor. Mixing toward the ink moves them along the one axis the
|
|
251
|
+
* palette already guarantees: `error 75%` clears 3.56:1 and `success 55%`
|
|
252
|
+
* 3.63:1 across all 63 palettes, measured on the REAL chrome composite (paper
|
|
253
|
+
* over plane over canvas), not on bare paper.
|
|
254
|
+
*
|
|
255
|
+
* The tick stays `--theme-paper`: on the green fill that is the palette's own
|
|
256
|
+
* paper/ink relationship read backwards, 3.60:1 worst case.
|
|
257
|
+
*/
|
|
258
|
+
[data-icon-style="color"] .kabmo-checkbox {
|
|
259
|
+
border-color: color-mix(in srgb, var(--theme-error) 75%, var(--theme-ink));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* Hover deepens toward the error colour, but stops at 85%: at full strength the
|
|
263
|
+
* ring measures 2.77:1 on `mono-light` — under the floor the resting state was
|
|
264
|
+
* chosen to clear — so the hover would be LESS legible than the idle box it is
|
|
265
|
+
* trying to highlight. 85% reads 3.47:1 and is still visibly warmer. */
|
|
266
|
+
[data-icon-style="color"] .kabmo-checkbox:hover:not(:disabled) {
|
|
267
|
+
border-color: color-mix(in srgb, var(--theme-error) 85%, var(--theme-ink));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
[data-icon-style="color"] .kabmo-checkbox:checked,
|
|
271
|
+
[data-icon-style="color"] .kabmo-checkbox:indeterminate {
|
|
272
|
+
background-color: color-mix(in srgb, var(--theme-success) 55%, var(--theme-ink));
|
|
273
|
+
border-color: color-mix(in srgb, var(--theme-success) 55%, var(--theme-ink));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* A SWITCH states the same two facts as a checkbox, so it states them in the same
|
|
277
|
+
* two colours — keyed on the ROLE and `aria-checked`, not on a class, because
|
|
278
|
+
* six call sites paint their track with five different utilities (`bg-ink`,
|
|
279
|
+
* `bg-ink/70`, `bg-ink/20`, `bg-ink/15`) and none of them is the thing that
|
|
280
|
+
* means "on".
|
|
281
|
+
*
|
|
282
|
+
* The alphas are the checkbox's, and for the same reason: measured over all 43
|
|
283
|
+
* palettes, `success 55%` clears 3.60:1 and `error 75%` 3.46:1 against the panel
|
|
284
|
+
* a switch sits on, while the canvas knob clears 3.72:1 / 3.87:1 against those
|
|
285
|
+
* tracks. The raw signal colours do not: `success` reaches 1.75:1 worst case.
|
|
286
|
+
*
|
|
287
|
+
* `[aria-checked="false"]` rather than `:not([aria-checked="true"])`: a switch
|
|
288
|
+
* that forgot the attribute is a bug in the control, and painting it red would
|
|
289
|
+
* hide that behind a plausible state. */
|
|
290
|
+
[data-icon-style="color"] [role="switch"][aria-checked="true"] {
|
|
291
|
+
background-color: color-mix(in srgb, var(--theme-success) 55%, var(--theme-ink));
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
[data-icon-style="color"] [role="switch"][aria-checked="false"] {
|
|
295
|
+
background-color: color-mix(in srgb, var(--theme-error) 75%, var(--theme-ink));
|
|
296
|
+
}
|
|
297
|
+
|
|
95
298
|
/* Dot grain texture for Hero production card */
|
|
96
299
|
.dot-grain-texture {
|
|
97
300
|
background-image: radial-gradient(color-mix(in srgb, var(--theme-ink) 6%, transparent) 0.65px, transparent 0.65px);
|
|
@@ -380,19 +583,36 @@
|
|
|
380
583
|
* paper. It has a real subject when the phone STRETCHES the composer over the
|
|
381
584
|
* transcript (`fixed inset-0`), which is the state the effect was drawn for.
|
|
382
585
|
*/
|
|
586
|
+
/* The material comes from `glass.css`, NOT from a second recipe here: one
|
|
587
|
+
* `--glass-*` token set states tint, bloom, sheen, shadow and the two blur
|
|
588
|
+
* budgets. The card takes `--glass-card-filter`, not the plane's — a 30px blur
|
|
589
|
+
* behind a card floating over a static transcript is a pass nobody can see.
|
|
590
|
+
* Under the classic look every token resolves to the values this block used to
|
|
591
|
+
* hardcode, so the style is unchanged when the surface is.
|
|
592
|
+
*
|
|
593
|
+
* Four layers, because one tint cannot be a pane of glass: the tint
|
|
594
|
+
* (`--glass-card`), the bloom (`--glass-bloom`, the light that passed through
|
|
595
|
+
* and landed in the corners), the sheen (`--glass-sheen`, the specular
|
|
596
|
+
* reflection on the face) and the rim + shadow (`--glass-edge`,
|
|
597
|
+
* `--glass-shadow`). Measured on the docked card, tint-only read 1.03:1
|
|
598
|
+
* (light) / 1.04:1 (dark) against the surface beside it — a card you could not
|
|
599
|
+
* see. The corner bloom is what makes the frost legible where nothing is
|
|
600
|
+
* behind it to blur. */
|
|
383
601
|
[data-composer-style="glass"] {
|
|
384
602
|
border-radius: 1.25rem;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
-
|
|
395
|
-
|
|
603
|
+
/* The RIM is what makes the surface legible — the fill cannot, because the
|
|
604
|
+
* plane under a docked composer is within 3 points of paper. It is the CARD's
|
|
605
|
+
* rim (`--glass-card-edge`), not the window's: the window's 1.5px `#fff 95%`
|
|
606
|
+
* line is right for a 1400px frame and reads as glare across 620px. */
|
|
607
|
+
border-color: transparent;
|
|
608
|
+
background-color: var(--glass-card);
|
|
609
|
+
/* NOT the plane's gradient stack (`--glass-glow`): that belongs to the window,
|
|
610
|
+
* and a card that borrowed it would paint a second highlight inside the first.
|
|
611
|
+
* The reflection sits ABOVE the transmitted light, as it does on real glass. */
|
|
612
|
+
background-image: var(--glass-sheen), var(--glass-bloom);
|
|
613
|
+
backdrop-filter: var(--glass-card-filter);
|
|
614
|
+
-webkit-backdrop-filter: var(--glass-card-filter);
|
|
615
|
+
box-shadow: var(--glass-card-edge), var(--glass-shadow);
|
|
396
616
|
}
|
|
397
617
|
[data-composer-style="glass"] .composer-attach-row {
|
|
398
618
|
padding-bottom: 0.25rem;
|
|
@@ -757,6 +977,39 @@ html[data-theme-variant="dark"] .shiki span { color: var(--shiki-dark); }
|
|
|
757
977
|
will-change: transform;
|
|
758
978
|
}
|
|
759
979
|
|
|
980
|
+
/* The header wordmark's halo (`common/brand-wordmark`, `glow`).
|
|
981
|
+
*
|
|
982
|
+
* Why it exists: the lockup ends in `text-ink` and starts in a warm gradient,
|
|
983
|
+
* and on a dark palette both sit on a near-black bar — the word is legible but
|
|
984
|
+
* flat, which is the state a title should not be in. The halo is what gives it
|
|
985
|
+
* a light source.
|
|
986
|
+
*
|
|
987
|
+
* Two `drop-shadow`s, not `text-shadow`: the first run is an SVG (the K's
|
|
988
|
+
* plate) and the second is gradient-clipped text, so a glyph shadow would paint
|
|
989
|
+
* under neither. `drop-shadow` follows the rendered alpha of all three runs.
|
|
990
|
+
*
|
|
991
|
+
* WHITE at 10%, and that is a decision with a measurement behind it. The halo
|
|
992
|
+
* started as `--color-brand` and was rejected twice — at 40%/22% it was
|
|
993
|
+
* invisible (the ring 1–8px outside the lockup moved +3 in mean red), and at
|
|
994
|
+
* full strength it tinted the whole bar and read as a lamp, not as light (that
|
|
995
|
+
* ring moved +41 in warm bias). The chroma was the problem: the lockup's own
|
|
996
|
+
* ink is near-white, so an orange halo is a second colour fighting the first.
|
|
997
|
+
* White at the same radius is the letters' own light — the warm bias does not
|
|
998
|
+
* move at all (−10.7 against the bare header's −10.8) while luminance rises
|
|
999
|
+
* +3.0 in the 1–8px ring and +0.7 in the 8–22px one, and the profile falls off
|
|
1000
|
+
* over ~25px. Alphas stay at 10% on BOTH layers: raising one is what made the
|
|
1001
|
+
* earlier attempts either invisible or heavy, and the visible edge of a halo is
|
|
1002
|
+
* its radius, not its opacity.
|
|
1003
|
+
*
|
|
1004
|
+
* DARK VARIANTS ONLY: on paper a white glow is a no-op at best, and the light
|
|
1005
|
+
* palettes never had the problem this fixes. Values are in `em` so the halo
|
|
1006
|
+
* scales with the size the caller sets. */
|
|
1007
|
+
html[data-theme-variant='dark'] .brand-wordmark-glow {
|
|
1008
|
+
filter:
|
|
1009
|
+
drop-shadow(0 0 0.35em rgb(255 255 255 / 10%))
|
|
1010
|
+
drop-shadow(0 0 0.9em rgb(255 255 255 / 10%));
|
|
1011
|
+
}
|
|
1012
|
+
|
|
760
1013
|
/* PWA Window Controls Overlay and Native Titlebar Styling */
|
|
761
1014
|
.titlebar-drag-region {
|
|
762
1015
|
-webkit-app-region: drag;
|
|
@@ -852,3 +1105,68 @@ html[data-theme-variant="dark"] .shiki span { color: var(--shiki-dark); }
|
|
|
852
1105
|
transform: translateX(33%);
|
|
853
1106
|
}
|
|
854
1107
|
}
|
|
1108
|
+
|
|
1109
|
+
/* ---------------------------------------------------------------------------
|
|
1110
|
+
* Review mode on a rendered markdown document.
|
|
1111
|
+
*
|
|
1112
|
+
* The verdict lives on `data-md-verdict` on the block element, painted by the
|
|
1113
|
+
* renderer after the annotations land. Two rules make it legible without
|
|
1114
|
+
* spending the palette:
|
|
1115
|
+
*
|
|
1116
|
+
* - a LEFT RAIL is the mark. It is the only thing that survives a reflow —
|
|
1117
|
+
* a background tint over a 3-line paragraph and over a 40-line code block
|
|
1118
|
+
* read as unrelated states.
|
|
1119
|
+
* - `needs-work` is the one state that uses chroma (`--theme-error`), because
|
|
1120
|
+
* it is the one state the reader must not miss. Chroma stays reserved for it.
|
|
1121
|
+
*
|
|
1122
|
+
* `data-md-selected` is the block whose popover is open: it gets an outline, not
|
|
1123
|
+
* a colour, so it composes with either verdict.
|
|
1124
|
+
* ------------------------------------------------------------------------- */
|
|
1125
|
+
|
|
1126
|
+
.md-review-active .prose-content [data-md-block] {
|
|
1127
|
+
position: relative;
|
|
1128
|
+
cursor: pointer;
|
|
1129
|
+
border-radius: 0.25rem;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
/* The hover affordance exists only where a review is possible, and only for a
|
|
1133
|
+
* block that has not been judged yet — a judged block already says so. */
|
|
1134
|
+
.md-review-active .prose-content [data-md-block]:hover:not([data-md-verdict]) {
|
|
1135
|
+
background: color-mix(in srgb, var(--theme-ink) 4%, transparent);
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
.md-review-active .prose-content [data-md-verdict]::before {
|
|
1139
|
+
content: '';
|
|
1140
|
+
position: absolute;
|
|
1141
|
+
inset-block: 0;
|
|
1142
|
+
left: -0.6rem;
|
|
1143
|
+
width: 3px;
|
|
1144
|
+
border-radius: 2px;
|
|
1145
|
+
background: color-mix(in srgb, var(--theme-ink) 35%, transparent);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
.md-review-active .prose-content [data-md-verdict='needs-work']::before {
|
|
1149
|
+
background: var(--theme-error);
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
/* A judged block keeps a faint tint so the marks read as a set when scrolled
|
|
1153
|
+
* past quickly; `needs-work` is the only one allowed to be a colour. */
|
|
1154
|
+
.md-review-active .prose-content [data-md-verdict='good'] {
|
|
1155
|
+
background: color-mix(in srgb, var(--theme-ink) 3%, transparent);
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
.md-review-active .prose-content [data-md-verdict='needs-work'] {
|
|
1159
|
+
background: color-mix(in srgb, var(--theme-error) 8%, transparent);
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
.md-review-active .prose-content [data-md-selected] {
|
|
1163
|
+
outline: 1px solid color-mix(in srgb, var(--theme-ink) 40%, transparent);
|
|
1164
|
+
outline-offset: 2px;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/* Review mode is a reading mode: a link inside a block is part of what is being
|
|
1168
|
+
* judged, and following it would leave the block. The handler consumes the
|
|
1169
|
+
* click; this only says so. */
|
|
1170
|
+
.md-review-active .prose-content [data-md-block] a {
|
|
1171
|
+
cursor: pointer;
|
|
1172
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The `<html>` attributes of the served shell, written in one place.
|
|
8
|
+
*
|
|
9
|
+
* `index.html` is a static template that every request rewrites, and the
|
|
10
|
+
* attributes it carries are the FIRST FRAME's whole appearance: the palette, the
|
|
11
|
+
* surface material and the brand-mark paint. A second replacement pass for the
|
|
12
|
+
* two new attributes was one `String.replace` away from silently missing — a
|
|
13
|
+
* missing attribute is not an error, it is the default look — so all four are
|
|
14
|
+
* stated together, in a function a test can call without rendering the shell.
|
|
15
|
+
*
|
|
16
|
+
* Two properties are load-bearing:
|
|
17
|
+
*
|
|
18
|
+
* - **`data-theme` and `data-theme-variant` are ALWAYS written.** They are the
|
|
19
|
+
* palette; `applyDocumentTheme` owns them after hydration, and a document
|
|
20
|
+
* served without them keeps `:root`'s shipped palette.
|
|
21
|
+
* - **The two style attributes are written only when they are not the default.**
|
|
22
|
+
* `applySurfaceStyle` / `applyIconStyle` remove the attribute for the default,
|
|
23
|
+
* so emitting `data-surface="classic"` here would make the server and the
|
|
24
|
+
* client disagree about the document's own state — and every CSS rule keys on
|
|
25
|
+
* the value, not on its absence.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import type { ThemePalette } from '@/shared/types/theme';
|
|
29
|
+
import {
|
|
30
|
+
DEFAULT_ICON_STYLE,
|
|
31
|
+
ICON_STYLE_ATTRIBUTE,
|
|
32
|
+
resolveIconStyle,
|
|
33
|
+
} from '@/shared/lib/theme/icon-style';
|
|
34
|
+
import {
|
|
35
|
+
DEFAULT_SURFACE_STYLE,
|
|
36
|
+
SURFACE_ATTRIBUTE,
|
|
37
|
+
resolveSurfaceStyle,
|
|
38
|
+
} from '@/shared/lib/theme/surface-style';
|
|
39
|
+
|
|
40
|
+
export interface ShellDocumentFacts {
|
|
41
|
+
palette: ThemePalette;
|
|
42
|
+
/** The stored surface style, unresolved — any value this build cannot draw
|
|
43
|
+
* falls to the default rather than to an attribute no rule matches. */
|
|
44
|
+
surfaceStyle: unknown;
|
|
45
|
+
iconStyle: unknown;
|
|
46
|
+
/** The `<meta name="theme-color">` value for this request. */
|
|
47
|
+
chromeColor: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** The template's own values, which the replacements below look for. */
|
|
51
|
+
const TEMPLATE_THEME = 'data-theme="paper"';
|
|
52
|
+
const TEMPLATE_VARIANT = 'data-theme-variant="light"';
|
|
53
|
+
const TEMPLATE_META = '<meta name="theme-color" content="#faf8f3" />';
|
|
54
|
+
|
|
55
|
+
/** The extra `<html>` attributes for the stored presentation styles. */
|
|
56
|
+
export function styleAttributes(surfaceStyle: unknown, iconStyle: unknown): string {
|
|
57
|
+
const surface = resolveSurfaceStyle(surfaceStyle);
|
|
58
|
+
const icon = resolveIconStyle(iconStyle);
|
|
59
|
+
const parts: string[] = [];
|
|
60
|
+
if (surface !== DEFAULT_SURFACE_STYLE) parts.push(`${SURFACE_ATTRIBUTE}="${surface}"`);
|
|
61
|
+
if (icon !== DEFAULT_ICON_STYLE) parts.push(`${ICON_STYLE_ATTRIBUTE}="${icon}"`);
|
|
62
|
+
return parts.length > 0 ? ` ${parts.join(' ')}` : '';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Rewrite the template's palette and chrome placeholders for one request.
|
|
67
|
+
*
|
|
68
|
+
* Returns the html unchanged for a document that predates the markers — the
|
|
69
|
+
* client's `initDocumentTheme` / `initSurfaceStyle` repair that case, which is
|
|
70
|
+
* why this does not throw: a stale template must still serve a page.
|
|
71
|
+
*/
|
|
72
|
+
export function applyShellDocumentFacts(html: string, facts: ShellDocumentFacts): string {
|
|
73
|
+
return html
|
|
74
|
+
.replace(
|
|
75
|
+
TEMPLATE_THEME,
|
|
76
|
+
`data-theme="${facts.palette.id}"${styleAttributes(facts.surfaceStyle, facts.iconStyle)}`,
|
|
77
|
+
)
|
|
78
|
+
.replace(TEMPLATE_VARIANT, `data-theme-variant="${facts.palette.variant}"`)
|
|
79
|
+
.replace(TEMPLATE_META, `<meta name="theme-color" content="${facts.chromeColor}" />`);
|
|
80
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The first frame's `<html>` attributes.
|
|
8
|
+
*
|
|
9
|
+
* The rule worth pinning is the ASYMMETRY: the palette is always written, and
|
|
10
|
+
* the two presentation styles are written only when they are not the default —
|
|
11
|
+
* because the client's writers REMOVE the attribute for the default, and a
|
|
12
|
+
* server that emitted `data-surface="classic"` would leave a document the
|
|
13
|
+
* client thinks is "explicitly classic" and a reload flipping between two
|
|
14
|
+
* spellings of the same state.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { describe, expect, test } from 'bun:test';
|
|
18
|
+
import {
|
|
19
|
+
applyShellDocumentFacts,
|
|
20
|
+
styleAttributes,
|
|
21
|
+
} from '@/server/lib/assets/shell-attributes.server';
|
|
22
|
+
import { KABMO_PALETTES } from '@/shared/lib/theme/palettes/kabmo';
|
|
23
|
+
|
|
24
|
+
const TEMPLATE = `<html lang="en" data-theme="paper" data-theme-variant="light">
|
|
25
|
+
<head>
|
|
26
|
+
<meta name="theme-color" content="#faf8f3" />
|
|
27
|
+
</head>
|
|
28
|
+
</html>`;
|
|
29
|
+
|
|
30
|
+
const dark = KABMO_PALETTES[0];
|
|
31
|
+
|
|
32
|
+
describe('styleAttributes', () => {
|
|
33
|
+
test('the defaults add nothing at all', () => {
|
|
34
|
+
expect(styleAttributes('classic', 'monochrome')).toBe('');
|
|
35
|
+
expect(styleAttributes(undefined, undefined)).toBe('');
|
|
36
|
+
expect(styleAttributes('nonsense', 'nonsense')).toBe('');
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('each non-default style contributes its own attribute', () => {
|
|
40
|
+
expect(styleAttributes('glass', 'monochrome')).toBe(' data-surface="glass"');
|
|
41
|
+
expect(styleAttributes('classic', 'color')).toBe(' data-icon-style="color"');
|
|
42
|
+
expect(styleAttributes('glass', 'color')).toBe(' data-surface="glass" data-icon-style="color"');
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
describe('applyShellDocumentFacts', () => {
|
|
47
|
+
test('writes the palette and the chrome colour, and nothing else by default', () => {
|
|
48
|
+
const html = applyShellDocumentFacts(TEMPLATE, {
|
|
49
|
+
palette: dark,
|
|
50
|
+
surfaceStyle: undefined,
|
|
51
|
+
iconStyle: undefined,
|
|
52
|
+
chromeColor: '#123456',
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
expect(html).toContain(`<html lang="en" data-theme="${dark.id}" data-theme-variant="${dark.variant}">`);
|
|
56
|
+
expect(html).toContain('<meta name="theme-color" content="#123456" />');
|
|
57
|
+
expect(html).not.toContain('data-surface');
|
|
58
|
+
expect(html).not.toContain('data-icon-style');
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test('a stored glass style lands on the FIRST frame, not after hydration', () => {
|
|
62
|
+
const html = applyShellDocumentFacts(TEMPLATE, {
|
|
63
|
+
palette: dark,
|
|
64
|
+
surfaceStyle: 'glass',
|
|
65
|
+
iconStyle: 'color',
|
|
66
|
+
chromeColor: '#123456',
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
expect(html).toContain(
|
|
70
|
+
`<html lang="en" data-theme="${dark.id}" data-surface="glass" data-icon-style="color" data-theme-variant="${dark.variant}">`,
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test('a document without the template markers is returned untouched, not thrown', () => {
|
|
75
|
+
const stale = '<html><head></head><body>an older build</body></html>';
|
|
76
|
+
|
|
77
|
+
expect(
|
|
78
|
+
applyShellDocumentFacts(stale, {
|
|
79
|
+
palette: dark,
|
|
80
|
+
surfaceStyle: 'glass',
|
|
81
|
+
iconStyle: 'color',
|
|
82
|
+
chromeColor: '#123456',
|
|
83
|
+
}),
|
|
84
|
+
).toBe(stale);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import type { RpcProcess, RpcFrame } from '@/server/lib/omp/rpc/process';
|
|
18
|
-
import { GET_STATE_TIMEOUT_MS, IDLE_REAP_MS,
|
|
18
|
+
import { GET_STATE_TIMEOUT_MS, IDLE_REAP_MS, promptAckTimeoutMs } from '@/server/lib/omp/rpc/constants';
|
|
19
19
|
import { buildBtwPrompt } from '@/server/lib/btw/prompt';
|
|
20
20
|
import { boundSideReply } from '@/server/lib/btw/reply';
|
|
21
21
|
import { appendBtwTurn, settleRunningBtwTurns, updateBtwTurn } from '@/server/lib/btw/store.server';
|
|
@@ -63,7 +63,7 @@ export async function askSideQuestion(host: BtwLifecycleHost, question: string,
|
|
|
63
63
|
const proc = await host.start();
|
|
64
64
|
await proc.sendCommand(
|
|
65
65
|
{ type: 'prompt', message: buildBtwPrompt(question), ...(images?.length ? { images } : {}) },
|
|
66
|
-
|
|
66
|
+
promptAckTimeoutMs(images),
|
|
67
67
|
);
|
|
68
68
|
} catch (error) {
|
|
69
69
|
await settleSideTurn(host, 'error');
|
|
@@ -19,7 +19,9 @@ import { ensureWaitingSchema } from '@/server/lib/waiting/schema.server';
|
|
|
19
19
|
import { ensurePluginSchema } from '@/server/lib/plugins/schema.server';
|
|
20
20
|
import { ensureModelRolePresetSchema } from '@/server/lib/model-roles/schema.server';
|
|
21
21
|
import { ensureProviderIconSchema } from '@/server/lib/models/provider-icon-store.server';
|
|
22
|
+
import { ensureUsageIndexSchema } from '@/server/lib/usage/index-schema.server';
|
|
22
23
|
import { ensureWorktreeSchema } from '@/server/lib/db/worktree-registry.server';
|
|
24
|
+
import { ensureReviewSchema } from '@/server/lib/review/schema.server';
|
|
23
25
|
import { migrateWorkspaceFolderColumns } from '@/shared/lib/workspace/schema-migrations';
|
|
24
26
|
import { migrateSessionStreamStateColumns } from '@/shared/lib/omp/session/schema-migrations';
|
|
25
27
|
|
|
@@ -126,9 +128,14 @@ export async function initSchema(db: DbClient): Promise<void> {
|
|
|
126
128
|
// Named model-role presets (the role editor's preset picker).
|
|
127
129
|
await ensureModelRolePresetSchema(db);
|
|
128
130
|
await ensureProviderIconSchema(db);
|
|
131
|
+
// Token-usage index: the rollup the telemetry panel reads instead of
|
|
132
|
+
// re-scanning every transcript on each request.
|
|
133
|
+
await ensureUsageIndexSchema(db);
|
|
129
134
|
// Worktree registry: the ref each worktree branched from, and the identity
|
|
130
135
|
// cache that keys its folder.
|
|
131
136
|
await ensureWorktreeSchema(db);
|
|
137
|
+
// Review annotations on a rendered markdown document (per block, per file).
|
|
138
|
+
await ensureReviewSchema(db);
|
|
132
139
|
|
|
133
140
|
await db.exec(`
|
|
134
141
|
CREATE TABLE IF NOT EXISTS files (
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
type TerminalSession,
|
|
40
40
|
type TerminalViewer,
|
|
41
41
|
} from '@/server/lib/terminal/session.server';
|
|
42
|
+
import { createTerminalOutputQueue } from '@/server/lib/terminal/output';
|
|
42
43
|
import { clampTerminalSize } from '@/shared/lib/workspace/terminal/protocol';
|
|
43
44
|
import { testPosix } from '@/test-support/platform';
|
|
44
45
|
describe('clampTerminalSize and session constants', () => {
|
|
@@ -213,6 +214,9 @@ function fakeSession(
|
|
|
213
214
|
term: undefined as unknown as Bun.Terminal,
|
|
214
215
|
proc: null,
|
|
215
216
|
history: undefined as never,
|
|
217
|
+
// A real queue: `closeTerminalStream` disposes it, which is one of the
|
|
218
|
+
// behaviours this file pins.
|
|
219
|
+
output: createTerminalOutputQueue(() => {}),
|
|
216
220
|
viewers: new Set(viewers),
|
|
217
221
|
cols: 80,
|
|
218
222
|
rows: 24,
|