@kortix/ui 0.15.2 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_vendor/kortix-shared.js +157 -2
- package/dist/_vendor/shared/channel-descriptors.d.ts +1 -1
- package/dist/_vendor/shared/index.d.ts +1 -0
- package/dist/_vendor/shared/workspace-actions.d.ts +155 -0
- package/dist/_vendor/shared/workspace-settings.d.ts +62 -0
- package/dist/access/access/access-dialog-share.js +6 -6
- package/dist/access/access/access-dialog.d.ts +44 -1
- package/dist/access/access/access-dialog.js +8 -8
- package/dist/access/access/agent-principals.d.ts +3 -3
- package/dist/access/access/agent-principals.js +5 -4
- package/dist/access/access/invite-people-dialog.d.ts +37 -0
- package/dist/access/access/invite-people-dialog.js +140 -0
- package/dist/access/access/principal-picker.js +3 -2
- package/dist/access/access/project-select.js +2 -2
- package/dist/access/access/role-select.d.ts +9 -8
- package/dist/access/access/role-select.js +22 -25
- package/dist/access/access/workspace-role-dialog.d.ts +27 -0
- package/dist/access/access/workspace-role-dialog.js +48 -0
- package/dist/access/iam/add-github-account-dialog.d.ts +1 -1
- package/dist/access/iam/add-github-account-dialog.js +1 -1
- package/dist/access/iam/api-key-expiry.d.ts +18 -0
- package/dist/access/iam/api-key-expiry.js +47 -0
- package/dist/access/iam/api-key-rows.d.ts +6 -0
- package/dist/access/iam/api-key-rows.js +3 -0
- package/dist/access/iam/workspace-key-acts-as.d.ts +41 -0
- package/dist/access/iam/workspace-key-acts-as.js +48 -0
- package/dist/access/sharing-intent.js +1 -1
- package/dist/access/sharing-picker.js +1 -1
- package/dist/animated-copy-icon.d.ts +2 -2
- package/dist/animated-copy-icon.js +7 -4
- package/dist/apps/app-shared.js +2 -2
- package/dist/artifacts/artifact-session.js +1 -1
- package/dist/customize/agents/agent-drives-section.js +2 -2
- package/dist/customize/agents/agent-page-chrome.js +1 -1
- package/dist/customize/agents/agent-page.js +4 -5
- package/dist/customize/agents/agents-page.js +2 -3
- package/dist/customize/connectors/connector-identity.d.ts +1 -1
- package/dist/customize/connectors/connector-identity.js +1 -1
- package/dist/customize/connectors/connector-moves-banner.js +2 -2
- package/dist/customize/connectors/connectors-page.d.ts +2 -2
- package/dist/customize/connectors/connectors-page.js +4 -4
- package/dist/customize/connectors/detail/app-page.js +1 -1
- package/dist/customize/connectors/detail/connector-page.d.ts +1 -1
- package/dist/customize/connectors/detail/connector-page.js +1 -1
- package/dist/customize/connectors/detail/connector-policy-sets.js +2 -2
- package/dist/customize/connectors/detail/connector-tools.js +7 -7
- package/dist/customize/connectors/detail/connector-triggers.js +2 -3
- package/dist/customize/connectors/detail/email-inboxes.js +2 -2
- package/dist/customize/models/models-page.d.ts +1 -1
- package/dist/customize/models/models-page.js +1 -1
- package/dist/customize/project-settings/project-admin-sections.d.ts +53 -17
- package/dist/customize/project-settings/project-admin-sections.js +80 -31
- package/dist/customize/project-settings/project-settings-page.d.ts +2 -2
- package/dist/customize/project-settings/project-settings-page.js +6 -4
- package/dist/customize/project-settings/project-settings-sections.d.ts +2 -3
- package/dist/customize/project-settings/project-settings-sections.js +9 -4
- package/dist/customize/providers/provider-accordion.d.ts +3 -1
- package/dist/customize/providers/provider-accordion.js +2 -2
- package/dist/customize/secrets/secrets-page.d.ts +1 -1
- package/dist/customize/secrets/secrets-page.js +1 -1
- package/dist/customize/sections/component/email-connect-form.js +2 -2
- package/dist/customize/sections/component/slack-byo-wizard.js +3 -3
- package/dist/customize/sections/connectors-view.js +17 -17
- package/dist/customize/sections/gateway-view.d.ts +7 -5
- package/dist/customize/sections/gateway-view.js +28 -17
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +2 -2
- package/dist/customize/sections/llm-provider/custom-provider-form.js +2 -2
- package/dist/customize/sections/llm-provider/llm-provider-modal.d.ts +1 -1
- package/dist/customize/sections/llm-provider/llm-provider-modal.js +4 -4
- package/dist/customize/sections/llm-provider/models-tab-row.js +5 -3
- package/dist/customize/sections/llm-provider/types.d.ts +2 -0
- package/dist/customize/sections/view/agent-editor-catalog.d.ts +5 -6
- package/dist/customize/sections/view/agent-editor-catalog.js +33 -14
- package/dist/customize/sections/view/agent-editor.js +1 -1
- package/dist/customize/sections/view/channels-view.js +13 -13
- package/dist/customize/sections/view/gateway/gateway-budgets.js +12 -10
- package/dist/customize/sections/view/gateway/gateway-logs.d.ts +1 -1
- package/dist/customize/sections/view/gateway/gateway-logs.js +3 -3
- package/dist/customize/sections/view/gateway/gateway-overview.js +1 -1
- package/dist/customize/sections/view/gateway/gateway-routing.js +1 -1
- package/dist/customize/sections/view/git-view.js +3 -3
- package/dist/customize/sections/view/grant-mode-field.js +2 -2
- package/dist/customize/sections/view/review-center-connected.js +1 -1
- package/dist/customize/sections/view/review-view.d.ts +0 -15
- package/dist/customize/sections/view/review-view.js +1 -23
- package/dist/customize/sections/view/secret-delivery.js +2 -2
- package/dist/customize/sections/view/secrets-view.js +16 -16
- package/dist/customize/sections/view/subscription-usage-tab.d.ts +12 -1
- package/dist/customize/sections/view/subscription-usage-tab.js +71 -72
- package/dist/customize/settings/rail-copy-context.js +1 -1
- package/dist/customize/settings/rail.d.ts +1 -1
- package/dist/customize/settings/rail.js +11 -18
- package/dist/customize/settings/settings-tab-header.d.ts +1 -1
- package/dist/customize/settings/settings-tab-header.js +1 -1
- package/dist/customize/settings/settings-tabs.d.ts +5 -12
- package/dist/customize/settings/settings-tabs.js +31 -44
- package/dist/customize/settings/tabs/experimental-tab.js +4 -4
- package/dist/customize/settings/tabs/general-tab.d.ts +29 -11
- package/dist/customize/settings/tabs/general-tab.js +55 -25
- package/dist/customize/settings/tabs/project-edit-patch.d.ts +0 -13
- package/dist/customize/settings/tabs/project-edit-patch.js +0 -28
- package/dist/customize/settings/tabs/sandbox-tab.js +2 -2
- package/dist/customize/settings/tabs/tokens-tab.d.ts +32 -2
- package/dist/customize/settings/tabs/tokens-tab.js +157 -32
- package/dist/customize/settings/tabs/workspace-keys.d.ts +6 -0
- package/dist/customize/settings/tabs/workspace-keys.js +240 -0
- package/dist/customize/shared/capability-library.js +3 -1
- package/dist/customize/shared/catalog/catalog-space-tabs.js +2 -2
- package/dist/customize/shared/customize-tab-bar.d.ts +6 -2
- package/dist/customize/shared/customize-tab-bar.js +36 -35
- package/dist/customize/shared/standalone-settings-nav.js +2 -2
- package/dist/customize/triggers/schedule/schedule-copy.d.ts +1 -1
- package/dist/customize/triggers/schedule/trigger-composer.js +5 -6
- package/dist/customize/triggers/schedule/trigger-list.js +2 -2
- package/dist/customize/triggers/schedule/trigger-session-access-copy.d.ts +6 -6
- package/dist/customize/triggers/schedule/trigger-session-access-copy.js +3 -3
- package/dist/customize/triggers/schedule/when-event.js +4 -4
- package/dist/customize/triggers/schedule/when-webhook-address.js +2 -2
- package/dist/customize/triggers/schedule/when-webhook.js +2 -2
- package/dist/customize/triggers/schedule-view.js +4 -5
- package/dist/customize/triggers/triggers-page.d.ts +1 -1
- package/dist/customize/triggers/triggers-page.js +1 -1
- package/dist/files/drives/drive-storage.d.ts +2 -2
- package/dist/files/drives/drive-storage.js +13 -6
- package/dist/files/project/components/change-request-detail-dialog.js +6 -6
- package/dist/files/project/components/change-requests-panel.js +2 -2
- package/dist/files/project/components/diff-preview-banner.d.ts +1 -1
- package/dist/files/project/components/diff-preview-banner.js +1 -1
- package/dist/files/project/components/drive-grid-view.js +1 -1
- package/dist/files/project/components/drive-list-view.js +1 -1
- package/dist/files/project/context.d.ts +1 -1
- package/dist/files/project/context.js +1 -1
- package/dist/files/renderers/image-renderer.js +1 -1
- package/dist/files/runtime/hooks/use-binary-blob.js +12 -2
- package/dist/files/runtime/hooks/use-file-content.js +18 -2
- package/dist/files/viewer/file-content-renderer.js +2 -2
- package/dist/files/viewer/preview-fit.d.ts +1 -1
- package/dist/files/viewer/preview-fit.js +1 -1
- package/dist/i18n/en.d.ts +304 -25
- package/dist/i18n/en.js +867 -588
- package/dist/i18n/ui-catalog/account-hub-translation-keys.generated.js +9 -9
- package/dist/i18n/ui-catalog/app-registry-translation-keys.generated.js +12 -6
- package/dist/i18n/ui-catalog/product-catalog-translation-keys.generated.js +5 -5
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +67 -60
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/icons/solid-right-arrow.d.ts +8 -0
- package/dist/icons/solid-right-arrow.js +11 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/account-hub/account-hub-entry.js +9 -8
- package/dist/internal/account-hub/account-hub-location.d.ts +20 -3
- package/dist/internal/account-hub/account-hub-location.js +16 -7
- package/dist/internal/account-hub/hub-sheet.d.ts +1 -1
- package/dist/internal/account-hub/hub-sheet.js +1 -1
- package/dist/internal/account-hub/sections.d.ts +2 -2
- package/dist/internal/account-hub/sections.js +10 -10
- package/dist/internal/account-hub/use-account-hub-access.d.ts +2 -0
- package/dist/internal/account-hub/use-account-hub-access.js +13 -5
- package/dist/internal/account-hub/workspace-settings-route.d.ts +27 -0
- package/dist/internal/account-hub/workspace-settings-route.js +51 -0
- package/dist/internal/components/nav-rail.d.ts +3 -1
- package/dist/internal/components/nav-rail.js +2 -0
- package/dist/internal/components/repository-disconnected.js +2 -2
- package/dist/internal/desktop/desktop-back-button.d.ts +1 -1
- package/dist/internal/files/file-read-retry.d.ts +13 -0
- package/dist/internal/files/file-read-retry.js +53 -1
- package/dist/internal/goals/goal-meta.d.ts +2 -1
- package/dist/internal/goals/goal-meta.js +4 -2
- package/dist/internal/hooks/account/use-accounts-list.d.ts +2 -12
- package/dist/internal/hooks/account/use-accounts-list.js +1 -14
- package/dist/internal/hooks/account/use-my-invites.d.ts +1 -1
- package/dist/internal/hooks/account/use-my-invites.js +1 -1
- package/dist/internal/hooks/use-review-session-summary.d.ts +7 -0
- package/dist/internal/hooks/use-review-session-summary.js +12 -1
- package/dist/internal/layout/project-capability-nav.d.ts +6 -17
- package/dist/internal/layout/project-capability-nav.js +7 -79
- package/dist/internal/layout/project-settings-nav.d.ts +2 -2
- package/dist/internal/layout/project-settings-nav.js +3 -3
- package/dist/internal/lib/billing/billing-gate-state.d.ts +11 -0
- package/dist/internal/lib/billing/billing-gate-state.js +18 -0
- package/dist/internal/lib/browser-noise/rules/expected-states.js +2 -3
- package/dist/internal/lib/browser-noise/rules/extensions.js +18 -0
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +55 -5
- package/dist/internal/lib/capability-tab-routes.d.ts +16 -40
- package/dist/internal/lib/capability-tab-routes.js +25 -54
- package/dist/internal/lib/desktop.d.ts +1 -1
- package/dist/internal/lib/desktop.js +1 -1
- package/dist/internal/lib/github-installations.d.ts +1 -1
- package/dist/internal/lib/github-installations.js +1 -1
- package/dist/internal/lib/model-pricing.js +1 -1
- package/dist/internal/lib/navigation/session-href.d.ts +1 -1
- package/dist/internal/lib/navigation/session-href.js +1 -1
- package/dist/internal/lib/onboarding/landing-destination.d.ts +12 -4
- package/dist/internal/lib/onboarding/landing-destination.js +17 -5
- package/dist/internal/lib/onboarding/last-project-cookie.d.ts +1 -1
- package/dist/internal/lib/onboarding/last-project-cookie.js +1 -1
- package/dist/internal/lib/project-actions.d.ts +1 -4
- package/dist/internal/lib/project-actions.js +2 -5
- package/dist/internal/lib/provider-branding.js +11 -3
- package/dist/internal/lib/use-project-can.d.ts +1 -3
- package/dist/internal/lib/use-project-can.js +0 -5
- package/dist/internal/lib/web-notifications.js +5 -5
- package/dist/internal/notifications/notification-inbox.d.ts +8 -2
- package/dist/internal/notifications/notification-inbox.js +8 -5
- package/dist/internal/notifications/use-inbox-summary.d.ts +8 -4
- package/dist/internal/notifications/use-inbox-summary.js +12 -6
- package/dist/internal/reminders/use-refetch-after-fire.d.ts +0 -2
- package/dist/internal/reminders/use-refetch-after-fire.js +1 -10
- package/dist/internal/stores/account-panel-store.d.ts +17 -1
- package/dist/internal/stores/account-panel-store.js +19 -2
- package/dist/internal/stores/project-switch-store.d.ts +2 -2
- package/dist/internal/stores/project-switch-store.js +4 -4
- package/dist/internal/stores/settings-panel-store.d.ts +6 -0
- package/dist/internal/stores/settings-panel-store.js +4 -1
- package/dist/internal/stores/workspace-settings-rail-store.d.ts +67 -0
- package/dist/internal/stores/workspace-settings-rail-store.js +11 -0
- package/dist/lib/routes.js +19 -18
- package/dist/lib/z-stack.d.ts +7 -0
- package/dist/lib/z-stack.js +13 -0
- package/dist/markdown/copy-button.d.ts +2 -2
- package/dist/markdown/copy-button.js +22 -20
- package/dist/markdown/setup-links/setup-link-button.js +1 -1
- package/dist/primitives/emoji-tint.d.ts +1 -1
- package/dist/primitives/emoji-tint.js +1 -1
- package/dist/primitives/error-state.js +8 -1
- package/dist/primitives/inline-meta.d.ts +12 -1
- package/dist/primitives/inline-meta.js +38 -5
- package/dist/primitives/page-search-bar.js +6 -6
- package/dist/primitives/section.d.ts +3 -3
- package/dist/primitives/section.js +9 -9
- package/dist/primitives/status.d.ts +5 -5
- package/dist/primitives/status.js +33 -33
- package/dist/primitives/tabs.d.ts +14 -26
- package/dist/primitives/tabs.js +103 -105
- package/dist/primitives/tag.d.ts +1 -1
- package/dist/primitives/toast.d.ts +6 -6
- package/dist/primitives/toast.js +55 -48
- package/dist/providers/session-ids.d.ts +1 -1
- package/dist/providers/ui-provider.d.ts +2 -0
- package/dist/session/agents/agent-strip.js +6 -6
- package/dist/session/agents/subagent-dialog-content.js +3 -4
- package/dist/session/agents/workflow-run-controls.d.ts +0 -2
- package/dist/session/agents/workflow-run-controls.js +1 -12
- package/dist/session/composer/ComposerCard.js +1 -1
- package/dist/session/composer/animated-placeholder.js +1 -1
- package/dist/session/composer/chat-input/chat-input-control.js +1 -8
- package/dist/session/composer/composer-toolbar.d.ts +18 -16
- package/dist/session/composer/composer-toolbar.js +10 -1
- package/dist/session/composer/composer.js +5 -13
- package/dist/session/composer/reasoning-effort-selector.d.ts +21 -0
- package/dist/session/composer/reasoning-effort-selector.js +46 -1
- package/dist/session/header/session-goal-indicator.js +2 -3
- package/dist/session/header/session-reminders-indicator.js +3 -3
- package/dist/session/header/session-site-header.js +1 -1
- package/dist/session/index.d.ts +1 -1
- package/dist/session/models/model-availability.d.ts +11 -0
- package/dist/session/models/model-availability.js +12 -0
- package/dist/session/models/model-connection-gate.d.ts +11 -26
- package/dist/session/models/model-connection-gate.js +22 -35
- package/dist/session/models/model-grouping.d.ts +30 -0
- package/dist/session/models/model-grouping.js +46 -0
- package/dist/session/models/model-picker-panel.d.ts +62 -0
- package/dist/session/models/model-picker-panel.js +181 -0
- package/dist/session/models/model-selector.d.ts +28 -4
- package/dist/session/models/model-selector.js +59 -15
- package/dist/session/models/model-tags.d.ts +4 -8
- package/dist/session/models/model-tags.js +20 -13
- package/dist/session/models/subscription-offer.d.ts +35 -0
- package/dist/session/models/subscription-offer.js +91 -0
- package/dist/session/models/use-model-connection-gate.d.ts +3 -3
- package/dist/session/models/use-model-connection-gate.js +8 -6
- package/dist/session/overrides/session-overrides-toolbar.js +8 -5
- package/dist/session/panel/open-session-quick-view.js +1 -1
- package/dist/session/panel/session-detail-panel.js +5 -1
- package/dist/session/panel/session-panel-provider.js +2 -2
- package/dist/session/panel/session-reminders-panel.js +2 -2
- package/dist/session/panel/shared/use-panel-derivations.d.ts +1 -0
- package/dist/session/panel/shared/use-panel-derivations.js +1 -1
- package/dist/session/panel/shared/use-panel-handoffs.d.ts +2 -2
- package/dist/session/panel/shared/use-panel-handoffs.js +22 -3
- package/dist/session/panel/use-session-panel-state.js +1 -1
- package/dist/session/prompts/ask-deck.d.ts +5 -3
- package/dist/session/prompts/ask-deck.js +30 -10
- package/dist/session/prompts/session-access-prompt.d.ts +61 -0
- package/dist/session/prompts/session-access-prompt.js +88 -0
- package/dist/session/prompts/session-permission-prompt.js +1 -1
- package/dist/session/scope/session-scope-control.js +2 -2
- package/dist/session/status/session-notice-banner.js +3 -3
- package/dist/session/status/session-route-prefetch.d.ts +2 -2
- package/dist/session/thread/optimistic-turn.js +1 -1
- package/dist/session/thread/session-chat.js +40 -18
- package/dist/session/thread/session-context-message-explorer.js +2 -2
- package/dist/session/thread/session-history.js +3 -3
- package/dist/session/tool/render-static.d.ts +11 -0
- package/dist/session/tool/render-static.js +16 -0
- package/dist/session/tool/shared/session-helpers.js +2 -2
- package/dist/session/tool/tool-part-renderer.d.ts +6 -1
- package/dist/session/tool/tool-part-renderer.js +9 -5
- package/dist/session/tool/tools/kortix-action-tool.js +4 -25
- package/dist/session/tool/tools/task-tool.js +9 -2
- package/dist/session/tool/tools/workflow-run-card.js +5 -1
- package/dist/session/tool/tools/workflow-tool.js +3 -14
- package/dist/session/turn/user-message.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/test-utils/intl.d.ts +10096 -0
- package/dist/test-utils/intl.js +27 -0
- package/dist/test-utils/strip-tags.d.ts +24 -0
- package/dist/test-utils/strip-tags.js +32 -0
- package/dist/workspace/admin/project-admin-dashboard.d.ts +51 -33
- package/dist/workspace/admin/project-admin-dashboard.js +269 -81
- package/dist/workspace/admin/settings-search-landing.d.ts +11 -0
- package/dist/workspace/admin/settings-search-landing.js +103 -0
- package/dist/workspace/admin/settings-search.d.ts +69 -0
- package/dist/workspace/admin/settings-search.js +393 -0
- package/dist/workspace/home/existing-repo-setup-prompt.d.ts +22 -0
- package/dist/workspace/home/existing-repo-setup-prompt.js +58 -0
- package/dist/workspace/home/no-agent-home.d.ts +25 -0
- package/dist/workspace/home/no-agent-home.js +44 -0
- package/dist/workspace/home/welcome-body.js +2 -1
- package/dist/workspace/inbox/workspace-inbox.d.ts +21 -0
- package/dist/workspace/inbox/workspace-inbox.js +52 -0
- package/dist/workspace/layout/project-files-view.js +1 -1
- package/dist/workspace/layout/project-home.js +60 -9
- package/dist/workspace/memory/memory-body.js +2 -2
- package/dist/workspace/new/account-param.d.ts +1 -1
- package/dist/workspace/new/account-param.js +4 -4
- package/dist/workspace/new/advanced-fields.js +3 -3
- package/dist/workspace/new/clone-param.d.ts +1 -1
- package/dist/workspace/new/clone-param.js +1 -1
- package/dist/workspace/new/create-workspace-key.js +1 -1
- package/dist/workspace/new/github-source.d.ts +6 -6
- package/dist/workspace/new/github-source.js +6 -6
- package/dist/workspace/new/new-workspace-form.d.ts +11 -141
- package/dist/workspace/new/new-workspace-form.js +9 -195
- package/dist/workspace/new/provision-new-workspace.d.ts +14 -0
- package/dist/workspace/new/provision-new-workspace.js +14 -0
- package/dist/workspace/new/repository-options.d.ts +2 -2
- package/dist/workspace/new/repository-options.js +2 -2
- package/dist/workspace/new/source-param.d.ts +2 -2
- package/dist/workspace/new/source-param.js +2 -2
- package/dist/workspace/new/use-create-workspace.d.ts +43 -102
- package/dist/workspace/new/use-create-workspace.js +77 -136
- package/dist/workspace/new/use-project-quota.d.ts +1 -1
- package/dist/workspace/new/use-project-quota.js +1 -1
- package/dist/workspace/new/workspace-handoff.d.ts +2 -2
- package/dist/workspace/new/workspace-handoff.js +2 -2
- package/dist/workspace/new/workspace-name.d.ts +1 -1
- package/dist/workspace/new/workspace-name.js +1 -1
- package/dist/workspace/project-selector/project-selector-model.d.ts +115 -57
- package/dist/workspace/project-selector/project-selector-model.js +157 -111
- package/dist/workspace/projects/modal/project-icon-field.d.ts +5 -5
- package/dist/workspace/projects/modal/project-icon-field.js +4 -4
- package/dist/workspace/projects/policies-panel.js +3 -3
- package/dist/workspace/sessions/board-grouping.js +1 -1
- package/dist/workspace/sessions/project-sessions-view.js +2 -2
- package/dist/workspace/sessions/session-detail.js +2 -2
- package/dist/workspace/sessions/sessions-board.d.ts +1 -1
- package/dist/workspace/sessions/sessions-board.js +1 -1
- package/dist/workspace/settings/split-notice-banner.d.ts +13 -0
- package/dist/workspace/settings/split-notice-banner.js +59 -0
- package/dist/workspace/settings/use-leave-workspace.d.ts +16 -0
- package/dist/workspace/settings/use-leave-workspace.js +60 -0
- package/dist/workspace/sidebar/footer/project-files-nav.js +2 -2
- package/dist/workspace/sidebar/footer/sandbox-health.js +1 -1
- package/dist/workspace/sidebar/invitations-menu-group.d.ts +2 -2
- package/dist/workspace/sidebar/invitations-menu-group.js +4 -4
- package/dist/workspace/sidebar/modal/session-embed-section.js +1 -1
- package/dist/workspace/sidebar/modal/share-session-access.js +1 -1
- package/dist/workspace/sidebar/modal/share-session-modal.js +3 -3
- package/dist/workspace/sidebar/project-nav-items.js +14 -25
- package/dist/workspace/sidebar/project-sidebar.js +17 -2
- package/dist/workspace/sidebar/project-spaces-nav.js +6 -15
- package/dist/workspace/sidebar/sidebar-drill.d.ts +37 -0
- package/dist/workspace/sidebar/sidebar-drill.js +110 -0
- package/dist/workspace/sidebar/use-workspace-directory.d.ts +24 -0
- package/dist/workspace/sidebar/use-workspace-directory.js +24 -0
- package/dist/workspace/sidebar/use-workspace-list.d.ts +37 -0
- package/dist/workspace/sidebar/use-workspace-list.js +71 -0
- package/dist/workspace/sidebar/workspace-grouping.d.ts +6 -67
- package/dist/workspace/sidebar/workspace-grouping.js +4 -107
- package/dist/workspace/sidebar/workspace-menu-model.d.ts +30 -12
- package/dist/workspace/sidebar/workspace-menu-model.js +13 -107
- package/dist/workspace/sidebar/workspace-menu-section.d.ts +7 -1
- package/dist/workspace/sidebar/workspace-menu-section.js +65 -100
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +34 -0
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +282 -0
- package/dist/workspace/space/space-filter-tabs.js +2 -2
- package/dist/workspace/space/space-page.d.ts +1 -1
- package/dist/workspace/space/space-page.js +1 -1
- package/package.json +51 -47
- package/skills/kortix-ui/SKILL.md +66 -66
- package/skills/kortix-ui/references/custom-dashboard.md +15 -15
- package/skills/kortix-ui/references/modules.md +15 -15
- package/dist/customize/agents/agent-pin-button.d.ts +0 -10
- package/dist/customize/agents/agent-pin-button.js +0 -20
- package/dist/customize/settings/tabs/transfer-workspace-dialog.d.ts +0 -4
- package/dist/customize/settings/tabs/transfer-workspace-dialog.js +0 -82
- package/dist/internal/account-hub/account-settings-shell.d.ts +0 -7
- package/dist/internal/account-hub/account-settings-shell.js +0 -87
- package/dist/internal/account-hub/account-settings-sidebar.d.ts +0 -2
- package/dist/internal/account-hub/account-settings-sidebar.js +0 -169
- package/dist/internal/lib/use-project-feature-flags.d.ts +0 -28
- package/dist/internal/lib/use-project-feature-flags.js +0 -76
- package/dist/internal/stores/pinned-agents-store.d.ts +0 -26
- package/dist/internal/stores/pinned-agents-store.js +0 -20
- package/dist/primitives/info-banner.d.ts +0 -14
- package/dist/primitives/info-banner.js +0 -72
- package/dist/workspace/new/account-picker.d.ts +0 -71
- package/dist/workspace/new/account-picker.js +0 -92
- package/dist/workspace/new/use-creatable-accounts.d.ts +0 -8
- package/dist/workspace/new/use-creatable-accounts.js +0 -33
|
@@ -29,6 +29,7 @@ import { useCallback, useState } from 'react';
|
|
|
29
29
|
import { Button } from '../../primitives/button.js';
|
|
30
30
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger, } from '../../primitives/dropdown-menu.js';
|
|
31
31
|
import { cn } from '../../lib/utils.js';
|
|
32
|
+
import { SolidCheckIcon } from '../../internal/icons/solid-check-icon.js';
|
|
32
33
|
import { CaretDownIcon, CellSignalFullIcon, CellSignalHighIcon, CellSignalLowIcon, CellSignalMediumIcon, CellSignalNoneIcon, GaugeIcon, } from '@phosphor-icons/react';
|
|
33
34
|
/**
|
|
34
35
|
* The value `onVariantChange(null)` means: no variant, let the model decide.
|
|
@@ -50,6 +51,8 @@ export function reasoningEffortChoices(variants, canApply) {
|
|
|
50
51
|
/** `medium` → `Medium`. The catalog ships lowercase ids; the trigger and the
|
|
51
52
|
* menu should not. */
|
|
52
53
|
export function effortLabel(value) {
|
|
54
|
+
if (value === 'xhigh')
|
|
55
|
+
return 'Extra high';
|
|
53
56
|
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
@@ -117,5 +120,47 @@ export function ReasoningEffortSelector({ variants, selectedVariant, onVariantCh
|
|
|
117
120
|
// reads as Auto rather than an unlabeled value; the next explicit choice
|
|
118
121
|
// replaces it.
|
|
119
122
|
const current = selectedVariant && choices.includes(selectedVariant) ? selectedVariant : null;
|
|
120
|
-
return (_jsxs(DropdownMenu, { open: open, onOpenChange: setOpen, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": t('thinkingEffort'), className: "text-muted-foreground gap-1.5 rounded-lg hit-area-y-3", children: [_jsx(EffortIcon, { value: current, className: "size-4 shrink-0" }), _jsx("span", { className: "max-w-[7rem] truncate", children: current ? effortLabel(current) : t('auto') }), _jsx(CaretDownIcon, { className: cn('size-3 opacity-50 transition-transform duration-
|
|
123
|
+
return (_jsxs(DropdownMenu, { open: open, onOpenChange: setOpen, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": t('thinkingEffort'), className: "text-muted-foreground gap-1.5 rounded-lg hit-area-y-3", children: [_jsx(EffortIcon, { value: current, className: "size-4 shrink-0" }), _jsx("span", { className: "max-w-[7rem] truncate", children: current ? effortLabel(current) : t('auto') }), _jsx(CaretDownIcon, { className: cn('size-3 opacity-50 transition-transform duration-moderate ease-out', open && 'rotate-180') })] }) }), _jsx(DropdownMenuContent, { side: "top", align: "start", className: "min-w-[10rem]", children: _jsxs(DropdownMenuRadioGroup, { value: current ?? AUTO, onValueChange: onValueChange, children: [_jsxs(DropdownMenuRadioItem, { value: AUTO, children: [_jsx(EffortIcon, { value: null, className: "size-4 shrink-0" }), t('auto')] }), choices.map((value) => (_jsxs(DropdownMenuRadioItem, { value: value, children: [_jsx(EffortIcon, { value: value, className: "size-4 shrink-0" }), effortLabel(value)] }, value)))] }) })] }));
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Thinking effort as the right-hand pane of the model popover: the merged
|
|
127
|
+
* model + effort picker (`ModelSelector`'s `reasoning` prop). Same values,
|
|
128
|
+
* same Auto-first rule and same stale-pick rule as the dropdown above.
|
|
129
|
+
*
|
|
130
|
+
* It sits inside cmdk's `Command` root, which handles Arrow keys and Enter on
|
|
131
|
+
* every keydown that bubbles to it. The pane stops those keys so Enter on a
|
|
132
|
+
* level never also selects the model row cmdk has highlighted; Escape still
|
|
133
|
+
* bubbles so the popover closes.
|
|
134
|
+
*/
|
|
135
|
+
export function ReasoningEffortPane({ choices, selectedVariant, onVariantChange, title, className, }) {
|
|
136
|
+
const t = useTranslations('threads');
|
|
137
|
+
if (choices.length === 0)
|
|
138
|
+
return null;
|
|
139
|
+
const current = selectedVariant && choices.includes(selectedVariant) ? selectedVariant : null;
|
|
140
|
+
const items = [
|
|
141
|
+
{ value: null, label: t('auto') },
|
|
142
|
+
...choices.map((value) => ({ value, label: effortLabel(value) })),
|
|
143
|
+
];
|
|
144
|
+
const onKeyDown = (event) => {
|
|
145
|
+
// Escape closes the popover, Tab leaves the pane, and a modifier
|
|
146
|
+
// combination (Mod+1..9 picks a model) belongs to the panel around it.
|
|
147
|
+
if (event.key === 'Escape' || event.key === 'Tab')
|
|
148
|
+
return;
|
|
149
|
+
if (event.metaKey || event.ctrlKey || event.altKey)
|
|
150
|
+
return;
|
|
151
|
+
event.stopPropagation();
|
|
152
|
+
if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp')
|
|
153
|
+
return;
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
const radios = Array.from(event.currentTarget.querySelectorAll('[role="radio"]'));
|
|
156
|
+
const index = radios.indexOf(document.activeElement);
|
|
157
|
+
const step = event.key === 'ArrowDown' ? 1 : -1;
|
|
158
|
+
radios[(index + step + radios.length) % radios.length]?.focus();
|
|
159
|
+
};
|
|
160
|
+
return (
|
|
161
|
+
// The heading names the knob only: the model is the checked row beside it.
|
|
162
|
+
_jsxs("div", { className: cn('flex min-w-0 flex-col', className), children: [_jsx("div", { className: "text-muted-foreground flex h-9 shrink-0 items-center border-b px-3 text-sm", children: title ?? t('thinkingEffort') }), _jsx("div", { role: "radiogroup", "aria-label": t('thinkingEffort'), onKeyDown: onKeyDown, className: "flex flex-col gap-px p-1.5", children: items.map(({ value, label }) => {
|
|
163
|
+
const checked = value === current;
|
|
164
|
+
return (_jsxs("button", { type: "button", role: "radio", "aria-checked": checked, tabIndex: checked ? 0 : -1, onClick: () => onVariantChange(value), className: cn('text-foreground flex h-8 cursor-pointer items-center gap-2 rounded-md px-2 text-left text-sm outline-none', 'hover:bg-hover focus-visible:bg-hover focus-visible:ring-kortix-base focus-visible:ring-2', checked && 'bg-active hover:bg-active'), children: [_jsx("span", { className: "min-w-0 flex-1 truncate", children: label }), checked ? _jsx(SolidCheckIcon, { className: "text-ring size-4 shrink-0" }) : null] }, value ?? AUTO));
|
|
165
|
+
}) })] }));
|
|
121
166
|
}
|
|
@@ -9,12 +9,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
9
9
|
* needs attention, so a broken goal is visible from its own session.
|
|
10
10
|
*/
|
|
11
11
|
import { HoverPrefetchLink } from '../../internal/components/hover-prefetch-link.js';
|
|
12
|
-
import { useNow } from '../../internal/reminders/use-refetch-after-fire.js';
|
|
13
12
|
import { Button } from '../../primitives/button.js';
|
|
14
13
|
import { Popover, PopoverContent, PopoverTrigger } from '../../primitives/popover.js';
|
|
15
14
|
import { StatusDot } from '../../primitives/status.js';
|
|
16
15
|
import { useLocale, useTranslations } from '../../i18n/index.js';
|
|
17
|
-
import { useFeatureFlag, useSessionGoal } from '@kortix/sdk/react';
|
|
16
|
+
import { useFeatureFlag, useNow, useSessionGoal } from '@kortix/sdk/react';
|
|
18
17
|
import { TargetIcon } from '@phosphor-icons/react';
|
|
19
18
|
import { useState } from 'react';
|
|
20
19
|
import { useSessionIds } from '../../providers/session-ids.js';
|
|
@@ -22,7 +21,7 @@ import { formatGoalTime, GoalHealthDot, goalHref, goalLastWake, goalNextWake, go
|
|
|
22
21
|
export function SessionGoalIndicator() {
|
|
23
22
|
const t = useTranslations('goals');
|
|
24
23
|
const locale = useLocale();
|
|
25
|
-
const now = useNow();
|
|
24
|
+
const now = useNow(30_000);
|
|
26
25
|
const { projectId, sessionId } = useSessionIds();
|
|
27
26
|
const gate = useFeatureFlag(projectId, 'goals');
|
|
28
27
|
const { goal, role } = useSessionGoal(gate.enabled ? projectId : null, sessionId);
|
|
@@ -23,10 +23,10 @@ import { useCapabilityAccess } from '../../internal/layout/project-settings-nav.
|
|
|
23
23
|
import { BELL_REFLECTION_MASK } from '../../internal/notifications/notification-bell.js';
|
|
24
24
|
import { badgeCount } from '../../internal/notifications/notification-rows.js';
|
|
25
25
|
import { reminderTitle } from '../../internal/reminders/reminder-format.js';
|
|
26
|
-
import {
|
|
26
|
+
import { useRefetchAfterFire } from '../../internal/reminders/use-refetch-after-fire.js';
|
|
27
27
|
import { cn } from '../../internal/lib/utils.js';
|
|
28
28
|
import { useTranslations } from '../../i18n/index.js';
|
|
29
|
-
import { qk, useFeatureFlag, useSessionWorking } from '@kortix/sdk/react';
|
|
29
|
+
import { qk, useFeatureFlag, useNow, useSessionWorking } from '@kortix/sdk/react';
|
|
30
30
|
import { AlarmIcon, PauseIcon, PlayIcon, TrashIcon } from '@phosphor-icons/react';
|
|
31
31
|
import { useQueryClient } from '@tanstack/react-query';
|
|
32
32
|
import { useSessionIds } from '../../providers/session-ids.js';
|
|
@@ -119,7 +119,7 @@ export function SessionRemindersIndicator({ runtimeSessionId }) {
|
|
|
119
119
|
const gate = useFeatureFlag(projectId, 'reminders');
|
|
120
120
|
const { reminders, controls, confirm } = useReminderControls(gate.enabled ? projectId : null, sessionId);
|
|
121
121
|
useRefetchAfterFire(reminders.data?.reminders, reminders.refetch);
|
|
122
|
-
const now = useNow();
|
|
122
|
+
const now = useNow(30_000);
|
|
123
123
|
const hasTab = useCapabilityAccess(projectId).tabs.includes('reminders');
|
|
124
124
|
// Null when the host serves no customize pages: no "Open in Reminders" link.
|
|
125
125
|
const manageHref = hasTab ? `${remindersHref(projectId)}?session=${sessionId}` : null;
|
|
@@ -104,7 +104,7 @@ export function SessionSiteHeader({ sessionId, sessionTitle, isMobileView, leadi
|
|
|
104
104
|
// The ids come from the session view (`SessionIdsProvider`); a host whose
|
|
105
105
|
// URL has another shape still gets them. apps/web's route is the fallback.
|
|
106
106
|
const sessionIds = useSessionIds();
|
|
107
|
-
const projectRoute = pathname?.match(/^\/projects\/([^/]+)\/sessions\/([^/]+)/);
|
|
107
|
+
const projectRoute = pathname?.match(/^\/(?:workspaces|projects)\/([^/]+)\/sessions\/([^/]+)/);
|
|
108
108
|
const projectId = sessionIds.projectId ?? projectRoute?.[1];
|
|
109
109
|
const projectSessionId = sessionIds.sessionId ?? projectRoute?.[2];
|
|
110
110
|
const isProjectSession = !!projectId && !!projectSessionId;
|
package/dist/session/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export { BasicTool } from './tool/shared/infrastructure-rows.js';
|
|
|
29
29
|
export { GenericTool } from './tool/generic-tool.js';
|
|
30
30
|
export { SessionChatInput, type SessionChatInputProps } from './composer/session-chat-input.js';
|
|
31
31
|
export { AgentSelector } from './composer/agent-selector.js';
|
|
32
|
-
export { ModelSelector, type ModelSelectorProps } from './models/model-selector.js';
|
|
32
|
+
export { ModelSelector, type ModelSelectorProps, type ModelReasoningControls } from './models/model-selector.js';
|
|
33
33
|
export { SessionPermissionPrompt } from './prompts/session-permission-prompt.js';
|
|
34
34
|
export { QuestionPrompt, type QuestionPromptHandle } from './prompts/question-prompt.js';
|
|
35
35
|
export { TurnErrorDisplay } from './status/session-error-banner.js';
|
|
@@ -26,6 +26,17 @@ export declare function unavailableModelConnection(model: {
|
|
|
26
26
|
}, options: {
|
|
27
27
|
chatGptAvailable: boolean;
|
|
28
28
|
}): 'chatgpt' | 'claude' | 'provider' | null;
|
|
29
|
+
/**
|
|
30
|
+
* True when a ChatGPT or Claude plan already serves a runnable model. The
|
|
31
|
+
* composer's connect prompt reads it: once a plan is connected it has nothing
|
|
32
|
+
* left to offer a project that already has Kortix models.
|
|
33
|
+
*/
|
|
34
|
+
export declare function hasRunnableSubscriptionModel(models: ReadonlyArray<{
|
|
35
|
+
enabled?: boolean;
|
|
36
|
+
available?: boolean;
|
|
37
|
+
providerID?: string;
|
|
38
|
+
provider?: string | null;
|
|
39
|
+
}>): boolean;
|
|
29
40
|
export declare function resolveAvailableSelectedModel(selectedModel: ModelKey | null | undefined, isSelectableModel: (model: ModelKey) => boolean): ModelKey | null;
|
|
30
41
|
/**
|
|
31
42
|
* The name of the selected model when it cannot read an attached image, else null.
|
|
@@ -23,6 +23,18 @@ export function unavailableModelConnection(model, options) {
|
|
|
23
23
|
return 'claude';
|
|
24
24
|
return model.availability === 'login' && options.chatGptAvailable ? 'chatgpt' : 'provider';
|
|
25
25
|
}
|
|
26
|
+
/** Providers that run on a member's own ChatGPT or Claude plan. */
|
|
27
|
+
const SUBSCRIPTION_PROVIDER_IDS = new Set(['codex', 'claude-agent']);
|
|
28
|
+
/**
|
|
29
|
+
* True when a ChatGPT or Claude plan already serves a runnable model. The
|
|
30
|
+
* composer's connect prompt reads it: once a plan is connected it has nothing
|
|
31
|
+
* left to offer a project that already has Kortix models.
|
|
32
|
+
*/
|
|
33
|
+
export function hasRunnableSubscriptionModel(models) {
|
|
34
|
+
return models.some((model) => (SUBSCRIPTION_PROVIDER_IDS.has(model.providerID ?? '') ||
|
|
35
|
+
SUBSCRIPTION_PROVIDER_IDS.has(model.provider ?? '')) &&
|
|
36
|
+
isRunnableModel(model));
|
|
37
|
+
}
|
|
26
38
|
export function resolveAvailableSelectedModel(selectedModel, isSelectableModel) {
|
|
27
39
|
if (!selectedModel)
|
|
28
40
|
return null;
|
|
@@ -1,37 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* offers the same two ways out as the full gate.
|
|
2
|
+
* No model can run: the composer shows the same "Connect ChatGPT" and "Connect
|
|
3
|
+
* Claude" rows the project home offers (`ConnectPlanRows`), a gap below the
|
|
4
|
+
* composer, not dismissible. Sending is already disabled by `modelUnavailable`.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
6
|
+
* It used to be a heading ("Connect a model to start"), two bordered tiles,
|
|
7
|
+
* "Use an API key" and "Upgrade". On the project home it stacked on top of the
|
|
8
|
+
* optional offer and read as a block. Other providers and API keys stay one
|
|
9
|
+
* click away in the model picker and the provider dialog.
|
|
8
10
|
*
|
|
9
|
-
*
|
|
10
|
-
* (`-mt-4` on the clipper, cancelled by `pt-4` on the strip), so the card —
|
|
11
|
-
* `isolate z-10`, opaque `bg-sidebar` — paints over the overlap. What is left
|
|
12
|
-
* is one surface: the composer, with a deeper strip hanging off its bottom
|
|
13
|
-
* edge and showing through the card's own rounded bottom corners.
|
|
14
|
-
*
|
|
15
|
-
* The overlap is why the card needs NO conditional radius. A flush seam would
|
|
16
|
-
* have meant `rounded-b-none` on the card while this is mounted, and the card
|
|
17
|
-
* would snap its corners back the instant `show` flipped — 350ms of square
|
|
18
|
-
* corner sitting above a strip that is still animating out. Here the card is
|
|
19
|
-
* untouched and only the tray moves.
|
|
20
|
-
*
|
|
21
|
-
* `-mt-4` lives on the clipper, never on the strip inside it: the clipper is
|
|
22
|
-
* `overflow-hidden` for the height animation, so a negative margin on its
|
|
23
|
-
* child would be clipped away instead of overlapping anything.
|
|
24
|
-
*
|
|
25
|
-
* `show` must only flip on settled data (see `entitlementsPending`) — the
|
|
26
|
-
* animation assumes it renders once with the final answer, not per-query.
|
|
11
|
+
* `show` must only flip on settled data (see `entitlementsPending`).
|
|
27
12
|
*/
|
|
28
13
|
export declare function ModelConnectionBar({ show }: {
|
|
29
14
|
show: boolean;
|
|
30
|
-
}): import("react").JSX.Element;
|
|
15
|
+
}): import("react").JSX.Element | null;
|
|
31
16
|
/**
|
|
32
17
|
* One line under the card when the selected model cannot read an attached image
|
|
33
|
-
* (`modelRejectingAttachedImages`). Send is refused with the same words. The
|
|
34
|
-
*
|
|
18
|
+
* (`modelRejectingAttachedImages`). Send is refused with the same words. The
|
|
19
|
+
* composer never shows it beside `ModelConnectionBar`.
|
|
35
20
|
*/
|
|
36
21
|
export declare function ImagesUnsupportedBar({ modelName }: {
|
|
37
22
|
modelName: string | null;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
3
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ImageBrokenIcon } from '@phosphor-icons/react';
|
|
4
4
|
import { AnimatePresence, m, useReducedMotion } from 'motion/react';
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { useTranslations } from '../../i18n/index.js';
|
|
7
|
-
import {
|
|
8
|
-
import { useModelConnectionGate } from './use-model-connection-gate.js';
|
|
9
|
-
/** Stable empty list so the hook's `models = []` default isn't re-allocated per render. */
|
|
10
|
-
const EMPTY_MODELS = [];
|
|
7
|
+
import { ConnectPlanRows } from './subscription-offer.js';
|
|
11
8
|
// Enter waits a beat (delay) so the composer paints first, then the bar slides
|
|
12
9
|
// out from under it — height opens the space while the strip translates down,
|
|
13
10
|
// same spring on both so they move as one surface. Exit runs faster than enter
|
|
@@ -15,41 +12,24 @@ const EMPTY_MODELS = [];
|
|
|
15
12
|
const BAR_ENTER = { type: 'spring', duration: 0.5, bounce: 0, delay: 0.15 };
|
|
16
13
|
const BAR_EXIT = { type: 'spring', duration: 0.35, bounce: 0 };
|
|
17
14
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* offers the same two ways out as the full gate.
|
|
15
|
+
* No model can run: the composer shows the same "Connect ChatGPT" and "Connect
|
|
16
|
+
* Claude" rows the project home offers (`ConnectPlanRows`), a gap below the
|
|
17
|
+
* composer, not dismissible. Sending is already disabled by `modelUnavailable`.
|
|
22
18
|
*
|
|
23
|
-
*
|
|
19
|
+
* It used to be a heading ("Connect a model to start"), two bordered tiles,
|
|
20
|
+
* "Use an API key" and "Upgrade". On the project home it stacked on top of the
|
|
21
|
+
* optional offer and read as a block. Other providers and API keys stay one
|
|
22
|
+
* click away in the model picker and the provider dialog.
|
|
24
23
|
*
|
|
25
|
-
*
|
|
26
|
-
* (`-mt-4` on the clipper, cancelled by `pt-4` on the strip), so the card —
|
|
27
|
-
* `isolate z-10`, opaque `bg-sidebar` — paints over the overlap. What is left
|
|
28
|
-
* is one surface: the composer, with a deeper strip hanging off its bottom
|
|
29
|
-
* edge and showing through the card's own rounded bottom corners.
|
|
30
|
-
*
|
|
31
|
-
* The overlap is why the card needs NO conditional radius. A flush seam would
|
|
32
|
-
* have meant `rounded-b-none` on the card while this is mounted, and the card
|
|
33
|
-
* would snap its corners back the instant `show` flipped — 350ms of square
|
|
34
|
-
* corner sitting above a strip that is still animating out. Here the card is
|
|
35
|
-
* untouched and only the tray moves.
|
|
36
|
-
*
|
|
37
|
-
* `-mt-4` lives on the clipper, never on the strip inside it: the clipper is
|
|
38
|
-
* `overflow-hidden` for the height animation, so a negative margin on its
|
|
39
|
-
* child would be clipped away instead of overlapping anything.
|
|
40
|
-
*
|
|
41
|
-
* `show` must only flip on settled data (see `entitlementsPending`) — the
|
|
42
|
-
* animation assumes it renders once with the final answer, not per-query.
|
|
24
|
+
* `show` must only flip on settled data (see `entitlementsPending`).
|
|
43
25
|
*/
|
|
44
26
|
export function ModelConnectionBar({ show }) {
|
|
45
|
-
|
|
46
|
-
const { canConnectProvider, openConnectProvider, openUpgrade, modal, showUpgradeOption } = useModelConnectionGate(EMPTY_MODELS);
|
|
47
|
-
return (_jsxs(_Fragment, { children: [modal, _jsxs(ComposerTray, { show: show, trayKey: "model-connection-bar", children: [_jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-2 text-xs", children: [_jsx(KeyIcon, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "truncate", children: [t('barTitle'), _jsxs("span", { className: "hidden sm:inline", children: [" \u2014 ", t('barDescription')] })] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [showUpgradeOption && (_jsxs(Button, { type: "button", variant: "ghost", size: "xs", onClick: openUpgrade, children: [_jsx(CreditCardIcon, { className: "size-3.5 shrink-0" }), t('upgrade')] })), canConnectProvider && (_jsx(Button, { type: "button", size: "xs", onClick: () => openConnectProvider('providers'), children: t('connectModel') }))] })] })] }));
|
|
27
|
+
return show ? _jsx(ConnectPlanRows, { dismissible: false, className: "mt-4" }) : null;
|
|
48
28
|
}
|
|
49
29
|
/**
|
|
50
30
|
* One line under the card when the selected model cannot read an attached image
|
|
51
|
-
* (`modelRejectingAttachedImages`). Send is refused with the same words. The
|
|
52
|
-
*
|
|
31
|
+
* (`modelRejectingAttachedImages`). Send is refused with the same words. The
|
|
32
|
+
* composer never shows it beside `ModelConnectionBar`.
|
|
53
33
|
*/
|
|
54
34
|
export function ImagesUnsupportedBar({ modelName }) {
|
|
55
35
|
const t = useTranslations('sessionUi.modelGate');
|
|
@@ -59,7 +39,14 @@ export function ImagesUnsupportedBar({ modelName }) {
|
|
|
59
39
|
setShownName(modelName);
|
|
60
40
|
return (_jsx(ComposerTray, { show: modelName !== null, trayKey: "images-unsupported-bar", children: _jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-2 text-xs", children: [_jsx(ImageBrokenIcon, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "truncate", children: [t('imagesUnsupported', { model: shownName ?? '' }), _jsxs("span", { className: "hidden sm:inline", children: [" \u2014 ", t('imagesUnsupportedHint')] })] })] }) }));
|
|
61
41
|
}
|
|
62
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* A strip that hangs behind the card's bottom edge: rendered as the card's next
|
|
44
|
+
* sibling, pulled up under it (`-mt-4` on the clipper, cancelled by `pt-4` on
|
|
45
|
+
* the strip), so the card — `isolate z-10`, opaque — paints over the overlap.
|
|
46
|
+
* `-mt-4` lives on the clipper, never on the strip: the clipper is
|
|
47
|
+
* `overflow-hidden` for the height animation and would clip a negative margin
|
|
48
|
+
* on its child.
|
|
49
|
+
*/
|
|
63
50
|
function ComposerTray({ show, trayKey, children, }) {
|
|
64
51
|
const reduceMotion = useReducedMotion();
|
|
65
52
|
return (_jsx(AnimatePresence, { initial: false, children: show && (_jsx(m.div, { initial: reduceMotion ? { opacity: 0 } : { height: 0 }, animate: reduceMotion
|
|
@@ -83,3 +83,33 @@ export declare function buildPickerSections(groups: readonly {
|
|
|
83
83
|
providerName: string;
|
|
84
84
|
models: FlatModel[];
|
|
85
85
|
}[]): PickerSection[];
|
|
86
|
+
/**
|
|
87
|
+
* The picker's left rail: Favorites, then where a model comes from. `kortix`
|
|
88
|
+
* holds the managed set, `chatgpt` the models billed to a connected ChatGPT
|
|
89
|
+
* plan, and every provider the workspace connected itself gets its own tab,
|
|
90
|
+
* keyed by its real provider id (`pickerGroupId`: `anthropic`, `deepseek`, …).
|
|
91
|
+
*/
|
|
92
|
+
export type PickerTabId = 'favorites' | 'kortix' | 'chatgpt' | (string & {});
|
|
93
|
+
export declare function pickerTabOf(model: Pick<FlatModel, 'providerID' | 'modelID' | 'provider'>): string;
|
|
94
|
+
/**
|
|
95
|
+
* The rail's tabs, in order: Favorites (always: it is where a star lands, and
|
|
96
|
+
* its empty state says how to fill it), Kortix, ChatGPT, then each provider in
|
|
97
|
+
* `providerOrder` (the picker's provider order), then the rest by id. A source
|
|
98
|
+
* tab shows only when it holds a model, except ChatGPT, which also shows when
|
|
99
|
+
* the member can connect a ChatGPT plan from it.
|
|
100
|
+
*/
|
|
101
|
+
export declare function pickerTabs(models: readonly Pick<FlatModel, 'providerID' | 'modelID' | 'provider'>[], opts?: {
|
|
102
|
+
canConnectChatGpt?: boolean;
|
|
103
|
+
providerOrder?: readonly string[];
|
|
104
|
+
}): PickerTabId[];
|
|
105
|
+
/**
|
|
106
|
+
* The tab the picker opens on: Favorites when the current model is starred,
|
|
107
|
+
* else the tab that holds the current model, else Favorites when anything is
|
|
108
|
+
* starred, else the first source tab.
|
|
109
|
+
*/
|
|
110
|
+
export declare function initialPickerTab(input: {
|
|
111
|
+
tabs: readonly PickerTabId[];
|
|
112
|
+
selected: Pick<FlatModel, 'providerID' | 'modelID' | 'provider'> | null | undefined;
|
|
113
|
+
selectedIsFavorite: boolean;
|
|
114
|
+
hasFavorites: boolean;
|
|
115
|
+
}): PickerTabId;
|
|
@@ -120,3 +120,49 @@ export function buildPickerSections(groups) {
|
|
|
120
120
|
models: group.models,
|
|
121
121
|
}));
|
|
122
122
|
}
|
|
123
|
+
export function pickerTabOf(model) {
|
|
124
|
+
if (model.provider === 'codex' || model.modelID.startsWith('codex/'))
|
|
125
|
+
return 'chatgpt';
|
|
126
|
+
return pickerGroupId(model);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The rail's tabs, in order: Favorites (always: it is where a star lands, and
|
|
130
|
+
* its empty state says how to fill it), Kortix, ChatGPT, then each provider in
|
|
131
|
+
* `providerOrder` (the picker's provider order), then the rest by id. A source
|
|
132
|
+
* tab shows only when it holds a model, except ChatGPT, which also shows when
|
|
133
|
+
* the member can connect a ChatGPT plan from it.
|
|
134
|
+
*/
|
|
135
|
+
export function pickerTabs(models, opts = {}) {
|
|
136
|
+
const present = new Set(models.map(pickerTabOf));
|
|
137
|
+
const tabs = ['favorites'];
|
|
138
|
+
if (present.has('kortix'))
|
|
139
|
+
tabs.push('kortix');
|
|
140
|
+
if (present.has('chatgpt') || opts.canConnectChatGpt)
|
|
141
|
+
tabs.push('chatgpt');
|
|
142
|
+
const order = opts.providerOrder ?? [];
|
|
143
|
+
const rank = (id) => {
|
|
144
|
+
const i = order.indexOf(id);
|
|
145
|
+
return i === -1 ? order.length : i;
|
|
146
|
+
};
|
|
147
|
+
const providers = [...present]
|
|
148
|
+
.filter((id) => id !== 'kortix' && id !== 'chatgpt')
|
|
149
|
+
.sort((a, b) => rank(a) - rank(b) || a.localeCompare(b));
|
|
150
|
+
return [...tabs, ...providers];
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The tab the picker opens on: Favorites when the current model is starred,
|
|
154
|
+
* else the tab that holds the current model, else Favorites when anything is
|
|
155
|
+
* starred, else the first source tab.
|
|
156
|
+
*/
|
|
157
|
+
export function initialPickerTab(input) {
|
|
158
|
+
if (input.selected && input.selectedIsFavorite)
|
|
159
|
+
return 'favorites';
|
|
160
|
+
if (input.selected) {
|
|
161
|
+
const tab = pickerTabOf(input.selected);
|
|
162
|
+
if (input.tabs.includes(tab))
|
|
163
|
+
return tab;
|
|
164
|
+
}
|
|
165
|
+
if (input.hasFavorites)
|
|
166
|
+
return 'favorites';
|
|
167
|
+
return input.tabs.find((t) => t !== 'favorites') ?? 'favorites';
|
|
168
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { FlatModel } from '@kortix/sdk/react';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
type ModelRef = {
|
|
4
|
+
providerID: string;
|
|
5
|
+
modelID: string;
|
|
6
|
+
};
|
|
7
|
+
export interface ModelPickerPanelProps {
|
|
8
|
+
/** Every pickable model with no search applied: the rail and the tabs read these. */
|
|
9
|
+
browseModels: FlatModel[];
|
|
10
|
+
/**
|
|
11
|
+
* Every model the member may pick, before the default-view curation. Favorites
|
|
12
|
+
* read these: a model starred from a search stays in Favorites after the
|
|
13
|
+
* search is cleared, though the default view would hide it.
|
|
14
|
+
*/
|
|
15
|
+
pickableModels: FlatModel[];
|
|
16
|
+
/** The models that match the search box. Used only while a search is typed. */
|
|
17
|
+
searchModels: FlatModel[];
|
|
18
|
+
search: string;
|
|
19
|
+
onSearchChange: (value: string) => void;
|
|
20
|
+
/** Controls at the right end of the search field (connect, manage). */
|
|
21
|
+
searchRight?: ReactNode;
|
|
22
|
+
selected: ModelRef | null;
|
|
23
|
+
onPick: (model: FlatModel) => void;
|
|
24
|
+
isFavorite: (model: ModelRef) => boolean;
|
|
25
|
+
setFavorite: (model: ModelRef, on: boolean) => void;
|
|
26
|
+
/** Models or entitlements still load. */
|
|
27
|
+
loading: boolean;
|
|
28
|
+
/** Nothing is pickable at all: the connect / upgrade empty state. */
|
|
29
|
+
emptyState: ReactNode;
|
|
30
|
+
/** The search matched nothing. */
|
|
31
|
+
searchEmpty: ReactNode;
|
|
32
|
+
/** Present when the member can connect a ChatGPT plan from here. */
|
|
33
|
+
onConnectChatGpt?: () => void;
|
|
34
|
+
/** Tag for a model whose provider is not connected. */
|
|
35
|
+
connectLabel: string;
|
|
36
|
+
/**
|
|
37
|
+
* Another dialog opened (the command palette, a modal). The popover sits
|
|
38
|
+
* above every top-level dialog, so it must close rather than float over it.
|
|
39
|
+
*/
|
|
40
|
+
onForeignDialog?: () => void;
|
|
41
|
+
/** Thinking effort for the selected model. Absent = no right pane. */
|
|
42
|
+
effort?: {
|
|
43
|
+
choices: readonly string[];
|
|
44
|
+
selectedVariant: string | null | undefined;
|
|
45
|
+
onChange: (variant: string | null) => void;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The composer's model popover: a rail on the left (Favorites, Kortix,
|
|
50
|
+
* ChatGPT, then one tab per connected provider), the tab's models in the
|
|
51
|
+
* middle, and the selected model's thinking effort on the right. Picking a
|
|
52
|
+
* model or a level keeps it open; Escape or a click outside closes it.
|
|
53
|
+
*
|
|
54
|
+
* The star on a row is a FAVORITE (per browser, `useModelStore`), not the
|
|
55
|
+
* workspace default: favorites collect in the first tab, the way a member
|
|
56
|
+
* keeps the three models they switch between in one place. The workspace
|
|
57
|
+
* default is set in Customize -> Models.
|
|
58
|
+
*
|
|
59
|
+
* Mod + 1..9 picks the visible row with that number while the popover is open.
|
|
60
|
+
*/
|
|
61
|
+
export declare function ModelPickerPanel({ browseModels, pickableModels, searchModels, search, onSearchChange, searchRight, selected, onPick, isFavorite, setFavorite, loading, emptyState, searchEmpty, onConnectChatGpt, connectLabel, effort, onForeignDialog, }: ModelPickerPanelProps): import("react").JSX.Element;
|
|
62
|
+
export {};
|