@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
|
@@ -11,7 +11,7 @@ import { cn } from '../lib/utils.js';
|
|
|
11
11
|
import { CheckIcon as Check, ArrowsOutSimpleIcon as Maximize2, ArrowCounterClockwiseIcon as RotateCcw, XIcon as X, MagnifyingGlassPlusIcon as ZoomIn, MagnifyingGlassMinusIcon as ZoomOut, } from '@phosphor-icons/react';
|
|
12
12
|
import { Copy } from '../icons/copy.js';
|
|
13
13
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
14
|
-
export const MermaidRenderer = React.memo(({ chart, className, enableFullscreen = true, isStreaming = false }) => {
|
|
14
|
+
export const MermaidRenderer = React.memo(({ chart, className, enableFullscreen = true, isStreaming = false, actions }) => {
|
|
15
15
|
const containerRef = useRef(null);
|
|
16
16
|
const [error, setError] = useState(null);
|
|
17
17
|
const [isLoading, setIsLoading] = useState(true);
|
|
@@ -234,26 +234,32 @@ export const MermaidRenderer = React.memo(({ chart, className, enableFullscreen
|
|
|
234
234
|
display: block !important;
|
|
235
235
|
margin: 0 auto !important;
|
|
236
236
|
}
|
|
237
|
-
.mermaid-container .node {
|
|
238
|
-
fill:
|
|
239
|
-
stroke:
|
|
237
|
+
.mermaid-container .node :is(rect, polygon, circle, ellipse, path) {
|
|
238
|
+
fill: var(--card) !important;
|
|
239
|
+
stroke: var(--border) !important;
|
|
240
240
|
}
|
|
241
|
-
.mermaid-container .cluster {
|
|
242
|
-
fill:
|
|
243
|
-
stroke:
|
|
241
|
+
.mermaid-container .cluster rect {
|
|
242
|
+
fill: var(--muted) !important;
|
|
243
|
+
stroke: var(--border) !important;
|
|
244
244
|
}
|
|
245
|
-
.mermaid-container text {
|
|
246
|
-
fill:
|
|
247
|
-
|
|
245
|
+
.mermaid-container :is(text, .nodeLabel, .edgeLabel, .label) {
|
|
246
|
+
fill: var(--foreground) !important;
|
|
247
|
+
color: var(--foreground) !important;
|
|
248
|
+
font-family: var(--font-sans) !important;
|
|
248
249
|
}
|
|
249
|
-
.mermaid-container .edgePath {
|
|
250
|
-
stroke:
|
|
250
|
+
.mermaid-container :is(.edgePath path, .flowchart-link) {
|
|
251
|
+
stroke: var(--muted-foreground) !important;
|
|
251
252
|
}
|
|
252
|
-
.mermaid-container .marker {
|
|
253
|
-
fill:
|
|
253
|
+
.mermaid-container :is(.marker, .arrowheadPath, .arrowMarkerPath) {
|
|
254
|
+
fill: var(--muted-foreground) !important;
|
|
255
|
+
stroke: var(--muted-foreground) !important;
|
|
256
|
+
}
|
|
257
|
+
.mermaid-container .edgeLabel :is(rect, p) {
|
|
258
|
+
background-color: var(--background) !important;
|
|
259
|
+
fill: var(--background) !important;
|
|
254
260
|
}
|
|
255
261
|
`,
|
|
256
|
-
} }), _jsxs("div", { className: cn('mermaid-container group bg-background relative my-4 w-full overflow-auto rounded-lg border', className),
|
|
262
|
+
} }), _jsxs("div", { className: cn('mermaid-container group bg-background relative my-4 w-full overflow-auto rounded-lg border', className), children: [_jsx("div", { className: "absolute top-2 right-2 z-10 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100", children: _jsxs(ButtonGroup, { children: [actions, enableFullscreen && (_jsx(Hint, { label: "Fullscreen", side: "top", children: _jsx(Button, { variant: "outline", size: "icon-sm", onClick: handleFullscreenOpen, className: "bg-background/90 backdrop-blur-sm", "aria-label": "Open diagram fullscreen", children: _jsx(Maximize2, { className: "size-3.5" }) }) })), _jsx(Hint, { label: copied ? 'Copied' : 'Copy source', side: "top", children: _jsx(Button, { variant: "outline", size: "icon-sm", onClick: handleCopySource, className: "bg-background/90 backdrop-blur-sm", "aria-label": "Copy diagram source", children: copied ? (_jsx(Check, { className: "text-kortix-green size-3.5" })) : (_jsx(Copy, { className: "size-3.5" })) }) })] }) }), _jsx("div", { ref: containerRef, dangerouslySetInnerHTML: { __html: renderedContent } })] }), _jsx(Modal, { open: isFullscreenOpen, onOpenChange: setIsFullscreenOpen, children: _jsxs(ModalContent, { variant: "base", showCloseButton: false, className: "flex h-[90vh] flex-col space-y-0 overflow-hidden lg:h-[90vh] lg:max-w-7xl", closeButtonChildren: _jsxs(ButtonGroup, { children: [_jsx(Hint, { label: "Zoom in", side: "bottom", children: _jsx(Button, { variant: "outline", size: "icon", onClick: handleZoomIn, "aria-label": "Zoom in", children: _jsx(ZoomIn, { className: "size-4" }) }) }), _jsx(Hint, { label: "Zoom out", side: "bottom", children: _jsx(Button, { variant: "outline", size: "icon", onClick: handleZoomOut, "aria-label": "Zoom out", children: _jsx(ZoomOut, { className: "size-4" }) }) }), _jsx(Hint, { label: "Rotate", side: "bottom", children: _jsx(Button, { variant: "outline", size: "icon", onClick: handleRotate, "aria-label": "Rotate diagram", children: _jsx(RotateCcw, { className: "size-4" }) }) }), _jsx(ModalClose, { asChild: true, children: _jsx(Button, { variant: "outline", size: "icon", "aria-label": "Close", children: _jsx(X, { className: "size-4" }) }) })] }), children: [_jsx(ModalTitle, { className: "sr-only", children: "Diagram" }), _jsx(ModalBody, { className: "relative min-h-0 flex-1 space-y-0 p-0", children: _jsx("div", { ref: canvasRef, className: "bg-muted/10 absolute inset-0 touch-none overflow-hidden select-none", onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, style: { cursor: isDragging ? 'grabbing' : 'grab' }, children: renderedContent ? (_jsx("div", { className: "mermaid-container absolute inset-0 flex items-center justify-center", style: {
|
|
257
263
|
transform: `translate(${panOffset.x}px, ${panOffset.y}px) scale(${zoom}) rotate(${rotation}deg)`,
|
|
258
264
|
transformOrigin: 'center center',
|
|
259
265
|
transition: isDragging ? 'none' : 'transform 0.15s ease-out',
|
|
@@ -3,6 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
5
5
|
import { cn } from '../lib/utils.js';
|
|
6
|
+
import { RESIZE_SEAM_CLASS } from './resize-seam.js';
|
|
6
7
|
function ResizablePanelGroup({ className, ...props }) {
|
|
7
8
|
return (_jsx(ResizablePrimitive.PanelGroup, { "data-slot": "resizable-panel-group", className: cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className), ...props }));
|
|
8
9
|
}
|
|
@@ -11,6 +12,10 @@ const ResizablePanel = React.forwardRef((props, ref) => {
|
|
|
11
12
|
});
|
|
12
13
|
ResizablePanel.displayName = 'ResizablePanel';
|
|
13
14
|
function ResizableHandle({ withHandle, className, ...props }) {
|
|
14
|
-
return (_jsx(ResizablePrimitive.PanelResizeHandle, { "data-slot": "resizable-handle", className: cn('
|
|
15
|
+
return (_jsx(ResizablePrimitive.PanelResizeHandle, { "data-slot": "resizable-handle", className: cn('relative flex cursor-col-resize items-center justify-center focus-visible:outline-hidden data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:cursor-row-resize [&[data-panel-group-direction=vertical]>div]:rotate-90',
|
|
16
|
+
// The sidebar rail's seam on hover, keyboard focus and drag: one look
|
|
17
|
+
// for every drag-to-resize edge. Horizontal groups only; a vertical
|
|
18
|
+
// handle keeps its plain row cursor.
|
|
19
|
+
RESIZE_SEAM_CLASS, 'data-[panel-group-direction=vertical]:before:hidden', 'data-[resize-handle-state=hover]:before:opacity-100 data-[resize-handle-state=drag]:before:opacity-100 focus-visible:before:opacity-100', className), ...props, children: withHandle && (_jsx("div", { className: "group z-10 flex cursor-col-resize items-center justify-center", children: _jsx("span", { className: "bg-muted-foreground/40 group-hover:bg-muted-foreground/70 h-[15px] w-[3px] rounded-full transition-colors" }) })) }));
|
|
15
20
|
}
|
|
16
21
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The resize seam: a 2px `kortix-base` line on a drag edge, tapered at both
|
|
3
|
+
* ends and faded top and bottom, so it reads as a seam, not a border. Drawn by
|
|
4
|
+
* `before:`, so a caller keeps `after:` for its hit strip. Hidden at rest; the
|
|
5
|
+
* caller reveals it (`before:opacity-100`) on hover, focus and drag. Opacity
|
|
6
|
+
* only: a width or position transition would animate layout on hover.
|
|
7
|
+
*
|
|
8
|
+
* The sidebar rail (`sidebar-panel.tsx`) and every `ResizableHandle` draw it,
|
|
9
|
+
* so every drag-to-resize edge in the app looks the same.
|
|
10
|
+
*/
|
|
11
|
+
export declare const RESIZE_SEAM_CLASS: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { cn } from '../lib/utils.js';
|
|
2
|
+
/**
|
|
3
|
+
* The resize seam: a 2px `kortix-base` line on a drag edge, tapered at both
|
|
4
|
+
* ends and faded top and bottom, so it reads as a seam, not a border. Drawn by
|
|
5
|
+
* `before:`, so a caller keeps `after:` for its hit strip. Hidden at rest; the
|
|
6
|
+
* caller reveals it (`before:opacity-100`) on hover, focus and drag. Opacity
|
|
7
|
+
* only: a width or position transition would animate layout on hover.
|
|
8
|
+
*
|
|
9
|
+
* The sidebar rail (`sidebar-panel.tsx`) and every `ResizableHandle` draw it,
|
|
10
|
+
* so every drag-to-resize edge in the app looks the same.
|
|
11
|
+
*/
|
|
12
|
+
export const RESIZE_SEAM_CLASS = cn('before:pointer-events-none before:absolute before:inset-y-0 before:left-1/2 before:z-10 before:w-[2px] before:-translate-x-1/2 before:opacity-0', 'before:bg-kortix-base before:transition-opacity before:duration-fast before:ease-out', 'before:[clip-path:polygon(calc(50%-0.0625rem)_0%,calc(50%+0.0625rem)_0%,calc(50%+0.125rem)_50%,calc(50%+0.0625rem)_100%,calc(50%-0.0625rem)_100%,calc(50%-0.125rem)_50%)]', 'before:[mask-image:linear-gradient(to_bottom,transparent,black_15%,black_85%,transparent)]', 'motion-reduce:before:transition-none');
|
|
@@ -6,6 +6,7 @@ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from
|
|
|
6
6
|
import { SIDEBAR_RESIZE_STEP_COARSE_PX, SIDEBAR_RESIZE_STEP_PX, SIDEBAR_UNDOCK_MS, SIDEBAR_WIDTH_MOBILE, useSidebar, } from './sidebar-context.js';
|
|
7
7
|
import { SIDEBAR_MAX_WIDTH_PX, SIDEBAR_MIN_WIDTH_PX, SIDEBAR_WIDTH_PX, clampSidebarWidth, } from './sidebar-width.js';
|
|
8
8
|
import { cn } from '../lib/utils.js';
|
|
9
|
+
import { RESIZE_SEAM_CLASS } from './resize-seam.js';
|
|
9
10
|
import { SidebarGlyph as PanelLeftIcon } from '../icons/sidebar-toggle.js';
|
|
10
11
|
function Sidebar({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ...props }) {
|
|
11
12
|
const { isMobile, state, openMobile, setOpenMobile, peek, peekEnter, peekLeave, instantToggle } = useSidebar();
|
|
@@ -251,13 +252,9 @@ function SidebarRail({ className, ...props }) {
|
|
|
251
252
|
setWidth(SIDEBAR_WIDTH_PX);
|
|
252
253
|
}
|
|
253
254
|
}, className: cn('absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 cursor-col-resize touch-none outline-none select-none group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex',
|
|
254
|
-
// The
|
|
255
|
-
//
|
|
256
|
-
|
|
257
|
-
// on hover, on an element that sits over the content pane.
|
|
258
|
-
'after:pointer-events-none after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] after:-translate-x-1/2 after:opacity-0', 'after:bg-kortix-base after:transition-opacity after:duration-fast after:ease-out', 'hover:after:opacity-100 focus-visible:after:opacity-100 data-[resizing]:after:opacity-100',
|
|
259
|
-
// Tapered top and bottom so the line reads as a seam, not a border.
|
|
260
|
-
'after:[clip-path:polygon(calc(50%-0.0625rem)_0%,calc(50%+0.0625rem)_0%,calc(50%+0.125rem)_50%,calc(50%+0.0625rem)_100%,calc(50%-0.0625rem)_100%,calc(50%-0.125rem)_50%)]', 'after:[mask-image:linear-gradient(to_bottom,transparent,black_15%,black_85%,transparent)]', 'motion-reduce:after:transition-none', className), ...props }));
|
|
255
|
+
// The seam is a pseudo-element so the 16px hit area stays 16px (well
|
|
256
|
+
// over the 8px a pointer needs) while the visible line stays 2px.
|
|
257
|
+
RESIZE_SEAM_CLASS, 'hover:before:opacity-100 focus-visible:before:opacity-100 data-[resizing]:before:opacity-100', className), ...props }));
|
|
261
258
|
}
|
|
262
259
|
function SidebarInset({ className, ...props }) {
|
|
263
260
|
return (_jsx("main", { "data-slot": "sidebar-inset", className: cn('bg-background relative flex w-full flex-1 flex-col overflow-hidden', 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2', className), ...props }));
|
|
@@ -26,6 +26,19 @@ type TabsUnderlineSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
|
26
26
|
* never segmented.
|
|
27
27
|
*/
|
|
28
28
|
type TabsListType = 'default' | 'underline' | 'segmented';
|
|
29
|
+
/**
|
|
30
|
+
* Segmented track + chip. Radii are concentric: the track is `rounded-md` (8px)
|
|
31
|
+
* with 2px of padding, so the chip is `rounded-sm` (6px). The chip lifts with a
|
|
32
|
+
* hairline ring plus `shadow-xs` — raised, not bordered, so it reads as the
|
|
33
|
+
* selected thing in both themes.
|
|
34
|
+
*
|
|
35
|
+
* The padding is `p-[2px]`, not `p-0.5`: `--spacing` is 0.23rem, so `p-0.5` is
|
|
36
|
+
* 1.84px. The chip's 1px ring leaves 0.84px of track showing, and a fraction of
|
|
37
|
+
* a pixel rounds differently on each side — 1px of track on one end and none on
|
|
38
|
+
* the other at 1x. A whole 2px leaves exactly 1px on every side.
|
|
39
|
+
*/
|
|
40
|
+
declare const tabsSegmentedTrackClasses = "bg-muted rounded-md p-[2px]";
|
|
41
|
+
declare const tabsSegmentedChipClasses = "bg-popover ring-border rounded-sm shadow-xs ring-1";
|
|
29
42
|
declare function Tabs({ className, value, defaultValue, onValueChange, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): React.JSX.Element;
|
|
30
43
|
interface TabsListProps extends React.ComponentProps<typeof TabsPrimitive.List> {
|
|
31
44
|
type?: TabsListType;
|
|
@@ -69,5 +82,5 @@ declare function TabsTriggerCompact({ className, variant, value, ...props }: Rea
|
|
|
69
82
|
declare function FilterBar({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
70
83
|
/** Standalone filter pill — works WITHOUT a <Tabs> root. Pair with FilterBar. */
|
|
71
84
|
declare function FilterBarItem({ className, ...props }: React.ComponentProps<'button'>): React.JSX.Element;
|
|
72
|
-
export { FilterBar, FilterBarItem, Tabs, TabsContent, TabsList, TabsListCompact, TabsTrigger, TabsTriggerCompact, tabsTriggerHeightVariants, tabsTriggerPaddingVariants, tabsTriggerTextVariants, };
|
|
85
|
+
export { tabsSegmentedChipClasses, tabsSegmentedTrackClasses, FilterBar, FilterBarItem, Tabs, TabsContent, TabsList, TabsListCompact, TabsTrigger, TabsTriggerCompact, tabsTriggerHeightVariants, tabsTriggerPaddingVariants, tabsTriggerTextVariants, };
|
|
73
86
|
export type { TabsListType, TabsSize, TabsTriggerSize, TabsTriggerVariant, TabsUnderlineSize };
|
package/dist/primitives/tabs.js
CHANGED
|
@@ -204,4 +204,4 @@ function FilterBar({ className, ...props }) {
|
|
|
204
204
|
function FilterBarItem({ className, ...props }) {
|
|
205
205
|
return (_jsx("button", { "data-slot": "filter-bar-item", role: "tab", type: "button", className: cn('inline-flex h-[calc(100%-4px)] flex-1 cursor-pointer items-center justify-center gap-1.5 border border-transparent px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-colors duration-normal', 'text-muted-foreground/60 hover:text-foreground/80', 'data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:ring-foreground/6 data-[state=active]:shadow-sm data-[state=active]:ring-1', 'disabled:pointer-events-none disabled:opacity-50', "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", className), ...props }));
|
|
206
206
|
}
|
|
207
|
-
export { FilterBar, FilterBarItem, Tabs, TabsContent, TabsList, TabsListCompact, TabsTrigger, TabsTriggerCompact, tabsTriggerHeightVariants, tabsTriggerPaddingVariants, tabsTriggerTextVariants, };
|
|
207
|
+
export { tabsSegmentedChipClasses, tabsSegmentedTrackClasses, FilterBar, FilterBarItem, Tabs, TabsContent, TabsList, TabsListCompact, TabsTrigger, TabsTriggerCompact, tabsTriggerHeightVariants, tabsTriggerPaddingVariants, tabsTriggerTextVariants, };
|
|
@@ -304,6 +304,15 @@ export interface UiHostComponents {
|
|
|
304
304
|
/** False or missing: read only. */
|
|
305
305
|
canWrite?: boolean;
|
|
306
306
|
}>;
|
|
307
|
+
/**
|
|
308
|
+
* The full artifact viewer (doc editor, history, share, PDF export) for a
|
|
309
|
+
* session panel. Without it, the panel shows the artifact's page read-only.
|
|
310
|
+
*/
|
|
311
|
+
ArtifactViewer?: React.ComponentType<{
|
|
312
|
+
projectId: string;
|
|
313
|
+
artifactId: string;
|
|
314
|
+
onClose: () => void;
|
|
315
|
+
}>;
|
|
307
316
|
/** The decorative background of an empty session. Without it, the plain surface. */
|
|
308
317
|
Wallpaper?: React.ComponentType;
|
|
309
318
|
/**
|
|
@@ -20,4 +20,4 @@ export interface ComposerAboveCardDerived {
|
|
|
20
20
|
handleRemoveQuote: (id: string) => void;
|
|
21
21
|
}
|
|
22
22
|
export type ComposerAboveCardProps = SessionChatInputProps & ComposerAboveCardDerived;
|
|
23
|
-
export declare function ComposerAboveCard({ dockId, quotes, quoteListLabels, handleRemoveQuote, aboveSlot, inputSlot, notice, onNoticeRetry, onModelChange, slashMenuPlacement, questionActive, }: ComposerAboveCardProps): import("react").JSX.Element;
|
|
23
|
+
export declare function ComposerAboveCard({ dockId, quotes, quoteListLabels, handleRemoveQuote, aboveSlot, inputSlot, notice, noticeAsleep, onNoticeRetry, onModelChange, slashMenuPlacement, questionActive, }: ComposerAboveCardProps): import("react").JSX.Element;
|
|
@@ -14,7 +14,7 @@ import { QuoteList } from './quote-list.js';
|
|
|
14
14
|
* keeps only the side ring, so no ring line crosses a seam.
|
|
15
15
|
*/
|
|
16
16
|
const DOCKED_MIDDLE_LAYER_CLASS = 'ring-muted/15 rounded-t-none ring-3 [clip-path:inset(0_-8px_0_-8px)]';
|
|
17
|
-
export function ComposerAboveCard({ dockId, quotes, quoteListLabels, handleRemoveQuote, aboveSlot, inputSlot, notice = null, onNoticeRetry, onModelChange, slashMenuPlacement = 'above', questionActive = false, }) {
|
|
17
|
+
export function ComposerAboveCard({ dockId, quotes, quoteListLabels, handleRemoveQuote, aboveSlot, inputSlot, notice = null, noticeAsleep, onNoticeRetry, onModelChange, slashMenuPlacement = 'above', questionActive = false, }) {
|
|
18
18
|
const showQueueStrip = Boolean(inputSlot);
|
|
19
19
|
return (_jsxs(_Fragment, { children: [slashMenuPlacement === 'above' && _jsx("div", { id: dockId }), _jsx("div", { className: "mb-2 w-full empty:hidden", children: _jsx(QuoteList, { quotes: quotes, labels: quoteListLabels, onRemove: handleRemoveQuote }, quotes.length === 0 ? 'empty' : 'quotes') }), aboveSlot && _jsx("div", { className: "mb-2 w-full empty:hidden", children: aboveSlot }), (notice || showQueueStrip) && (_jsxs("div", { "data-composer-stack": true, className: "relative isolate flex w-full flex-col items-center justify-center [&>[data-composer-strip]:not(:empty)~*]:rounded-t-none", children: [showQueueStrip && (
|
|
20
20
|
// A pending question also carries a ring around the whole
|
|
@@ -24,5 +24,5 @@ export function ComposerAboveCard({ dockId, quotes, quoteListLabels, handleRemov
|
|
|
24
24
|
// Rounded when topmost; square under a visible strip (the
|
|
25
25
|
// wrapper's sibling rule). Under a docked question it also
|
|
26
26
|
// carries the side ring.
|
|
27
|
-
className: cn('bg-sidebar border-border flex w-full items-center gap-2 rounded-t-xl border border-b-0 px-3 py-1.5', questionActive && DOCKED_MIDDLE_LAYER_CLASS), children: [notice === SESSION_NOTICE.idle ? (_jsx(MoonIcon, { className: "text-muted-foreground size-3.5 shrink-0", "aria-hidden": "true" })) : (_jsx(Loading, { className: "size-3.5 shrink-0" })), _jsx("span", { className: "text-muted-foreground min-w-0 flex-1 truncate text-xs", children: notice }), onNoticeRetry && (_jsx(Button, { type: "button", variant: "ghost", size: "xs", className: "text-muted-foreground hover:text-foreground h-auto shrink-0 px-1.5 py-0.5 text-xs", onClick: onNoticeRetry, children: 'Retry' }))] }))] }))] }));
|
|
27
|
+
className: cn('bg-sidebar border-border flex w-full items-center gap-2 rounded-t-xl border border-b-0 px-3 py-1.5', questionActive && DOCKED_MIDDLE_LAYER_CLASS), children: [(noticeAsleep ?? notice === SESSION_NOTICE.idle) ? (_jsx(MoonIcon, { className: "text-muted-foreground size-3.5 shrink-0", "aria-hidden": "true" })) : (_jsx(Loading, { className: "size-3.5 shrink-0" })), _jsx("span", { className: "text-muted-foreground min-w-0 flex-1 truncate text-xs", children: notice }), onNoticeRetry && (_jsx(Button, { type: "button", variant: "ghost", size: "xs", className: "text-muted-foreground hover:text-foreground h-auto shrink-0 px-1.5 py-0.5 text-xs", onClick: onNoticeRetry, children: 'Retry' }))] }))] }))] }));
|
|
28
28
|
}
|
|
@@ -71,4 +71,4 @@ export interface ComposerCardDerived {
|
|
|
71
71
|
noModelsConnected: boolean;
|
|
72
72
|
}
|
|
73
73
|
export type ComposerCardProps = SessionChatInputProps & ComposerCardDerived;
|
|
74
|
-
export declare function ComposerCard({ tHardcodedUi, isDragOver, handleDragEnter, handleDragOver, handleDragLeave, handleDropFiles, attachedFiles, promptAttachmentItems, removeAttachedFile, retryAttachedFile, pastes, removePaste, onOpenPastedContent, commandAttachmentPlan, editorDisabled, editorRef, setEditorRef, editorPlaceholder, animatePlaceholder, handleSubmit, handleArrowUpAtStart, setIsEmpty, handleDocChange, allSessions, slashActions, handleSelectAction, dockId, setMenuOpen, fileInputRef, handleFileSelect, sessionId, handleAttachClick, primaryAgents, availableSelectedModel, agentMenuOpen, setAgentMenuOpen, modelMenuOpen, setModelMenuOpen, reasoningMenuOpen, setReasoningMenuOpen, isEmpty, canSubmit, submitDisabled, attachmentFailed, modelRejectingImages, imagesUnsupportedReason, modelUnavailable, agentUnavailable, noModelsConnected, agents, commands, slashFiles, models, notice, disabled, lockForQuestion, lockForApproval, questionButtonLabel, questionActive, submitLabel, questionCanAct, escCount, isBusy, isSending, onStop, stopDisabled, canStop, modelsLoading, modelRequired, onModelChange, modelDefaultControls, providers, variants, selectedVariant, onVariantChange, projectId, toolbarSlot, rewind, selectedAgent, onAgentChange, noAccessibleAgents, onContextClick, messages, underbarPlacement, slashMenuPlacement, cardClassName, onArrowUpAtStart, }: ComposerCardProps): import("react").JSX.Element;
|
|
74
|
+
export declare function ComposerCard({ tHardcodedUi, isDragOver, handleDragEnter, handleDragOver, handleDragLeave, handleDropFiles, attachedFiles, promptAttachmentItems, removeAttachedFile, retryAttachedFile, pastes, removePaste, onOpenPastedContent, commandAttachmentPlan, editorDisabled, editorRef, setEditorRef, editorPlaceholder, animatePlaceholder, handleSubmit, handleArrowUpAtStart, setIsEmpty, handleDocChange, allSessions, slashActions, handleSelectAction, dockId, setMenuOpen, fileInputRef, handleFileSelect, sessionId, handleAttachClick, primaryAgents, availableSelectedModel, agentMenuOpen, setAgentMenuOpen, modelMenuOpen, setModelMenuOpen, reasoningMenuOpen, setReasoningMenuOpen, isEmpty, canSubmit, submitDisabled, attachmentFailed, modelRejectingImages, imagesUnsupportedReason, modelUnavailable, agentUnavailable, noModelsConnected, agents, commands, slashFiles, models, notice, disabled, lockForQuestion, lockForApproval, questionButtonLabel, questionActive, submitLabel, questionCanAct, escCount, isBusy, isSending, onStop, stopDisabled, canStop, modelsLoading, modelRequired, onModelChange, modelDefaultControls, providers, variants, selectedVariant, onVariantChange, projectId, toolbarSlot, rewind, selectedAgent, onAgentChange, noAccessibleAgents, onContextClick, messages, underbarPlacement, agentPickerCompact, slashMenuPlacement, cardClassName, onArrowUpAtStart, }: ComposerCardProps): import("react").JSX.Element;
|
|
@@ -21,7 +21,7 @@ export function ComposerCard({ tHardcodedUi, isDragOver, handleDragEnter, handle
|
|
|
21
21
|
// Raw props the moved JSX reads; `{...props}` carries the rest. These
|
|
22
22
|
// defaults mirror `ComposerImpl`'s, because the spread passes the raw
|
|
23
23
|
// values, not the component's defaulted locals.
|
|
24
|
-
agents = EMPTY_AGENTS, commands = EMPTY_COMMANDS, slashFiles = EMPTY_SLASH_FILES, models = EMPTY_MODELS, notice = null, disabled = false, lockForQuestion = false, lockForApproval = false, questionButtonLabel = null, questionActive = false, submitLabel = null, questionCanAct = true, escCount = 0, isBusy = false, isSending = false, onStop, stopDisabled = false, canStop = true, modelsLoading = false, modelRequired = false, onModelChange, modelDefaultControls, providers, variants = EMPTY_VARIANTS, selectedVariant = null, onVariantChange, projectId, toolbarSlot, rewind, selectedAgent = null, onAgentChange, noAccessibleAgents = false, onContextClick, messages, underbarPlacement = 'below', slashMenuPlacement = 'above', cardClassName, onArrowUpAtStart, }) {
|
|
24
|
+
agents = EMPTY_AGENTS, commands = EMPTY_COMMANDS, slashFiles = EMPTY_SLASH_FILES, models = EMPTY_MODELS, notice = null, disabled = false, lockForQuestion = false, lockForApproval = false, questionButtonLabel = null, questionActive = false, submitLabel = null, questionCanAct = true, escCount = 0, isBusy = false, isSending = false, onStop, stopDisabled = false, canStop = true, modelsLoading = false, modelRequired = false, onModelChange, modelDefaultControls, providers, variants = EMPTY_VARIANTS, selectedVariant = null, onVariantChange, projectId, toolbarSlot, rewind, selectedAgent = null, onAgentChange, noAccessibleAgents = false, onContextClick, messages, underbarPlacement = 'below', agentPickerCompact = false, slashMenuPlacement = 'above', cardClassName, onArrowUpAtStart, }) {
|
|
25
25
|
const cardRef = useRef(null);
|
|
26
26
|
const { attachAccept } = useUiHostConfig();
|
|
27
27
|
const inlineUnderbar = underbarPlacement === 'inline';
|
|
@@ -33,7 +33,7 @@ agents = EMPTY_AGENTS, commands = EMPTY_COMMANDS, slashFiles = EMPTY_SLASH_FILES
|
|
|
33
33
|
'bg-background border-border relative isolate z-10 w-full rounded-xl border', 'pt-3',
|
|
34
34
|
// The drag border swaps colour AND gains a ring. Without this it
|
|
35
35
|
// snapped: a hard flash the moment a file crossed the card.
|
|
36
|
-
'duration-normal ease-default transition-[border-color]', 'motion-reduce:transition-none', cardClassName, isDragOver && 'border-
|
|
36
|
+
'duration-normal ease-default transition-[border-color]', 'motion-reduce:transition-none', cardClassName, isDragOver && 'border-ring ring-ring/15 border ring',
|
|
37
37
|
// A layer above (`ComposerAboveCard`) owns the top corners: a notice,
|
|
38
38
|
// or a visible strip (known only to CSS, through `data-composer-stack`).
|
|
39
39
|
(notice || questionActive) &&
|
|
@@ -51,7 +51,7 @@ agents = EMPTY_AGENTS, commands = EMPTY_COMMANDS, slashFiles = EMPTY_SLASH_FILES
|
|
|
51
51
|
// the div and immediately fights the caret we are placing.
|
|
52
52
|
e.preventDefault();
|
|
53
53
|
editorRef.current?.focus();
|
|
54
|
-
}, children: [_jsx(AnimatedComposerPlaceholder, { placeholder: editorPlaceholder, active: animatePlaceholder }), _jsx(Suspense, { fallback: _jsx(ComposerEditorFallback, {}), children: _jsx(ComposerEditorLazy, { ref: setEditorRef, placeholder: animatePlaceholder ? '' : editorPlaceholder, disabled: editorDisabled, onSubmit: handleSubmit, onArrowUpAtStart: onArrowUpAtStart ? handleArrowUpAtStart : undefined, onEmptyChange: setIsEmpty, onDocChange: handleDocChange, agents: agents, sessions: allSessions ?? [], currentSessionId: sessionId, commands: commands, actions: slashActions, files: slashFiles, onSelectAction: handleSelectAction, slashDockSelector: `#${dockId}`, onMenuOpenChange: setMenuOpen }) })] }), _jsx("input", { ref: fileInputRef, type: "file", accept: attachAccept ?? DEFAULT_ATTACH_ACCEPT, multiple: true, className: "hidden", onChange: handleFileSelect }), _jsx(ComposerToolbar, { leading: inlineUnderbar ? (_jsx(ComposerUnderbar, { variant: "inline", onAttachClick: handleAttachClick, agents: primaryAgents, selectedAgent: selectedAgent, onAgentChange: onAgentChange, agentMenuOpen: agentMenuOpen, onAgentMenuOpenChange: setAgentMenuOpen, noAccessibleAgents: noAccessibleAgents, messages: messages, models: models, selectedModel: availableSelectedModel, onContextClick: onContextClick })) : null, modelsLoading: modelsLoading, models: models, selectedModel: availableSelectedModel, onModelChange: onModelChange, modelDefaultControls: modelDefaultControls, providers: providers, modelRequired: modelRequired, modelMenuOpen: modelMenuOpen, onModelMenuOpenChange: setModelMenuOpen, reasoningMenuOpen: reasoningMenuOpen, onReasoningMenuOpenChange: setReasoningMenuOpen, variants: variants, selectedVariant: selectedVariant, onVariantChange: onVariantChange, projectId: projectId,
|
|
54
|
+
}, children: [_jsx(AnimatedComposerPlaceholder, { placeholder: editorPlaceholder, active: animatePlaceholder }), _jsx(Suspense, { fallback: _jsx(ComposerEditorFallback, {}), children: _jsx(ComposerEditorLazy, { ref: setEditorRef, placeholder: animatePlaceholder ? '' : editorPlaceholder, disabled: editorDisabled, onSubmit: handleSubmit, onArrowUpAtStart: onArrowUpAtStart ? handleArrowUpAtStart : undefined, onEmptyChange: setIsEmpty, onDocChange: handleDocChange, agents: agents, sessions: allSessions ?? [], currentSessionId: sessionId, commands: commands, actions: slashActions, files: slashFiles, onSelectAction: handleSelectAction, slashDockSelector: `#${dockId}`, onMenuOpenChange: setMenuOpen }) })] }), _jsx("input", { ref: fileInputRef, type: "file", accept: attachAccept ?? DEFAULT_ATTACH_ACCEPT, multiple: true, className: "hidden", onChange: handleFileSelect }), _jsx(ComposerToolbar, { leading: inlineUnderbar ? (_jsx(ComposerUnderbar, { variant: "inline", agentPickerCompact: agentPickerCompact, onAttachClick: handleAttachClick, agents: primaryAgents, selectedAgent: selectedAgent, onAgentChange: onAgentChange, agentMenuOpen: agentMenuOpen, onAgentMenuOpenChange: setAgentMenuOpen, noAccessibleAgents: noAccessibleAgents, messages: messages, models: models, selectedModel: availableSelectedModel, onContextClick: onContextClick })) : null, modelsLoading: modelsLoading, models: models, selectedModel: availableSelectedModel, onModelChange: onModelChange, modelDefaultControls: modelDefaultControls, providers: providers, modelRequired: modelRequired, modelMenuOpen: modelMenuOpen, onModelMenuOpenChange: setModelMenuOpen, reasoningMenuOpen: reasoningMenuOpen, onReasoningMenuOpenChange: setReasoningMenuOpen, variants: variants, selectedVariant: selectedVariant, onVariantChange: onVariantChange, projectId: projectId,
|
|
55
55
|
// Inline placement has no under-row, so the slot (the session
|
|
56
56
|
// overrides gear, meta indicator) rides the toolbar itself. With
|
|
57
57
|
// the 'below' placement the ComposerUnderbar further down renders
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import type { Agent } from '@kortix/sdk/react';
|
|
2
|
+
/**
|
|
3
|
+
* A place's own agents, listed first in the picker under `label` (a
|
|
4
|
+
* channel's `#name`); every other agent follows under `restLabel`. Set by a
|
|
5
|
+
* channel's composer (`space-view.tsx`). No provider: one plain list.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FeaturedAgentsContext: import("react").Context<{
|
|
8
|
+
label: string;
|
|
9
|
+
restLabel: string;
|
|
10
|
+
names: readonly string[];
|
|
11
|
+
} | null>;
|
|
2
12
|
/** The label `AgentSelector` shows for a selection (null = nothing picked). Other surfaces that name the agent reuse it. */
|
|
3
13
|
export declare function agentDisplayLabel(agents: Agent[], selectedAgent: string | null): string;
|
|
4
|
-
export declare function AgentSelector({ agents, selectedAgent, onSelect, disabled, triggerLabelClassName, unavailableHint, open: controlledOpen, onOpenChange, appearance, }: {
|
|
14
|
+
export declare function AgentSelector({ agents, selectedAgent, onSelect, disabled, triggerLabelClassName, unavailableHint, open: controlledOpen, onOpenChange, compact, appearance, }: {
|
|
15
|
+
/** The trigger shows the agent's tile alone, no caret; the name is its tooltip. */
|
|
16
|
+
compact?: boolean;
|
|
5
17
|
agents: Agent[];
|
|
6
18
|
selectedAgent: string | null;
|
|
7
19
|
onSelect: (agentName: string | null) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Badge } from '../../primitives/badge.js';
|
|
4
4
|
import { Button } from '../../primitives/button.js';
|
|
5
5
|
import { CommandGroup, CommandInput, CommandItem, CommandList, CommandPopover, CommandPopoverContent, CommandPopoverTrigger, CommandSeparator, } from '../../primitives/command.js';
|
|
@@ -11,8 +11,14 @@ import { TRIGGER_CARET_CLASS, triggerVariants } from '../../primitives/trigger-v
|
|
|
11
11
|
import { capitalizeWords, isMetaAgentName, META_AGENT_DISPLAY_NAME } from '../../_vendor/kortix-shared.js';
|
|
12
12
|
import { CaretDownIcon, CheckIcon } from '@phosphor-icons/react';
|
|
13
13
|
import { AgentMark } from '../../internal/components/agent-mark.js';
|
|
14
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
14
|
+
import { createContext, useContext, useEffect, useMemo, useState } from 'react';
|
|
15
15
|
import { composerSelectableAgents } from './composer-agent-access.js';
|
|
16
|
+
/**
|
|
17
|
+
* A place's own agents, listed first in the picker under `label` (a
|
|
18
|
+
* channel's `#name`); every other agent follows under `restLabel`. Set by a
|
|
19
|
+
* channel's composer (`space-view.tsx`). No provider: one plain list.
|
|
20
|
+
*/
|
|
21
|
+
export const FeaturedAgentsContext = createContext(null);
|
|
16
22
|
/**
|
|
17
23
|
* Agents on screen before the popover grows a search field.
|
|
18
24
|
*
|
|
@@ -38,7 +44,7 @@ export function agentDisplayLabel(agents, selectedAgent) {
|
|
|
38
44
|
return 'Agent';
|
|
39
45
|
return isMetaAgentName(name) ? META_AGENT_DISPLAY_NAME : capitalizeWords(name);
|
|
40
46
|
}
|
|
41
|
-
export function AgentSelector({ agents, selectedAgent, onSelect, disabled = false, triggerLabelClassName, unavailableHint, open: controlledOpen, onOpenChange, appearance = 'chip', }) {
|
|
47
|
+
export function AgentSelector({ agents, selectedAgent, onSelect, disabled = false, triggerLabelClassName, unavailableHint, open: controlledOpen, onOpenChange, compact = false, appearance = 'chip', }) {
|
|
42
48
|
const tHardcodedUi = useTranslations('hardcodedUi');
|
|
43
49
|
const t = useTranslations('threads');
|
|
44
50
|
const [internalOpen, setInternalOpen] = useState(false);
|
|
@@ -73,6 +79,12 @@ export function AgentSelector({ agents, selectedAgent, onSelect, disabled = fals
|
|
|
73
79
|
}, [primaryAgents, search, agentLabels]);
|
|
74
80
|
const filteredMeta = useMemo(() => filteredPrimary.filter((a) => isMetaAgentName(a.name)), [filteredPrimary]);
|
|
75
81
|
const filteredProject = useMemo(() => filteredPrimary.filter((a) => !isMetaAgentName(a.name)), [filteredPrimary]);
|
|
82
|
+
// The place's agents, in its order, then every other agent.
|
|
83
|
+
const featured = useContext(FeaturedAgentsContext);
|
|
84
|
+
const filteredFeatured = useMemo(() => (featured?.names ?? []).flatMap((name) => {
|
|
85
|
+
const agent = filteredPrimary.find((a) => a.name === name);
|
|
86
|
+
return agent ? [agent] : [];
|
|
87
|
+
}), [featured, filteredPrimary]);
|
|
76
88
|
// Keyed off the FULL list, never the filtered one: deriving it from
|
|
77
89
|
// `filteredPrimary` would make the field that is doing the filtering vanish
|
|
78
90
|
// the moment a query narrowed the list past the threshold, taking the
|
|
@@ -157,8 +169,16 @@ export function AgentSelector({ agents, selectedAgent, onSelect, disabled = fals
|
|
|
157
169
|
return fieldTrigger(false, { disabled: true });
|
|
158
170
|
return (_jsxs(Button, { type: "button", variant: "ghost", size: "sm", disabled: true, className: "text-muted-foreground rounded-lg hit-area-y-3", children: [triggerMark, _jsx("span", { className: cn('max-w-[100px] truncate', triggerLabelClassName), children: displayName })] }));
|
|
159
171
|
}
|
|
160
|
-
|
|
172
|
+
const trigger = (_jsx(CommandPopoverTrigger, { children: field ? (fieldTrigger(true, { 'aria-label': t('selectAgent') })) : (_jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": compact ? `${t('selectAgent')}: ${displayName}` : t('selectAgent'), className: cn('text-muted-foreground rounded-lg hit-area-y-3', compact && 'px-1.5'), children: compact ? (
|
|
173
|
+
// The mark alone: the name is the tooltip and the menu's checked row.
|
|
174
|
+
// A placeholder name has no mark, so it shows as text.
|
|
175
|
+
triggerMark ?? _jsx("span", { className: cn('max-w-[100px] truncate', triggerLabelClassName), children: displayName })) : (_jsxs(_Fragment, { children: [triggerMark, _jsx("span", { className: cn('max-w-[100px] truncate', triggerLabelClassName), children: displayName }), _jsx(CaretDownIcon, { className: cn('size-3 transition-transform duration-moderate ease-out', open && 'rotate-180') })] })) })) }));
|
|
176
|
+
return (_jsxs(CommandPopover, { open: open, onOpenChange: setOpen, children: [compact ? (_jsx(Hint, { side: "top", label: displayName, children: trigger })) : (trigger), _jsxs(CommandPopoverContent, { side: "top", align: "start", sideOffset: 8, className: "w-[min(300px,calc(100vw-1.5rem))]", children: [_jsx("div", { className: showSearch ? undefined : 'sr-only', children: _jsx(CommandInput, { compact: true, placeholder: tHardcodedUi.raw('componentsSessionSessionChatInput.line231JsxAttrPlaceholderSearchAgents'), value: search, onValueChange: setSearch }) }), _jsxs(CommandList, { className: "max-h-[320px]", children: [filteredFeatured.length > 0 && featured ? (
|
|
177
|
+
// Two groups, so each earns its heading: the place's agents, then the rest.
|
|
178
|
+
_jsxs(_Fragment, { children: [_jsx(CommandGroup, { forceMount: true, heading: featured.label, className: "[&_[cmdk-group-items]]:flex [&_[cmdk-group-items]]:flex-col [&_[cmdk-group-items]]:gap-px", children: filteredFeatured.map((agent) => renderAgentItem(agent, isMetaAgentName(agent.name))) }), filteredPrimary.length > filteredFeatured.length && (_jsx(CommandGroup, { forceMount: true, heading: featured.restLabel, className: "[&_[cmdk-group-items]]:flex [&_[cmdk-group-items]]:flex-col [&_[cmdk-group-items]]:gap-px", children: filteredPrimary
|
|
179
|
+
.filter((agent) => !filteredFeatured.includes(agent))
|
|
180
|
+
.map((agent) => renderAgentItem(agent, isMetaAgentName(agent.name))) }))] })) : filteredPrimary.length > 0 && (
|
|
161
181
|
// `gap-px` between rows: a selected row and a hovered row next to it
|
|
162
182
|
// otherwise draw one merged grey block.
|
|
163
|
-
_jsxs(CommandGroup, { forceMount: true, className: "[&_[cmdk-group-items]]:flex [&_[cmdk-group-items]]:flex-col [&_[cmdk-group-items]]:gap-px", children: [filteredMeta.map((agent) => renderAgentItem(agent, true)), filteredMeta.length > 0 && filteredProject.length > 0 && (_jsx(CommandSeparator, { className: "my-1" })), filteredProject.map((agent) => renderAgentItem(agent, false))] })), filteredPrimary.length === 0 && search.trim() && (_jsxs("div", { className: "text-muted-foreground
|
|
183
|
+
_jsxs(CommandGroup, { forceMount: true, className: "[&_[cmdk-group-items]]:flex [&_[cmdk-group-items]]:flex-col [&_[cmdk-group-items]]:gap-px", children: [filteredMeta.map((agent) => renderAgentItem(agent, true)), filteredMeta.length > 0 && filteredProject.length > 0 && (_jsx(CommandSeparator, { className: "my-1" })), filteredProject.map((agent) => renderAgentItem(agent, false))] })), filteredPrimary.length === 0 && search.trim() && (_jsxs("div", { className: "text-muted-foreground py-8 text-center text-xs", children: [tHardcodedUi.raw('componentsSessionSessionChatInput.line273JsxTextNoAgentsMatchLdquo'), search.trim(), tHardcodedUi.raw('componentsSessionSessionChatInput.line273JsxTextRdquo')] }))] })] })] }));
|
|
164
184
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProjectSpace } from '@kortix/sdk';
|
|
1
2
|
import type { Agent } from '@kortix/sdk/react';
|
|
2
3
|
/**
|
|
3
4
|
* Which agent the composer will actually run, given the roster the server is
|
|
@@ -64,6 +65,20 @@ export interface ComposerAgentResolution {
|
|
|
64
65
|
* empty picker, and must not read as "we have an agent to run".
|
|
65
66
|
*/
|
|
66
67
|
export declare function composerSelectableAgents(agents: Agent[] | undefined): Agent[];
|
|
68
|
+
/**
|
|
69
|
+
* The agents anyone who posts in this channel may run, granted or not (the
|
|
70
|
+
* server's `channelAgentNames`): the channel's agents,
|
|
71
|
+
* else the project default. None in a DM or with no space: its own rules apply.
|
|
72
|
+
*/
|
|
73
|
+
export declare function channelRunnableAgents(space: Pick<ProjectSpace, 'agents' | 'kind'> | null | undefined, projectDefault: string | null | undefined): string[];
|
|
74
|
+
/**
|
|
75
|
+
* The roster plus a channel's agents: whoever may
|
|
76
|
+
* post in a channel runs its agents there without an agent grant, and the
|
|
77
|
+
* server applies the same rule (`agent-access.ts`, `channelRunnableAgents`).
|
|
78
|
+
* A name missing from the roster gets a plain primary entry. `undefined`
|
|
79
|
+
* (still loading) stays `undefined`.
|
|
80
|
+
*/
|
|
81
|
+
export declare function withChannelAgents(agents: Agent[] | undefined, channelAgents: readonly string[] | undefined): Agent[] | undefined;
|
|
67
82
|
export declare function resolveComposerAgent(input: {
|
|
68
83
|
/** The accessible roster. `undefined` means the query is still in flight. */
|
|
69
84
|
agents: Agent[] | undefined;
|
|
@@ -48,6 +48,33 @@ export function composerSelectableAgents(agents) {
|
|
|
48
48
|
return [];
|
|
49
49
|
return agents.filter(isSelectableAgent);
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* The agents anyone who posts in this channel may run, granted or not (the
|
|
53
|
+
* server's `channelAgentNames`): the channel's agents,
|
|
54
|
+
* else the project default. None in a DM or with no space: its own rules apply.
|
|
55
|
+
*/
|
|
56
|
+
export function channelRunnableAgents(space, projectDefault) {
|
|
57
|
+
if (space?.kind !== 'channel')
|
|
58
|
+
return [];
|
|
59
|
+
const agents = space.agents ?? [];
|
|
60
|
+
return agents.length > 0 ? [...agents] : projectDefault ? [projectDefault] : [];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The roster plus a channel's agents: whoever may
|
|
64
|
+
* post in a channel runs its agents there without an agent grant, and the
|
|
65
|
+
* server applies the same rule (`agent-access.ts`, `channelRunnableAgents`).
|
|
66
|
+
* A name missing from the roster gets a plain primary entry. `undefined`
|
|
67
|
+
* (still loading) stays `undefined`.
|
|
68
|
+
*/
|
|
69
|
+
export function withChannelAgents(agents, channelAgents) {
|
|
70
|
+
if (!agents || !channelAgents?.length)
|
|
71
|
+
return agents;
|
|
72
|
+
const known = new Set(agents.map((a) => a.name));
|
|
73
|
+
const missing = channelAgents.filter((name) => !known.has(name));
|
|
74
|
+
if (missing.length === 0)
|
|
75
|
+
return agents;
|
|
76
|
+
return [...agents, ...missing.map((name) => ({ name, mode: 'primary' }))];
|
|
77
|
+
}
|
|
51
78
|
export function resolveComposerAgent(input) {
|
|
52
79
|
const bound = input.boundAgent?.trim() || null;
|
|
53
80
|
// A pending roster is not an empty one. Refusing the send here would disable
|
|
@@ -24,7 +24,7 @@ export interface ComposerOptions {
|
|
|
24
24
|
* The current selections are handed to `onSend` / `onCommand` as `options`, so
|
|
25
25
|
* callers never need their own `useRuntimeLocal`.
|
|
26
26
|
*/
|
|
27
|
-
export declare function ComposerChatInput({ onSend, onCommand, sessionId, projectId, isBusy, sessionWorking, runtimeReady, stopDisabled, isSending, disabled, autoFocus, placeholder, prefill, onPrefillApplied, aboveSlot, inputSlot, toolbarSlot, underbarPlacement, slashMenuPlacement, cardClassName, parentClassName, boundAgentName, projectSession, clearOnSend, onAgentSelectionChange, sandboxSlot, draftScope, draftActive, promptAttachments, submitLabel, onArrowUpAtStart, }: {
|
|
27
|
+
export declare function ComposerChatInput({ onSend, onCommand, sessionId, projectId, isBusy, sessionWorking, runtimeReady, stopDisabled, isSending, disabled, autoFocus, placeholder, hint, prefill, onPrefillApplied, aboveSlot, inputSlot, toolbarSlot, underbarPlacement, slashMenuPlacement, cardClassName, parentClassName, boundAgentName, defaultAgentName, channelAgentNames, projectSession, clearOnSend, onAgentSelectionChange, sandboxSlot, draftScope, draftActive, promptAttachments, submitLabel, onArrowUpAtStart, }: {
|
|
28
28
|
onSend: (text: string, files: AttachedFile[] | undefined, options: ComposerOptions, attachments?: AttachmentSubmission) => void | Promise<void>;
|
|
29
29
|
onCommand?: (command: Command, args: string | undefined, options: ComposerOptions) => void;
|
|
30
30
|
sessionId?: string;
|
|
@@ -49,13 +49,15 @@ export declare function ComposerChatInput({ onSend, onCommand, sessionId, projec
|
|
|
49
49
|
clearOnSend?: ComposerSendReset;
|
|
50
50
|
autoFocus?: boolean;
|
|
51
51
|
placeholder?: string;
|
|
52
|
+
/** Static copy that replaces the rotating placeholder. See `SessionChatInputProps.hint`. */
|
|
53
|
+
hint?: string;
|
|
52
54
|
prefill?: {
|
|
53
55
|
text: string;
|
|
54
56
|
id: number;
|
|
55
57
|
files?: AttachedFile[];
|
|
56
58
|
mode?: 'replace' | 'merge';
|
|
57
59
|
options?: SessionPromptOverrides | null;
|
|
58
|
-
submit?: boolean;
|
|
60
|
+
submit?: boolean | 'when-ready';
|
|
59
61
|
} | null;
|
|
60
62
|
onPrefillApplied?: SessionChatInputProps['onPrefillApplied'];
|
|
61
63
|
aboveSlot?: ReactNode;
|
|
@@ -69,6 +71,10 @@ export declare function ComposerChatInput({ onSend, onCommand, sessionId, projec
|
|
|
69
71
|
parentClassName?: string;
|
|
70
72
|
/** Immutable project-session agent. When set, sends are locked to this agent. */
|
|
71
73
|
boundAgentName?: string | null;
|
|
74
|
+
/** The agent a new thread starts on here (a channel's default). Unset: the project's default. */
|
|
75
|
+
defaultAgentName?: string | null;
|
|
76
|
+
/** A channel's agents: anyone who posts here runs them, granted or not. */
|
|
77
|
+
channelAgentNames?: readonly string[];
|
|
72
78
|
/** The project session row. Its model pin is the model this composer opens on. */
|
|
73
79
|
projectSession?: {
|
|
74
80
|
metadata?: Record<string, unknown> | null;
|
|
@@ -5,7 +5,7 @@ import { SessionOverridesComposer } from '../overrides/session-overrides-compose
|
|
|
5
5
|
import { SessionChatInput, } from './session-chat-input.js';
|
|
6
6
|
import { useProjectConfig, useRuntimeAgents, useRuntimeCommands, useRuntimeConfig, useRuntimeProviders, useSessionModelSelection } from '@kortix/sdk/react';
|
|
7
7
|
import { appendMentionRefs } from '../../internal/lib/project-preamble.js';
|
|
8
|
-
import { resolveComposerAgent } from './composer-agent-access.js';
|
|
8
|
+
import { resolveComposerAgent, withChannelAgents } from './composer-agent-access.js';
|
|
9
9
|
/**
|
|
10
10
|
* The canonical "compose a first message" input: {@link SessionChatInput}
|
|
11
11
|
* pre-wired with the OpenCode model / agent / variant / command selectors (the
|
|
@@ -15,18 +15,20 @@ import { resolveComposerAgent } from './composer-agent-access.js';
|
|
|
15
15
|
* The current selections are handed to `onSend` / `onCommand` as `options`, so
|
|
16
16
|
* callers never need their own `useRuntimeLocal`.
|
|
17
17
|
*/
|
|
18
|
-
export function ComposerChatInput({ onSend, onCommand, sessionId, projectId, isBusy, sessionWorking, runtimeReady, stopDisabled, isSending, disabled, autoFocus, placeholder, prefill, onPrefillApplied, aboveSlot, inputSlot, toolbarSlot, underbarPlacement, slashMenuPlacement, cardClassName, parentClassName, boundAgentName, projectSession, clearOnSend, onAgentSelectionChange, sandboxSlot, draftScope, draftActive, promptAttachments, submitLabel, onArrowUpAtStart, }) {
|
|
19
|
-
const { data:
|
|
18
|
+
export function ComposerChatInput({ onSend, onCommand, sessionId, projectId, isBusy, sessionWorking, runtimeReady, stopDisabled, isSending, disabled, autoFocus, placeholder, hint, prefill, onPrefillApplied, aboveSlot, inputSlot, toolbarSlot, underbarPlacement, slashMenuPlacement, cardClassName, parentClassName, boundAgentName, defaultAgentName, channelAgentNames, projectSession, clearOnSend, onAgentSelectionChange, sandboxSlot, draftScope, draftActive, promptAttachments, submitLabel, onArrowUpAtStart, }) {
|
|
19
|
+
const { data: rosterAgents } = useRuntimeAgents({ projectId });
|
|
20
|
+
const agents = useMemo(() => withChannelAgents(rosterAgents, channelAgentNames), [rosterAgents, channelAgentNames]);
|
|
20
21
|
const { data: providers, isLoading: providersLoading } = useRuntimeProviders();
|
|
21
22
|
const { data: config } = useRuntimeConfig();
|
|
22
23
|
const projectConfig = useProjectConfig(projectId);
|
|
24
|
+
const startAgent = defaultAgentName || (projectConfig?.default_agent ?? projectConfig?.open_code_default_agent);
|
|
23
25
|
const local = useSessionModelSelection({
|
|
24
26
|
agents,
|
|
25
27
|
providers,
|
|
26
28
|
config,
|
|
27
29
|
sessionId,
|
|
28
30
|
boundAgentName,
|
|
29
|
-
defaultAgentName:
|
|
31
|
+
defaultAgentName: startAgent,
|
|
30
32
|
projectSession,
|
|
31
33
|
});
|
|
32
34
|
const setAgent = local.agent.set;
|
|
@@ -70,7 +72,7 @@ export function ComposerChatInput({ onSend, onCommand, sessionId, projectId, isB
|
|
|
70
72
|
const agentResolution = resolveComposerAgent({
|
|
71
73
|
agents,
|
|
72
74
|
boundAgent: boundAgentName,
|
|
73
|
-
defaultAgent:
|
|
75
|
+
defaultAgent: startAgent,
|
|
74
76
|
selectedAgent: local.agent.current?.name ?? null,
|
|
75
77
|
});
|
|
76
78
|
const selectedAgentName = agentResolution.selected;
|
|
@@ -141,5 +143,5 @@ export function ComposerChatInput({ onSend, onCommand, sessionId, projectId, isB
|
|
|
141
143
|
, {
|
|
142
144
|
// A first message has no session send to write the `@` mention blocks
|
|
143
145
|
// (`session-chat.tsx` `handleSend`), so they go into the text here.
|
|
144
|
-
onSend: (text, files, mentions, attachments, placement) => onSend(appendMentionRefs(text, mentions), files, { ...options(), placement }, attachments), promptAttachments: promptAttachments, onCommand: onCommand ? (cmd, args) => onCommand(cmd, args, options()) : undefined, clearOnSend: clearOnSend, isBusy: isBusy, sessionWorking: sessionWorking, runtimeReady: runtimeReady, stopDisabled: stopDisabled, isSending: isSending, disabled: disabled, autoFocus: autoFocus, placeholder: placeholder, prefill: deliveredPrefill, onPrefillApplied: onPrefillApplied, aboveSlot: aboveSlot, inputSlot: inputSlot, toolbarSlot: combinedToolbarSlot, underbarPlacement: underbarPlacement, slashMenuPlacement: slashMenuPlacement, cardClassName: cardClassName, parentClassName: parentClassName, sessionId: sessionId, projectId: projectId, providers: providers, agents: local.agent.list, selectedAgent: selectedAgentName, noAccessibleAgents: noAccessibleAgents, onAgentChange: (name) => local.agent.set(name ?? undefined), models: local.model.list, selectedModel: local.model.currentKey ?? null, onModelChange: (m) => local.model.set(m ?? undefined, { recent: true }), modelRequired: true, modelsLoading: providersLoading, variants: local.model.variant.list, selectedVariant: local.model.variant.current ?? null, onVariantChange: (v) => local.model.variant.set(v ?? undefined), commands: commands || [], commandsResolved: commands !== undefined, draftScope: draftScope, draftActive: draftActive, submitLabel: submitLabel, onArrowUpAtStart: onArrowUpAtStart }));
|
|
146
|
+
onSend: (text, files, mentions, attachments, placement) => onSend(appendMentionRefs(text, mentions), files, { ...options(), placement }, attachments), promptAttachments: promptAttachments, onCommand: onCommand ? (cmd, args) => onCommand(cmd, args, options()) : undefined, clearOnSend: clearOnSend, isBusy: isBusy, sessionWorking: sessionWorking, runtimeReady: runtimeReady, stopDisabled: stopDisabled, isSending: isSending, disabled: disabled, autoFocus: autoFocus, placeholder: placeholder, hint: hint, prefill: deliveredPrefill, onPrefillApplied: onPrefillApplied, aboveSlot: aboveSlot, inputSlot: inputSlot, toolbarSlot: combinedToolbarSlot, underbarPlacement: underbarPlacement, slashMenuPlacement: slashMenuPlacement, cardClassName: cardClassName, parentClassName: parentClassName, sessionId: sessionId, projectId: projectId, providers: providers, agents: local.agent.list, selectedAgent: selectedAgentName, noAccessibleAgents: noAccessibleAgents, onAgentChange: (name) => local.agent.set(name ?? undefined), models: local.model.list, selectedModel: local.model.currentKey ?? null, onModelChange: (m) => local.model.set(m ?? undefined, { recent: true }), modelRequired: true, modelsLoading: providersLoading, variants: local.model.variant.list, selectedVariant: local.model.variant.current ?? null, onVariantChange: (v) => local.model.variant.set(v ?? undefined), commands: commands || [], commandsResolved: commands !== undefined, draftScope: draftScope, draftActive: draftActive, submitLabel: submitLabel, onArrowUpAtStart: onArrowUpAtStart }));
|
|
145
147
|
}
|
|
@@ -245,6 +245,22 @@ export interface ShouldSubmitPrefillInput {
|
|
|
245
245
|
* submit would send the same message again, so each prefill id submits once.
|
|
246
246
|
*/
|
|
247
247
|
export declare function shouldSubmitPrefill({ prefillId, prefillSubmit, submittedPrefillId, }: ShouldSubmitPrefillInput): boolean;
|
|
248
|
+
export interface ShouldSubmitWhenReadyInput {
|
|
249
|
+
prefillId: number | undefined;
|
|
250
|
+
/** The id whose text is in the editor now, or null. */
|
|
251
|
+
landedPrefillId: number | null;
|
|
252
|
+
submittedPrefillId: number | null;
|
|
253
|
+
/** Send is refused right now: no model, no agent, a create in flight. */
|
|
254
|
+
submitDisabled: boolean;
|
|
255
|
+
/** The model catalog or entitlements are still loading. */
|
|
256
|
+
loading: boolean;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Whether a `submit: 'when-ready'` prefill sends now: its text has landed, a
|
|
260
|
+
* send is possible, and this id has not been sent before. The onboarding chat
|
|
261
|
+
* holds "Onboard me" this way until a model is connected.
|
|
262
|
+
*/
|
|
263
|
+
export declare function shouldSubmitWhenReady({ prefillId, landedPrefillId, submittedPrefillId, submitDisabled, loading, }: ShouldSubmitWhenReadyInput): boolean;
|
|
248
264
|
/** One "Reply" on a transcript selection, waiting to join the quote list. */
|
|
249
265
|
export interface QuoteRequest {
|
|
250
266
|
id: number;
|
|
@@ -228,6 +228,18 @@ export function shouldApplyPrefill({ prefillId, prefillText, prefillFiles, prefi
|
|
|
228
228
|
export function shouldSubmitPrefill({ prefillId, prefillSubmit, submittedPrefillId, }) {
|
|
229
229
|
return prefillSubmit && prefillId !== undefined && prefillId !== submittedPrefillId;
|
|
230
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Whether a `submit: 'when-ready'` prefill sends now: its text has landed, a
|
|
233
|
+
* send is possible, and this id has not been sent before. The onboarding chat
|
|
234
|
+
* holds "Onboard me" this way until a model is connected.
|
|
235
|
+
*/
|
|
236
|
+
export function shouldSubmitWhenReady({ prefillId, landedPrefillId, submittedPrefillId, submitDisabled, loading, }) {
|
|
237
|
+
return (prefillId !== undefined &&
|
|
238
|
+
landedPrefillId === prefillId &&
|
|
239
|
+
submittedPrefillId !== prefillId &&
|
|
240
|
+
!submitDisabled &&
|
|
241
|
+
!loading);
|
|
242
|
+
}
|
|
231
243
|
/**
|
|
232
244
|
* The `quoteRequests` to append right now, in order.
|
|
233
245
|
*
|
|
@@ -49,6 +49,8 @@ export interface ComposerUnderbarProps {
|
|
|
49
49
|
* duplicated for it — same component, different packing.
|
|
50
50
|
*/
|
|
51
51
|
variant?: 'row' | 'inline';
|
|
52
|
+
/** See `SessionChatInputProps.agentPickerCompact`. */
|
|
53
|
+
agentPickerCompact?: boolean;
|
|
52
54
|
toolbarSlot?: React.ReactNode;
|
|
53
55
|
}
|
|
54
|
-
export declare function ComposerUnderbar({ onAttachClick, agents, selectedAgent, agentMenuOpen, onAgentMenuOpenChange, onAgentChange, noAccessibleAgents, messages, models, selectedModel, onContextClick, variant, toolbarSlot, }: ComposerUnderbarProps): import("react").JSX.Element;
|
|
56
|
+
export declare function ComposerUnderbar({ onAttachClick, agents, selectedAgent, agentMenuOpen, onAgentMenuOpenChange, onAgentChange, noAccessibleAgents, messages, models, selectedModel, onContextClick, variant, agentPickerCompact, toolbarSlot, }: ComposerUnderbarProps): import("react").JSX.Element;
|