@kortix/ui 0.14.8 → 0.14.10
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 +2 -2
- package/dist/_vendor/kortix-shared.js +116 -3
- package/dist/_vendor/shared/app-config.d.ts +175 -0
- package/dist/_vendor/shared/artifact-comments.d.ts +235 -0
- package/dist/_vendor/shared/channel-descriptors.d.ts +96 -0
- package/dist/_vendor/shared/channel-message.d.ts +45 -5
- package/dist/_vendor/shared/index.d.ts +2 -0
- package/dist/_vendor/shared/space-slug.d.ts +37 -0
- package/dist/access/access/access-detail-shell.js +1 -1
- package/dist/access/access/principal-picker.d.ts +11 -0
- package/dist/access/access/principal-picker.js +3 -2
- package/dist/apps/app-preview-pool.d.ts +7 -2
- package/dist/apps/app-preview-pool.js +30 -7
- package/dist/apps/app-shared.d.ts +22 -15
- package/dist/apps/app-shared.js +37 -19
- package/dist/apps/index.d.ts +2 -2
- package/dist/apps/index.js +2 -2
- package/dist/artifacts/artifact-frame.d.ts +16 -0
- package/dist/artifacts/artifact-frame.js +55 -0
- package/dist/artifacts/artifact-session.d.ts +18 -0
- package/dist/artifacts/artifact-session.js +101 -0
- package/dist/artifacts/frame-policy.d.ts +30 -0
- package/dist/artifacts/frame-policy.js +61 -0
- package/dist/artifacts/index.d.ts +3 -0
- package/dist/artifacts/index.js +5 -0
- package/dist/browser/sandbox-browser-chrome.d.ts +4 -1
- package/dist/browser/sandbox-browser-chrome.js +2 -2
- package/dist/customize/agents/agent-grant-pages.d.ts +5 -1
- package/dist/customize/agents/agent-grant-pages.js +30 -4
- package/dist/customize/agents/agent-page.js +3 -1
- package/dist/customize/agents/agent-policy-sets.d.ts +43 -0
- package/dist/customize/agents/agent-policy-sets.js +72 -0
- package/dist/customize/agents/agent-triggers-section.js +2 -1
- package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.d.ts +6 -1
- package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.js +10 -4
- package/dist/customize/connectors/agent-access.d.ts +35 -0
- package/dist/customize/connectors/agent-access.js +77 -0
- package/dist/customize/connectors/catalog/browse-sections.d.ts +2 -29
- package/dist/customize/connectors/catalog/browse-sections.js +7 -74
- package/dist/customize/connectors/catalog/catalog-entry.d.ts +18 -37
- package/dist/customize/connectors/catalog/catalog-entry.js +28 -40
- package/dist/customize/connectors/catalog/connector-browse.d.ts +3 -32
- package/dist/customize/connectors/catalog/connector-browse.js +19 -50
- package/dist/customize/connectors/catalog/use-catalog.d.ts +20 -59
- package/dist/customize/connectors/catalog/use-catalog.js +48 -175
- package/dist/customize/connectors/connector-identity.d.ts +9 -11
- package/dist/customize/connectors/connector-identity.js +13 -42
- package/dist/customize/connectors/connector-moves-banner.d.ts +2 -1
- package/dist/customize/connectors/connector-moves-banner.js +4 -6
- package/dist/customize/connectors/connector-routes.d.ts +21 -9
- package/dist/customize/connectors/connector-routes.js +29 -20
- package/dist/customize/connectors/connectors-page.js +53 -82
- package/dist/customize/connectors/detail/app-page.js +226 -98
- package/dist/customize/connectors/detail/computer-app-page.d.ts +16 -0
- package/dist/customize/connectors/detail/computer-app-page.js +39 -0
- package/dist/customize/connectors/detail/connector-accounts.js +3 -1
- package/dist/customize/connectors/detail/connector-advanced-tools.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-advanced-tools.js +2 -2
- package/dist/customize/connectors/detail/connector-agents.d.ts +14 -0
- package/dist/customize/connectors/detail/connector-agents.js +69 -0
- package/dist/customize/connectors/detail/connector-detail-tabs.js +2 -1
- package/dist/customize/connectors/detail/connector-move-row.d.ts +8 -5
- package/dist/customize/connectors/detail/connector-move-row.js +23 -14
- package/dist/customize/connectors/detail/connector-page.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-page.js +14 -10
- package/dist/customize/connectors/detail/connector-policy-sets.d.ts +28 -0
- package/dist/customize/connectors/detail/connector-policy-sets.js +203 -0
- package/dist/customize/connectors/detail/connector-settings.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-settings.js +7 -3
- package/dist/customize/connectors/detail/connector-status.d.ts +19 -6
- package/dist/customize/connectors/detail/connector-status.js +34 -10
- package/dist/customize/connectors/detail/connector-tabs.d.ts +4 -1
- package/dist/customize/connectors/detail/connector-tabs.js +8 -2
- package/dist/customize/connectors/detail/connector-tools.d.ts +3 -3
- package/dist/customize/connectors/detail/connector-tools.js +105 -48
- package/dist/customize/connectors/detail/email-inboxes.d.ts +43 -0
- package/dist/customize/connectors/detail/email-inboxes.js +184 -0
- package/dist/customize/connectors/detail/provider-info.d.ts +1 -1
- package/dist/customize/connectors/detail/provider-info.js +2 -2
- package/dist/customize/connectors/detail/status-badge.d.ts +1 -1
- package/dist/customize/connectors/detail/status-badge.js +4 -5
- package/dist/customize/connectors/detail/use-connector-detail.d.ts +6 -0
- package/dist/customize/connectors/detail/use-connector-detail.js +14 -4
- package/dist/customize/connectors/install/install-dialog.d.ts +23 -0
- package/dist/customize/connectors/install/install-dialog.js +40 -0
- package/dist/customize/connectors/install/install.d.ts +13 -2
- package/dist/customize/connectors/install/install.js +9 -4
- package/dist/customize/connectors/install/use-install.d.ts +19 -2
- package/dist/customize/connectors/install/use-install.js +65 -37
- package/dist/customize/connectors/install/way-kind.d.ts +5 -0
- package/dist/customize/connectors/install/way-kind.js +16 -0
- package/dist/customize/connectors/provider-label.d.ts +2 -1
- package/dist/customize/connectors/provider-label.js +13 -3
- package/dist/customize/connectors/tools/pattern-rule-draft.d.ts +4 -0
- package/dist/customize/connectors/tools/pattern-rule-draft.js +12 -3
- package/dist/customize/connectors/tools/policy-sets.d.ts +27 -0
- package/dist/customize/connectors/tools/policy-sets.js +41 -0
- package/dist/customize/connectors/tools/tool-groups.d.ts +32 -9
- package/dist/customize/connectors/tools/tool-groups.js +78 -16
- package/dist/customize/connectors/tools/tool-policy-control.d.ts +11 -10
- package/dist/customize/connectors/tools/tool-policy-control.js +15 -16
- package/dist/customize/connectors/tools/tool-policy-labels.d.ts +6 -5
- package/dist/customize/connectors/tools/tool-policy-labels.js +17 -16
- package/dist/customize/connectors/tools/tool-policy.d.ts +50 -4
- package/dist/customize/connectors/tools/tool-policy.js +74 -8
- package/dist/customize/connectors/use-agent-access.d.ts +85 -0
- package/dist/customize/connectors/use-agent-access.js +72 -0
- package/dist/customize/migrate-to-v2/index.d.ts +1 -2
- package/dist/customize/migrate-to-v2/index.js +1 -2
- package/dist/customize/migrate-to-v2/migration-prompt.d.ts +12 -25
- package/dist/customize/migrate-to-v2/migration-prompt.js +34 -236
- package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +1 -1
- package/dist/customize/migrate-to-v2/upgrade-defs.js +7 -6
- package/dist/customize/migrate-to-v2/upgrade-view.js +7 -7
- package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +3 -3
- package/dist/customize/providers/provider-accordion.js +17 -2
- package/dist/customize/sections/component/channel-access-panel.d.ts +16 -0
- package/dist/customize/sections/component/channel-access-panel.js +146 -0
- package/dist/customize/sections/component/channel-connect-hero.d.ts +3 -2
- package/dist/customize/sections/component/channel-connect-hero.js +3 -2
- package/dist/customize/sections/component/channel-hero-frame.d.ts +31 -0
- package/dist/customize/sections/component/channel-hero-frame.js +40 -0
- package/dist/customize/sections/component/channel-mocks.d.ts +6 -0
- package/dist/customize/sections/component/channel-mocks.js +46 -0
- package/dist/customize/sections/component/channel-row.d.ts +13 -3
- package/dist/customize/sections/component/channel-row.js +10 -4
- package/dist/customize/sections/component/email-connect-form.d.ts +27 -0
- package/dist/customize/sections/component/email-connect-form.js +183 -0
- package/dist/customize/sections/component/slack-connect-card.d.ts +7 -0
- package/dist/customize/sections/component/slack-connect-card.js +2 -3
- package/dist/customize/sections/component/teams-connect-card.d.ts +7 -0
- package/dist/customize/sections/component/teams-connect-card.js +2 -3
- package/dist/customize/sections/component/telegram-channel-row.js +21 -28
- package/dist/customize/sections/connectors-view.d.ts +1 -15
- package/dist/customize/sections/connectors-view.js +81 -314
- package/dist/customize/sections/view/agent-editor-catalog.js +10 -0
- package/dist/customize/sections/view/channels-view.d.ts +6 -1
- package/dist/customize/sections/view/channels-view.js +72 -81
- package/dist/customize/sections/view/gateway/gateway-overview.js +10 -2
- package/dist/customize/settings/rail.js +9 -0
- package/dist/customize/settings/settings-tabs.d.ts +1 -1
- package/dist/customize/settings/settings-tabs.js +1 -0
- package/dist/customize/settings/tabs/chrome-connections-tab.d.ts +6 -0
- package/dist/customize/settings/tabs/chrome-connections-tab.js +99 -0
- package/dist/customize/settings/tabs/experimental-tab.js +35 -16
- package/dist/customize/shared/catalog/catalog-empty-state.d.ts +4 -15
- package/dist/customize/shared/catalog/catalog-empty-state.js +9 -7
- package/dist/customize/shared/channels-switch-dialog.d.ts +18 -0
- package/dist/customize/shared/channels-switch-dialog.js +30 -0
- package/dist/customize/shared/feature-gate-screen.js +27 -9
- package/dist/customize/shared/use-customize-prefetch.d.ts +2 -3
- package/dist/customize/shared/use-customize-prefetch.js +9 -27
- package/dist/customize/triggers/schedule/post-to-field.d.ts +18 -0
- package/dist/customize/triggers/schedule/post-to-field.js +49 -0
- package/dist/customize/triggers/schedule/schedule-copy.d.ts +10 -6
- package/dist/customize/triggers/schedule/schedule-copy.js +42 -11
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +2 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +22 -0
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +25 -0
- package/dist/customize/triggers/schedule/trigger-composer.d.ts +5 -0
- package/dist/customize/triggers/schedule/trigger-composer.js +23 -14
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +3 -0
- package/dist/customize/triggers/schedule/trigger-filter.js +1 -1
- package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +2 -2
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -0
- package/dist/customize/triggers/schedule/trigger-toast.js +2 -1
- package/dist/customize/triggers/schedule-view.js +5 -2
- package/dist/files/index.d.ts +1 -0
- package/dist/files/index.js +1 -0
- package/dist/files/project/change-request-recovery.d.ts +1 -26
- package/dist/files/project/change-request-recovery.js +1 -59
- package/dist/files/project/components/change-request-detail-dialog.js +13 -3
- package/dist/files/project/components/drive-explorer.js +15 -15
- package/dist/files/project/components/drive-toolbar.d.ts +16 -2
- package/dist/files/project/components/drive-toolbar.js +14 -5
- package/dist/files/project/hooks/use-change-request-recovery.js +3 -19
- package/dist/files/project/hooks/use-change-requests.d.ts +1 -0
- package/dist/files/project/hooks/use-change-requests.js +11 -2
- package/dist/files/renderers/image-frame.d.ts +48 -0
- package/dist/files/renderers/image-frame.js +59 -0
- package/dist/files/renderers/image-renderer.d.ts +11 -1
- package/dist/files/renderers/image-renderer.js +13 -3
- package/dist/files/renderers/pdf/pdf-clipboard.d.ts +2 -0
- package/dist/files/renderers/pdf/pdf-clipboard.js +21 -0
- package/dist/files/renderers/pdf/pdf-viewer.js +4 -2
- package/dist/files/renderers/show-content-renderer.d.ts +9 -1
- package/dist/files/renderers/show-content-renderer.js +56 -14
- package/dist/files/runtime/file-source.js +2 -0
- package/dist/files/runtime/hooks/use-binary-blob.d.ts +10 -1
- package/dist/files/runtime/hooks/use-binary-blob.js +10 -4
- package/dist/files/runtime/hooks/use-shared-image.d.ts +41 -0
- package/dist/files/runtime/hooks/use-shared-image.js +177 -0
- package/dist/files/viewer/file-content-renderer.d.ts +22 -1
- package/dist/files/viewer/file-content-renderer.js +50 -7
- package/dist/files/viewer/file-header.d.ts +7 -3
- package/dist/files/viewer/file-header.js +20 -11
- package/dist/files/viewer/file-preview-modal.d.ts +1 -1
- package/dist/files/viewer/file-preview-modal.js +10 -22
- package/dist/files/viewer/file-source.d.ts +13 -0
- package/dist/files/viewer/use-file-content-state.d.ts +2 -0
- package/dist/files/viewer/use-file-content-state.js +28 -10
- package/dist/files/viewer/viewer-actions.d.ts +3 -1
- package/dist/files/viewer/viewer-actions.js +2 -2
- package/dist/hooks/use-media-query.d.ts +1 -0
- package/dist/hooks/use-mobile.d.ts +5 -0
- package/dist/hooks/use-mobile.js +8 -0
- package/dist/i18n/en.d.ts +1062 -85
- package/dist/i18n/en.js +1078 -101
- package/dist/i18n/ui-catalog/localize-ui-catalog.js +4 -0
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +15 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/internal/account-hub/account-settings-sidebar.js +1 -1
- package/dist/internal/account-hub/hub-sheet.d.ts +9 -1
- package/dist/internal/account-hub/hub-sheet.js +21 -5
- package/dist/internal/account-hub/sections.d.ts +1 -1
- package/dist/internal/account-hub/sections.js +2 -1
- package/dist/internal/apps-and-extensions/apps-modal.d.ts +9 -0
- package/dist/internal/apps-and-extensions/apps-modal.js +107 -0
- package/dist/internal/auth/auth-card-shell.js +3 -3
- package/dist/internal/chrome/browser-icon.d.ts +24 -0
- package/dist/internal/chrome/browser-icon.js +58 -0
- package/dist/internal/chrome/chrome-card-state.d.ts +16 -0
- package/dist/internal/chrome/chrome-card-state.js +9 -0
- package/dist/internal/chrome/chrome-connect.d.ts +69 -0
- package/dist/internal/chrome/chrome-connect.js +178 -0
- package/dist/internal/chrome/chrome-mock.d.ts +4 -0
- package/dist/internal/chrome/chrome-mock.js +15 -0
- package/dist/internal/chrome/chrome-names.d.ts +15 -0
- package/dist/internal/chrome/chrome-names.js +35 -0
- package/dist/internal/chrome/extension.d.ts +47 -0
- package/dist/internal/chrome/extension.js +91 -0
- package/dist/internal/chrome/use-chrome-offered.d.ts +11 -0
- package/dist/internal/chrome/use-chrome-offered.js +22 -0
- package/dist/internal/components/agent-mark.js +5 -2
- package/dist/internal/connector-logo/connector-logo-source.d.ts +64 -0
- package/dist/internal/connector-logo/connector-logo-source.js +49 -0
- package/dist/internal/connector-logo/connector-logo.d.ts +39 -0
- package/dist/internal/connector-logo/connector-logo.js +56 -0
- package/dist/internal/connector-logo/connector-mark-files.d.ts +11 -0
- package/dist/internal/connector-logo/connector-mark-files.js +35 -0
- package/dist/internal/files/file-read-retry.d.ts +13 -0
- package/dist/internal/files/file-read-retry.js +23 -3
- package/dist/internal/files/session-drive-files.d.ts +5 -1
- package/dist/internal/files/session-drive-files.js +7 -2
- package/dist/internal/hooks/channels/use-channels-installations.d.ts +32 -5
- package/dist/internal/hooks/channels/use-channels-installations.js +55 -7
- package/dist/internal/hooks/channels/use-email-inboxes.d.ts +19 -0
- package/dist/internal/hooks/channels/use-email-inboxes.js +48 -0
- package/dist/internal/hooks/connectors/use-add-account.js +1 -1
- package/dist/internal/hooks/index.d.ts +1 -1
- package/dist/internal/hooks/index.js +1 -1
- package/dist/internal/hooks/projects/use-new-project-session.d.ts +9 -0
- package/dist/internal/hooks/projects/use-new-project-session.js +28 -12
- package/dist/internal/hooks/use-auto-scroll.d.ts +8 -1
- package/dist/internal/hooks/use-auto-scroll.js +4 -4
- package/dist/internal/icons/edge.d.ts +5 -0
- package/dist/internal/icons/edge.js +10 -0
- package/dist/internal/icons/telegram.d.ts +5 -0
- package/dist/internal/icons/telegram.js +6 -1
- package/dist/internal/layout/nav-hover-card.d.ts +35 -0
- package/dist/internal/layout/nav-hover-card.js +84 -0
- package/dist/internal/layout/project-nav-row.d.ts +3 -1
- package/dist/internal/layout/project-nav-row.js +3 -2
- package/dist/internal/layout/project-page-header.d.ts +4 -2
- package/dist/internal/layout/project-page-header.js +4 -3
- package/dist/internal/layout/project-settings-nav.js +59 -2
- package/dist/internal/lib/browser-error-noise.d.ts +1 -1
- package/dist/internal/lib/browser-error-noise.js +1 -1
- package/dist/internal/lib/browser-noise/rules/extensions.js +17 -3
- package/dist/internal/lib/browser-noise/rules/injected-scripts.d.ts +7 -0
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +15 -0
- package/dist/internal/lib/detect-os.d.ts +43 -0
- package/dist/internal/lib/detect-os.js +70 -0
- package/dist/internal/lib/manifest-version.d.ts +1 -1
- package/dist/internal/lib/manifest-version.js +2 -2
- package/dist/internal/lib/memory-href.d.ts +16 -0
- package/dist/internal/lib/memory-href.js +46 -0
- package/dist/internal/lib/use-project-feature-flags.js +13 -9
- package/dist/internal/lib/utils/heic-convert.d.ts +1 -1
- package/dist/internal/lib/utils/heic-convert.js +3 -4
- package/dist/internal/lib/web-notifications.d.ts +20 -0
- package/dist/internal/lib/web-notifications.js +48 -4
- package/dist/internal/notifications/notification-bell.d.ts +4 -1
- package/dist/internal/notifications/notification-bell.js +2 -2
- package/dist/internal/selection/selection-bar.d.ts +2 -1
- package/dist/internal/selection/selection-bar.js +1 -1
- package/dist/internal/stores/apps-modal-store.d.ts +8 -0
- package/dist/internal/stores/apps-modal-store.js +6 -0
- package/dist/internal/stores/composer-prefill-store.d.ts +12 -5
- package/dist/internal/stores/file-preview-store.d.ts +29 -2
- package/dist/internal/stores/file-preview-store.js +19 -1
- package/dist/internal/stores/kortix-computer-store.js +3 -0
- package/dist/internal/stores/sidebar-nav-store.d.ts +1 -1
- package/dist/internal/stores/sidebar-nav-store.js +3 -1
- package/dist/lib/routes.d.ts +13 -1
- package/dist/lib/routes.js +13 -0
- package/dist/markdown/index.d.ts +2 -1
- package/dist/markdown/index.js +2 -1
- package/dist/markdown/setup-links/approval-decision.d.ts +1 -0
- package/dist/markdown/setup-links/approval-decision.js +9 -3
- package/dist/markdown/setup-links/connector-handshake.d.ts +3 -1
- package/dist/markdown/setup-links/connector-handshake.js +12 -10
- package/dist/markdown/setup-links/secret-intake-form.d.ts +0 -10
- package/dist/markdown/setup-links/secret-intake-form.js +1 -1
- package/dist/markdown/setup-links/show-connect-hero.d.ts +28 -0
- package/dist/markdown/setup-links/show-connect-hero.js +91 -0
- package/dist/markdown/unified-markdown.js +5 -5
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/badge.js +2 -0
- package/dist/primitives/disclosure.js +14 -2
- package/dist/primitives/empty-art.d.ts +12 -0
- package/dist/primitives/empty-art.js +11 -0
- package/dist/primitives/empty-state.d.ts +2 -2
- package/dist/primitives/empty-state.js +6 -5
- package/dist/primitives/mermaid-renderer.d.ts +2 -0
- package/dist/primitives/mermaid-renderer.js +21 -15
- package/dist/primitives/resizable.js +6 -1
- package/dist/primitives/resize-seam.d.ts +11 -0
- package/dist/primitives/resize-seam.js +12 -0
- package/dist/primitives/sidebar-panel.js +4 -7
- package/dist/primitives/tabs.d.ts +14 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/providers/ui-provider.d.ts +9 -0
- package/dist/session/composer/ComposerAboveCard.d.ts +1 -1
- package/dist/session/composer/ComposerAboveCard.js +2 -2
- package/dist/session/composer/ComposerCard.d.ts +1 -1
- package/dist/session/composer/ComposerCard.js +3 -3
- package/dist/session/composer/agent-selector.d.ts +13 -1
- package/dist/session/composer/agent-selector.js +25 -5
- package/dist/session/composer/composer-agent-access.d.ts +15 -0
- package/dist/session/composer/composer-agent-access.js +27 -0
- package/dist/session/composer/composer-chat-input.d.ts +8 -2
- package/dist/session/composer/composer-chat-input.js +8 -6
- package/dist/session/composer/composer-logic.d.ts +16 -0
- package/dist/session/composer/composer-logic.js +12 -0
- package/dist/session/composer/composer-underbar.d.ts +3 -1
- package/dist/session/composer/composer-underbar.js +4 -3
- package/dist/session/composer/composer.d.ts +15 -1
- package/dist/session/composer/composer.js +19 -1
- package/dist/session/composer/draft/composer-draft.d.ts +6 -2
- package/dist/session/composer/draft/composer-draft.js +5 -1
- package/dist/session/composer/reasoning-effort-selector.js +1 -1
- package/dist/session/models/chatgpt-connection-button.d.ts +11 -0
- package/dist/session/models/chatgpt-connection-button.js +54 -0
- package/dist/session/models/model-selector.js +5 -2
- package/dist/session/models/use-model-connection-gate.d.ts +5 -5
- package/dist/session/models/use-model-connection-gate.js +5 -5
- package/dist/session/outcomes/jump-to-outcome.d.ts +10 -0
- package/dist/session/outcomes/jump-to-outcome.js +11 -0
- package/dist/session/outcomes/session-outcomes-bridge.d.ts +14 -0
- package/dist/session/outcomes/session-outcomes-bridge.js +12 -0
- package/dist/session/outcomes/session-outcomes-provider.d.ts +3 -1
- package/dist/session/outcomes/session-outcomes-provider.js +33 -3
- package/dist/session/panel/easy/app-preview.d.ts +10 -0
- package/dist/session/panel/easy/app-preview.js +31 -12
- package/dist/session/panel/easy/change-requests-card.d.ts +7 -0
- package/dist/session/panel/easy/change-requests-card.js +17 -0
- package/dist/session/panel/easy/easy-panel-logic.js +7 -1
- package/dist/session/panel/easy/easy-panel.js +5 -2
- package/dist/session/panel/easy/file-preview.js +1 -1
- package/dist/session/panel/easy/outputs-card.d.ts +2 -1
- package/dist/session/panel/easy/outputs-card.js +3 -2
- package/dist/session/panel/mobile-tool-drawer.js +7 -1
- package/dist/session/panel/session-audit-panel.js +9 -2
- package/dist/session/panel/session-audit-shared.js +3 -1
- package/dist/session/panel/session-detail-panel.js +9 -3
- package/dist/session/panel/session-files-explorer.d.ts +9 -0
- package/dist/session/panel/session-files-explorer.js +12 -3
- package/dist/session/panel/session-panel-provider.d.ts +15 -1
- package/dist/session/panel/session-panel-provider.js +32 -7
- package/dist/session/panel/shared/derive-panels.d.ts +8 -1
- package/dist/session/panel/shared/derive-panels.js +12 -2
- package/dist/session/panel/shared/output-priority.js +2 -0
- package/dist/session/participants/session-participants.d.ts +8 -2
- package/dist/session/participants/session-participants.js +11 -4
- package/dist/session/prompts/approval-request.d.ts +5 -0
- package/dist/session/prompts/approval-request.js +9 -1
- package/dist/session/prompts/session-approval-review.d.ts +9 -0
- package/dist/session/prompts/session-approval-review.js +18 -0
- package/dist/session/status/session-error-banner.js +2 -49
- package/dist/session/status/session-starting-loader.d.ts +14 -2
- package/dist/session/status/session-starting-loader.js +16 -4
- package/dist/session/thread/after-first-prompt.d.ts +7 -0
- package/dist/session/thread/after-first-prompt.js +8 -0
- package/dist/session/thread/detect-command.d.ts +12 -0
- package/dist/session/thread/detect-command.js +20 -0
- package/dist/session/thread/session-chat.d.ts +3 -1
- package/dist/session/thread/session-chat.js +377 -252
- package/dist/session/thread/session-thread.d.ts +15 -1
- package/dist/session/thread/session-thread.js +20 -3
- package/dist/session/thread/session-transcript-class.d.ts +5 -1
- package/dist/session/thread/session-transcript-class.js +5 -1
- package/dist/session/thread/thread-boot-rows.d.ts +36 -0
- package/dist/session/thread/thread-boot-rows.js +89 -0
- package/dist/session/thread/transcript-rows.d.ts +31 -0
- package/dist/session/thread/transcript-rows.js +3 -0
- package/dist/session/thread/transcript.d.ts +0 -9
- package/dist/session/thread/transcript.js +104 -19
- package/dist/session/tool/shared/infrastructure-contexts.d.ts +28 -0
- package/dist/session/tool/shared/infrastructure-contexts.js +31 -3
- package/dist/session/tool/tool-part-renderer.d.ts +5 -4
- package/dist/session/tool/tool-part-renderer.js +8 -3
- package/dist/session/tool/tools/bash-tool.js +7 -6
- package/dist/session/tool/tools/channel-send-card.d.ts +1 -2
- package/dist/session/tool/tools/channel-send.d.ts +2 -1
- package/dist/session/tool/tools/codemode-tool.js +1 -1
- package/dist/session/tool/tools/connector-tools.js +1 -1
- package/dist/session/tool/tools/image-gen-tool.d.ts +1 -1
- package/dist/session/tool/tools/image-gen-tool.js +241 -53
- package/dist/session/tool/tools/show-tool.js +19 -8
- package/dist/session/turn/channel-brand.d.ts +8 -3
- package/dist/session/turn/channel-brand.js +20 -4
- package/dist/session/turn/message-author.d.ts +8 -0
- package/dist/session/turn/message-author.js +24 -0
- package/dist/session/turn/message-row.d.ts +52 -0
- package/dist/session/turn/message-row.js +44 -0
- package/dist/session/turn/plan-anchor.d.ts +1 -1
- package/dist/session/turn/plan-anchor.js +1 -1
- package/dist/session/turn/user-message.d.ts +14 -6
- package/dist/session/turn/user-message.js +35 -15
- package/dist/styles.css +1 -1
- package/dist/workspace/home/access-requests-bell.d.ts +9 -2
- package/dist/workspace/home/access-requests-bell.js +20 -6
- package/dist/workspace/home/first-chat.d.ts +8 -21
- package/dist/workspace/home/first-chat.js +22 -72
- package/dist/workspace/index.d.ts +6 -0
- package/dist/workspace/index.js +6 -0
- package/dist/workspace/layout/project-home.d.ts +14 -2
- package/dist/workspace/layout/project-home.js +60 -21
- package/dist/workspace/layout/use-project-home-send.d.ts +9 -1
- package/dist/workspace/layout/use-project-home-send.js +82 -3
- package/dist/workspace/memory/body-doc.d.ts +17 -0
- package/dist/workspace/memory/body-doc.js +208 -0
- package/dist/workspace/memory/body-extensions.d.ts +38 -0
- package/dist/workspace/memory/body-extensions.js +103 -0
- package/dist/workspace/memory/company-memory-page.d.ts +8 -0
- package/dist/workspace/memory/company-memory-page.js +16 -0
- package/dist/workspace/memory/memory-all.d.ts +20 -0
- package/dist/workspace/memory/memory-all.js +27 -0
- package/dist/workspace/memory/memory-body.d.ts +19 -0
- package/dist/workspace/memory/memory-body.js +139 -0
- package/dist/workspace/memory/memory-empty.d.ts +13 -0
- package/dist/workspace/memory/memory-empty.js +28 -0
- package/dist/workspace/memory/memory-history.d.ts +27 -0
- package/dist/workspace/memory/memory-history.js +108 -0
- package/dist/workspace/memory/memory-labels.d.ts +16 -0
- package/dist/workspace/memory/memory-labels.js +47 -0
- package/dist/workspace/memory/memory-page-list.d.ts +34 -0
- package/dist/workspace/memory/memory-page-list.js +156 -0
- package/dist/workspace/memory/memory-reader.d.ts +58 -0
- package/dist/workspace/memory/memory-reader.js +123 -0
- package/dist/workspace/memory/memory-view.d.ts +21 -0
- package/dist/workspace/memory/memory-view.js +124 -0
- package/dist/workspace/memory/remember-popover.d.ts +19 -0
- package/dist/workspace/memory/remember-popover.js +61 -0
- package/dist/workspace/memory/remember-this.d.ts +12 -0
- package/dist/workspace/memory/remember-this.js +89 -0
- package/dist/workspace/memory/source-mark.d.ts +18 -0
- package/dist/workspace/memory/source-mark.js +79 -0
- package/dist/workspace/memory/used-memory-chip.d.ts +14 -0
- package/dist/workspace/memory/used-memory-chip.js +61 -0
- package/dist/workspace/new/advanced-fields.d.ts +2 -1
- package/dist/workspace/new/advanced-fields.js +2 -2
- package/dist/workspace/new/source-param.d.ts +1 -1
- package/dist/workspace/new/source-param.js +3 -1
- package/dist/workspace/new/use-create-workspace.d.ts +8 -10
- package/dist/workspace/new/use-create-workspace.js +3 -3
- package/dist/workspace/projects/onboarding/app-logo.d.ts +7 -2
- package/dist/workspace/projects/onboarding/app-logo.js +6 -13
- package/dist/workspace/projects/policies-panel.js +5 -3
- package/dist/workspace/review/review-actions.d.ts +4 -2
- package/dist/workspace/review/review-actions.js +8 -2
- package/dist/workspace/review/review-center.js +11 -7
- package/dist/workspace/review/review-detail.d.ts +10 -0
- package/dist/workspace/review/review-detail.js +101 -13
- package/dist/workspace/saved-session-skeleton.d.ts +2 -2
- package/dist/workspace/saved-session-skeleton.js +3 -3
- package/dist/workspace/session-workspace.js +15 -13
- package/dist/workspace/sessions/project-sessions-view.js +3 -2
- package/dist/workspace/sessions/session-label-badges.js +2 -1
- package/dist/workspace/sessions/sessions-toolbar.d.ts +3 -1
- package/dist/workspace/sessions/sessions-toolbar.js +2 -2
- package/dist/workspace/sidebar/footer/project-apps-nav.d.ts +5 -0
- package/dist/workspace/sidebar/footer/project-apps-nav.js +41 -2
- package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +22 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +10 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.js +56 -0
- package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +13 -13
- package/dist/workspace/sidebar/footer/project-memory-nav.d.ts +7 -0
- package/dist/workspace/sidebar/footer/project-memory-nav.js +19 -0
- package/dist/workspace/sidebar/nav-row-meta.js +14 -2
- package/dist/workspace/sidebar/project-nav-items.js +3 -0
- package/dist/workspace/sidebar/project-session-list.js +68 -56
- package/dist/workspace/sidebar/project-sidebar.js +13 -2
- package/dist/workspace/sidebar/project-spaces-nav.d.ts +8 -0
- package/dist/workspace/sidebar/project-spaces-nav.js +69 -0
- package/dist/workspace/sidebar/session-group-order.d.ts +9 -0
- package/dist/workspace/sidebar/session-group-order.js +25 -0
- package/dist/workspace/sidebar/session-group-sections.d.ts +62 -0
- package/dist/workspace/sidebar/session-group-sections.js +267 -0
- package/dist/workspace/sidebar/session-list-chrome.d.ts +28 -0
- package/dist/workspace/sidebar/session-list-chrome.js +50 -0
- package/dist/workspace/spaces/channel-glyph.d.ts +5 -0
- package/dist/workspace/spaces/channel-glyph.js +6 -0
- package/dist/workspace/spaces/channel-setup.d.ts +16 -0
- package/dist/workspace/spaces/channel-setup.js +105 -0
- package/dist/workspace/spaces/channels-onboarding.d.ts +13 -0
- package/dist/workspace/spaces/channels-onboarding.js +37 -0
- package/dist/workspace/spaces/create-channel-dialog.d.ts +16 -0
- package/dist/workspace/spaces/create-channel-dialog.js +158 -0
- package/dist/workspace/spaces/private-channels-not-in.d.ts +9 -0
- package/dist/workspace/spaces/private-channels-not-in.js +69 -0
- package/dist/workspace/spaces/space-agents.d.ts +10 -0
- package/dist/workspace/spaces/space-agents.js +10 -0
- package/dist/workspace/spaces/space-details-dialog.d.ts +20 -0
- package/dist/workspace/spaces/space-details-dialog.js +176 -0
- package/dist/workspace/spaces/space-link-label.d.ts +49 -0
- package/dist/workspace/spaces/space-link-label.js +73 -0
- package/dist/workspace/spaces/space-links.d.ts +19 -0
- package/dist/workspace/spaces/space-links.js +230 -0
- package/dist/workspace/spaces/space-members.d.ts +46 -0
- package/dist/workspace/spaces/space-members.js +182 -0
- package/dist/workspace/spaces/space-roster.d.ts +15 -0
- package/dist/workspace/spaces/space-roster.js +44 -0
- package/dist/workspace/spaces/space-threads-tab.d.ts +56 -0
- package/dist/workspace/spaces/space-threads-tab.js +156 -0
- package/dist/workspace/spaces/space-timeline-view.d.ts +254 -0
- package/dist/workspace/spaces/space-timeline-view.js +235 -0
- package/dist/workspace/spaces/space-timeline.d.ts +106 -0
- package/dist/workspace/spaces/space-timeline.js +183 -0
- package/dist/workspace/spaces/space-triggers.d.ts +13 -0
- package/dist/workspace/spaces/space-triggers.js +78 -0
- package/dist/workspace/spaces/space-view.d.ts +37 -0
- package/dist/workspace/spaces/space-view.js +436 -0
- package/package.json +67 -36
- package/skills/kortix-ui/SKILL.md +3 -3
- package/skills/kortix-ui/references/custom-dashboard.md +3 -3
- package/skills/kortix-ui/references/modules.md +29 -5
- package/skills/kortix-ui/references/theming.md +1 -1
- package/dist/customize/connectors/catalog/merge-search.d.ts +0 -10
- package/dist/customize/connectors/catalog/merge-search.js +0 -26
- package/dist/customize/connectors/detail/find-easy-connect-app.d.ts +0 -29
- package/dist/customize/connectors/detail/find-easy-connect-app.js +0 -22
- package/dist/customize/migrate-to-v2/use-migrate-to-v2.d.ts +0 -9
- package/dist/customize/migrate-to-v2/use-migrate-to-v2.js +0 -24
- package/dist/customize/sections/connector-connection-header.d.ts +0 -36
- package/dist/customize/sections/connector-connection-header.js +0 -33
- package/dist/customize/sections/connector-connection-modal.d.ts +0 -34
- package/dist/customize/sections/connector-connection-modal.js +0 -72
- package/dist/customize/sections/discover-catalogue-card.d.ts +0 -19
- package/dist/customize/sections/discover-catalogue-card.js +0 -26
- package/dist/customize/sections/discover-catalogue-detail.d.ts +0 -15
- package/dist/customize/sections/discover-catalogue-detail.js +0 -24
- package/dist/customize/sections/discover-catalogue.d.ts +0 -17
- package/dist/customize/sections/discover-catalogue.js +0 -132
- package/dist/customize/sections/llm-provider/provider-access-menu.d.ts +0 -10
- package/dist/customize/sections/llm-provider/provider-access-menu.js +0 -23
- package/dist/files/project/components/drive-empty-art.d.ts +0 -2
- package/dist/files/project/components/drive-empty-art.js +0 -5
- package/dist/internal/hooks/use-media-query.d.ts +0 -2
- package/dist/internal/share/public-share-link-button.d.ts +0 -14
- package/dist/internal/share/public-share-link-button.js +0 -17
- package/dist/markdown/setup-links/app-credentials-form.d.ts +0 -12
- package/dist/markdown/setup-links/app-credentials-form.js +0 -115
- /package/dist/{internal/hooks → hooks}/use-media-query.js +0 -0
|
@@ -4,13 +4,13 @@ import { Drawer, DrawerContent } from '../primitives/drawer.js';
|
|
|
4
4
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '../primitives/resizable.js';
|
|
5
5
|
import { BrowserPanel } from '../browser/browser-panel.js';
|
|
6
6
|
import { SessionDetailPanel } from '../session/panel/session-detail-panel.js';
|
|
7
|
+
import { SessionOutcomesBridge } from '../session/outcomes/session-outcomes-bridge.js';
|
|
7
8
|
import { SessionPanelProvider } from '../session/panel/session-panel-provider.js';
|
|
8
9
|
import { MobileToolDrawer } from '../session/panel/mobile-tool-drawer.js';
|
|
9
10
|
import { ProviderPoolDraftBoundary } from '../session/overrides/provider-pool-draft-context.js';
|
|
10
11
|
import { SessionAuditPanel } from '../session/panel/session-audit-panel.js';
|
|
11
12
|
import { SessionFilesExplorer } from '../session/panel/session-files-explorer.js';
|
|
12
13
|
import { PanelHeaderSwitcher } from '../session/panel/session-panel-header.js';
|
|
13
|
-
import { SessionStartingLoader } from '../session/status/session-starting-loader.js';
|
|
14
14
|
import { SessionTerminalPanel } from '../terminal/session-terminal-panel.js';
|
|
15
15
|
import { SessionWallpaperLayerContext } from '../session/panel/session-wallpaper-layer.js';
|
|
16
16
|
import { useSessionPanelLayout } from '../session/panel/use-session-panel-layout.js';
|
|
@@ -41,14 +41,14 @@ export const SessionLayout = memo(function SessionLayout({ sessionId, projectId,
|
|
|
41
41
|
sessionId,
|
|
42
42
|
projectId,
|
|
43
43
|
projectSessionId,
|
|
44
|
-
|
|
44
|
+
// Boot draws the Easy body (the detail shell, gated inside on `booting`)
|
|
45
|
+
// whatever the mode: Advanced's tabs mount the PTY, browser and explorer.
|
|
46
|
+
isEasy: isEasy || booting,
|
|
45
47
|
effectiveView,
|
|
46
48
|
});
|
|
47
49
|
const surfaces = useSessionPanelSurfaces({
|
|
48
50
|
sessionId,
|
|
49
|
-
|
|
50
|
-
projectSessionId,
|
|
51
|
-
bootStage,
|
|
51
|
+
booting,
|
|
52
52
|
isEasy,
|
|
53
53
|
effectiveView,
|
|
54
54
|
auditPendingCount,
|
|
@@ -59,6 +59,7 @@ export const SessionLayout = memo(function SessionLayout({ sessionId, projectId,
|
|
|
59
59
|
sessionId,
|
|
60
60
|
projectId,
|
|
61
61
|
projectSessionId,
|
|
62
|
+
booting,
|
|
62
63
|
...panels,
|
|
63
64
|
isSessionBusy,
|
|
64
65
|
effectiveView,
|
|
@@ -97,8 +98,7 @@ function useSessionPanelSplitState() {
|
|
|
97
98
|
const shouldShowPanel = isSidePanelOpen;
|
|
98
99
|
return { isSidePanelOpen, isExpanded, panelSplit, panelAspect, shouldShowPanel };
|
|
99
100
|
}
|
|
100
|
-
function useSessionPanelSurfaces({ sessionId,
|
|
101
|
-
const booting = !!bootStage;
|
|
101
|
+
function useSessionPanelSurfaces({ sessionId, booting, isEasy, effectiveView, auditPendingCount, togglePanelMode, panelBody, }) {
|
|
102
102
|
const isSidePanelOpen = useKortixComputerStore((s) => s.isSidePanelOpen);
|
|
103
103
|
const setIsSidePanelOpen = useKortixComputerStore((s) => s.setIsSidePanelOpen);
|
|
104
104
|
const setPanelView = useSessionBrowserStore((s) => s.setView);
|
|
@@ -106,10 +106,12 @@ function useSessionPanelSurfaces({ sessionId, projectId, projectSessionId, bootS
|
|
|
106
106
|
setIsSidePanelOpen(!isSidePanelOpen);
|
|
107
107
|
}, [isSidePanelOpen, setIsSidePanelOpen]);
|
|
108
108
|
const panelHeader = (_jsx(PanelHeaderSwitcher, { view: effectiveView, onChangeView: (v) => setPanelView(sessionId, v), isSidePanelOpen: isSidePanelOpen, onTogglePanel: handleTogglePanel, auditBadge: auditPendingCount, onToggleMode: togglePanelMode }));
|
|
109
|
-
// While booting
|
|
110
|
-
//
|
|
111
|
-
//
|
|
112
|
-
//
|
|
109
|
+
// While booting there is no header bar. The body is the same `panelBody`
|
|
110
|
+
// tree as when ready, so the boot→ready flip never remounts the detail shell;
|
|
111
|
+
// `SessionDetailPanel` reads `booting` from the provider: a Terminal/Browser/
|
|
112
|
+
// Files card wears its real chrome over the wake status, and with no card
|
|
113
|
+
// open the panel is the wake status alone. The runtime-coupled bodies (PTY,
|
|
114
|
+
// preview frame, file listing) mount only once booted.
|
|
113
115
|
//
|
|
114
116
|
// Easy mode has no header either: it is the three cards and nothing else. No
|
|
115
117
|
// title, no view tabs, no mode button, no border. The mode is switched from
|
|
@@ -119,7 +121,7 @@ function useSessionPanelSurfaces({ sessionId, projectId, projectSessionId, bootS
|
|
|
119
121
|
// own close DISCARDS the detail (it is done with), while ⌘I only puts it
|
|
120
122
|
// away — press it again and the same detail comes back.
|
|
121
123
|
const effectivePanelHeader = booting || isEasy ? null : panelHeader;
|
|
122
|
-
const effectivePanelBody =
|
|
124
|
+
const effectivePanelBody = panelBody;
|
|
123
125
|
return { effectivePanelHeader, effectivePanelBody };
|
|
124
126
|
}
|
|
125
127
|
function useSessionPanelBody({ sessionId, projectId, projectSessionId, isEasy, effectiveView, }) {
|
|
@@ -145,7 +147,7 @@ function useSessionPanelBody({ sessionId, projectId, projectSessionId, isEasy, e
|
|
|
145
147
|
// inside `children` (the chat, in the main resizable panel) and every detail
|
|
146
148
|
// renders in the side panel, and a card row clicked in one opens a detail in
|
|
147
149
|
// the other. See `session-panel-provider.tsx`.
|
|
148
|
-
const withPanelProvider = ({ sessionId, projectId, projectSessionId, isSessionBusy, }, node) => (_jsx(ProviderPoolDraftBoundary, { identity: `${projectId}/${projectSessionId ?? sessionId}`, children: _jsx(SessionPanelProvider, { sessionId: sessionId, isSessionBusy: isSessionBusy, projectId: projectId, projectSessionId: projectSessionId, children: node }) }));
|
|
150
|
+
const withPanelProvider = ({ sessionId, projectId, projectSessionId, isSessionBusy, booting, }, node) => (_jsx(ProviderPoolDraftBoundary, { identity: `${projectId}/${projectSessionId ?? sessionId}`, children: _jsx(SessionPanelProvider, { sessionId: sessionId, isSessionBusy: isSessionBusy, projectId: projectId, projectSessionId: projectSessionId, booting: booting, children: _jsx(SessionOutcomesBridge, { children: node }, `${projectId}/${projectSessionId ?? sessionId}`) }) }));
|
|
149
151
|
function MobileSessionLayout({ panel, children }) {
|
|
150
152
|
const { sessionId, projectId, projectSessionId, effectivePanelHeader, effectivePanelBody } = panel;
|
|
151
153
|
const isSidePanelOpen = useKortixComputerStore((s) => s.isSidePanelOpen);
|
|
@@ -26,7 +26,7 @@ import { cn } from '../../internal/lib/utils.js';
|
|
|
26
26
|
import { selectExpandedIds, useSessionExpandedStore, } from '../../internal/stores/session-expanded-store.js';
|
|
27
27
|
import { selectCollapsedSections, selectGroupMode, selectHiddenSections, selectOrderMode, selectSourceFilters, selectLabelFilters, selectAccessFilters, selectOwnerFilters, selectStatusFilters, useSessionFilterStore, } from '../../internal/stores/session-filter-store.js';
|
|
28
28
|
import { deleteProjectSession, restartProjectSession, setSessionArchived, stopProjectSession, } from '@kortix/sdk';
|
|
29
|
-
import { qk, removeCachedProjectSession, useProjectSessions, useSessionChildren, } from '@kortix/sdk/react';
|
|
29
|
+
import { qk, removeCachedProjectSession, useFeatureFlag, useProjectSessions, useSessionChildren, } from '@kortix/sdk/react';
|
|
30
30
|
import { CaretRightIcon, MagnifyingGlassIcon } from '@phosphor-icons/react';
|
|
31
31
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
32
32
|
import { format, formatDistanceToNowStrict } from 'date-fns';
|
|
@@ -140,6 +140,7 @@ export function ProjectSessionsView({ projectId }) {
|
|
|
140
140
|
const router = useUiRouter();
|
|
141
141
|
const pathname = useUiPathname();
|
|
142
142
|
const searchParams = useUiSearchParams();
|
|
143
|
+
const channelsOn = useFeatureFlag(projectId, 'project_channels').enabled;
|
|
143
144
|
const [search, setSearch] = useState('');
|
|
144
145
|
// `?view=archived` opens the archive, `?view=deleted` Recently deleted (the
|
|
145
146
|
// sidebar menu's links).
|
|
@@ -533,7 +534,7 @@ export function ProjectSessionsView({ projectId }) {
|
|
|
533
534
|
deleted: session.deleted_at ? formatTimestamp(session.deleted_at).exact : null,
|
|
534
535
|
} })) : null }), childrenOpen ? (_jsx(SessionChildrenRows, { projectId: projectId, parentId: session.session_id, q: searching && session.search_match === 'child' ? searchQuery : undefined, renderRow: (child) => renderRow(child) })) : null] }, session.session_id));
|
|
535
536
|
};
|
|
536
|
-
const header = selectMode ? (_jsx(SessionsSelectionBar, { selectedCount: selectedCount, selectableCount: selectableSessions.length, allSelected: allSelected, onSelectAll: () => setSelected(new Set(selectableSessions.map((session) => session.session_id))), onClearSelection: () => setSelected(new Set()), onExit: exitSelectMode, onDelete: () => setBulkConfirmOpen(true), deleting: bulkDeleteMutation.isPending, onArchive: () => bulkArchiveMutation.mutate({ sessionIds: [...visibleSelection], archived: !archivedTab }), archiveLabel: tPinArchive(archivedTab ? 'bulkUnarchive' : 'bulkArchive'), archiving: bulkArchiveMutation.isPending })) : (_jsx(SessionsToolbar, { projectId: projectId, sessions: sessions, reviewCountBySession: needsYouBySession, search: search, onSearchChange: setSearch, searchOpen: searchOpen, onSearchOpenChange: setSearchOpen, onEnterSelectMode: () => setSelectMode(true), creatingSession: creatingSession, canSelect: sessions.length > 0 && !deletedTab }));
|
|
537
|
+
const header = selectMode ? (_jsx(SessionsSelectionBar, { selectedCount: selectedCount, selectableCount: selectableSessions.length, allSelected: allSelected, onSelectAll: () => setSelected(new Set(selectableSessions.map((session) => session.session_id))), onClearSelection: () => setSelected(new Set()), onExit: exitSelectMode, onDelete: () => setBulkConfirmOpen(true), deleting: bulkDeleteMutation.isPending, onArchive: () => bulkArchiveMutation.mutate({ sessionIds: [...visibleSelection], archived: !archivedTab }), archiveLabel: tPinArchive(archivedTab ? 'bulkUnarchive' : 'bulkArchive'), archiving: bulkArchiveMutation.isPending })) : (_jsx(SessionsToolbar, { projectId: projectId, sessions: sessions, reviewCountBySession: needsYouBySession, search: search, onSearchChange: setSearch, searchOpen: searchOpen, onSearchOpenChange: setSearchOpen, onEnterSelectMode: () => setSelectMode(true), creatingSession: creatingSession, canSelect: sessions.length > 0 && !deletedTab, showNewSession: !channelsOn }));
|
|
537
538
|
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "relative flex h-full min-h-0 flex-col overflow-hidden", children: [_jsx(SidebarToggle, { placement: "floating" }), _jsxs("header", { className: cn('mx-auto w-full max-w-4xl shrink-0 px-4 pt-10 pb-5 lg:pt-20', 'flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between'), children: [_jsx("div", { className: "space-y-1", children: _jsx("h2", { className: "text-foreground text-xl font-medium", children: tI18nComplete.raw('text6fa3cbf451b2') }) }), _jsx("div", { className: "mt-2 shrink-0 sm:mt-0", children: header })] }), _jsxs("div", { className: cn('mx-auto flex min-h-0 w-full max-w-4xl flex-1 flex-col px-4 pb-4'), children: [_jsx(Tabs, { value: startedBy, onValueChange: (value) => selectTab(value), className: "shrink-0", children: _jsxs(TabsListCompact, { "aria-label": tSidebar('startedBy.label'), children: [STARTED_BY_FILTERS.map((value) => (_jsx(TabsTriggerCompact, { value: value, children: tSidebar(`startedBy.${value}`) }, value))), _jsx(TabsTriggerCompact, { value: "archived", children: tPinArchive('view') }), _jsx(TabsTriggerCompact, { value: "deleted", children: tDeleted('view') })] }) }), listState === 'loading' ? (_jsx(SessionListSkeleton, {})) : listState === 'error' ? (_jsx(ErrorState, { size: "sm", title: tI18nComplete.raw('textb6d85433a7ee'), description: sessionsQuery.error instanceof Error ? sessionsQuery.error.message : undefined, action: _jsx(Button, { variant: "outline", size: "sm", onClick: () => sessionsQuery.refetch(), children: tI18nComplete.raw('text942087cc2d41') }) })) : listState === 'more' ? (
|
|
538
539
|
// No row the viewer can see on the pages read so far, and more
|
|
539
540
|
// pages exist (KRTX-1727): offer them, never "No sessions yet".
|
|
@@ -4,7 +4,8 @@ import { Badge } from '../../primitives/badge.js';
|
|
|
4
4
|
import { cn } from '../../internal/lib/utils.js';
|
|
5
5
|
/** A session's labels as outline badges: the first `max`, then `+N` with the rest in its title. */
|
|
6
6
|
export function SessionLabelBadges({ session, max = 3, className, }) {
|
|
7
|
-
|
|
7
|
+
// `artifact:<id>` ties an artifact's Ask agent sessions together (its history reads it): a key, not a name.
|
|
8
|
+
const labels = (session.labels ?? []).filter((label) => !label.startsWith('artifact:'));
|
|
8
9
|
if (labels.length === 0)
|
|
9
10
|
return null;
|
|
10
11
|
const shown = labels.slice(0, max);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ProjectSession } from '@kortix/sdk';
|
|
2
|
-
export declare function SessionsToolbar({ projectId, sessions, reviewCountBySession, search, onSearchChange, searchOpen, onSearchOpenChange, onEnterSelectMode, onNewSession, creatingSession, canSelect, }: {
|
|
2
|
+
export declare function SessionsToolbar({ projectId, sessions, reviewCountBySession, search, onSearchChange, searchOpen, onSearchOpenChange, onEnterSelectMode, onNewSession, creatingSession, canSelect, showNewSession, }: {
|
|
3
3
|
projectId: string;
|
|
4
4
|
sessions: ProjectSession[];
|
|
5
5
|
reviewCountBySession: Record<string, number>;
|
|
@@ -15,4 +15,6 @@ export declare function SessionsToolbar({ projectId, sessions, reviewCountBySess
|
|
|
15
15
|
onNewSession?: () => void;
|
|
16
16
|
creatingSession: boolean;
|
|
17
17
|
canSelect: boolean;
|
|
18
|
+
/** False under `project_channels`: work starts from a channel's composer. */
|
|
19
|
+
showNewSession?: boolean;
|
|
18
20
|
}): import("react").JSX.Element;
|
|
@@ -11,7 +11,7 @@ import { cn } from '../../internal/lib/utils.js';
|
|
|
11
11
|
import { MagnifyingGlassIcon, PlusIcon } from '@phosphor-icons/react';
|
|
12
12
|
import { useTranslations } from '../../i18n/index.js';
|
|
13
13
|
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
14
|
-
export function SessionsToolbar({ projectId, sessions, reviewCountBySession, search, onSearchChange, searchOpen, onSearchOpenChange, onEnterSelectMode, onNewSession, creatingSession, canSelect, }) {
|
|
14
|
+
export function SessionsToolbar({ projectId, sessions, reviewCountBySession, search, onSearchChange, searchOpen, onSearchOpenChange, onEnterSelectMode, onNewSession, creatingSession, canSelect, showNewSession = true, }) {
|
|
15
15
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
16
16
|
const closeSearch = () => {
|
|
17
17
|
onSearchChange('');
|
|
@@ -36,5 +36,5 @@ export function SessionsToolbar({ projectId, sessions, reviewCountBySession, sea
|
|
|
36
36
|
_jsxs(DropdownMenu, { children: [_jsx(Hint, { label: tI18nComplete.raw('text6c03b504d991'), side: "bottom", children: _jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { type: "button", variant: "outline", size: "sm", "aria-label": tI18nComplete.raw('text6c03b504d991'), className: "transition-[scale] duration-150 active:scale-[0.96]", children: tI18nComplete.raw('text638e249f4a15') }) }) }), _jsx(SessionFilterMenu, { projectId: projectId, sessions: sessions, reviewCountBySession: reviewCountBySession, align: "end", side: "bottom",
|
|
37
37
|
// Same menu as the sidebar, its OWN state. Inherits the sidebar's
|
|
38
38
|
// values until something is changed here.
|
|
39
|
-
surface: "page" })] })) : null, canSelect ? (_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: onEnterSelectMode, className: "h-8 transition-[scale] duration-150 active:scale-[0.96]", children: tI18nComplete.raw('text2a78025de6aa') })) : null, creatingSession ? (_jsxs(Button, { type: "button", size: "sm", variant: "secondary", className: cn('h-8 gap-1.5 transition-[scale] duration-150 active:scale-[0.96]'), disabled: true, "aria-busy": true, children: [_jsx(Loading, { className: "size-4 shrink-0" }), tI18nComplete.raw('text18fdd549b2ed')] })) : (_jsx(Button, { asChild: true, size: "sm", variant: "secondary", className: cn('h-8 gap-1.5 transition-[scale] duration-150 active:scale-[0.96]'), children: _jsxs(Link, { href: uiRoutes().project(projectId), prefetch: true, onClick: onNewSession, children: [_jsx(PlusIcon, { className: "size-4 shrink-0" }), tI18nComplete.raw('text18fdd549b2ed')] }) }))] }));
|
|
39
|
+
surface: "page" })] })) : null, canSelect ? (_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: onEnterSelectMode, className: "h-8 transition-[scale] duration-150 active:scale-[0.96]", children: tI18nComplete.raw('text2a78025de6aa') })) : null, !showNewSession ? null : creatingSession ? (_jsxs(Button, { type: "button", size: "sm", variant: "secondary", className: cn('h-8 gap-1.5 transition-[scale] duration-150 active:scale-[0.96]'), disabled: true, "aria-busy": true, children: [_jsx(Loading, { className: "size-4 shrink-0" }), tI18nComplete.raw('text18fdd549b2ed')] })) : (_jsx(Button, { asChild: true, size: "sm", variant: "secondary", className: cn('h-8 gap-1.5 transition-[scale] duration-150 active:scale-[0.96]'), children: _jsxs(Link, { href: uiRoutes().project(projectId), prefetch: true, onClick: onNewSession, children: [_jsx(PlusIcon, { className: "size-4 shrink-0" }), tI18nComplete.raw('text18fdd549b2ed')] }) }))] }));
|
|
40
40
|
}
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
* answers land, so the row never appears and then vanishes.
|
|
6
6
|
*/
|
|
7
7
|
export declare function useAppsRowVisible(projectId: string | undefined): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The Apps row, with a hover card of the Apps the page shows as cards
|
|
10
|
+
* (`gridApps`), so one click opens an App. A pick lands on `?app=<id>`, which
|
|
11
|
+
* opens that App's detail on the page.
|
|
12
|
+
*/
|
|
8
13
|
export declare function ProjectAppsNavItem({ projectId }: {
|
|
9
14
|
projectId: string;
|
|
10
15
|
}): import("react").JSX.Element | null;
|
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { uiRoutes } from '../../../lib/routes.js';
|
|
4
4
|
import { ProjectNavRow } from '../../../internal/layout/project-nav-row.js';
|
|
5
|
+
import { HoverPrefetchLink } from '../../../internal/components/hover-prefetch-link.js';
|
|
5
6
|
import { useTranslations } from '../../../i18n/index.js';
|
|
6
7
|
import { PROJECT_ACTIONS } from '../../../internal/lib/project-actions.js';
|
|
7
8
|
import { useProjectCan } from '../../../internal/lib/use-project-can.js';
|
|
9
|
+
import { appStatus, gridApps } from '../../../apps/app-shared.js';
|
|
10
|
+
import { Popover, PopoverAnchor } from '../../../primitives/popover.js';
|
|
11
|
+
import { InputGroupSearch, InputGroupSearchIcon, InputGroupSearchInput, } from '../../../primitives/input-group.js';
|
|
12
|
+
import { menuRow } from '../../../primitives/menu-recipe.js';
|
|
13
|
+
import { cn } from '../../../lib/utils.js';
|
|
14
|
+
import { NavHoverCardContent, NavHoverCardList, useNavHoverCard } from '../../../internal/layout/nav-hover-card.js';
|
|
8
15
|
import { useProjectApps } from '@kortix/sdk/react';
|
|
9
|
-
import { AppWindowIcon } from '@phosphor-icons/react';
|
|
16
|
+
import { AppWindowIcon, MagnifyingGlassIcon } from '@phosphor-icons/react';
|
|
10
17
|
import { useUiPathname } from '../../../providers/ui-provider.js';
|
|
18
|
+
import { useRef, useState } from 'react';
|
|
19
|
+
/** Above this many Apps the card gets a search field. */
|
|
20
|
+
const SEARCH_THRESHOLD = 10;
|
|
11
21
|
/**
|
|
12
22
|
* The Apps row shows to a caller who can deploy an App, or while the project
|
|
13
23
|
* has an App they can open. A member who can do neither got an empty page
|
|
@@ -23,12 +33,41 @@ export function useAppsRowVisible(projectId) {
|
|
|
23
33
|
return false;
|
|
24
34
|
return (apps.data?.length ?? 0) > 0;
|
|
25
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* The Apps row, with a hover card of the Apps the page shows as cards
|
|
38
|
+
* (`gridApps`), so one click opens an App. A pick lands on `?app=<id>`, which
|
|
39
|
+
* opens that App's detail on the page.
|
|
40
|
+
*/
|
|
26
41
|
export function ProjectAppsNavItem({ projectId }) {
|
|
27
42
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
43
|
+
const t = useTranslations('sidebar');
|
|
28
44
|
const pathname = useUiPathname();
|
|
29
45
|
const visible = useAppsRowVisible(projectId);
|
|
46
|
+
const apps = useProjectApps(projectId);
|
|
47
|
+
const canAdmin = useProjectCan(projectId, PROJECT_ACTIONS.PROJECT_APP_ADMIN).allowed === true;
|
|
48
|
+
const [query, setQuery] = useState('');
|
|
49
|
+
const searchRef = useRef(null);
|
|
50
|
+
const listed = apps.data ? gridApps(apps.data, canAdmin) : [];
|
|
51
|
+
const card = useNavHoverCard({ enabled: listed.length > 0, holdRef: searchRef });
|
|
52
|
+
const showSearch = listed.length > SEARCH_THRESHOLD;
|
|
53
|
+
const needle = query.trim().toLowerCase();
|
|
54
|
+
const shown = needle
|
|
55
|
+
? listed.filter((app) => app.name.toLowerCase().includes(needle) || app.slug.includes(needle))
|
|
56
|
+
: listed;
|
|
30
57
|
const href = projectId ? uiRoutes().apps(projectId) : null;
|
|
31
58
|
if (!href || !visible)
|
|
32
59
|
return null;
|
|
33
|
-
|
|
60
|
+
const label = tI18nComplete.raw('text89dd748442c1');
|
|
61
|
+
const close = () => card.setOpen(false);
|
|
62
|
+
return (_jsxs(Popover, { open: card.open, onOpenChange: (next) => {
|
|
63
|
+
card.setOpen(next);
|
|
64
|
+
if (!next)
|
|
65
|
+
setQuery('');
|
|
66
|
+
}, children: [_jsx(PopoverAnchor, { virtualRef: card.anchorRef }), _jsxs(ProjectNavRow, { active: pathname?.startsWith(href) === true, label: label, href: href, prefetch: true, ...card.rowProps, children: [_jsx("span", { className: "shrink-0", children: _jsx(AppWindowIcon, {}) }), label] }), _jsxs(NavHoverCardContent, { ...card.contentProps, children: [showSearch ? (_jsx("div", { className: "border-border border-b p-1", children: _jsxs(InputGroupSearch, { children: [_jsx(InputGroupSearchIcon, { children: _jsx(MagnifyingGlassIcon, {}) }), _jsx(InputGroupSearchInput, { ref: searchRef, variant: "popover", size: "xs", value: query, onChange: (event) => setQuery(event.target.value), placeholder: t('searchApps'), "aria-label": t('searchApps') })] }) })) : null, _jsxs(NavHoverCardList, { className: "max-h-80 overflow-x-hidden overflow-y-auto overscroll-contain", children: [shown.map((app) => (_jsx("li", { children: _jsx(AppRow, { app: app, href: `${href}?app=${encodeURIComponent(app.app_id)}`, onOpen: close }) }, app.app_id))), shown.length === 0 ? (_jsx("li", { className: menuRow('sm', 'default', 'text-muted-foreground pointer-events-none'), children: t('appsNoMatches') })) : null] })] })] }));
|
|
67
|
+
}
|
|
68
|
+
/** One App: its name and the status dot the Apps page draws under its card. */
|
|
69
|
+
function AppRow({ app, href, onOpen }) {
|
|
70
|
+
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
71
|
+
const status = appStatus(app, tI18nComplete);
|
|
72
|
+
return (_jsxs(HoverPrefetchLink, { href: href, onClick: onOpen, className: menuRow('sm', 'default', 'cursor-pointer'), children: [_jsx("span", { className: "flex size-4 shrink-0 items-center justify-center", title: status.label, children: _jsx("span", { "aria-hidden": true, className: cn('size-1.5 rounded-full', status.dot) }) }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: app.name }), _jsx("span", { className: "sr-only", children: status.label })] }));
|
|
34
73
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** The Artifacts row shows only with the `artifacts` flag on. */
|
|
2
|
+
export declare function useArtifactsRowVisible(projectId: string | undefined): boolean;
|
|
3
|
+
/** The Artifacts row: docs, slides, boards and dashboards published in the project. */
|
|
4
|
+
export declare function ProjectArtifactsNavItem({ projectId }: {
|
|
5
|
+
projectId: string;
|
|
6
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { uiRoutes } from '../../../lib/routes.js';
|
|
4
|
+
import { ProjectNavRow } from '../../../internal/layout/project-nav-row.js';
|
|
5
|
+
import { useTranslations } from '../../../i18n/index.js';
|
|
6
|
+
import { useFeatureFlag } from '@kortix/sdk/react';
|
|
7
|
+
import { CardsThreeIcon } from '@phosphor-icons/react';
|
|
8
|
+
import { useUiPathname } from '../../../providers/ui-provider.js';
|
|
9
|
+
/** The Artifacts row shows only with the `artifacts` flag on. */
|
|
10
|
+
export function useArtifactsRowVisible(projectId) {
|
|
11
|
+
return useFeatureFlag(projectId, 'artifacts').enabled;
|
|
12
|
+
}
|
|
13
|
+
/** The Artifacts row: docs, slides, boards and dashboards published in the project. */
|
|
14
|
+
export function ProjectArtifactsNavItem({ projectId }) {
|
|
15
|
+
const t = useTranslations('sidebar');
|
|
16
|
+
const pathname = useUiPathname();
|
|
17
|
+
const visible = useArtifactsRowVisible(projectId);
|
|
18
|
+
const href = projectId ? uiRoutes().artifacts(projectId) : null;
|
|
19
|
+
if (!href || !visible)
|
|
20
|
+
return null;
|
|
21
|
+
return (_jsxs(ProjectNavRow, { active: pathname?.startsWith(href) === true, label: t('artifacts'), href: href, prefetch: true, children: [_jsx("span", { className: "shrink-0", children: _jsx(CardsThreeIcon, {}) }), t('artifacts')] }));
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const CHROME_PROMO_DISMISSED_KEY = "kortix.chrome-promo.dismissed";
|
|
2
|
+
/**
|
|
3
|
+
* "Kortix in Chrome": an advertisement, not a status widget. It shows
|
|
4
|
+
* until the caller connected a browser or dismisses it. The sidebar owns the
|
|
5
|
+
* connect dialog, not this row: on a phone the row lives in the sidebar sheet,
|
|
6
|
+
* and closing the sheet unmounts it together with anything it renders.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ProjectChromeNavItem({ onOpenConnect }: {
|
|
9
|
+
onOpenConnect: () => void;
|
|
10
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useChromeConnections } from '@kortix/sdk/react';
|
|
4
|
+
import { XIcon } from '@phosphor-icons/react';
|
|
5
|
+
import { useCallback, useState } from 'react';
|
|
6
|
+
import { SidebarMenuAction, SidebarMenuButton, SidebarMenuItem, useSidebar, } from '../../../primitives/sidebar.js';
|
|
7
|
+
import { BrowserIcon } from '../../../internal/chrome/browser-icon.js';
|
|
8
|
+
import { useIsMobile } from '../../../internal/hooks/index.js';
|
|
9
|
+
import { useTranslations } from '../../../i18n/index.js';
|
|
10
|
+
export const CHROME_PROMO_DISMISSED_KEY = 'kortix.chrome-promo.dismissed';
|
|
11
|
+
function readDismissed() {
|
|
12
|
+
try {
|
|
13
|
+
return window.localStorage.getItem(CHROME_PROMO_DISMISSED_KEY) === '1';
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* "Kortix in Chrome": an advertisement, not a status widget. It shows
|
|
21
|
+
* until the caller connected a browser or dismisses it. The sidebar owns the
|
|
22
|
+
* connect dialog, not this row: on a phone the row lives in the sidebar sheet,
|
|
23
|
+
* and closing the sheet unmounts it together with anything it renders.
|
|
24
|
+
*/
|
|
25
|
+
export function ProjectChromeNavItem({ onOpenConnect }) {
|
|
26
|
+
// Client-only: the row renders nothing until its query resolves, so the
|
|
27
|
+
// server render and the first client render agree.
|
|
28
|
+
const [dismissed, setDismissed] = useState(() => typeof window === 'undefined' ? true : readDismissed());
|
|
29
|
+
const dismiss = useCallback(() => {
|
|
30
|
+
setDismissed(true);
|
|
31
|
+
try {
|
|
32
|
+
window.localStorage.setItem(CHROME_PROMO_DISMISSED_KEY, '1');
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
// Private mode or blocked storage: dismissed for this page view only.
|
|
36
|
+
}
|
|
37
|
+
}, []);
|
|
38
|
+
if (dismissed)
|
|
39
|
+
return null;
|
|
40
|
+
return _jsx(ChromePromo, { onDismiss: dismiss, onOpenConnect: onOpenConnect });
|
|
41
|
+
}
|
|
42
|
+
function ChromePromo({ onDismiss, onOpenConnect, }) {
|
|
43
|
+
const t = useTranslations('chrome');
|
|
44
|
+
const isMobile = useIsMobile();
|
|
45
|
+
const { setOpenMobile } = useSidebar();
|
|
46
|
+
// One a minute until the first browser connects: the connect dialog polls
|
|
47
|
+
// faster while it is open.
|
|
48
|
+
const connections = useChromeConnections({ refetchInterval: 60_000 });
|
|
49
|
+
if (!connections.isSuccess || connections.data.length > 0)
|
|
50
|
+
return null;
|
|
51
|
+
return (_jsxs(SidebarMenuItem, { children: [_jsxs(SidebarMenuButton, { className: "text-sidebar-foreground bg-hover group-has-data-[sidebar=menu-action]/menu-item:pr-8", onClick: () => {
|
|
52
|
+
onOpenConnect();
|
|
53
|
+
if (isMobile)
|
|
54
|
+
setOpenMobile(false);
|
|
55
|
+
}, children: [_jsx(BrowserIcon, { brand: "chrome", tone: "current", className: "text-muted-foreground size-4" }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: t('promoLabel') })] }), _jsx(SidebarMenuAction, { onClick: onDismiss, "aria-label": t('dismissPromo'), showOnHover: true, className: "mr-1", children: _jsx(XIcon, {}) })] }));
|
|
56
|
+
}
|
|
@@ -2,28 +2,29 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
4
|
* ProjectManifestUpgradeAlert — the left-sidebar nudge that makes a project's
|
|
5
|
-
*
|
|
5
|
+
* pre-v3 manifest (kortix_version 1 or 2) impossible to miss. Sits just above Files/Customize and
|
|
6
6
|
* wears the shared footer alert shell (`sidebar-alert.tsx`) — the same one
|
|
7
7
|
* `ProjectSandboxAlert` wears. It used to be a hand-copied duplicate of that
|
|
8
8
|
* file's shell, which is how the two drifted to different paddings and
|
|
9
9
|
* different open-state tints while their own comments claimed they matched.
|
|
10
10
|
*
|
|
11
11
|
* Tone is `info` rather than a failure colour: this is a recommended upgrade,
|
|
12
|
-
* not something that is broken.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* a change request
|
|
12
|
+
* not something that is broken. A v2 project keeps running unchanged until
|
|
13
|
+
* someone upgrades it. The action is one click, end to end: `useRunUpgrade`
|
|
14
|
+
* mints a session seeded with `MIGRATE_TO_V3_PROMPT`, boots the project's
|
|
15
|
+
* default agent (git/CR powers), and drops the user into the thread where it
|
|
16
|
+
* auto-runs — `kortix migrate` to kortix.yaml version 3, then a change request
|
|
17
|
+
* for review.
|
|
17
18
|
*
|
|
18
|
-
* Only renders while the project is on v1 AND the viewer can actually
|
|
19
|
-
* (`project.write` — the people who can push and open the CR); it
|
|
20
|
-
* for good the moment the manifest lands on
|
|
19
|
+
* Only renders while the project is on v1 or v2 AND the viewer can actually
|
|
20
|
+
* act on it (`project.write` — the people who can push and open the CR); it
|
|
21
|
+
* disappears for good the moment the manifest lands on v3.
|
|
21
22
|
*/
|
|
22
23
|
import { useTranslations } from '../../../i18n/index.js';
|
|
23
24
|
import { useState } from 'react';
|
|
24
25
|
import { Button } from '../../../primitives/button.js';
|
|
25
26
|
import Loading from '../../../primitives/loading.js';
|
|
26
|
-
import {
|
|
27
|
+
import { MIGRATE_TO_V3_PROMPT, manifestNeedsUpgrade, useProjectManifestVersion, useRunUpgrade, } from '../../../customize/migrate-to-v2/index.js';
|
|
27
28
|
import { SidebarAlert, SidebarAlertActions, SidebarAlertBody, SidebarAlertText, } from './sidebar-alert.js';
|
|
28
29
|
import { PROJECT_ACTIONS } from '../../../internal/lib/project-actions.js';
|
|
29
30
|
import { useProjectPageCans } from '../../../internal/lib/use-project-can.js';
|
|
@@ -36,13 +37,12 @@ export function ProjectManifestUpgradeAlertView({ visible, pending, onMigrate, d
|
|
|
36
37
|
if (!visible)
|
|
37
38
|
return null;
|
|
38
39
|
return (_jsxs(SidebarAlert, { tone: "info", icon: _jsx(ArrowUpCircle, { className: "size-4" }), label: t('manifestUpgrade.title'), open: isOpen, onOpenChange: setIsOpen, children: [_jsx(SidebarAlertBody, { children: _jsx(SidebarAlertText, { children: t.rich('manifestUpgrade.description', {
|
|
39
|
-
toml: (chunks) => _jsx("span", { className: "font-mono", children: chunks }),
|
|
40
40
|
yaml: (chunks) => _jsx("span", { className: "font-mono", children: chunks }),
|
|
41
41
|
}) }) }), _jsx(SidebarAlertActions, { children: _jsxs(Button, { size: "sm", className: "w-full", disabled: pending, onClick: onMigrate, children: [pending ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(ArrowUpCircle, { className: "size-3.5 shrink-0" })), t('manifestUpgrade.start')] }) })] }));
|
|
42
42
|
}
|
|
43
43
|
export function ProjectManifestUpgradeAlert({ projectId }) {
|
|
44
44
|
const { version } = useProjectManifestVersion(projectId);
|
|
45
45
|
const canWrite = useProjectPageCans(projectId)[PROJECT_ACTIONS.PROJECT_WRITE]?.allowed === true;
|
|
46
|
-
const
|
|
47
|
-
return (_jsx(ProjectManifestUpgradeAlertView, { visible: version
|
|
46
|
+
const run = useRunUpgrade(projectId);
|
|
47
|
+
return (_jsx(ProjectManifestUpgradeAlertView, { visible: manifestNeedsUpgrade(version) && canWrite, pending: run.pending, onMigrate: () => run.start(MIGRATE_TO_V3_PROMPT) }));
|
|
48
48
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Memory row: the project's Company memory. The sidebar draws it only
|
|
3
|
+
* with `project_channels` on; a host that serves no Memory page gets no row.
|
|
4
|
+
*/
|
|
5
|
+
export declare function ProjectMemoryNavItem({ projectId }: {
|
|
6
|
+
projectId: string;
|
|
7
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { SunDimIcon } from '@phosphor-icons/react';
|
|
4
|
+
import { useTranslations } from '../../../i18n/index.js';
|
|
5
|
+
import { ProjectNavRow } from '../../../internal/layout/project-nav-row.js';
|
|
6
|
+
import { uiRoutes } from '../../../lib/routes.js';
|
|
7
|
+
import { useUiPathname } from '../../../providers/ui-provider.js';
|
|
8
|
+
/**
|
|
9
|
+
* The Memory row: the project's Company memory. The sidebar draws it only
|
|
10
|
+
* with `project_channels` on; a host that serves no Memory page gets no row.
|
|
11
|
+
*/
|
|
12
|
+
export function ProjectMemoryNavItem({ projectId }) {
|
|
13
|
+
const t = useTranslations('spaces.memory.company');
|
|
14
|
+
const pathname = useUiPathname();
|
|
15
|
+
const href = uiRoutes().memory(projectId);
|
|
16
|
+
if (!href)
|
|
17
|
+
return null;
|
|
18
|
+
return (_jsxs(ProjectNavRow, { active: pathname?.startsWith(href) === true, label: t('title'), href: href, prefetch: true, children: [_jsx("span", { className: "shrink-0", children: _jsx(SunDimIcon, {}) }), t('title')] }));
|
|
19
|
+
}
|
|
@@ -4,11 +4,12 @@ import { uiRoutes } from '../../lib/routes.js';
|
|
|
4
4
|
import { capabilityTabHref } from '../../internal/lib/capability-tab-routes.js';
|
|
5
5
|
import { useAppsRowVisible } from './footer/project-apps-nav.js';
|
|
6
6
|
import { useGoalsRowVisible } from './footer/project-goals-nav.js';
|
|
7
|
+
import { useArtifactsRowVisible } from './footer/project-artifacts-nav.js';
|
|
7
8
|
import { useRoomsRowVisible } from './footer/project-rooms-nav.js';
|
|
8
9
|
import { filesRow } from '../../internal/layout/files-nav-label.js';
|
|
9
10
|
import { CustomizeGlyph, useProjectNavRows, } from '../../internal/layout/project-settings-nav.js';
|
|
10
11
|
import { useTranslations } from '../../i18n/index.js';
|
|
11
|
-
import { AppWindowIcon, ChatsTeardropIcon, FoldersIcon, HardDrivesIcon, TargetIcon } from '@phosphor-icons/react';
|
|
12
|
+
import { AppWindowIcon, CardsThreeIcon, ChatsTeardropIcon, FoldersIcon, HardDrivesIcon, TargetIcon } from '@phosphor-icons/react';
|
|
12
13
|
import { useMemo } from 'react';
|
|
13
14
|
/**
|
|
14
15
|
* Label, glyph, destination and availability of every customizable nav row,
|
|
@@ -23,6 +24,7 @@ export function useNavRowMeta(projectId) {
|
|
|
23
24
|
const appsVisible = useAppsRowVisible(projectId);
|
|
24
25
|
const roomsVisible = useRoomsRowVisible(projectId);
|
|
25
26
|
const goalsVisible = useGoalsRowVisible(projectId);
|
|
27
|
+
const artifactsVisible = useArtifactsRowVisible(projectId);
|
|
26
28
|
// Memoized on the gates, not rebuilt per render: the Customize sidebar
|
|
27
29
|
// modal memoizes its rows on this object, and a fresh one per render would
|
|
28
30
|
// re-render every row on every drag frame.
|
|
@@ -30,6 +32,7 @@ export function useNavRowMeta(projectId) {
|
|
|
30
32
|
const appsHref = uiRoutes().apps(projectId);
|
|
31
33
|
const roomsHref = uiRoutes().rooms(projectId);
|
|
32
34
|
const goalsHref = uiRoutes().goals(projectId);
|
|
35
|
+
const artifactsHref = uiRoutes().artifacts(projectId);
|
|
33
36
|
const files = filesTarget ? filesRow(projectId, filesTarget) : null;
|
|
34
37
|
return {
|
|
35
38
|
...(customizeTab
|
|
@@ -68,6 +71,15 @@ export function useNavRowMeta(projectId) {
|
|
|
68
71
|
},
|
|
69
72
|
}
|
|
70
73
|
: {}),
|
|
74
|
+
...(artifactsVisible && artifactsHref
|
|
75
|
+
? {
|
|
76
|
+
artifacts: {
|
|
77
|
+
label: t('artifacts'),
|
|
78
|
+
icon: _jsx(CardsThreeIcon, {}),
|
|
79
|
+
href: artifactsHref,
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
: {}),
|
|
71
83
|
...(files
|
|
72
84
|
? {
|
|
73
85
|
files: {
|
|
@@ -78,5 +90,5 @@ export function useNavRowMeta(projectId) {
|
|
|
78
90
|
}
|
|
79
91
|
: {}),
|
|
80
92
|
};
|
|
81
|
-
}, [t, tI18nComplete, projectId, customizeTab, appsVisible, roomsVisible, goalsVisible, filesTarget]);
|
|
93
|
+
}, [t, tI18nComplete, projectId, customizeTab, appsVisible, roomsVisible, goalsVisible, artifactsVisible, filesTarget]);
|
|
82
94
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ProjectAppsNavItem } from './footer/project-apps-nav.js';
|
|
4
4
|
import { ProjectGoalsNavItem } from './footer/project-goals-nav.js';
|
|
5
|
+
import { ProjectArtifactsNavItem } from './footer/project-artifacts-nav.js';
|
|
5
6
|
import { ProjectRoomsNavItem } from './footer/project-rooms-nav.js';
|
|
6
7
|
import { ProjectFilesNavItem } from './footer/project-files-nav.js';
|
|
7
8
|
import { ProjectCustomizeNavItem } from '../../internal/layout/project-settings-nav.js';
|
|
@@ -98,5 +99,7 @@ function NavItem({ entry, projectId }) {
|
|
|
98
99
|
return _jsx(ProjectRoomsNavItem, { projectId: projectId });
|
|
99
100
|
case 'goals':
|
|
100
101
|
return _jsx(ProjectGoalsNavItem, { projectId: projectId });
|
|
102
|
+
case 'artifacts':
|
|
103
|
+
return _jsx(ProjectArtifactsNavItem, { projectId: projectId });
|
|
101
104
|
}
|
|
102
105
|
}
|