@kortix/ui 0.14.8 → 0.14.9
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 +63 -3
- package/dist/_vendor/shared/app-config.d.ts +175 -0
- package/dist/_vendor/shared/channel-message.d.ts +34 -5
- package/dist/_vendor/shared/index.d.ts +1 -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 +11 -5
- 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 +51 -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 +16 -25
- 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 +5 -0
- package/dist/customize/sections/view/channels-view.d.ts +5 -1
- package/dist/customize/sections/view/channels-view.js +61 -75
- package/dist/customize/sections/view/gateway/gateway-overview.js +10 -2
- package/dist/customize/settings/tabs/experimental-tab.js +35 -16
- package/dist/customize/shared/catalog/catalog-empty-state.d.ts +1 -12
- package/dist/customize/shared/catalog/catalog-empty-state.js +3 -3
- 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 +46 -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 +873 -85
- package/dist/i18n/en.js +888 -100
- 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/auth/auth-card-shell.js +3 -3
- package/dist/internal/components/agent-mark.js +5 -2
- package/dist/internal/connector-logo/connector-logo-source.d.ts +63 -0
- package/dist/internal/connector-logo/connector-logo-source.js +48 -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/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/injected-scripts.d.ts +7 -0
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +15 -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 +9 -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/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 +6 -2
- 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/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-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 +5 -1
- package/dist/session/participants/session-participants.js +9 -2
- package/dist/session/prompts/approval-request.d.ts +5 -0
- package/dist/session/prompts/approval-request.js +7 -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 +3 -1
- package/dist/session/thread/session-thread.js +9 -2
- 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 +240 -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 +7 -1
- package/dist/session/turn/user-message.js +21 -7
- 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/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-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 +9 -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 +27 -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 +28 -4
- 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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProjectAccessRequest } from '@kortix/sdk';
|
|
1
2
|
import { type HubTarget } from '../../internal/stores/account-panel-store.js';
|
|
2
3
|
/**
|
|
3
4
|
* The pending-access-requests control, floated over the hero's top-right
|
|
@@ -6,6 +7,11 @@ import { type HubTarget } from '../../internal/stores/account-panel-store.js';
|
|
|
6
7
|
* (KRTX-1742), and two bells on one screen would read as one control. With
|
|
7
8
|
* the flag off there is no inbox bell, and the glyph stays the bell.
|
|
8
9
|
*
|
|
10
|
+
* It draws its count with the inbox's `BellMark`, in the yellow "needs you"
|
|
11
|
+
* tone: a request waits on the person, so it reads like the sidebar bell.
|
|
12
|
+
* Hover opens the people card of the session header's participant stack:
|
|
13
|
+
* who asked and when, with one way to review.
|
|
14
|
+
*
|
|
9
15
|
* ## One button, not two
|
|
10
16
|
*
|
|
11
17
|
* The destination needs the project's `account_id`, which arrives on its own
|
|
@@ -23,8 +29,9 @@ import { type HubTarget } from '../../internal/stores/account-panel-store.js';
|
|
|
23
29
|
* runs at 80% of the enter. Under reduced motion the scale is dropped and the
|
|
24
30
|
* fade stays, because the fade is what says "this is new".
|
|
25
31
|
*/
|
|
26
|
-
export declare function AccessRequestsBell({
|
|
27
|
-
|
|
32
|
+
export declare function AccessRequestsBell({ requests, to, notificationCenter, className, }: {
|
|
33
|
+
/** The project's pending access requests, newest last as the API returns them. */
|
|
34
|
+
requests: ProjectAccessRequest[];
|
|
28
35
|
/** The account hub's Access › Projects pane, scoped to this project.
|
|
29
36
|
* `null` while `account_id` is still loading — the bell renders inert. */
|
|
30
37
|
to: HubTarget | null;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { BellIcon, UserPlusIcon } from '@phosphor-icons/react';
|
|
4
4
|
import { AnimatePresence, m, useReducedMotion } from 'motion/react';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { BellMark } from '../../internal/notifications/notification-bell.js';
|
|
5
7
|
import { HubLink } from '../../internal/account-hub/account-hub-location.js';
|
|
6
|
-
import { Badge } from '../../primitives/badge.js';
|
|
7
8
|
import { Button } from '../../primitives/button.js';
|
|
8
|
-
import
|
|
9
|
+
import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
|
|
10
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from '../../primitives/hover-card.js';
|
|
11
|
+
import { UserAvatar } from '../../primitives/user-avatar.js';
|
|
12
|
+
import { useLocale, useTranslations } from '../../i18n/index.js';
|
|
13
|
+
import { relativeTime } from '../../internal/lib/relative-time.js';
|
|
9
14
|
import { cn } from '../../internal/lib/utils.js';
|
|
10
15
|
/**
|
|
11
16
|
* The pending-access-requests control, floated over the hero's top-right
|
|
@@ -14,6 +19,11 @@ import { cn } from '../../internal/lib/utils.js';
|
|
|
14
19
|
* (KRTX-1742), and two bells on one screen would read as one control. With
|
|
15
20
|
* the flag off there is no inbox bell, and the glyph stays the bell.
|
|
16
21
|
*
|
|
22
|
+
* It draws its count with the inbox's `BellMark`, in the yellow "needs you"
|
|
23
|
+
* tone: a request waits on the person, so it reads like the sidebar bell.
|
|
24
|
+
* Hover opens the people card of the session header's participant stack:
|
|
25
|
+
* who asked and when, with one way to review.
|
|
26
|
+
*
|
|
17
27
|
* ## One button, not two
|
|
18
28
|
*
|
|
19
29
|
* The destination needs the project's `account_id`, which arrives on its own
|
|
@@ -31,11 +41,15 @@ import { cn } from '../../internal/lib/utils.js';
|
|
|
31
41
|
* runs at 80% of the enter. Under reduced motion the scale is dropped and the
|
|
32
42
|
* fade stays, because the fade is what says "this is new".
|
|
33
43
|
*/
|
|
34
|
-
export function AccessRequestsBell({
|
|
44
|
+
export function AccessRequestsBell({ requests, to, notificationCenter = false, className, }) {
|
|
45
|
+
const t = useTranslations('hardcodedUi.i18nComplete');
|
|
46
|
+
const locale = useLocale();
|
|
35
47
|
const reduceMotion = useReducedMotion();
|
|
48
|
+
const [open, setOpen] = useState(false);
|
|
49
|
+
const count = requests.length;
|
|
36
50
|
const label = `${count} pending access request${count === 1 ? '' : 's'}`;
|
|
37
51
|
const Glyph = notificationCenter ? UserPlusIcon : BellIcon;
|
|
38
|
-
const body =
|
|
52
|
+
const body = _jsx(BellMark, { count: count, needsYou: true, icon: Glyph });
|
|
39
53
|
return (_jsx(AnimatePresence, { children: count > 0 && (_jsx(m.div, { initial: reduceMotion ? { opacity: 0 } : { opacity: 0, scale: 0.95 }, animate: {
|
|
40
54
|
opacity: 1,
|
|
41
55
|
scale: 1,
|
|
@@ -44,5 +58,5 @@ export function AccessRequestsBell({ count, to, notificationCenter = false, clas
|
|
|
44
58
|
opacity: 0,
|
|
45
59
|
scale: reduceMotion ? 1 : 0.95,
|
|
46
60
|
transition: { duration: 0.12, ease: [0.23, 1, 0.32, 1] },
|
|
47
|
-
}, className: cn('absolute top-
|
|
61
|
+
}, className: cn('absolute top-2 right-2 z-20', className), children: _jsxs(HoverCard, { open: open, onOpenChange: setOpen, openDelay: 300, closeDelay: 100, children: [_jsx(HoverCardTrigger, { asChild: true, children: _jsx(Button, { asChild: Boolean(to), type: "button", variant: "ghost", size: "icon", className: "relative shrink-0", "aria-label": label, children: to ? _jsx(HubLink, { to: to, children: body }) : body }) }), _jsxs(HoverCardContent, { side: "bottom", align: "end", sideOffset: 6, animated: false, className: "w-80 overflow-hidden p-0", onEscapeKeyDown: () => setOpen(false), children: [_jsxs("div", { className: "text-muted-foreground flex items-center justify-between px-3.5 pt-2.5 pb-1 text-xs", children: [_jsx("span", { children: t.raw('textf810ceed99d6') }), _jsx("span", { className: "tabular-nums", children: count })] }), _jsx(FadedScrollArea, { fadeColor: "from-popover", fadeSize: "6", className: "max-h-64 overscroll-contain", children: _jsx("ul", { className: "p-1 pt-0", children: requests.map((request) => (_jsx("li", { children: _jsxs("div", { className: "text-foreground flex min-h-9 items-center gap-2.5 px-2 py-1 text-sm", children: [_jsx(UserAvatar, { email: request.requester_email, size: "md" }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "truncate leading-tight", children: request.requester_email }), _jsxs("span", { className: "text-muted-foreground truncate text-xs leading-tight tabular-nums", children: [t.raw('text2d9e28289fac'), " ", relativeTime(request.created_at, locale)] })] })] }) }, request.request_id))) }) }), to ? (_jsx("div", { className: "border-border border-t p-1", children: _jsx(Button, { asChild: true, variant: "ghost", size: "sm", className: "w-full justify-center", children: _jsx(HubLink, { to: to, onClick: () => setOpen(false), children: t.raw('textaff0766a5290') }) }) })) : null] })] }) }, "access-requests-bell")) }));
|
|
48
62
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { HubTarget } from '../../internal/stores/account-panel-store.js';
|
|
3
2
|
/**
|
|
4
3
|
* "Your first chat with Kortix": what project home shows a new person instead
|
|
5
4
|
* of its usual greeting, until they send their first message.
|
|
@@ -10,30 +9,18 @@ import type { HubTarget } from '../../internal/stores/account-panel-store.js';
|
|
|
10
9
|
* composer already where it stays, so nothing jumps.
|
|
11
10
|
*
|
|
12
11
|
* The welcome is static text, and it stays: it is never replaced by a
|
|
13
|
-
* session. Every send from here
|
|
14
|
-
*
|
|
15
|
-
* shows this welcome again.
|
|
12
|
+
* session. Every send from here starts a new session and opens it; coming
|
|
13
|
+
* back to project home shows this welcome again.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* -
|
|
21
|
-
*
|
|
22
|
-
* - "Connect Slack" runs the one-click Slack install in a popup and turns into
|
|
23
|
-
* a checked tile once the install lands.
|
|
15
|
+
* It reads as one short message: a greeting, one line of intro, then what
|
|
16
|
+
* Kortix can do — six items to read, not to click — and one line that points
|
|
17
|
+
* at the composer. A new project's composer holds "Onboard me" here
|
|
18
|
+
* (`project-home.tsx`); the agent's guided setup does the connecting and
|
|
19
|
+
* inviting the items describe.
|
|
24
20
|
*
|
|
25
21
|
* The welcome fades in once, over 300ms. It is opacity only, so reduced motion
|
|
26
22
|
* needs no other variant.
|
|
27
23
|
*/
|
|
28
|
-
export declare function FirstChat({
|
|
29
|
-
projectId: string;
|
|
30
|
-
/** Where "Invite teammate" opens; `null` hides the tile (no permission, or
|
|
31
|
-
* the project's account is still loading). */
|
|
32
|
-
inviteTo: HubTarget | null;
|
|
33
|
-
/** The docked composer. Project home owns its wiring. */
|
|
24
|
+
export declare function FirstChat({ composer }: {
|
|
34
25
|
composer: ReactNode;
|
|
35
|
-
/** A send is in flight: the starters wait with the composer. */
|
|
36
|
-
busy: boolean;
|
|
37
|
-
onRecommendTools: () => void;
|
|
38
|
-
onUpdateMemory: () => void;
|
|
39
26
|
}): import("react").JSX.Element;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import Loading from '../../primitives/loading.js';
|
|
6
|
-
import { HubLink } from '../../internal/account-hub/account-hub-location.js';
|
|
7
|
-
import { Slack } from '../../internal/icons/slack.js';
|
|
8
|
-
import { useSlackInstall, useSlackMode } from '../../internal/hooks/channels/use-channels-installations.js';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AppWindowIcon, BriefcaseIcon, ChatsCircleIcon, ClockIcon, GrainsIcon, PlugsConnectedIcon, } from '@phosphor-icons/react';
|
|
4
|
+
import { useId } from 'react';
|
|
9
5
|
import { useUiViewer } from '../../providers/ui-provider.js';
|
|
10
6
|
import { SESSION_TRANSCRIPT_CLASS } from '../../session/thread/session-transcript-class.js';
|
|
11
7
|
import { useTranslations } from '../../i18n/index.js';
|
|
12
8
|
import { cn } from '../../internal/lib/utils.js';
|
|
13
9
|
import { firstNameOf } from './first-chat-name.js';
|
|
10
|
+
/** What Kortix does, in the order a new person meets it. Keys under `firstChat.can`. */
|
|
11
|
+
const CAPABILITIES = [
|
|
12
|
+
{ key: 'work', icon: BriefcaseIcon },
|
|
13
|
+
{ key: 'memory', icon: GrainsIcon },
|
|
14
|
+
{ key: 'tools', icon: PlugsConnectedIcon },
|
|
15
|
+
{ key: 'chat', icon: ChatsCircleIcon },
|
|
16
|
+
{ key: 'schedule', icon: ClockIcon },
|
|
17
|
+
{ key: 'apps', icon: AppWindowIcon },
|
|
18
|
+
];
|
|
14
19
|
/**
|
|
15
20
|
* "Your first chat with Kortix": what project home shows a new person instead
|
|
16
21
|
* of its usual greeting, until they send their first message.
|
|
@@ -21,81 +26,26 @@ import { firstNameOf } from './first-chat-name.js';
|
|
|
21
26
|
* composer already where it stays, so nothing jumps.
|
|
22
27
|
*
|
|
23
28
|
* The welcome is static text, and it stays: it is never replaced by a
|
|
24
|
-
* session. Every send from here
|
|
25
|
-
*
|
|
26
|
-
* shows this welcome again.
|
|
29
|
+
* session. Every send from here starts a new session and opens it; coming
|
|
30
|
+
* back to project home shows this welcome again.
|
|
27
31
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* -
|
|
32
|
-
*
|
|
33
|
-
* - "Connect Slack" runs the one-click Slack install in a popup and turns into
|
|
34
|
-
* a checked tile once the install lands.
|
|
32
|
+
* It reads as one short message: a greeting, one line of intro, then what
|
|
33
|
+
* Kortix can do — six items to read, not to click — and one line that points
|
|
34
|
+
* at the composer. A new project's composer holds "Onboard me" here
|
|
35
|
+
* (`project-home.tsx`); the agent's guided setup does the connecting and
|
|
36
|
+
* inviting the items describe.
|
|
35
37
|
*
|
|
36
38
|
* The welcome fades in once, over 300ms. It is opacity only, so reduced motion
|
|
37
39
|
* needs no other variant.
|
|
38
40
|
*/
|
|
39
|
-
export function FirstChat({
|
|
41
|
+
export function FirstChat({ composer }) {
|
|
40
42
|
const t = useTranslations('firstChat');
|
|
41
43
|
const user = useUiViewer();
|
|
42
44
|
const name = firstNameOf(user?.metadata);
|
|
43
45
|
const headingId = useId();
|
|
44
|
-
const
|
|
46
|
+
const canId = useId();
|
|
45
47
|
return (_jsxs("div", { className: "relative z-10 flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: _jsxs("section", { "aria-labelledby": headingId, className: cn(SESSION_TRANSCRIPT_CLASS,
|
|
46
48
|
// Below the floating sidebar toggle, and a little lower on wide
|
|
47
49
|
// screens where the column has room to breathe.
|
|
48
|
-
'flex flex-col gap-10 pt-16 pb-8 lg:pt-24', 'transition-opacity duration-(--duration-slow) ease-out starting:opacity-0'), children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("h1", { id: headingId, className: "text-foreground text-2xl font-medium tracking-tight text-balance", children: name ? t('greeting', { name }) : t('greetingNoName') }), _jsx("p", { className: "text-muted-foreground max-w-prose text-base leading-7 text-pretty", children: t('intro') })] }), _jsxs("div", {
|
|
49
|
-
}
|
|
50
|
-
const tileClass = cn('border-border bg-popover text-foreground relative flex h-30 w-auto flex-col justify-between rounded-md border p-4 text-left', 'transition-[background-color,border-color,scale] duration-(--duration-normal)', 'focus-visible:ring-kortix-base focus-visible:ring-[0.6px] focus-visible:outline-none', 'hover:border-primary/20 cursor-pointer active:scale-[0.97] motion-reduce:active:scale-100', 'disabled:pointer-events-none disabled:opacity-50', 'aria-disabled:pointer-events-none');
|
|
51
|
-
/** The icon in its own chip at the top, the title at the bottom on one line. */
|
|
52
|
-
function TileBody({ glyph, label, badge }) {
|
|
53
|
-
return (_jsxs(_Fragment, { children: [_jsx("span", { className: "bg-muted text-foreground flex size-8 items-center justify-center rounded-sm", children: glyph }), _jsx("span", { className: "truncate text-sm leading-5 font-medium whitespace-nowrap", children: label }), badge && (_jsx("span", { "aria-hidden": true, className: "absolute top-4 right-4", children: badge }))] }));
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* A square starter that fills the composer. The same tile shape as
|
|
57
|
-
* onboarding's app grid, so the first screen after onboarding reads as its
|
|
58
|
-
* continuation.
|
|
59
|
-
*/
|
|
60
|
-
function StarterTile({ icon: Glyph, label, disabled, onClick, }) {
|
|
61
|
-
return (_jsx("button", { type: "button", disabled: disabled, onClick: onClick, className: tileClass, children: _jsx(TileBody, { glyph: _jsx(Glyph, { className: "size-4.5", "aria-hidden": true }), label: label }) }));
|
|
62
|
-
}
|
|
63
|
-
/** How long a popup install may take before the tile stops waiting on it. */
|
|
64
|
-
const SLACK_WAIT_MS = 5 * 60_000;
|
|
65
|
-
const SLACK_POLL_MS = 2_500;
|
|
66
|
-
/**
|
|
67
|
-
* One click installs Kortix into Slack: the popup opens inside the click, and
|
|
68
|
-
* the tile polls the installation until it lands, then shows a check. With no
|
|
69
|
-
* managed Slack app on this deployment (`oauth_available` false) the tile is
|
|
70
|
-
* hidden; the custom-app setup lives on the Channels page.
|
|
71
|
-
*/
|
|
72
|
-
function SlackTile({ projectId }) {
|
|
73
|
-
const t = useTranslations('firstChat');
|
|
74
|
-
const mode = useSlackMode(projectId);
|
|
75
|
-
const install = useSlackInstall(projectId);
|
|
76
|
-
const [waitingSince, setWaitingSince] = useState(null);
|
|
77
|
-
const connected = Boolean(install.data);
|
|
78
|
-
const waiting = waitingSince !== null && !connected;
|
|
79
|
-
const refetch = install.refetch;
|
|
80
|
-
useEffect(() => {
|
|
81
|
-
if (!waiting)
|
|
82
|
-
return;
|
|
83
|
-
const poll = setInterval(() => void refetch(), SLACK_POLL_MS);
|
|
84
|
-
const stop = setTimeout(() => setWaitingSince(null), SLACK_WAIT_MS);
|
|
85
|
-
return () => {
|
|
86
|
-
clearInterval(poll);
|
|
87
|
-
clearTimeout(stop);
|
|
88
|
-
};
|
|
89
|
-
}, [waiting, refetch]);
|
|
90
|
-
const installUrl = mode.data?.oauth_available ? mode.data.install_url : null;
|
|
91
|
-
if (!installUrl && !connected)
|
|
92
|
-
return null;
|
|
93
|
-
return (_jsx("button", { type: "button", "aria-disabled": connected || undefined, "aria-busy": waiting || undefined, "aria-label": connected ? t('slackConnected') : t('connectSlack'), onClick: () => {
|
|
94
|
-
if (connected || !installUrl)
|
|
95
|
-
return;
|
|
96
|
-
window.open(installUrl, 'kortix-slack-install', 'width=640,height=780,noopener');
|
|
97
|
-
setWaitingSince(Date.now());
|
|
98
|
-
}, className: cn(tileClass, connected && 'border-primary/40 bg-primary/[0.05] cursor-default'), children: _jsx(TileBody, { glyph: _jsx(Slack, { className: "size-4" }), label: connected ? t('slackConnected') : t('connectSlack'), badge: waiting ? (
|
|
99
|
-
// Inside a <button> the spinner defaults to `text-background`.
|
|
100
|
-
_jsx(Loading, { variant: "spokes", className: "text-foreground! size-4" })) : connected ? (_jsx(CheckCircleIcon, { weight: "fill", className: "text-foreground size-4" })) : null }) }));
|
|
50
|
+
'flex flex-col gap-10 pt-16 pb-8 lg:pt-24', 'transition-opacity duration-(--duration-slow) ease-out starting:opacity-0'), children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("h1", { id: headingId, className: "text-foreground text-2xl font-medium tracking-tight text-balance", children: name ? t('greeting', { name }) : t('greetingNoName') }), _jsx("p", { className: "text-muted-foreground max-w-prose text-base leading-7 text-pretty", children: t('intro') })] }), _jsxs("div", { className: "flex flex-col gap-4", children: [_jsx("h2", { id: canId, className: "text-foreground text-base font-medium", children: t('canTitle') }), _jsx("ul", { "aria-labelledby": canId, className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3", children: CAPABILITIES.map(({ key, icon: Glyph }) => (_jsxs("li", { className: "border-border bg-popover flex flex-col gap-3 rounded-md border p-4", children: [_jsx("span", { className: "bg-muted text-foreground flex size-8 items-center justify-center rounded-sm", children: _jsx(Glyph, { className: "size-4", "aria-hidden": true }) }), _jsxs("span", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-foreground text-sm leading-5 font-medium", children: t(`can.${key}.title`) }), _jsx("span", { className: "text-muted-foreground text-sm leading-5 text-pretty", children: t(`can.${key}.body`) })] })] }, key))) }), _jsx("p", { className: "text-muted-foreground text-sm leading-5 text-pretty", children: t('startHint') })] })] }) }), composer] }));
|
|
101
51
|
}
|
|
@@ -20,6 +20,12 @@ export { useProjectHomeSend, type UseProjectHomeSendOptions } from './layout/use
|
|
|
20
20
|
export { SavedSessionSkeleton } from './saved-session-skeleton.js';
|
|
21
21
|
export { SessionLayout, SessionWorkspace, type SessionLayoutProps, type SessionWorkspaceProps, } from './session-workspace.js';
|
|
22
22
|
export { ProjectSessionsView } from './sessions/project-sessions-view.js';
|
|
23
|
+
export { SpaceView, type SpaceFolder, type SpaceTarget, type SpaceViewProps } from './spaces/space-view.js';
|
|
24
|
+
export { ChannelGlyph } from './spaces/channel-glyph.js';
|
|
25
|
+
export { agentLabel } from './spaces/space-timeline.js';
|
|
26
|
+
export { MemoryView, type MemoryViewProps } from './memory/memory-view.js';
|
|
27
|
+
export { type MemoryLayerRef, useMemoryPageHref } from '../internal/lib/memory-href.js';
|
|
28
|
+
export { CompanyMemoryPage } from './memory/company-memory-page.js';
|
|
23
29
|
export { ProjectSessionList } from './sidebar/project-session-list.js';
|
|
24
30
|
export { ProjectSidebar } from './sidebar/project-sidebar.js';
|
|
25
31
|
export { ShareSessionModal } from './sidebar/modal/share-session-modal.js';
|
package/dist/workspace/index.js
CHANGED
|
@@ -20,6 +20,12 @@ export { useProjectHomeSend } from './layout/use-project-home-send.js';
|
|
|
20
20
|
export { SavedSessionSkeleton } from './saved-session-skeleton.js';
|
|
21
21
|
export { SessionLayout, SessionWorkspace, } from './session-workspace.js';
|
|
22
22
|
export { ProjectSessionsView } from './sessions/project-sessions-view.js';
|
|
23
|
+
export { SpaceView } from './spaces/space-view.js';
|
|
24
|
+
export { ChannelGlyph } from './spaces/channel-glyph.js';
|
|
25
|
+
export { agentLabel } from './spaces/space-timeline.js';
|
|
26
|
+
export { MemoryView } from './memory/memory-view.js';
|
|
27
|
+
export { useMemoryPageHref } from '../internal/lib/memory-href.js';
|
|
28
|
+
export { CompanyMemoryPage } from './memory/company-memory-page.js';
|
|
23
29
|
export { ProjectSessionList } from './sidebar/project-session-list.js';
|
|
24
30
|
export { ProjectSidebar } from './sidebar/project-sidebar.js';
|
|
25
31
|
export { ShareSessionModal } from './sidebar/modal/share-session-modal.js';
|
|
@@ -11,8 +11,14 @@ export interface ProjectHomeSendOptions extends ComposerOptions {
|
|
|
11
11
|
* setup checklist.
|
|
12
12
|
*
|
|
13
13
|
* Until a new project's first message is sent, the column is the first chat
|
|
14
|
-
* instead (`home/first-chat.tsx
|
|
15
|
-
*
|
|
14
|
+
* instead (`home/first-chat.tsx`): the same composer, docked at the bottom
|
|
15
|
+
* under a welcome from Kortix.
|
|
16
|
+
*
|
|
17
|
+
* With `onboarding`, a project that is not onboarded yet redirects here, and
|
|
18
|
+
* the first chat's composer holds "Onboard me". It sends itself as soon as a
|
|
19
|
+
* model is usable; the agent runs the onboarding from there (the
|
|
20
|
+
* `kortix-onboarding` skill). Without a model the composer's tray offers
|
|
21
|
+
* Upgrade and Connect model.
|
|
16
22
|
*
|
|
17
23
|
* This component owns the composer's WIRING — which sandbox, which agent, what
|
|
18
24
|
* a send carries, what a prefill does. Everything it renders is a component of
|
|
@@ -31,6 +37,12 @@ export type ProjectHomeProps = {
|
|
|
31
37
|
busy?: boolean;
|
|
32
38
|
/** With the default send: runs first; throw to refuse the send (the draft stays). */
|
|
33
39
|
beforeSend?: () => Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* A project that is not onboarded yet opens on the first chat, whose
|
|
42
|
+
* composer sends "Onboard me" once a model is usable. Off by default: a
|
|
43
|
+
* white-label or SDK host decides its own first run. Kortix web turns it on.
|
|
44
|
+
*/
|
|
45
|
+
onboarding?: boolean;
|
|
34
46
|
};
|
|
35
47
|
/**
|
|
36
48
|
* Self-contained: the composer and its pickers read the project from
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useQuery } from '@tanstack/react-query';
|
|
3
|
+
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
4
4
|
import { hubTarget } from '../../internal/stores/account-panel-store.js';
|
|
5
5
|
import { useTranslations } from '../../i18n/index.js';
|
|
6
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
7
|
import { ComposerChatInput } from '../../session/composer/composer-chat-input.js';
|
|
8
8
|
import { ComposerDropZone } from '../../session/composer/composer-drop-zone.js';
|
|
9
9
|
import { SidebarToggle } from '../../internal/layout/sidebar-toggle.js';
|
|
10
10
|
import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
|
|
11
11
|
import { useIsMobile } from '../../internal/hooks/index.js';
|
|
12
|
-
import { useProjectCan } from '../../internal/lib/use-project-can.js';
|
|
12
|
+
import { useProjectCan, useProjectCans } from '../../internal/lib/use-project-can.js';
|
|
13
13
|
import { useComposerPrefillStore } from '../../internal/stores/composer-prefill-store.js';
|
|
14
|
-
import { isFirstChatRequested, useFirstChatPending } from '../../internal/stores/first-chat-store.js';
|
|
14
|
+
import { firstChatHref, isFirstChatRequested, useFirstChatPending, useFirstChatStore, } from '../../internal/stores/first-chat-store.js';
|
|
15
15
|
import { ProjectScope } from '../../internal/project-scope.js';
|
|
16
|
-
import { useUiComponents, useUiSearchParams } from '../../providers/ui-provider.js';
|
|
17
|
-
import { getProjectDetail, listProjectAccessRequests, listProjectSandboxes, } from '@kortix/sdk';
|
|
18
|
-
import { contract, qk } from '@kortix/sdk/react';
|
|
16
|
+
import { useUiComponents, useUiRouter, useUiSearchParams } from '../../providers/ui-provider.js';
|
|
17
|
+
import { getProjectDetail, listProjectAccessRequests, listProjectSandboxes, setProjectOnboardingComplete, } from '@kortix/sdk';
|
|
18
|
+
import { contract, invalidateProject, qk } from '@kortix/sdk/react';
|
|
19
19
|
import { META_SANDBOX_SLUG, isMetaAgentName } from '../../_vendor/kortix-shared.js';
|
|
20
20
|
import { AccessRequestsBell } from '../home/access-requests-bell.js';
|
|
21
21
|
import { notificationCenterOn } from '../../internal/hooks/use-notification-center.js';
|
|
@@ -26,6 +26,11 @@ import { useProjectHomeSend } from './use-project-home-send.js';
|
|
|
26
26
|
// This path is this view's public surface — the instant session shell and the
|
|
27
27
|
// IAM tests already import from here, so the moved pieces keep their address.
|
|
28
28
|
export { ProjectHomeWelcomeBody } from '../home/welcome-body.js';
|
|
29
|
+
/** What finishing the onboarding takes. Module-level: the batch key needs a stable list. */
|
|
30
|
+
const ONBOARDING_ACTIONS = [
|
|
31
|
+
PROJECT_ACTIONS.PROJECT_SETTINGS_WRITE,
|
|
32
|
+
PROJECT_ACTIONS.PROJECT_SESSION_START,
|
|
33
|
+
];
|
|
29
34
|
/**
|
|
30
35
|
* Self-contained: the composer and its pickers read the project from
|
|
31
36
|
* `SessionIdsProvider`, so the home provides it for its own subtree.
|
|
@@ -33,7 +38,7 @@ export { ProjectHomeWelcomeBody } from '../home/welcome-body.js';
|
|
|
33
38
|
export function ProjectHome(props) {
|
|
34
39
|
return (_jsx(ProjectScope, { projectId: props.projectId, children: _jsx(ProjectHomeView, { ...props }) }));
|
|
35
40
|
}
|
|
36
|
-
function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
|
|
41
|
+
function ProjectHomeView({ projectId, onSend, busy, beforeSend, onboarding: onboardingEnabled = false, }) {
|
|
37
42
|
const defaultSend = useProjectHomeSend(projectId, { beforeSend });
|
|
38
43
|
const { HomeAnnouncement } = useUiComponents();
|
|
39
44
|
const send = onSend ?? defaultSend.send;
|
|
@@ -45,7 +50,9 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
|
|
|
45
50
|
// home, which "New session" opens, stays the normal home.
|
|
46
51
|
const searchParams = useUiSearchParams();
|
|
47
52
|
const firstChatPending = useFirstChatPending(projectId);
|
|
48
|
-
const
|
|
53
|
+
const firstChatRequested = isFirstChatRequested(searchParams);
|
|
54
|
+
const router = useUiRouter();
|
|
55
|
+
const queryClient = useQueryClient();
|
|
49
56
|
const [selectedSlug, setSelectedSlug] = useState(null);
|
|
50
57
|
const [selectedAgent, setSelectedAgent] = useState(null);
|
|
51
58
|
const [prefill, setPrefill] = useState(null);
|
|
@@ -83,7 +90,6 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
|
|
|
83
90
|
...contract('inventory'),
|
|
84
91
|
refetchOnWindowFocus: false,
|
|
85
92
|
});
|
|
86
|
-
const pendingAccessCount = accessRequests.data?.requests.length ?? 0;
|
|
87
93
|
// Same query key page.tsx (`ProjectIndexPage`) already fetches for this
|
|
88
94
|
// project — this dedupes against that cache entry rather than firing a
|
|
89
95
|
// second request. Needed here only to resolve `account_id` for the pending
|
|
@@ -97,10 +103,37 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
|
|
|
97
103
|
...contract('config'),
|
|
98
104
|
});
|
|
99
105
|
const accountId = projectDetailQuery.data?.project?.account_id;
|
|
100
|
-
// The
|
|
101
|
-
// (`project-shell.tsx`); the promo waits for the stamp (KRTX-2378).
|
|
106
|
+
// The promo waits for the onboarding stamp (KRTX-2378).
|
|
102
107
|
const onboarded = Boolean(projectDetailQuery.data?.project?.metadata
|
|
103
108
|
?.onboarding_completed_at);
|
|
109
|
+
// Only someone who can finish the onboarding is sent into it: the kickoff
|
|
110
|
+
// starts a session (project.session.start) and the stamp,
|
|
111
|
+
// `PATCH /projects/:id/onboarding`, asserts project.settings.write. A role
|
|
112
|
+
// missing either would auto-send a kickoff whose stamp is refused, and get
|
|
113
|
+
// the onboarding again on every visit. `=== true`: an unresolved probe
|
|
114
|
+
// never redirects someone the onboarding is not for.
|
|
115
|
+
const onboardingCans = useProjectCans(projectId, ONBOARDING_ACTIONS);
|
|
116
|
+
const canSetUpProject = ONBOARDING_ACTIONS.every((action) => onboardingCans[action]?.allowed === true);
|
|
117
|
+
const onboarding = onboardingEnabled && projectDetailQuery.isSuccess && !onboarded && canSetUpProject;
|
|
118
|
+
// The onboarding lands on the first chat: it starts the chat (the sidebar
|
|
119
|
+
// row) and moves the address to it. Rendered as the first chat from this
|
|
120
|
+
// render on, so the usual home never paints in between.
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
if (!onboarding)
|
|
123
|
+
return;
|
|
124
|
+
useFirstChatStore.getState().start(projectId);
|
|
125
|
+
if (!firstChatRequested)
|
|
126
|
+
router.replace(firstChatHref(projectId));
|
|
127
|
+
}, [onboarding, firstChatRequested, projectId, router]);
|
|
128
|
+
const firstChat = (firstChatPending && firstChatRequested) || onboarding;
|
|
129
|
+
// Once per mount: a second prefill id would send a second kickoff.
|
|
130
|
+
const kickoffQueuedRef = useRef(false);
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
if (!onboarding || kickoffQueuedRef.current)
|
|
133
|
+
return;
|
|
134
|
+
kickoffQueuedRef.current = true;
|
|
135
|
+
setPrefill({ text: tFirstChat('kickoff'), id: Date.now(), submit: 'when-ready' });
|
|
136
|
+
}, [onboarding, tFirstChat]);
|
|
104
137
|
// Resolved during render so the bell is an anchor and Next holds its payload
|
|
105
138
|
// in the segment cache. `account_id` arrives on a different query than the
|
|
106
139
|
// count, so the bell can paint before the destination exists.
|
|
@@ -108,16 +141,27 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
|
|
|
108
141
|
? hubTarget(accountId, { tab: 'access-projects', project: projectId })
|
|
109
142
|
: null;
|
|
110
143
|
const handleSend = useCallback((text, files, options, attachments) => {
|
|
111
|
-
const sent = send(text, files, {
|
|
144
|
+
const sent = Promise.resolve(send(text, files, {
|
|
112
145
|
...options,
|
|
113
146
|
...(metaSelected
|
|
114
147
|
? { sandbox_slug: META_SANDBOX_SLUG }
|
|
115
148
|
: selectedSlug
|
|
116
149
|
? { sandbox_slug: selectedSlug }
|
|
117
150
|
: {}),
|
|
118
|
-
}, attachments);
|
|
151
|
+
}, attachments));
|
|
152
|
+
// The first send opened a session: the project is onboarded. Stamped
|
|
153
|
+
// only after the create resolves, so a refused send keeps the
|
|
154
|
+
// onboarding for the next visit.
|
|
155
|
+
if (onboarding) {
|
|
156
|
+
// Spent: a composer mounted later must not apply it again.
|
|
157
|
+
setPrefill(null);
|
|
158
|
+
void sent
|
|
159
|
+
.then(() => setProjectOnboardingComplete(projectId, true))
|
|
160
|
+
.then(() => invalidateProject(queryClient, projectId))
|
|
161
|
+
.catch(() => undefined);
|
|
162
|
+
}
|
|
119
163
|
return sent;
|
|
120
|
-
}, [metaSelected, selectedSlug, send]);
|
|
164
|
+
}, [metaSelected, selectedSlug, send, onboarding, projectId, queryClient]);
|
|
121
165
|
const isMobile = useIsMobile();
|
|
122
166
|
const pendingPrefill = useComposerPrefillStore((s) => s.prefillByProject[projectId]);
|
|
123
167
|
const consumePrefill = useComposerPrefillStore((s) => s.consume);
|
|
@@ -186,10 +230,5 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
|
|
|
186
230
|
return (
|
|
187
231
|
// A file dropped anywhere on the page attaches to the composer, as on a
|
|
188
232
|
// session page.
|
|
189
|
-
_jsxs(ComposerDropZone, { className: "bg-background relative flex min-h-0 flex-1 flex-col overflow-hidden lg:px-4.5", children: [_jsx(ProjectHomeWallpaper, {}), _jsx(SidebarToggle, { placement: "floating" }), _jsx(AccessRequestsBell, {
|
|
190
|
-
// Both starters send at once, each into a new session. Through the
|
|
191
|
-
// composer's own submit, not `sendOutsideComposer`: the send carries
|
|
192
|
-
// the agent and model the composer shows, and a missing model refuses
|
|
193
|
-
// it the same way a typed message is refused.
|
|
194
|
-
onRecommendTools: () => setPrefill({ text: tFirstChat('toolsPrompt'), id: Date.now(), submit: true }), onUpdateMemory: () => setPrefill({ text: tFirstChat('memoryPrompt'), id: Date.now(), submit: true }) })) : (_jsx(ProjectHomeWelcomeBody, { projectId: projectId, onPickSuggestion: applySuggestion, composer: composer }))] }));
|
|
233
|
+
_jsxs(ComposerDropZone, { className: "bg-background relative flex min-h-0 flex-1 flex-col overflow-hidden lg:px-4.5", children: [_jsx(ProjectHomeWallpaper, {}), _jsx(SidebarToggle, { placement: "floating" }), _jsx(AccessRequestsBell, { requests: accessRequests.data?.requests ?? [], to: accessRequestsTo, notificationCenter: notificationCenterOn(projectDetailQuery.data?.project) }), firstChatPending || !onboarded || !HomeAnnouncement ? null : _jsx(HomeAnnouncement, {}), firstChat ? (_jsx(FirstChat, { composer: composer })) : (_jsx(ProjectHomeWelcomeBody, { projectId: projectId, onPickSuggestion: applySuggestion, composer: composer }))] }));
|
|
195
234
|
}
|
|
@@ -7,6 +7,14 @@ export interface UseProjectHomeSendOptions {
|
|
|
7
7
|
* apps/web checks the account's billing state here.
|
|
8
8
|
*/
|
|
9
9
|
beforeSend?: () => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* A channel or DM composer: file each send in this space as a new thread.
|
|
12
|
+
* The page stays: `onOpen(sessionId)` runs instead of the navigation.
|
|
13
|
+
*/
|
|
14
|
+
space?: {
|
|
15
|
+
spaceId: string;
|
|
16
|
+
onOpen: (sessionId: string) => void;
|
|
17
|
+
};
|
|
10
18
|
}
|
|
11
19
|
/**
|
|
12
20
|
* The project home composer's send: create the session (with the prompt as
|
|
@@ -14,7 +22,7 @@ export interface UseProjectHomeSendOptions {
|
|
|
14
22
|
* message on its first frame. `ProjectHome` uses it when the host passes no
|
|
15
23
|
* `onSend`.
|
|
16
24
|
*/
|
|
17
|
-
export declare function useProjectHomeSend(projectId: string, { beforeSend }?: UseProjectHomeSendOptions): {
|
|
25
|
+
export declare function useProjectHomeSend(projectId: string, { beforeSend, space }?: UseProjectHomeSendOptions): {
|
|
18
26
|
send: (text: string, files: AttachedFile[] | undefined, options?: ProjectHomeSendOptions, attachments?: AttachmentSubmission) => Promise<void>;
|
|
19
27
|
sending: boolean;
|
|
20
28
|
};
|