@kortix/ui 0.15.10 → 0.16.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/dist/_vendor/kortix-shared.js +769 -76
- package/dist/_vendor/shared/app-config.d.ts +6 -30
- package/dist/_vendor/shared/channel-descriptors.d.ts +0 -34
- package/dist/_vendor/shared/channel-header.d.ts +2 -1
- package/dist/_vendor/shared/connector-sections.d.ts +0 -25
- package/dist/_vendor/shared/file-tags.d.ts +2 -1
- package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
- package/dist/_vendor/shared/pasted-content.d.ts +0 -4
- package/dist/_vendor/shared/pixel-mark.d.ts +0 -17
- package/dist/_vendor/shared/project-glyphs.d.ts +0 -1
- package/dist/_vendor/shared/session/attachment-tile.d.ts +8 -0
- package/dist/_vendor/shared/workspace-settings.d.ts +3 -0
- package/dist/access/access/copy-row.d.ts +7 -1
- package/dist/access/access/copy-row.js +2 -2
- package/dist/animated-copy-icon.js +2 -1
- package/dist/browser/sandbox-browser-chrome.d.ts +2 -1
- package/dist/browser/sandbox-browser-chrome.js +1 -1
- package/dist/customize/agents/agent-cover-card.d.ts +1 -1
- package/dist/customize/agents/agent-cover-card.js +10 -2
- package/dist/customize/agents/agent-filter.js +3 -1
- package/dist/customize/agents/agent-model-view.d.ts +11 -1
- package/dist/customize/agents/agent-model-view.js +12 -1
- package/dist/customize/agents/agent-overview.d.ts +10 -0
- package/dist/customize/agents/agent-overview.js +5 -4
- package/dist/customize/agents/agent-page-chrome.d.ts +5 -6
- package/dist/customize/agents/agent-page-chrome.js +16 -13
- package/dist/customize/agents/agent-page.js +25 -34
- package/dist/customize/agents/agent-tabs.d.ts +3 -0
- package/dist/customize/agents/agent-tabs.js +3 -0
- package/dist/customize/agents/agents-page.js +3 -3
- package/dist/customize/agents/create-agent-modal.d.ts +9 -0
- package/dist/customize/agents/create-agent-modal.js +21 -3
- package/dist/customize/agents/use-default-agent.js +2 -2
- package/dist/customize/connectors/connector-identity.d.ts +11 -2
- package/dist/customize/connectors/connector-identity.js +16 -4
- package/dist/customize/connectors/connectors-page.js +10 -6
- package/dist/customize/connectors/detail/app-page.js +2 -2
- package/dist/customize/connectors/detail/connector-triggers.js +1 -1
- package/dist/customize/connectors/install/install-dialog.d.ts +2 -0
- package/dist/customize/connectors/install/install-dialog.js +6 -1
- package/dist/customize/connectors/use-agent-access.d.ts +2 -0
- package/dist/customize/evals/eval-compare-view.d.ts +10 -0
- package/dist/customize/evals/eval-compare-view.js +68 -0
- package/dist/customize/evals/eval-dataset-view.d.ts +20 -0
- package/dist/customize/evals/eval-dataset-view.js +81 -0
- package/dist/customize/evals/eval-datasets-page.d.ts +25 -0
- package/dist/customize/evals/eval-datasets-page.js +91 -0
- package/dist/customize/evals/eval-job-view.d.ts +12 -0
- package/dist/customize/evals/eval-job-view.js +360 -0
- package/dist/customize/evals/eval-jobs-page.d.ts +4 -0
- package/dist/customize/evals/eval-jobs-page.js +69 -0
- package/dist/customize/evals/eval-meta.d.ts +97 -0
- package/dist/customize/evals/eval-meta.js +228 -0
- package/dist/customize/evals/eval-task-view.d.ts +13 -0
- package/dist/customize/evals/eval-task-view.js +123 -0
- package/dist/customize/evals/eval-tasks-page.d.ts +8 -0
- package/dist/customize/evals/eval-tasks-page.js +56 -0
- package/dist/customize/evals/eval-ui.d.ts +97 -0
- package/dist/customize/evals/eval-ui.js +153 -0
- package/dist/customize/evals/evals-page.d.ts +10 -0
- package/dist/customize/evals/evals-page.js +56 -0
- package/dist/customize/evals/run-eval-modal.d.ts +28 -0
- package/dist/customize/evals/run-eval-modal.js +167 -0
- package/dist/customize/project-settings/project-admin-sections.d.ts +3 -2
- package/dist/customize/project-settings/project-admin-sections.js +6 -1
- package/dist/customize/providers/provider-connect.d.ts +13 -0
- package/dist/customize/providers/provider-connect.js +29 -5
- package/dist/customize/providers/provider-sheet.js +5 -4
- package/dist/customize/sections/component/teams-byo-wizard.js +4 -1
- package/dist/customize/sections/view/gateway/gateway-overview.d.ts +5 -0
- package/dist/customize/sections/view/gateway/gateway-overview.js +32 -6
- package/dist/customize/sections/view/gateway/routing-parts.d.ts +6 -0
- package/dist/customize/sections/view/gateway/routing-parts.js +21 -13
- package/dist/customize/sections/view/git-view.d.ts +19 -1
- package/dist/customize/sections/view/git-view.js +7 -3
- package/dist/customize/sections/view/manifest-issue-list.d.ts +16 -0
- package/dist/customize/sections/view/manifest-issue-list.js +41 -0
- package/dist/customize/sections/view/manifest-issues-row.d.ts +24 -0
- package/dist/customize/sections/view/manifest-issues-row.js +39 -0
- package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +7 -1
- package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -5
- package/dist/customize/sections/view/secrets-view.d.ts +13 -0
- package/dist/customize/sections/view/secrets-view.js +10 -6
- package/dist/customize/sections/view/subscription-usage.d.ts +2 -7
- package/dist/customize/sections/view/subscription-usage.js +4 -8
- package/dist/customize/settings/settings-tab-header.js +12 -3
- package/dist/customize/settings/tabs/experimental-tab.d.ts +16 -5
- package/dist/customize/settings/tabs/experimental-tab.js +36 -11
- package/dist/customize/settings/tabs/general-tab.js +1 -1
- package/dist/customize/settings/tabs/sandbox-tab.d.ts +10 -0
- package/dist/customize/settings/tabs/sandbox-tab.js +27 -4
- package/dist/customize/settings/tabs/snapshots-tab.d.ts +31 -0
- package/dist/customize/settings/tabs/snapshots-tab.js +61 -5
- package/dist/customize/settings/tabs/workspace-keys.js +6 -3
- package/dist/customize/shared/capability-page-shell.js +9 -1
- package/dist/customize/shared/catalog/catalog-card.d.ts +1 -1
- package/dist/customize/shared/catalog/catalog-card.js +15 -5
- package/dist/customize/shared/customize-tab-bar.js +1 -1
- package/dist/customize/shared/new-entity-menu.d.ts +1 -1
- package/dist/customize/shared/new-entity-menu.js +38 -1
- package/dist/customize/triggers/runtime-triggers.d.ts +4 -0
- package/dist/customize/triggers/runtime-triggers.js +33 -3
- package/dist/customize/triggers/schedule/event-trigger-copy.js +1 -1
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +5 -4
- package/dist/customize/triggers/schedule/then-fields.d.ts +5 -1
- package/dist/customize/triggers/schedule/then-fields.js +23 -3
- package/dist/customize/triggers/schedule/trigger-callouts.js +1 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +27 -0
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +51 -5
- package/dist/customize/triggers/schedule/trigger-composer.js +19 -13
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +25 -5
- package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -3
- package/dist/customize/triggers/schedule/trigger-filter.js +7 -6
- package/dist/customize/triggers/schedule/trigger-readonly.js +1 -1
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -1
- package/dist/customize/triggers/schedule/when-event.js +1 -1
- package/dist/customize/triggers/schedule/when-schedule.d.ts +5 -1
- package/dist/customize/triggers/schedule/when-schedule.js +16 -1
- package/dist/customize/triggers/schedule-view.js +6 -3
- package/dist/files/project/components/drive-explorer.js +33 -70
- package/dist/files/project/components/drive-grid-view.d.ts +2 -31
- package/dist/files/project/components/drive-grid-view.js +12 -22
- package/dist/files/project/components/drive-list-view.d.ts +3 -30
- package/dist/files/project/components/drive-list-view.js +8 -18
- package/dist/files/project/components/drive-selection-bar.d.ts +4 -5
- package/dist/files/project/components/drive-selection-bar.js +13 -20
- package/dist/files/project/components/explorer-listing.d.ts +48 -0
- package/dist/files/project/components/explorer-listing.js +64 -0
- package/dist/files/project/components/file-explorer-page.js +7 -204
- package/dist/files/project/components/file-thumbnail.js +3 -1
- package/dist/files/project/components/manifest-issue-mark.d.ts +9 -0
- package/dist/files/project/components/manifest-issue-mark.js +26 -0
- package/dist/files/project/hooks/use-change-requests.d.ts +10 -0
- package/dist/files/project/hooks/use-change-requests.js +17 -0
- package/dist/files/project/manifest-annotations.d.ts +16 -0
- package/dist/files/project/manifest-annotations.js +19 -0
- package/dist/files/project/store/version-store.d.ts +1 -1
- package/dist/files/project/upload-batch.d.ts +20 -0
- package/dist/files/project/upload-batch.js +20 -0
- package/dist/files/runtime/hooks/use-binary-blob.js +3 -2
- package/dist/files/runtime/hooks/use-file-content.js +3 -2
- package/dist/files/runtime/hooks/use-file-list.js +1 -2
- package/dist/files/runtime/hooks/use-file-mutations.js +69 -6
- package/dist/files/runtime/hooks/use-file-refresh.d.ts +4 -0
- package/dist/files/runtime/hooks/use-file-refresh.js +6 -0
- package/dist/files/tree/components/file-tree-item.js +1 -4
- package/dist/files/viewer/file-annotations.d.ts +18 -0
- package/dist/files/viewer/file-annotations.js +21 -0
- package/dist/files/viewer/file-content-renderer.js +1 -1
- package/dist/files/viewer/file-viewer.js +2 -1
- package/dist/files/viewer/index.d.ts +1 -0
- package/dist/files/viewer/index.js +1 -0
- package/dist/files/viewer/use-file-content-state.js +8 -1
- package/dist/i18n/en.d.ts +544 -46
- package/dist/i18n/en.js +593 -95
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -4
- package/dist/icons/caret-right-solid.d.ts +11 -0
- package/dist/icons/caret-right-solid.js +15 -0
- package/dist/internal/auth/auth-art.d.ts +12 -0
- package/dist/internal/auth/auth-art.js +118 -0
- package/dist/internal/auth/auth-card-shell.d.ts +14 -10
- package/dist/internal/auth/auth-card-shell.js +20 -31
- package/dist/internal/auth/auth-consent.d.ts +3 -1
- package/dist/internal/auth/auth-consent.js +2 -2
- package/dist/internal/auth/auth-primitives.d.ts +26 -1
- package/dist/internal/auth/auth-primitives.js +37 -8
- package/dist/internal/connector-logo/connector-logo.d.ts +2 -1
- package/dist/internal/connector-logo/connector-logo.js +11 -2
- package/dist/internal/files/file-read-retry.d.ts +18 -2
- package/dist/internal/files/file-read-retry.js +42 -4
- package/dist/internal/hooks/projects/use-new-project-session.js +5 -10
- package/dist/internal/hooks/use-auto-scroll-physics.d.ts +1 -1
- package/dist/internal/hooks/use-auto-scroll-physics.js +2 -10
- package/dist/internal/hooks/use-reduced-motion.d.ts +4 -0
- package/dist/internal/hooks/use-reduced-motion.js +12 -0
- package/dist/internal/hooks/use-save-shortcut.d.ts +8 -0
- package/dist/internal/hooks/use-save-shortcut.js +28 -0
- package/dist/internal/layout/connect-mcp-modal.d.ts +1 -1
- package/dist/internal/layout/connect-mcp-modal.js +9 -4
- package/dist/internal/layout/panel-chrome.d.ts +28 -0
- package/dist/internal/layout/panel-chrome.js +27 -0
- package/dist/internal/layout/project-page-header.js +5 -1
- package/dist/internal/layout/project-settings-nav.d.ts +17 -0
- package/dist/internal/layout/project-settings-nav.js +24 -0
- package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
- package/dist/internal/lib/capability-tab-routes.d.ts +8 -0
- package/dist/internal/lib/capability-tab-routes.js +11 -0
- package/dist/internal/lib/manifest-health.d.ts +25 -1
- package/dist/internal/lib/manifest-health.js +56 -0
- package/dist/internal/lib/project-preamble.js +1 -1
- package/dist/internal/lib/web-notifications.d.ts +1 -1
- package/dist/internal/lib/web-notifications.js +3 -0
- package/dist/internal/notifications/notification-inbox.js +2 -1
- package/dist/internal/notifications/notification-rows.d.ts +1 -1
- package/dist/internal/notifications/notification-rows.js +15 -1
- package/dist/internal/selection/selection-bar.d.ts +2 -8
- package/dist/internal/selection/selection-bar.js +15 -38
- package/dist/internal/stores/active-space-store.d.ts +1 -1
- package/dist/internal/stores/browser-recents-store.d.ts +1 -1
- package/dist/internal/stores/composer-prefill-store.d.ts +7 -0
- package/dist/internal/stores/composer-prefill-store.js +1 -0
- package/dist/internal/stores/current-account-store.d.ts +1 -1
- package/dist/internal/stores/first-chat-store.d.ts +1 -1
- package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
- package/dist/internal/stores/session-browser-store.d.ts +1 -1
- package/dist/internal/stores/session-expanded-store.d.ts +1 -1
- package/dist/internal/stores/session-filter-store.d.ts +1 -1
- package/dist/internal/stores/session-history-view-store.d.ts +1 -1
- package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
- package/dist/internal/stores/sound-store.d.ts +1 -1
- package/dist/internal/stores/tab-store.d.ts +1 -1
- package/dist/internal/stores/user-preferences-store.d.ts +9 -1
- package/dist/internal/stores/user-preferences-store.js +2 -0
- package/dist/internal/stores/web-notification-store.d.ts +1 -1
- package/dist/lib/base-ui-compat.js +28 -1
- package/dist/lib/dotmatrix-hooks.d.ts +1 -0
- package/dist/lib/dotmatrix-hooks.js +3 -13
- package/dist/lib/reduced-motion.d.ts +10 -0
- package/dist/lib/reduced-motion.js +104 -0
- package/dist/lib/routes.d.ts +9 -0
- package/dist/lib/routes.js +7 -4
- package/dist/markdown/artifact-link.d.ts +11 -0
- package/dist/markdown/artifact-link.js +62 -0
- package/dist/markdown/code/index.d.ts +1 -1
- package/dist/markdown/code/index.js +1 -1
- package/dist/markdown/code/inline-code.d.ts +1 -1
- package/dist/markdown/code/inline-code.js +1 -1
- package/dist/markdown/genui/components/map-canvas.js +2 -1
- package/dist/markdown/index.d.ts +3 -1
- package/dist/markdown/index.js +2 -1
- package/dist/markdown/{code/inline-chip.js → inline-chip.js} +2 -2
- package/dist/markdown/inline-code-text.d.ts +34 -0
- package/dist/markdown/inline-code-text.js +68 -0
- package/dist/markdown/setup-links/approval-decision.js +3 -3
- package/dist/markdown/soft-breaks.d.ts +21 -0
- package/dist/markdown/soft-breaks.js +33 -0
- package/dist/markdown/unified-markdown.d.ts +9 -1
- package/dist/markdown/unified-markdown.js +31 -9
- package/dist/primitives/action-bar.d.ts +50 -0
- package/dist/primitives/action-bar.js +87 -0
- package/dist/primitives/calendar.js +4 -2
- package/dist/primitives/inline-meta.js +2 -2
- package/dist/primitives/kortix-loader.js +2 -1
- package/dist/primitives/modal.d.ts +1 -1
- package/dist/primitives/paper-wallpaper-shaders.d.ts +1 -0
- package/dist/primitives/paper-wallpaper-shaders.js +6 -0
- package/dist/primitives/resizable.d.ts +1 -1
- package/dist/primitives/resize-seam.d.ts +3 -2
- package/dist/primitives/resize-seam.js +4 -3
- package/dist/primitives/settings-section-header.d.ts +30 -1
- package/dist/primitives/settings-section-header.js +37 -0
- package/dist/primitives/sliding-tab-indicator.js +2 -1
- package/dist/primitives/switch.js +15 -8
- package/dist/primitives/text-shimmer.js +6 -0
- package/dist/primitives/toast-clearance.d.ts +52 -0
- package/dist/primitives/toast-clearance.js +116 -0
- package/dist/primitives/toast.d.ts +3 -1
- package/dist/primitives/toast.js +2 -0
- package/dist/primitives/typed-title.js +1 -1
- package/dist/primitives/wallpaper-shaders.js +1 -1
- package/dist/session/actions/project-session-list-helpers.d.ts +16 -0
- package/dist/session/actions/project-session-list-helpers.js +18 -0
- package/dist/session/actions/session-label.js +2 -2
- package/dist/session/agents/agent-model.d.ts +1 -0
- package/dist/session/agents/agent-model.js +2 -1
- package/dist/session/agents/agent-strip.d.ts +10 -5
- package/dist/session/agents/agent-strip.js +49 -15
- package/dist/session/agents/held-messages.d.ts +6 -2
- package/dist/session/agents/held-messages.js +6 -3
- package/dist/session/agents/workflow-run-controls.d.ts +27 -4
- package/dist/session/agents/workflow-run-controls.js +63 -10
- package/dist/session/composer/ComposerCard.js +7 -1
- package/dist/session/composer/agent-selector.d.ts +2 -0
- package/dist/session/composer/agent-selector.js +11 -4
- package/dist/session/composer/animated-placeholder.js +2 -1
- package/dist/session/composer/attachment-tile.d.ts +2 -2
- package/dist/session/composer/attachment-tile.js +25 -3
- package/dist/session/composer/composer-agent-access.d.ts +10 -1
- package/dist/session/composer/composer-agent-access.js +18 -4
- package/dist/session/composer/composer-chat-input.d.ts +1 -0
- package/dist/session/composer/composer-chat-input.js +7 -2
- package/dist/session/composer/composer-logic.d.ts +7 -0
- package/dist/session/composer/composer-logic.js +18 -0
- package/dist/session/composer/composer-reset.d.ts +8 -14
- package/dist/session/composer/composer-toolbar.d.ts +3 -1
- package/dist/session/composer/composer-toolbar.js +3 -3
- package/dist/session/composer/composer.d.ts +9 -2
- package/dist/session/composer/composer.js +24 -9
- package/dist/session/composer/editor/composer-editor.js +6 -4
- package/dist/session/composer/hooks/use-file-search.d.ts +12 -2
- package/dist/session/composer/hooks/use-file-search.js +71 -7
- package/dist/session/composer/menus/menu-items.js +6 -2
- package/dist/session/composer/menus/menu-shell.d.ts +3 -1
- package/dist/session/composer/menus/menu-shell.js +2 -2
- package/dist/session/composer/menus/slash-menu.d.ts +7 -0
- package/dist/session/composer/menus/slash-menu.js +48 -1
- package/dist/session/composer/use-instant-session-send.js +7 -1
- package/dist/session/header/session-reminders-indicator.js +3 -2
- package/dist/session/header/session-site-header.d.ts +3 -1
- package/dist/session/header/session-site-header.js +27 -8
- package/dist/session/media/sandbox-url-detector.js +1 -1
- package/dist/session/models/connect-model-step.d.ts +29 -0
- package/dist/session/models/connect-model-step.js +50 -0
- package/dist/session/models/model-connection-gate.js +2 -1
- package/dist/session/models/model-selector.js +1 -1
- package/dist/session/models/subscription-switcher.d.ts +7 -0
- package/dist/session/models/subscription-switcher.js +52 -10
- package/dist/session/models/subscription-windows.d.ts +2 -0
- package/dist/session/models/subscription-windows.js +2 -0
- package/dist/session/models/use-workspace-model-gate.d.ts +11 -0
- package/dist/session/models/use-workspace-model-gate.js +62 -0
- package/dist/session/models/workspace-model-gate.d.ts +46 -0
- package/dist/session/models/workspace-model-gate.js +66 -0
- package/dist/session/outcomes/session-outcomes-provider.js +14 -7
- package/dist/session/panel/action-panel.js +8 -19
- package/dist/session/panel/easy/app-preview.d.ts +4 -1
- package/dist/session/panel/easy/app-preview.js +95 -33
- package/dist/session/panel/easy/apps-card.js +6 -11
- package/dist/session/panel/easy/change-requests-card.js +1 -1
- package/dist/session/panel/easy/changes-card.d.ts +14 -0
- package/dist/session/panel/easy/changes-card.js +60 -0
- package/dist/session/panel/easy/context-card.d.ts +5 -1
- package/dist/session/panel/easy/context-card.js +13 -28
- package/dist/session/panel/easy/context-meter.d.ts +18 -0
- package/dist/session/panel/easy/context-meter.js +73 -0
- package/dist/session/panel/easy/detail-view.d.ts +1 -1
- package/dist/session/panel/easy/detail-view.js +24 -21
- package/dist/session/panel/easy/easy-panel.js +7 -5
- package/dist/session/panel/easy/file-preview.js +3 -1
- package/dist/session/panel/easy/frame-history.d.ts +91 -0
- package/dist/session/panel/easy/frame-history.js +198 -0
- package/dist/session/panel/easy/outputs-card.d.ts +10 -0
- package/dist/session/panel/easy/outputs-card.js +28 -31
- package/dist/session/panel/easy/panel-card.d.ts +1 -3
- package/dist/session/panel/easy/panel-card.js +24 -8
- package/dist/session/panel/easy/plan-card.js +2 -2
- package/dist/session/panel/easy/step-icon.d.ts +4 -1
- package/dist/session/panel/easy/step-icon.js +2 -2
- package/dist/session/panel/session-action-panel-column.d.ts +5 -0
- package/dist/session/panel/session-action-panel-column.js +198 -101
- package/dist/session/panel/session-desktop.js +5 -1
- package/dist/session/panel/session-diff-viewer.d.ts +3 -1
- package/dist/session/panel/session-diff-viewer.js +7 -4
- package/dist/session/panel/session-panel-provider.js +29 -5
- package/dist/session/panel/shared/derive-panels.js +64 -4
- package/dist/session/prompts/session-connect-card.d.ts +63 -0
- package/dist/session/prompts/{session-connect-prompt.js → session-connect-card.js} +53 -42
- package/dist/session/status/session-busy-indicator.js +2 -1
- package/dist/session/status/session-error-banner.js +1 -1
- package/dist/session/thread/chat-minimap.js +2 -1
- package/dist/session/thread/session-body.js +4 -1
- package/dist/session/thread/session-chat.js +311 -300
- package/dist/session/thread/session-turn-meta-rows.d.ts +13 -5
- package/dist/session/thread/session-turn-meta-rows.js +33 -5
- package/dist/session/thread/transcript.d.ts +3 -3
- package/dist/session/thread/transcript.js +33 -27
- package/dist/session/thread/typing-indicator.d.ts +2 -2
- package/dist/session/thread/typing-indicator.js +10 -3
- package/dist/session/tool/tool-part-renderer.js +7 -2
- package/dist/session/tool/tools/kortix-action-tool.js +10 -2
- package/dist/session/tool/tools/session-spawn-tool.js +3 -3
- package/dist/session/tool/tools/workflow-run-card.d.ts +11 -1
- package/dist/session/tool/tools/workflow-run-card.js +31 -7
- package/dist/session/tool/tools/workflow-run-cost.d.ts +29 -0
- package/dist/session/tool/tools/workflow-run-cost.js +75 -0
- package/dist/session/tool/tools/workflow-tool.d.ts +1 -1
- package/dist/session/tool/tools/workflow-tool.js +40 -15
- package/dist/session/turn/peer-message-row.js +1 -1
- package/dist/session/turn/queued-prompt-bubbles.d.ts +3 -2
- package/dist/session/turn/queued-prompt-bubbles.js +1 -1
- package/dist/session/turn/throttled-markdown.js +1 -1
- package/dist/session/turn/turn-viewport.d.ts +66 -10
- package/dist/session/turn/turn-viewport.js +92 -12
- package/dist/session/turn/user-message.js +7 -5
- package/dist/styles/theme.css +68 -0
- package/dist/styles.css +1 -1
- package/dist/terminal/pty-terminal.js +1 -1
- package/dist/terminal/session-terminal-connect-bar.js +2 -1
- package/dist/test-utils/intl.d.ts +544 -46
- package/dist/workspace/admin/project-admin-dashboard.js +23 -11
- package/dist/workspace/admin/settings-search-landing.js +2 -1
- package/dist/workspace/calendar/calendar-dates.d.ts +31 -0
- package/dist/workspace/calendar/calendar-dates.js +64 -0
- package/dist/workspace/calendar/calendar-new-item.d.ts +11 -0
- package/dist/workspace/calendar/calendar-new-item.js +47 -0
- package/dist/workspace/calendar/calendar-page.d.ts +3 -0
- package/dist/workspace/calendar/calendar-page.js +177 -0
- package/dist/workspace/calendar/calendar-panel.d.ts +13 -0
- package/dist/workspace/calendar/calendar-panel.js +103 -0
- package/dist/workspace/calendar/calendar-people.d.ts +52 -0
- package/dist/workspace/calendar/calendar-people.js +117 -0
- package/dist/workspace/calendar/calendar-scheduled.d.ts +29 -0
- package/dist/workspace/calendar/calendar-scheduled.js +118 -0
- package/dist/workspace/calendar/calendar-views.d.ts +32 -0
- package/dist/workspace/calendar/calendar-views.js +124 -0
- package/dist/workspace/calendar/calendar-when.d.ts +14 -0
- package/dist/workspace/calendar/calendar-when.js +81 -0
- package/dist/workspace/calendar/mention-textarea.d.ts +19 -0
- package/dist/workspace/calendar/mention-textarea.js +84 -0
- package/dist/workspace/home/access-requests-bell.js +2 -1
- package/dist/workspace/home/existing-repo-setup-prompt.d.ts +5 -8
- package/dist/workspace/home/existing-repo-setup-prompt.js +16 -42
- package/dist/workspace/home/no-agent-home.d.ts +3 -1
- package/dist/workspace/home/no-agent-home.js +2 -2
- package/dist/workspace/inbox/workspace-inbox.d.ts +1 -1
- package/dist/workspace/inbox/workspace-inbox.js +1 -1
- package/dist/workspace/layout/project-files-view.js +2 -1
- package/dist/workspace/layout/project-home.js +16 -9
- package/dist/workspace/memory/memory-page-list.js +1 -1
- package/dist/workspace/new/workspace-handoff.js +2 -1
- package/dist/workspace/projects/modal/project-icon-field.js +2 -1
- package/dist/workspace/session-workspace.js +13 -12
- package/dist/workspace/setup/setup-steps.d.ts +43 -0
- package/dist/workspace/setup/setup-steps.js +38 -0
- package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
- package/dist/workspace/setup/workspace-setup-page.js +124 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
- package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
- package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
- package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
- package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
- package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
- package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
- package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
- package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
- package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
- package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
- package/dist/workspace/sidebar/footer/promo-card.js +47 -0
- package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
- package/dist/workspace/sidebar/project-nav-items.js +12 -4
- package/dist/workspace/sidebar/project-session-list.js +58 -26
- package/dist/workspace/sidebar/project-sidebar.js +2 -5
- package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
- package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
- package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
- package/dist/workspace/sidebar/session-group-sections.js +121 -41
- package/dist/workspace/sidebar/session-grouping.d.ts +1 -1
- package/dist/workspace/sidebar/session-grouping.js +1 -1
- package/dist/workspace/sidebar/sidebar-drill.js +6 -0
- package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
- package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
- package/dist/workspace/sidebar/use-workspace-list.js +11 -1
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
- package/dist/workspace/space/space-tab-panels.js +1 -1
- package/dist/workspace/spaces/space-details-panel.js +2 -2
- package/dist/workspace/spaces/space-timeline.js +2 -2
- package/dist/workspace/spaces/space-triggers.js +2 -2
- package/dist/workspace/spaces/space-view.js +11 -5
- package/package.json +79 -10
- package/skills/kortix-ui/SKILL.md +2 -2
- package/skills/kortix-ui/references/modules.md +5 -3
- package/dist/session/prompts/session-connect-prompt.d.ts +0 -40
- package/dist/session/thread/turn-share.d.ts +0 -16
- package/dist/session/thread/turn-share.js +0 -161
- package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
- package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
- /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
|
@@ -23,6 +23,7 @@ import { ObjectUrlCache } from '../../../internal/lib/object-url-cache.js';
|
|
|
23
23
|
import { track } from '../../../lib/telemetry.js';
|
|
24
24
|
import { cn } from '../../../lib/utils.js';
|
|
25
25
|
import { AppWindowIcon as AppWindow, CaretDownIcon as ChevronDown, FileTextIcon as FileText, ImageIcon, PresentationIcon, VideoIcon, } from '@phosphor-icons/react';
|
|
26
|
+
import { chalkColors } from '../../../_vendor/kortix-shared.js';
|
|
26
27
|
import { useEffect, useState } from 'react';
|
|
27
28
|
import { deliverableKindLabel, isScaffoldingOutput } from '../shared/output-priority.js';
|
|
28
29
|
import { groupOutputsByKind, outputKey } from './easy-panel-logic.js';
|
|
@@ -80,11 +81,11 @@ function ImageThumb({ path, callID, name }) {
|
|
|
80
81
|
// `size-4`, like every other leading glyph in this list — the fallback
|
|
81
82
|
// stands where the thumbnail will, so it must not be a smaller mark.
|
|
82
83
|
const Ico = KIND_ICON.image;
|
|
83
|
-
return _jsx(Ico, { className: "text-
|
|
84
|
+
return _jsx(Ico, { className: "text-foreground size-4" });
|
|
84
85
|
}
|
|
85
86
|
return (
|
|
86
87
|
// eslint-disable-next-line @next/next/no-img-element
|
|
87
|
-
_jsx("img", { src: src, alt: name, className: "size-
|
|
88
|
+
_jsx("img", { src: src, alt: name, className: "size-6 rounded-sm object-cover outline outline-1 -outline-offset-1 outline-black/10 dark:outline-white/10" }));
|
|
88
89
|
}
|
|
89
90
|
/**
|
|
90
91
|
* A file gets its real per-extension glyph (the `.md` tile, the `.png` tile) —
|
|
@@ -94,21 +95,27 @@ function ImageThumb({ path, callID, name }) {
|
|
|
94
95
|
* thumbnail (W13): the icon says "picture," the thumb shows which one.
|
|
95
96
|
*/
|
|
96
97
|
function OutputIcon({ output }) {
|
|
97
|
-
const tile = 'flex size-
|
|
98
|
-
/** A quiet ground under the glyph, the same treatment the Context card's
|
|
99
|
-
* `FileList` tiles carry. Without it the leading mark floats and the list
|
|
100
|
-
* loses the left edge the eye reads down. A real thumbnail is its own
|
|
101
|
-
* anchor and fills the whole tile, so it stays bare — a ground under a
|
|
102
|
-
* transparent PNG would read as a backing colour the image doesn't have. */
|
|
103
|
-
const groundedTile = `${tile} bg-muted/70`;
|
|
104
|
-
if (output.kind === 'file') {
|
|
105
|
-
return (_jsx("span", { className: groundedTile, children: getFileIcon(output.name, { className: 'size-4', variant: 'monochrome' }) }));
|
|
106
|
-
}
|
|
98
|
+
const tile = 'flex size-6 shrink-0 items-center justify-center rounded-sm';
|
|
107
99
|
if (output.kind === 'image' && output.path) {
|
|
108
100
|
return (_jsx("span", { className: tile, children: _jsx(ImageThumb, { path: output.path, callID: output.callID, name: output.name }) }));
|
|
109
101
|
}
|
|
102
|
+
// The chalk tile Drive uses for a file type: one stable color per extension
|
|
103
|
+
// (or per kind, for an app or generated media), the glyph in its ink. A list
|
|
104
|
+
// of eight outputs reads by color before a single name is read.
|
|
110
105
|
const Ico = KIND_ICON[output.kind];
|
|
111
|
-
return (_jsx(
|
|
106
|
+
return (_jsx(ChalkTile, { label: chalkLabel(output), children: output.kind === 'file' ? (getFileIcon(output.name, { className: 'size-3.5', variant: 'monochrome' })) : (_jsx(Ico, { className: "size-3.5" })) }));
|
|
107
|
+
}
|
|
108
|
+
/** The chalk key: a file's extension, else its kind. */
|
|
109
|
+
export function chalkLabel(output) {
|
|
110
|
+
if (output.kind === 'file' && output.name.includes('.')) {
|
|
111
|
+
return output.name.slice(output.name.lastIndexOf('.') + 1).toUpperCase();
|
|
112
|
+
}
|
|
113
|
+
return output.kind.toUpperCase();
|
|
114
|
+
}
|
|
115
|
+
/** A 24px chalk tile, fill only (no border); the glyph takes the chalk ink, whatever its own color class. */
|
|
116
|
+
export function ChalkTile({ label, children }) {
|
|
117
|
+
const chalk = chalkColors(label);
|
|
118
|
+
return (_jsx("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm [&_svg]:text-current!", style: { backgroundColor: chalk.background, color: chalk.foreground }, "aria-hidden": true, children: children }));
|
|
112
119
|
}
|
|
113
120
|
/** An output leads somewhere only if there's something to open: a file has a
|
|
114
121
|
* path, a running app has a URL. Media the agent generated may have neither. */
|
|
@@ -132,11 +139,12 @@ const VISIBLE_LIMIT = 8;
|
|
|
132
139
|
* branches render the identical row markup instead of two copies drifting
|
|
133
140
|
* apart. */
|
|
134
141
|
function OutputRow({ output, onOpenOutput, }) {
|
|
142
|
+
const t = useTranslations('sessionUi.panel');
|
|
135
143
|
return (_jsx("li", { className: "flex items-center", children: _jsxs("button", { type: "button", disabled: !isOpenable(output), onClick: () => isOpenable(output) && onOpenOutput(output),
|
|
136
|
-
//
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
className: "hover:bg-accent
|
|
144
|
+
// Compact (~34px): a run can make dozens of outputs, and the chalk
|
|
145
|
+
// tile carries the type, so a row is the tile, the name and at most
|
|
146
|
+
// one state word. The kind label repeated what the tile already says.
|
|
147
|
+
title: `${output.title ?? output.name} · ${deliverableKindLabel(output)}`, className: "hover:bg-accent flex w-full items-center gap-2.5 px-4 py-1.5 text-left transition-[background-color,transform] active:scale-[0.998] disabled:cursor-default", children: [_jsx(OutputIcon, { output: output }), _jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm", children: output.title ?? output.name }), output.fresh === 'new' && (_jsx("span", { className: "text-kortix-green shrink-0 text-xs font-medium", children: t('outputNew') })), output.fresh === 'updated' && (_jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: t('outputUpdated') }))] }) }));
|
|
140
148
|
}
|
|
141
149
|
export function OutputRows({ outputs, onOpenOutput, initialShowAll, }) {
|
|
142
150
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
@@ -154,12 +162,12 @@ export function OutputRows({ outputs, onOpenOutput, initialShowAll, }) {
|
|
|
154
162
|
// `groupOutputsByKind`'s own doc comment) — the collapsed, pre-fold slice
|
|
155
163
|
// stays a flat list, so this is `null` whenever `showAll` is false.
|
|
156
164
|
const groups = showAll ? groupOutputsByKind(visible) : null;
|
|
157
|
-
return (_jsxs(FadedScrollArea, { fadeColor: "from-pane", rootClassName: "h-auto min-h-0 flex-1", className: "overscroll-contain", children: [groups ? (_jsx("div", { className: "flex flex-col gap-0", children: groups.map((group, i) => (_jsxs("div", { children: [_jsx("p", { className: cn('text-muted-foreground px-
|
|
165
|
+
return (_jsxs(FadedScrollArea, { fadeColor: "from-pane", rootClassName: "h-auto min-h-0 flex-1", className: "overscroll-contain", children: [groups ? (_jsx("div", { className: "flex flex-col gap-0", children: groups.map((group, i) => (_jsxs("div", { children: [_jsx("p", { className: cn('text-muted-foreground px-4 pb-1 text-xs font-medium', i > 0 && 'pt-2'), children: group.label }), _jsx("ul", { className: "flex flex-col gap-0", children: group.items.map((o) => (_jsx(OutputRow, { output: o, onOpenOutput: onOpenOutput }, outputKey(o)))) })] }, group.kind))) })) : (_jsx("ul", { className: "flex flex-col gap-0", children: visible.map((o) => (_jsx(OutputRow, { output: o, onOpenOutput: onOpenOutput }, outputKey(o)))) })), hidden > 0 && !showAll && (_jsxs("button", { type: "button", onClick: () => setShowAll(true),
|
|
158
166
|
// Same rhythm and press feedback as the rows above it. `color` rides
|
|
159
167
|
// along in the transition list because this row also lightens its
|
|
160
168
|
// label on hover — `transition-colors` would have swept in
|
|
161
169
|
// border-color and fill with it.
|
|
162
|
-
className: "text-muted-foreground hover:text-foreground hover:bg-accent
|
|
170
|
+
className: "text-muted-foreground hover:text-foreground hover:bg-accent mt-0.5 flex w-full cursor-pointer items-center gap-2.5 px-4 py-1.5 text-left text-sm transition-[background-color,color,transform] active:scale-[0.998]", children: [_jsx("span", { className: "flex size-6 shrink-0 items-center justify-center", children: _jsx(ChevronDown, { className: "size-3.5" }) }), _jsxs("span", { className: "truncate tabular-nums", children: [hidden, " ", tI18nComplete.raw('text187897ce0afc'), " ", hiddenNoun] })] }))] }));
|
|
163
171
|
}
|
|
164
172
|
/**
|
|
165
173
|
* The card header's "download all" affordance (W15). Only worth offering once
|
|
@@ -196,16 +204,5 @@ function DownloadAllAction({ outputs }) {
|
|
|
196
204
|
}
|
|
197
205
|
export function OutputsCard({ outputs, defaultExpanded, onOpenOutput, fill = true, }) {
|
|
198
206
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
199
|
-
return (_jsx(PanelCard, { title: tI18nComplete.raw('texte7ce99764a2d'), count: outputs.length, isEmpty: outputs.length === 0, defaultExpanded: defaultExpanded,
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Soft placeholder art — a stacked-document glyph, matching the reference.
|
|
203
|
-
*
|
|
204
|
-
* Full-alpha `border-border` and `bg-muted/50` for the same reason
|
|
205
|
-
* `ContextArt` (context-card.tsx) carries them: on dark, `--border` at 60%
|
|
206
|
-
* and `--muted` at 30% both resolve to within ~0.03 L of `--card`, which left
|
|
207
|
-
* the frame invisible in exactly the state whose whole job is to be seen.
|
|
208
|
-
*/
|
|
209
|
-
function OutputsArt() {
|
|
210
|
-
return (_jsxs("div", { "aria-hidden": true, className: "border-border bg-muted/50 flex h-16 w-20 items-end justify-center gap-1 rounded-md border p-3", children: [_jsx("span", { className: "bg-muted-foreground/30 h-4 w-1.5 rounded-sm" }), _jsx("span", { className: "bg-muted-foreground/30 h-7 w-1.5 rounded-sm" }), _jsx("span", { className: "bg-muted-foreground/30 h-5 w-1.5 rounded-sm" })] }));
|
|
207
|
+
return (_jsx(PanelCard, { title: tI18nComplete.raw('texte7ce99764a2d'), count: outputs.length, isEmpty: outputs.length === 0, defaultExpanded: defaultExpanded, emptyText: tI18nComplete.raw('textd5f2ad00f99b'), contentClassName: cn('flex min-h-0 flex-col pb-2', !fill && 'max-h-40 overflow-y-auto'), fill: fill, headerAction: _jsx(DownloadAllAction, { outputs: outputs }), children: _jsx(OutputRows, { outputs: outputs, onOpenOutput: onOpenOutput }) }));
|
|
211
208
|
}
|
|
@@ -49,9 +49,7 @@ export interface PanelCardProps {
|
|
|
49
49
|
* card, the rest fixed, is what keeps Context and Preview on screen while
|
|
50
50
|
* Outputs holds two hundred files.
|
|
51
51
|
*
|
|
52
|
-
*
|
|
53
|
-
* container, so a `fill` card's `contentClassName` carries padding only —
|
|
54
|
-
* pass no `border-t` or the card draws two.
|
|
52
|
+
* A `fill` card's `contentClassName` carries padding and scrolling only.
|
|
55
53
|
*/
|
|
56
54
|
fill?: boolean;
|
|
57
55
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
|
-
* `PanelCard` — the reusable Easy-mode
|
|
4
|
+
* `PanelCard` — the reusable Easy-mode section shell (a flat section of the
|
|
5
|
+
* docked cards column; the name predates the flat design). Outputs, Context, Preview
|
|
5
6
|
* and Plan are all this component with different contents.
|
|
6
7
|
*
|
|
7
8
|
* Collapsed and empty, a card is a *promise*: a title, soft placeholder art,
|
|
@@ -16,15 +17,19 @@ import { CountBadge } from '../../../primitives/count-badge.js';
|
|
|
16
17
|
import { Disclosure, DisclosureContent, DisclosureTrigger } from '../../../primitives/disclosure.js';
|
|
17
18
|
import { Empty, EmptyContent, EmptyDescription, EmptyMedia } from '../../../primitives/empty.js';
|
|
18
19
|
import { cn } from '../../../lib/utils.js';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
20
|
+
import { m } from 'motion/react';
|
|
21
|
+
import { useReducedMotion } from '../../../internal/hooks/use-reduced-motion.js';
|
|
21
22
|
import { useState } from 'react';
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
import { CaretRightSolidIcon } from '../../../icons/caret-right-solid.js';
|
|
24
|
+
/** Full-width section header. A flat row, not a card lid: hover is color
|
|
25
|
+
* only. `px-4` is the column's one left edge: the rows below use it too. */
|
|
26
|
+
const HEADER_CLASS = cn('flex min-h-11 w-full items-center justify-between gap-2 px-4 py-2 text-left', 'transition-colors duration-(--duration-fast) ease-out',
|
|
27
|
+
// The same hover fill as the rows below: one hover token per column.
|
|
28
|
+
'hover:bg-accent');
|
|
24
29
|
function CardTitleRow({ title, count, indicator, subtitle, chevron, }) {
|
|
25
30
|
return (_jsxs(_Fragment, { children: [_jsxs("span", { className: "flex min-w-0 flex-col gap-0.5", children: [_jsxs("span", { className: "flex min-w-0 items-baseline gap-1.5", children: [_jsx("span", { className: "text-foreground truncate text-sm font-semibold", children: title }), typeof count === 'number' && count > 0 && (_jsx(CountBadge, { count: count })), indicator && _jsx("span", { className: "flex shrink-0 self-center", children: indicator })] }), subtitle] }), chevron] }));
|
|
26
31
|
}
|
|
27
|
-
export function PanelCard({ title, count, indicator, subtitle, children, emptyArt, emptyText, emptyActions, isEmpty, defaultExpanded = false, contentClassName = '
|
|
32
|
+
export function PanelCard({ title, count, indicator, subtitle, children, emptyArt, emptyText, emptyActions, isEmpty, defaultExpanded = false, contentClassName = 'px-4 pb-4', headerAction, fill = false, }) {
|
|
28
33
|
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
29
34
|
const reduce = useReducedMotion();
|
|
30
35
|
const transition = reduce ? { duration: 0 } : { duration: 0.2, ease: 'easeOut' };
|
|
@@ -37,10 +42,21 @@ export function PanelCard({ title, count, indicator, subtitle, children, emptyAr
|
|
|
37
42
|
if (defaultExpanded)
|
|
38
43
|
setExpanded(true);
|
|
39
44
|
}
|
|
40
|
-
return (
|
|
45
|
+
return (
|
|
46
|
+
// A section of the docked column, not a card: no fill, no radius, no box.
|
|
47
|
+
// Sections divide with one hairline under each, the way the column itself
|
|
48
|
+
// is divided from the chat by one hairline (`panel-chrome.ts`).
|
|
49
|
+
_jsxs(Disclosure, { open: expanded, onOpenChange: setExpanded, className: cn(
|
|
50
|
+
// `last:border-b-0`: dividers sit BETWEEN sections, no stray rule
|
|
51
|
+
// under the last one.
|
|
52
|
+
'text-foreground border-border border-b last:border-b-0', fill ? 'flex min-h-0 flex-col' : 'shrink-0'), transition: transition, children: [_jsx(DisclosureTrigger, { children: _jsx("div", { className: cn(HEADER_CLASS, 'cursor-pointer'), children: _jsx(CardTitleRow, { title: title, count: count, indicator: indicator, subtitle: subtitle, chevron: _jsxs("span", { className: "flex shrink-0 items-center gap-0.5", children: [headerAction && (
|
|
41
53
|
// Isolated from the toggle on both input paths: `stopPropagation`
|
|
42
54
|
// on click covers the mouse/tap case, and on keydown stops the
|
|
43
55
|
// Enter/Space that activates the nested button from *also*
|
|
44
56
|
// bubbling up into the trigger's own Enter/Space handler.
|
|
45
|
-
_jsx("span", { onClick: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), children: headerAction })), _jsx(m.span, { animate: { rotate: expanded ? 90 : 0 }, transition: transition, className: "text-muted-foreground shrink-0", children: _jsx(
|
|
57
|
+
_jsx("span", { onClick: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), children: headerAction })), _jsx(m.span, { animate: { rotate: expanded ? 90 : 0 }, transition: transition, className: "text-muted-foreground shrink-0", children: _jsx(CaretRightSolidIcon, { className: "size-4" }) })] }) }) }) }), _jsx(DisclosureContent, { className: cn(fill && 'flex min-h-0 flex-col'), contentClassName: contentClassName, children: isEmpty && !emptyArt ? (
|
|
58
|
+
// Compact empty: one line in the section's own left edge, plus its
|
|
59
|
+
// action. The illustrated `Empty` below stays for callers that pass
|
|
60
|
+
// art; the session column's sections pass none.
|
|
61
|
+
_jsxs("div", { className: "flex flex-col items-start gap-2 px-4", children: [emptyText && _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: emptyText }), emptyActions] })) : isEmpty ? (_jsxs(Empty, { className: "flex-none gap-3 rounded-none border-none p-0 text-center", children: [emptyArt && _jsx(EmptyMedia, { className: "mb-0", children: emptyArt }), emptyText && _jsx(EmptyDescription, { className: "text-pretty", children: emptyText }), emptyActions && (_jsx(EmptyContent, { className: "w-full max-w-none", children: emptyActions }))] })) : (children) })] }));
|
|
46
62
|
}
|
|
@@ -104,7 +104,7 @@ export function PlanPanelCard({ sessionId }) {
|
|
|
104
104
|
// `block`, not a bare span: `truncate` needs a block box to
|
|
105
105
|
// clip against, and the header column already caps the width.
|
|
106
106
|
'block truncate text-xs', complete ? 'text-muted-foreground' : 'text-foreground/70'), children: label })) : undefined,
|
|
107
|
-
// `px-
|
|
107
|
+
// `px-4` matches the header's own inset, so a step's glyph sits on the
|
|
108
108
|
// same left edge as the title above it.
|
|
109
|
-
contentClassName: "
|
|
109
|
+
contentClassName: "px-4 pb-3", defaultExpanded: true, children: _jsx(PlanSteps, { rows: rows }) }));
|
|
110
110
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Step } from '@kortix/sdk';
|
|
2
2
|
import type { StepFamily } from '@kortix/sdk';
|
|
3
|
-
export declare function StepIcon({ family, status }: {
|
|
3
|
+
export declare function StepIcon({ family, status, tone, }: {
|
|
4
4
|
family: StepFamily;
|
|
5
5
|
status: Step['status'];
|
|
6
|
+
/** A done step's color: muted in the stepper, foreground in the session
|
|
7
|
+
* panel's Context list, where every glyph is foreground. Failed stays red. */
|
|
8
|
+
tone?: 'muted' | 'foreground';
|
|
6
9
|
}): import("react").JSX.Element;
|
|
@@ -37,12 +37,12 @@ const FAMILY_ICON = {
|
|
|
37
37
|
retired: Archive,
|
|
38
38
|
other: Wrench,
|
|
39
39
|
};
|
|
40
|
-
export function StepIcon({ family, status }) {
|
|
40
|
+
export function StepIcon({ family, status, tone = 'muted', }) {
|
|
41
41
|
const Glyph = FAMILY_ICON[family] ?? Wrench;
|
|
42
42
|
// A running step is the one thing the eye must find without reading. Keep the
|
|
43
43
|
// pulse it had as a dot, now wrapped around the glyph itself.
|
|
44
44
|
if (status === 'running') {
|
|
45
45
|
return (_jsxs("span", { className: "relative flex size-4 shrink-0 items-center justify-center", children: [_jsx("span", { className: "bg-kortix-green/25 absolute inline-flex size-4 animate-ping rounded-full motion-reduce:animate-none" }), _jsx(Glyph, { className: "text-kortix-green relative size-4" })] }));
|
|
46
46
|
}
|
|
47
|
-
return (_jsx(Glyph, { className: cn('size-4 shrink-0', status === 'error' ? 'text-kortix-red' : 'text-muted-foreground') }));
|
|
47
|
+
return (_jsx(Glyph, { className: cn('size-4 shrink-0', status === 'error' ? 'text-kortix-red' : tone === 'foreground' ? 'text-foreground' : 'text-muted-foreground') }));
|
|
48
48
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/** Width bounds, in px. The chat keeps at least the rest of the row. */
|
|
2
|
+
export declare const ACTION_PANEL_DEFAULT_WIDTH = 340;
|
|
3
|
+
export declare const ACTION_PANEL_MIN_WIDTH = 280;
|
|
4
|
+
export declare const ACTION_PANEL_MAX_WIDTH = 560;
|
|
5
|
+
export declare function clampActionPanelWidth(width: number, max?: number): number;
|
|
1
6
|
export declare function SessionActionPanelColumn({
|
|
2
7
|
/**
|
|
3
8
|
* Own the ⌘I / Ctrl+I binding. False for the instant boot shell: it and the
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
|
-
* The action panel column — the Outputs/Context/Preview
|
|
5
|
-
*
|
|
4
|
+
* The action panel column — the Outputs/Context/Preview sections as a docked
|
|
5
|
+
* pane beside the chat.
|
|
6
6
|
*
|
|
7
7
|
* IN FLOW, never an overlay. It sits beside the chat as a sibling, so opening
|
|
8
8
|
* it takes width away from the transcript and the chat re-centers itself in
|
|
9
|
-
* what is left.
|
|
10
|
-
* and covered it; this one moves it.
|
|
9
|
+
* what is left.
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* Docked, not floating. One hairline (`border-l`) separates it from the chat
|
|
12
|
+
* and it runs the full height of the body, under the session header's rule.
|
|
13
|
+
* The sections inside are flat rows divided by hairlines (`easy/panel-card.tsx`).
|
|
14
|
+
* No card, radius or shadow: the brand rule for an in-flow surface
|
|
15
|
+
* (`effects.md`), and the look of a docked pane.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Resizable. The left edge is a drag handle (pointer and arrow keys); the width
|
|
18
|
+
* persists per browser. Double-click the edge to reset it.
|
|
19
|
+
*
|
|
20
|
+
* Its toggle lives in the session header (`session-site-header.tsx`), beside
|
|
21
|
+
* the other panel controls, never as a rail over the chat.
|
|
19
22
|
*
|
|
20
23
|
* It toggles ONLY itself. Opening it never opens the right-hand detail panel;
|
|
21
24
|
* that surface is content-driven and opens when something gives it a detail to
|
|
@@ -30,53 +33,179 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
30
33
|
* "toggle the right side", which is `toggleRightPanel` in the store: close
|
|
31
34
|
* whatever is docked there — this column, a detail panel, or both — and, when
|
|
32
35
|
* nothing is, reopen what this session was last showing, falling back to this
|
|
33
|
-
* column. One key for one visual region.
|
|
34
|
-
* the session and the key is back to opening this column.
|
|
36
|
+
* column. One key for one visual region.
|
|
35
37
|
*
|
|
36
38
|
* The binding lives on this component only because this is the surface that is
|
|
37
39
|
* always mounted for a session (the detail panel is content-driven and may
|
|
38
40
|
* have nothing to render). It stays mounted while `hidden` under a detail,
|
|
39
41
|
* which is what lets the key close that detail.
|
|
40
|
-
*
|
|
41
|
-
* The chevron is unaffected: it is this column's own control, so it toggles
|
|
42
|
-
* this column and nothing else.
|
|
43
42
|
*/
|
|
44
|
-
import Hint from '../../primitives/hint.js';
|
|
45
|
-
import { Kbd, KbdGroup } from '../../primitives/kbd.js';
|
|
46
43
|
import { ActionPanel } from './action-panel.js';
|
|
47
44
|
import { useOptionalSessionPanel } from './session-panel-provider.js';
|
|
48
45
|
import { useIsMobile } from '../../internal/hooks/index.js';
|
|
49
46
|
import { cn } from '../../lib/utils.js';
|
|
50
|
-
import {
|
|
47
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
48
|
+
import { RESIZE_SEAM_CLASS } from '../../primitives/resize-seam.js';
|
|
49
|
+
import { useIsActionPanelOpen, useIsSidePanelOpen, useToggleRightPanel, } from '../../internal/stores/kortix-computer-store.js';
|
|
51
50
|
import { useTabStore } from '../../internal/stores/tab-store.js';
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import { useEffect } from 'react';
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
const
|
|
51
|
+
import { m } from 'motion/react';
|
|
52
|
+
import { useReducedMotion } from '../../internal/hooks/use-reduced-motion.js';
|
|
53
|
+
import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore, } from 'react';
|
|
54
|
+
/** Width bounds, in px. The chat keeps at least the rest of the row. */
|
|
55
|
+
export const ACTION_PANEL_DEFAULT_WIDTH = 340;
|
|
56
|
+
export const ACTION_PANEL_MIN_WIDTH = 280;
|
|
57
|
+
export const ACTION_PANEL_MAX_WIDTH = 560;
|
|
58
|
+
/** One arrow-key step on the resize edge. */
|
|
59
|
+
const KEY_STEP = 16;
|
|
60
|
+
const WIDTH_STORAGE_KEY = 'kortix:session-action-panel-width';
|
|
61
|
+
export function clampActionPanelWidth(width, max = ACTION_PANEL_MAX_WIDTH) {
|
|
62
|
+
if (!Number.isFinite(width))
|
|
63
|
+
return ACTION_PANEL_DEFAULT_WIDTH;
|
|
64
|
+
return Math.round(Math.min(max, Math.max(ACTION_PANEL_MIN_WIDTH, width)));
|
|
65
|
+
}
|
|
61
66
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
* The width on screen and the widest it may go right now, read from the DOM.
|
|
68
|
+
* The column is capped at half its row (`max-w-[50cqw]`), so on a narrow
|
|
69
|
+
* window the visible width is below the stored one. A resize must start from
|
|
70
|
+
* what the user sees, or the edge does not follow the pointer until the drag
|
|
71
|
+
* passes the stored width.
|
|
72
|
+
*/
|
|
73
|
+
function liveBounds(handle) {
|
|
74
|
+
const column = handle.parentElement;
|
|
75
|
+
const row = column?.parentElement;
|
|
76
|
+
const rendered = column?.getBoundingClientRect().width ?? ACTION_PANEL_DEFAULT_WIDTH;
|
|
77
|
+
const max = row
|
|
78
|
+
? Math.min(ACTION_PANEL_MAX_WIDTH, Math.floor(row.getBoundingClientRect().width / 2))
|
|
79
|
+
: ACTION_PANEL_MAX_WIDTH;
|
|
80
|
+
return { rendered, max };
|
|
81
|
+
}
|
|
82
|
+
function readStoredWidth() {
|
|
83
|
+
try {
|
|
84
|
+
const raw = window.localStorage.getItem(WIDTH_STORAGE_KEY);
|
|
85
|
+
return raw ? clampActionPanelWidth(Number(raw)) : ACTION_PANEL_DEFAULT_WIDTH;
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
return ACTION_PANEL_DEFAULT_WIDTH;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/** Same-tab writers notify through this event; other tabs through `storage`. */
|
|
92
|
+
const WIDTH_EVENT = 'kortix:session-action-panel-width';
|
|
93
|
+
/** Set only while storage writes fail, so a resize still lasts for this page.
|
|
94
|
+
* A working store stays the source of truth, which keeps other tabs' writes
|
|
95
|
+
* (the `storage` event) visible here. */
|
|
96
|
+
let memoryWidth = null;
|
|
97
|
+
function writeStoredWidth(width) {
|
|
98
|
+
try {
|
|
99
|
+
window.localStorage.setItem(WIDTH_STORAGE_KEY, String(width));
|
|
100
|
+
memoryWidth = null;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
memoryWidth = width;
|
|
104
|
+
}
|
|
105
|
+
window.dispatchEvent(new Event(WIDTH_EVENT));
|
|
106
|
+
}
|
|
107
|
+
function subscribeStoredWidth(onChange) {
|
|
108
|
+
const onStorage = (e) => {
|
|
109
|
+
if (e.key === WIDTH_STORAGE_KEY)
|
|
110
|
+
onChange();
|
|
111
|
+
};
|
|
112
|
+
window.addEventListener(WIDTH_EVENT, onChange);
|
|
113
|
+
window.addEventListener('storage', onStorage);
|
|
114
|
+
return () => {
|
|
115
|
+
window.removeEventListener(WIDTH_EVENT, onChange);
|
|
116
|
+
window.removeEventListener('storage', onStorage);
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
const getStoredWidth = () => memoryWidth ?? readStoredWidth();
|
|
120
|
+
// The server has no storage: it renders the default, and the client swaps in
|
|
121
|
+
// the stored width after hydration without a mismatch.
|
|
122
|
+
const getServerWidth = () => ACTION_PANEL_DEFAULT_WIDTH;
|
|
123
|
+
/**
|
|
124
|
+
* The column's width, plus a drag/keyboard handle for its left edge. The edge
|
|
125
|
+
* sits on the column's LEFT, so dragging left (a smaller clientX) widens it.
|
|
126
|
+
*/
|
|
127
|
+
function useActionPanelWidth() {
|
|
128
|
+
const storedWidth = useSyncExternalStore(subscribeStoredWidth, getStoredWidth, getServerWidth);
|
|
129
|
+
// The live width while a drag is in flight; storage is written once, on drop.
|
|
130
|
+
const [dragWidth, setDragWidth] = useState(null);
|
|
131
|
+
const drag = useRef(null);
|
|
132
|
+
const width = dragWidth ?? storedWidth;
|
|
133
|
+
const dragging = dragWidth !== null;
|
|
134
|
+
const commit = useCallback((next, max) => {
|
|
135
|
+
writeStoredWidth(clampActionPanelWidth(next, max));
|
|
136
|
+
}, []);
|
|
137
|
+
const onPointerDown = useCallback((e) => {
|
|
138
|
+
if (e.button !== 0)
|
|
139
|
+
return;
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
142
|
+
const { rendered, max } = liveBounds(e.currentTarget);
|
|
143
|
+
const start = clampActionPanelWidth(rendered, max);
|
|
144
|
+
drag.current = { startX: e.clientX, startWidth: start, max, last: start, moved: false };
|
|
145
|
+
setDragWidth(start);
|
|
146
|
+
}, []);
|
|
147
|
+
const onPointerMove = useCallback((e) => {
|
|
148
|
+
const start = drag.current;
|
|
149
|
+
if (!start)
|
|
150
|
+
return;
|
|
151
|
+
const next = clampActionPanelWidth(start.startWidth + (start.startX - e.clientX), start.max);
|
|
152
|
+
start.last = next;
|
|
153
|
+
if (e.clientX !== start.startX)
|
|
154
|
+
start.moved = true;
|
|
155
|
+
setDragWidth(next);
|
|
156
|
+
}, []);
|
|
157
|
+
const onPointerEnd = useCallback((e) => {
|
|
158
|
+
const ended = drag.current;
|
|
159
|
+
if (!ended)
|
|
160
|
+
return;
|
|
161
|
+
drag.current = null;
|
|
162
|
+
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
|
163
|
+
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
164
|
+
}
|
|
165
|
+
// Saved from the ref, not from render state: the last move may not have
|
|
166
|
+
// rendered yet when the pointer lifts.
|
|
167
|
+
if (ended.moved)
|
|
168
|
+
commit(ended.last);
|
|
169
|
+
setDragWidth(null);
|
|
170
|
+
}, [commit]);
|
|
171
|
+
const onKeyDown = useCallback((e) => {
|
|
172
|
+
const step = e.shiftKey ? KEY_STEP * 4 : KEY_STEP;
|
|
173
|
+
const { rendered, max } = liveBounds(e.currentTarget);
|
|
174
|
+
if (e.key === 'ArrowLeft')
|
|
175
|
+
commit(rendered + step, max);
|
|
176
|
+
else if (e.key === 'ArrowRight')
|
|
177
|
+
commit(rendered - step, max);
|
|
178
|
+
else if (e.key === 'Home')
|
|
179
|
+
commit(max, max);
|
|
180
|
+
else if (e.key === 'End')
|
|
181
|
+
commit(ACTION_PANEL_MIN_WIDTH, max);
|
|
182
|
+
else
|
|
183
|
+
return;
|
|
184
|
+
e.preventDefault();
|
|
185
|
+
}, [commit]);
|
|
186
|
+
const onDoubleClick = useCallback(() => commit(ACTION_PANEL_DEFAULT_WIDTH), [commit]);
|
|
187
|
+
return {
|
|
188
|
+
width,
|
|
189
|
+
dragging,
|
|
190
|
+
handleProps: {
|
|
191
|
+
onPointerDown,
|
|
192
|
+
onPointerMove,
|
|
193
|
+
onPointerUp: onPointerEnd,
|
|
194
|
+
onPointerCancel: onPointerEnd,
|
|
195
|
+
onKeyDown,
|
|
196
|
+
onDoubleClick,
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Motion. Pushing the chat aside IS a layout change, so the width animates —
|
|
202
|
+
* one 200ms one-shot on an explicit toggle, on a single element. Ease-out,
|
|
203
|
+
* 200ms in, 160ms out. A drag never animates: the edge follows the pointer.
|
|
70
204
|
*/
|
|
71
|
-
/** Collapsed, the column is only the chevron: `size-7` + `mr-1` + the `gap-2`
|
|
72
|
-
* before the zero-width panel = 10 spacing tokens (`--spacing: 0.23rem`). A
|
|
73
|
-
* negative margin of the same size cancels it, so the chat centers on the
|
|
74
|
-
* full row width and the chevron sits over its right edge. Kept in rem so
|
|
75
|
-
* motion can interpolate it against `0rem`. */
|
|
76
|
-
const COLLAPSED_RAIL_OFFSET = '-2.3rem';
|
|
77
205
|
const EASE_OUT = [0.23, 1, 0.32, 1];
|
|
78
206
|
const ENTER = { duration: 0.2, ease: EASE_OUT };
|
|
79
207
|
const EXIT = { duration: 0.16, ease: EASE_OUT };
|
|
208
|
+
const INSTANT = { duration: 0 };
|
|
80
209
|
export function SessionActionPanelColumn({
|
|
81
210
|
/**
|
|
82
211
|
* Own the ⌘I / Ctrl+I binding. False for the instant boot shell: it and the
|
|
@@ -86,19 +215,19 @@ export function SessionActionPanelColumn({
|
|
|
86
215
|
* shell yields it; the surface that outlives the fade keeps it.
|
|
87
216
|
*/
|
|
88
217
|
hotkey = true, } = {}) {
|
|
218
|
+
const t = useTranslations('sessionUi.panel');
|
|
89
219
|
const panel = useOptionalSessionPanel();
|
|
90
220
|
const isMobile = useIsMobile();
|
|
91
221
|
const isOpen = useIsActionPanelOpen();
|
|
92
|
-
// The chevron's own action — it is this column's control, so it moves this
|
|
93
|
-
// column and nothing else.
|
|
94
|
-
const toggle = useToggleActionPanel();
|
|
95
222
|
// ⌘I's action — the whole right side, whichever surface is docked there.
|
|
96
223
|
const toggleRight = useToggleRightPanel();
|
|
97
|
-
const readyChip = useReadyChip();
|
|
98
224
|
const reduce = useReducedMotion();
|
|
225
|
+
const { width, dragging, handleProps } = useActionPanelWidth();
|
|
226
|
+
// Built once: a drag re-renders this column on every pointer move, and the
|
|
227
|
+
// sections (Outputs can hold hundreds of rows) must not re-render with it.
|
|
228
|
+
const sections = useMemo(() => _jsx(ActionPanel, {}), []);
|
|
99
229
|
// The right-hand detail panel is showing a browser, a terminal, a file
|
|
100
|
-
// explorer or a file preview.
|
|
101
|
-
// this flag is true exactly when one of those is on screen.
|
|
230
|
+
// explorer or a file preview.
|
|
102
231
|
const detailPanelOpen = useIsSidePanelOpen();
|
|
103
232
|
const sessionId = panel?.sessionId;
|
|
104
233
|
const isInTabSystem = useTabStore((s) => (sessionId ? !!s.tabs[sessionId] : false));
|
|
@@ -112,11 +241,8 @@ hotkey = true, } = {}) {
|
|
|
112
241
|
const onKey = (e) => {
|
|
113
242
|
if ((e.metaKey || e.ctrlKey) && (e.key === 'i' || e.key === 'I')) {
|
|
114
243
|
e.preventDefault();
|
|
115
|
-
// NOT
|
|
116
|
-
// the
|
|
117
|
-
// detail panel (browser, terminal, files, a preview) with no keyboard
|
|
118
|
-
// close at all, and pressing ⌘I under one silently moved a column the
|
|
119
|
-
// detail was covering.
|
|
244
|
+
// NOT the column's own toggle — see this file's header. The key owns
|
|
245
|
+
// the right side, so it also closes a detail panel.
|
|
120
246
|
toggleRight();
|
|
121
247
|
}
|
|
122
248
|
};
|
|
@@ -135,56 +261,27 @@ hotkey = true, } = {}) {
|
|
|
135
261
|
}, [shouldHandleHotkey, toggleRight]);
|
|
136
262
|
// No provider means no panel to render: `SessionChat` also renders read-only
|
|
137
263
|
// inside `legacy-subagent-chat.tsx`, outside `SessionLayout`. Mobile has no
|
|
138
|
-
// column either — at 375px a side column is the whole screen, so the
|
|
139
|
-
// stay in the bottom drawer
|
|
264
|
+
// column either — at 375px a side column is the whole screen, so the
|
|
265
|
+
// sections stay in the bottom drawer.
|
|
140
266
|
if (!panel || isMobile)
|
|
141
267
|
return null;
|
|
142
|
-
const showReadyDot = readyChip?.sessionId === sessionId && !isOpen;
|
|
143
|
-
const label = isOpen ? 'Collapse pane' : 'Expand pane';
|
|
144
268
|
return (
|
|
145
|
-
// The
|
|
146
|
-
//
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
//
|
|
150
|
-
|
|
151
|
-
//
|
|
152
|
-
|
|
153
|
-
//
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
// purpose: `isActionPanelOpen` is never written here, so closing the
|
|
164
|
-
// detail brings the column back exactly as the user left it. The two
|
|
165
|
-
// states stay independent — only what is PAINTED depends on both.
|
|
166
|
-
detailPanelOpen && 'hidden'), "data-testid": "session-action-panel", children: [_jsx(Hint, { side: "left", sideOffset: 4, delayDuration: 300, label: _jsxs("span", { className: "flex items-center gap-1.5", children: [label, _jsxs(KbdGroup, { children: [_jsx(Kbd, { className: "font-mono", children: modSymbol }), _jsx(Kbd, { className: "font-mono", children: "I" })] })] }), children: _jsx("button", { type: "button", "aria-label": label, "aria-expanded": isOpen, onClick: toggle, className: cn('flex size-7 shrink-0 items-center justify-center rounded-md', 'text-foreground/80 hover:text-foreground hover:bg-accent', 'transition-[color,background-color,transform,opacity] duration-150 ease-out active:scale-[0.96]',
|
|
167
|
-
// Expanded, the collapse control steps out of the way: the cards
|
|
168
|
-
// are the content, and a permanently visible chevron beside them is
|
|
169
|
-
// chrome the user has already read. Hovering anywhere in the column
|
|
170
|
-
// brings it back, as does tabbing to it.
|
|
171
|
-
//
|
|
172
|
-
// `pointer-events-none` rides WITH the fade, deliberately. Opacity
|
|
173
|
-
// zero still occupies space AND still receives pointer events, so a
|
|
174
|
-
// faded-out button stays clickable — an invisible hit target pinned
|
|
175
|
-
// against the panel's edge. (This is the opacity/visibility
|
|
176
|
-
// distinction: `visibility: hidden` would drop interaction for us,
|
|
177
|
-
// but it is not animatable, and the fade is the point.) Both are
|
|
178
|
-
// restored together on reveal. Focus is unaffected by
|
|
179
|
-
// `pointer-events`, so the keyboard path still reaches it.
|
|
180
|
-
isOpen
|
|
181
|
-
? 'pointer-events-none opacity-0 group-hover/panel:pointer-events-auto group-hover/panel:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100'
|
|
182
|
-
: 'pointer-events-auto mr-1'), children: _jsx("span", { className: "relative inline-flex", children: isOpen ? (_jsx(CaretDoubleRightIcon, { className: "size-4" })) : (_jsx(CaretDoubleLeftIcon, { className: "size-4" })) }) }) }), _jsx(m.div, { initial: false, animate: { width: isOpen ? PANEL_WIDTH : 0 }, transition: reduce ? { duration: 0 } : isOpen ? ENTER : EXIT, "aria-hidden": !isOpen, inert: !isOpen || undefined,
|
|
183
|
-
// `self-stretch` against the column's `items-start`: the cards inside
|
|
184
|
-
// divide the available height between them, and "available" has to be
|
|
185
|
-
// a real number for that to mean anything. Left at `items-start` this
|
|
186
|
-
// box was only as tall as its content, so `h-full` further down
|
|
187
|
-
// resolved against nothing and every card fell back to its natural
|
|
188
|
-
// height — the stack the panel used to be.
|
|
189
|
-
className: "min-h-0 self-stretch overflow-hidden", children: _jsx("div", { className: "scrollbar-minimal h-full overflow-y-auto overscroll-contain pr-3", style: { width: PANEL_WIDTH }, children: _jsx(ActionPanel, {}) }) })] }));
|
|
269
|
+
// The width animates; the content inside is pinned to the open width, so
|
|
270
|
+
// the sections slide into view instead of reflowing on every frame.
|
|
271
|
+
_jsxs(m.div, { initial: false, animate: { width: isOpen ? width : 0 }, transition: reduce || dragging ? INSTANT : isOpen ? ENTER : EXIT, "aria-hidden": !isOpen, inert: !isOpen || undefined, className: cn(
|
|
272
|
+
// Never more than half the body row (`SessionBodyRow` is the
|
|
273
|
+
// container): on a narrow window the chat keeps the other half.
|
|
274
|
+
'relative z-10 min-h-0 max-w-[50cqw] shrink-0 self-stretch',
|
|
275
|
+
// A detail panel is showing on the right: the column steps aside, so
|
|
276
|
+
// the session is the chat plus the one thing being looked at. `hidden`,
|
|
277
|
+
// not an unmount, so the sections keep their expanded state.
|
|
278
|
+
detailPanelOpen && 'hidden'), "data-testid": "session-action-panel", children: [isOpen && (
|
|
279
|
+
// The resize edge: zero-width over the column's `border-l`, with a
|
|
280
|
+
// 12px hit strip. Hover, focus and drag light the shared resize seam.
|
|
281
|
+
_jsx("div", { role: "separator", "aria-orientation": "vertical", "aria-label": t('resizePane'), "aria-valuemin": ACTION_PANEL_MIN_WIDTH, "aria-valuemax": ACTION_PANEL_MAX_WIDTH, "aria-valuenow": width, tabIndex: 0, "data-dragging": dragging || undefined, className: cn('absolute inset-y-0 -left-1.5 z-20 w-3 cursor-col-resize touch-none outline-none', RESIZE_SEAM_CLASS, 'hover:before:opacity-100 focus-visible:before:opacity-100 data-[dragging]:before:opacity-100'), ...handleProps })), _jsx("div", { className: "h-full overflow-hidden", children: _jsx("div", { className: cn(
|
|
282
|
+
// The same cap as the column, so a capped column still shows its
|
|
283
|
+
// sections whole instead of clipping their right edge.
|
|
284
|
+
'border-border bg-background scrollbar-minimal h-full max-w-[50cqw] overflow-y-auto overscroll-contain border-l',
|
|
285
|
+
// A drag must not select transcript text under the pointer.
|
|
286
|
+
dragging && 'select-none'), style: { width }, "data-review-scroll": true, children: sections }) })] }));
|
|
190
287
|
}
|