@kortix/ui 0.15.11 → 0.16.1
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 +485 -187
- package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
- package/dist/_vendor/shared/session/attachment-tile.d.ts +8 -0
- package/dist/_vendor/shared/workspace-settings.d.ts +3 -0
- package/dist/access/access/copy-row.d.ts +7 -1
- package/dist/access/access/copy-row.js +2 -2
- package/dist/animated-copy-icon.js +2 -1
- package/dist/browser/sandbox-browser-chrome.d.ts +2 -1
- package/dist/browser/sandbox-browser-chrome.js +1 -1
- package/dist/customize/agents/agent-cover-card.d.ts +1 -1
- package/dist/customize/agents/agent-cover-card.js +10 -2
- package/dist/customize/agents/agent-filter.js +3 -1
- package/dist/customize/agents/agent-overview.d.ts +10 -0
- package/dist/customize/agents/agent-overview.js +5 -4
- package/dist/customize/agents/agent-page-chrome.d.ts +5 -6
- package/dist/customize/agents/agent-page-chrome.js +16 -13
- package/dist/customize/agents/agent-page.js +6 -28
- package/dist/customize/agents/agent-tabs.d.ts +1 -0
- package/dist/customize/agents/agent-tabs.js +1 -0
- package/dist/customize/agents/agents-page.js +3 -3
- package/dist/customize/agents/create-agent-modal.d.ts +9 -0
- package/dist/customize/agents/create-agent-modal.js +21 -3
- package/dist/customize/agents/use-default-agent.js +2 -2
- package/dist/customize/connectors/connector-identity.d.ts +11 -2
- package/dist/customize/connectors/connector-identity.js +16 -4
- package/dist/customize/connectors/connectors-page.js +10 -6
- package/dist/customize/connectors/detail/app-page.js +2 -2
- package/dist/customize/connectors/install/install-dialog.d.ts +2 -0
- package/dist/customize/connectors/install/install-dialog.js +6 -1
- package/dist/customize/connectors/use-agent-access.d.ts +1 -0
- package/dist/customize/evals/eval-compare-view.d.ts +10 -0
- package/dist/customize/evals/eval-compare-view.js +68 -0
- package/dist/customize/evals/eval-dataset-view.d.ts +20 -0
- package/dist/customize/evals/eval-dataset-view.js +81 -0
- package/dist/customize/evals/eval-datasets-page.d.ts +25 -0
- package/dist/customize/evals/eval-datasets-page.js +91 -0
- package/dist/customize/evals/eval-job-view.d.ts +12 -0
- package/dist/customize/evals/eval-job-view.js +360 -0
- package/dist/customize/evals/eval-jobs-page.d.ts +4 -0
- package/dist/customize/evals/eval-jobs-page.js +69 -0
- package/dist/customize/evals/eval-meta.d.ts +97 -0
- package/dist/customize/evals/eval-meta.js +228 -0
- package/dist/customize/evals/eval-task-view.d.ts +13 -0
- package/dist/customize/evals/eval-task-view.js +123 -0
- package/dist/customize/evals/eval-tasks-page.d.ts +8 -0
- package/dist/customize/evals/eval-tasks-page.js +56 -0
- package/dist/customize/evals/eval-ui.d.ts +97 -0
- package/dist/customize/evals/eval-ui.js +153 -0
- package/dist/customize/evals/evals-page.d.ts +10 -0
- package/dist/customize/evals/evals-page.js +56 -0
- package/dist/customize/evals/run-eval-modal.d.ts +28 -0
- package/dist/customize/evals/run-eval-modal.js +167 -0
- package/dist/customize/project-settings/project-admin-sections.d.ts +3 -2
- package/dist/customize/project-settings/project-admin-sections.js +6 -1
- package/dist/customize/providers/provider-connect.d.ts +13 -0
- package/dist/customize/providers/provider-connect.js +29 -5
- package/dist/customize/providers/provider-sheet.js +5 -4
- package/dist/customize/sections/view/gateway/gateway-overview.d.ts +5 -0
- package/dist/customize/sections/view/gateway/gateway-overview.js +32 -6
- package/dist/customize/sections/view/gateway/routing-parts.d.ts +6 -0
- package/dist/customize/sections/view/gateway/routing-parts.js +21 -13
- package/dist/customize/sections/view/git-view.d.ts +19 -1
- package/dist/customize/sections/view/git-view.js +7 -3
- package/dist/customize/sections/view/manifest-issue-list.d.ts +16 -0
- package/dist/customize/sections/view/manifest-issue-list.js +41 -0
- package/dist/customize/sections/view/manifest-issues-row.d.ts +24 -0
- package/dist/customize/sections/view/manifest-issues-row.js +39 -0
- package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +7 -1
- package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -5
- package/dist/customize/sections/view/secrets-view.d.ts +13 -0
- package/dist/customize/sections/view/secrets-view.js +10 -6
- package/dist/customize/sections/view/subscription-usage.d.ts +2 -7
- package/dist/customize/sections/view/subscription-usage.js +4 -8
- package/dist/customize/settings/settings-tab-header.js +12 -3
- package/dist/customize/settings/tabs/experimental-tab.d.ts +16 -5
- package/dist/customize/settings/tabs/experimental-tab.js +36 -11
- package/dist/customize/settings/tabs/general-tab.js +1 -1
- package/dist/customize/settings/tabs/sandbox-tab.d.ts +10 -0
- package/dist/customize/settings/tabs/sandbox-tab.js +27 -4
- package/dist/customize/settings/tabs/snapshots-tab.d.ts +31 -0
- package/dist/customize/settings/tabs/snapshots-tab.js +61 -5
- package/dist/customize/settings/tabs/workspace-keys.js +6 -3
- package/dist/customize/shared/capability-page-shell.js +9 -1
- package/dist/customize/shared/catalog/catalog-card.d.ts +1 -1
- package/dist/customize/shared/catalog/catalog-card.js +15 -5
- package/dist/customize/shared/customize-tab-bar.js +1 -1
- package/dist/customize/shared/new-entity-menu.d.ts +1 -1
- package/dist/customize/shared/new-entity-menu.js +38 -1
- package/dist/customize/triggers/runtime-triggers.d.ts +4 -0
- package/dist/customize/triggers/runtime-triggers.js +21 -2
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule-view.js +2 -1
- package/dist/files/project/components/drive-explorer.js +33 -70
- package/dist/files/project/components/drive-grid-view.d.ts +2 -31
- package/dist/files/project/components/drive-grid-view.js +12 -22
- package/dist/files/project/components/drive-list-view.d.ts +3 -30
- package/dist/files/project/components/drive-list-view.js +8 -18
- package/dist/files/project/components/drive-selection-bar.d.ts +4 -5
- package/dist/files/project/components/drive-selection-bar.js +13 -20
- package/dist/files/project/components/explorer-listing.d.ts +48 -0
- package/dist/files/project/components/explorer-listing.js +64 -0
- package/dist/files/project/components/file-explorer-page.js +7 -204
- package/dist/files/project/components/file-thumbnail.js +3 -1
- package/dist/files/project/components/manifest-issue-mark.d.ts +9 -0
- package/dist/files/project/components/manifest-issue-mark.js +26 -0
- package/dist/files/project/hooks/use-change-requests.d.ts +10 -0
- package/dist/files/project/hooks/use-change-requests.js +17 -0
- package/dist/files/project/manifest-annotations.d.ts +16 -0
- package/dist/files/project/manifest-annotations.js +19 -0
- package/dist/files/project/store/version-store.d.ts +1 -1
- package/dist/files/project/upload-batch.d.ts +20 -0
- package/dist/files/project/upload-batch.js +20 -0
- package/dist/files/runtime/hooks/use-binary-blob.js +3 -2
- package/dist/files/runtime/hooks/use-file-content.js +3 -2
- package/dist/files/runtime/hooks/use-file-list.js +1 -2
- package/dist/files/runtime/hooks/use-file-mutations.js +69 -6
- package/dist/files/runtime/hooks/use-file-refresh.d.ts +4 -0
- package/dist/files/runtime/hooks/use-file-refresh.js +6 -0
- package/dist/files/tree/components/file-tree-item.js +1 -4
- package/dist/files/viewer/file-annotations.d.ts +18 -0
- package/dist/files/viewer/file-annotations.js +21 -0
- package/dist/files/viewer/file-content-renderer.js +1 -1
- package/dist/files/viewer/file-viewer.js +2 -1
- package/dist/files/viewer/index.d.ts +1 -0
- package/dist/files/viewer/index.js +1 -0
- package/dist/files/viewer/use-file-content-state.js +8 -1
- package/dist/i18n/en.d.ts +497 -46
- package/dist/i18n/en.js +538 -87
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -4
- package/dist/icons/caret-right-solid.d.ts +11 -0
- package/dist/icons/caret-right-solid.js +15 -0
- package/dist/internal/auth/auth-art.d.ts +12 -0
- package/dist/internal/auth/auth-art.js +118 -0
- package/dist/internal/auth/auth-card-shell.d.ts +14 -10
- package/dist/internal/auth/auth-card-shell.js +20 -31
- package/dist/internal/auth/auth-consent.d.ts +3 -1
- package/dist/internal/auth/auth-consent.js +2 -2
- package/dist/internal/auth/auth-primitives.d.ts +26 -1
- package/dist/internal/auth/auth-primitives.js +37 -8
- package/dist/internal/connector-logo/connector-logo.d.ts +2 -1
- package/dist/internal/connector-logo/connector-logo.js +11 -2
- package/dist/internal/files/file-read-retry.d.ts +18 -2
- package/dist/internal/files/file-read-retry.js +42 -4
- package/dist/internal/hooks/projects/use-new-project-session.js +5 -10
- package/dist/internal/hooks/use-auto-scroll-physics.d.ts +1 -1
- package/dist/internal/hooks/use-auto-scroll-physics.js +2 -10
- package/dist/internal/hooks/use-reduced-motion.d.ts +4 -0
- package/dist/internal/hooks/use-reduced-motion.js +12 -0
- package/dist/internal/hooks/use-save-shortcut.d.ts +8 -0
- package/dist/internal/hooks/use-save-shortcut.js +28 -0
- package/dist/internal/layout/connect-mcp-modal.d.ts +1 -1
- package/dist/internal/layout/connect-mcp-modal.js +9 -4
- package/dist/internal/layout/panel-chrome.d.ts +28 -0
- package/dist/internal/layout/panel-chrome.js +27 -0
- package/dist/internal/layout/project-page-header.js +5 -1
- package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
- package/dist/internal/lib/manifest-health.d.ts +25 -1
- package/dist/internal/lib/manifest-health.js +56 -0
- package/dist/internal/lib/project-preamble.js +1 -1
- package/dist/internal/lib/web-notifications.d.ts +1 -1
- package/dist/internal/lib/web-notifications.js +3 -0
- package/dist/internal/notifications/notification-inbox.js +2 -1
- package/dist/internal/notifications/notification-rows.d.ts +1 -1
- package/dist/internal/notifications/notification-rows.js +15 -1
- package/dist/internal/selection/selection-bar.d.ts +2 -8
- package/dist/internal/selection/selection-bar.js +15 -38
- package/dist/internal/stores/active-space-store.d.ts +1 -1
- package/dist/internal/stores/browser-recents-store.d.ts +1 -1
- package/dist/internal/stores/current-account-store.d.ts +1 -1
- package/dist/internal/stores/first-chat-store.d.ts +1 -1
- package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
- package/dist/internal/stores/session-browser-store.d.ts +1 -1
- package/dist/internal/stores/session-expanded-store.d.ts +1 -1
- package/dist/internal/stores/session-filter-store.d.ts +1 -1
- package/dist/internal/stores/session-history-view-store.d.ts +1 -1
- package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
- package/dist/internal/stores/sound-store.d.ts +1 -1
- package/dist/internal/stores/tab-store.d.ts +1 -1
- package/dist/internal/stores/user-preferences-store.d.ts +9 -1
- package/dist/internal/stores/user-preferences-store.js +2 -0
- package/dist/internal/stores/web-notification-store.d.ts +1 -1
- package/dist/lib/base-ui-compat.js +28 -1
- package/dist/lib/dotmatrix-hooks.d.ts +1 -0
- package/dist/lib/dotmatrix-hooks.js +3 -13
- package/dist/lib/reduced-motion.d.ts +10 -0
- package/dist/lib/reduced-motion.js +104 -0
- package/dist/lib/routes.d.ts +9 -0
- package/dist/lib/routes.js +7 -4
- package/dist/markdown/artifact-link.d.ts +11 -0
- package/dist/markdown/artifact-link.js +62 -0
- package/dist/markdown/code/index.d.ts +1 -1
- package/dist/markdown/code/index.js +1 -1
- package/dist/markdown/code/inline-code.d.ts +1 -1
- package/dist/markdown/code/inline-code.js +1 -1
- package/dist/markdown/genui/components/map-canvas.js +2 -1
- package/dist/markdown/index.d.ts +3 -1
- package/dist/markdown/index.js +2 -1
- package/dist/markdown/{code/inline-chip.js → inline-chip.js} +2 -2
- package/dist/markdown/inline-code-text.d.ts +34 -0
- package/dist/markdown/inline-code-text.js +68 -0
- package/dist/markdown/setup-links/approval-decision.js +3 -3
- package/dist/markdown/soft-breaks.d.ts +21 -0
- package/dist/markdown/soft-breaks.js +33 -0
- package/dist/markdown/unified-markdown.d.ts +9 -1
- package/dist/markdown/unified-markdown.js +31 -9
- package/dist/primitives/action-bar.d.ts +50 -0
- package/dist/primitives/action-bar.js +87 -0
- package/dist/primitives/calendar.js +4 -2
- package/dist/primitives/inline-meta.js +2 -2
- package/dist/primitives/kortix-loader.js +2 -1
- package/dist/primitives/modal.d.ts +1 -1
- package/dist/primitives/paper-wallpaper-shaders.d.ts +1 -0
- package/dist/primitives/paper-wallpaper-shaders.js +6 -0
- package/dist/primitives/resizable.d.ts +1 -1
- package/dist/primitives/resize-seam.d.ts +3 -2
- package/dist/primitives/resize-seam.js +4 -3
- package/dist/primitives/settings-section-header.d.ts +30 -1
- package/dist/primitives/settings-section-header.js +37 -0
- package/dist/primitives/sliding-tab-indicator.js +2 -1
- package/dist/primitives/switch.js +15 -8
- package/dist/primitives/text-shimmer.js +6 -0
- package/dist/primitives/toast-clearance.d.ts +52 -0
- package/dist/primitives/toast-clearance.js +116 -0
- package/dist/primitives/toast.d.ts +3 -1
- package/dist/primitives/toast.js +2 -0
- package/dist/primitives/typed-title.js +1 -1
- package/dist/primitives/wallpaper-shaders.js +1 -1
- package/dist/session/actions/project-session-list-helpers.d.ts +16 -0
- package/dist/session/actions/project-session-list-helpers.js +18 -0
- package/dist/session/agents/agent-model.d.ts +1 -0
- package/dist/session/agents/agent-model.js +2 -1
- package/dist/session/agents/agent-strip.js +10 -4
- package/dist/session/agents/workflow-run-controls.d.ts +27 -4
- package/dist/session/agents/workflow-run-controls.js +63 -10
- package/dist/session/composer/ComposerCard.js +3 -0
- package/dist/session/composer/agent-selector.js +6 -4
- package/dist/session/composer/animated-placeholder.js +2 -1
- package/dist/session/composer/attachment-tile.d.ts +2 -2
- package/dist/session/composer/attachment-tile.js +25 -3
- package/dist/session/composer/composer-agent-access.d.ts +10 -1
- package/dist/session/composer/composer-agent-access.js +18 -4
- package/dist/session/composer/composer-chat-input.js +7 -2
- package/dist/session/composer/composer.d.ts +2 -2
- package/dist/session/composer/composer.js +7 -6
- package/dist/session/composer/hooks/use-file-search.d.ts +12 -2
- package/dist/session/composer/hooks/use-file-search.js +71 -7
- package/dist/session/composer/menus/menu-items.js +6 -2
- package/dist/session/composer/menus/menu-shell.d.ts +3 -1
- package/dist/session/composer/menus/menu-shell.js +2 -2
- package/dist/session/composer/menus/slash-menu.d.ts +7 -0
- package/dist/session/composer/menus/slash-menu.js +48 -1
- package/dist/session/composer/use-instant-session-send.js +7 -1
- package/dist/session/header/session-reminders-indicator.js +3 -2
- package/dist/session/header/session-site-header.js +24 -6
- package/dist/session/media/sandbox-url-detector.js +1 -1
- package/dist/session/models/model-connection-gate.js +2 -1
- package/dist/session/models/model-selector.js +1 -1
- package/dist/session/models/subscription-switcher.d.ts +7 -0
- package/dist/session/models/subscription-switcher.js +52 -10
- package/dist/session/models/subscription-windows.d.ts +2 -0
- package/dist/session/models/subscription-windows.js +2 -0
- package/dist/session/outcomes/session-outcomes-provider.js +14 -7
- package/dist/session/panel/action-panel.js +8 -19
- package/dist/session/panel/easy/app-preview.d.ts +4 -1
- package/dist/session/panel/easy/app-preview.js +95 -33
- package/dist/session/panel/easy/apps-card.js +6 -11
- package/dist/session/panel/easy/change-requests-card.js +1 -1
- package/dist/session/panel/easy/changes-card.d.ts +14 -0
- package/dist/session/panel/easy/changes-card.js +60 -0
- package/dist/session/panel/easy/context-card.d.ts +5 -1
- package/dist/session/panel/easy/context-card.js +13 -28
- package/dist/session/panel/easy/context-meter.d.ts +18 -0
- package/dist/session/panel/easy/context-meter.js +73 -0
- package/dist/session/panel/easy/detail-view.d.ts +1 -1
- package/dist/session/panel/easy/detail-view.js +24 -21
- package/dist/session/panel/easy/easy-panel.js +7 -5
- package/dist/session/panel/easy/file-preview.js +3 -1
- package/dist/session/panel/easy/frame-history.d.ts +91 -0
- package/dist/session/panel/easy/frame-history.js +198 -0
- package/dist/session/panel/easy/outputs-card.d.ts +10 -0
- package/dist/session/panel/easy/outputs-card.js +28 -31
- package/dist/session/panel/easy/panel-card.d.ts +1 -3
- package/dist/session/panel/easy/panel-card.js +24 -8
- package/dist/session/panel/easy/plan-card.js +2 -2
- package/dist/session/panel/easy/step-icon.d.ts +4 -1
- package/dist/session/panel/easy/step-icon.js +2 -2
- package/dist/session/panel/session-action-panel-column.d.ts +5 -0
- package/dist/session/panel/session-action-panel-column.js +198 -101
- package/dist/session/panel/session-desktop.js +5 -1
- package/dist/session/panel/session-diff-viewer.d.ts +3 -1
- package/dist/session/panel/session-diff-viewer.js +7 -4
- package/dist/session/panel/session-panel-provider.js +29 -5
- package/dist/session/panel/shared/derive-panels.js +64 -4
- package/dist/session/status/session-busy-indicator.js +2 -1
- package/dist/session/status/session-error-banner.js +1 -1
- package/dist/session/thread/chat-minimap.js +2 -1
- package/dist/session/thread/session-body.js +4 -1
- package/dist/session/thread/session-chat.js +18 -3
- package/dist/session/thread/session-turn-meta-rows.d.ts +13 -5
- package/dist/session/thread/session-turn-meta-rows.js +33 -5
- package/dist/session/thread/transcript.d.ts +1 -2
- package/dist/session/thread/transcript.js +26 -24
- package/dist/session/thread/typing-indicator.d.ts +2 -2
- package/dist/session/thread/typing-indicator.js +10 -3
- package/dist/session/tool/tools/session-spawn-tool.js +3 -3
- package/dist/session/tool/tools/workflow-run-card.d.ts +11 -1
- package/dist/session/tool/tools/workflow-run-card.js +31 -7
- package/dist/session/tool/tools/workflow-run-cost.d.ts +29 -0
- package/dist/session/tool/tools/workflow-run-cost.js +75 -0
- package/dist/session/tool/tools/workflow-tool.d.ts +1 -1
- package/dist/session/tool/tools/workflow-tool.js +40 -15
- package/dist/session/turn/peer-message-row.js +1 -1
- package/dist/session/turn/queued-prompt-bubbles.d.ts +3 -2
- package/dist/session/turn/queued-prompt-bubbles.js +1 -1
- package/dist/session/turn/throttled-markdown.js +1 -1
- package/dist/styles/theme.css +68 -0
- package/dist/styles.css +1 -1
- package/dist/terminal/pty-terminal.js +1 -1
- package/dist/terminal/session-terminal-connect-bar.js +2 -1
- package/dist/test-utils/intl.d.ts +497 -46
- package/dist/workspace/admin/project-admin-dashboard.js +21 -7
- package/dist/workspace/admin/settings-search-landing.js +2 -1
- package/dist/workspace/calendar/calendar-dates.d.ts +31 -0
- package/dist/workspace/calendar/calendar-dates.js +64 -0
- package/dist/workspace/calendar/calendar-new-item.d.ts +11 -0
- package/dist/workspace/calendar/calendar-new-item.js +47 -0
- package/dist/workspace/calendar/calendar-page.d.ts +3 -0
- package/dist/workspace/calendar/calendar-page.js +177 -0
- package/dist/workspace/calendar/calendar-panel.d.ts +13 -0
- package/dist/workspace/calendar/calendar-panel.js +103 -0
- package/dist/workspace/calendar/calendar-people.d.ts +52 -0
- package/dist/workspace/calendar/calendar-people.js +117 -0
- package/dist/workspace/calendar/calendar-scheduled.d.ts +29 -0
- package/dist/workspace/calendar/calendar-scheduled.js +118 -0
- package/dist/workspace/calendar/calendar-views.d.ts +32 -0
- package/dist/workspace/calendar/calendar-views.js +124 -0
- package/dist/workspace/calendar/calendar-when.d.ts +14 -0
- package/dist/workspace/calendar/calendar-when.js +81 -0
- package/dist/workspace/calendar/mention-textarea.d.ts +19 -0
- package/dist/workspace/calendar/mention-textarea.js +84 -0
- package/dist/workspace/home/access-requests-bell.js +2 -1
- package/dist/workspace/inbox/workspace-inbox.d.ts +1 -1
- package/dist/workspace/inbox/workspace-inbox.js +1 -1
- package/dist/workspace/layout/project-files-view.js +2 -1
- package/dist/workspace/layout/project-home.js +2 -1
- package/dist/workspace/memory/memory-page-list.js +1 -1
- package/dist/workspace/new/workspace-handoff.js +2 -1
- package/dist/workspace/projects/modal/project-icon-field.js +2 -1
- package/dist/workspace/session-workspace.js +13 -12
- package/dist/workspace/setup/setup-banner.d.ts +4 -0
- package/dist/workspace/setup/setup-banner.js +57 -0
- package/dist/workspace/setup/setup-steps.d.ts +57 -0
- package/dist/workspace/setup/setup-steps.js +53 -0
- package/dist/workspace/setup/use-setup-steps.d.ts +18 -0
- package/dist/workspace/setup/use-setup-steps.js +57 -0
- package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
- package/dist/workspace/setup/workspace-setup-page.js +91 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
- package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
- package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
- package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
- package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
- package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
- package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
- package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
- package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
- package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
- package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
- package/dist/workspace/sidebar/footer/promo-card.js +47 -0
- package/dist/workspace/sidebar/footer/sandbox-health.js +1 -1
- package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
- package/dist/workspace/sidebar/project-nav-items.js +12 -4
- package/dist/workspace/sidebar/project-session-list.js +58 -26
- package/dist/workspace/sidebar/project-sidebar.js +2 -5
- package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
- package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
- package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
- package/dist/workspace/sidebar/session-group-sections.js +121 -41
- package/dist/workspace/sidebar/sidebar-drill.js +6 -0
- package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
- package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
- package/dist/workspace/sidebar/use-workspace-list.js +11 -1
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
- package/dist/workspace/space/space-tab-panels.js +1 -1
- package/dist/workspace/spaces/space-timeline.js +2 -2
- package/package.json +67 -10
- package/skills/kortix-ui/SKILL.md +2 -2
- package/skills/kortix-ui/references/modules.md +5 -3
- package/dist/session/thread/turn-share.d.ts +0 -16
- package/dist/session/thread/turn-share.js +0 -161
- package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
- package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
- /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
|
@@ -7,7 +7,8 @@ import { useTranslations } from '../../i18n/index.js';
|
|
|
7
7
|
import { useUiHostConfig } from '../../providers/ui-provider.js';
|
|
8
8
|
import { cn } from '../../lib/utils.js';
|
|
9
9
|
import { TRIGGER_CARET_CLASS, triggerVariants } from '../../primitives/trigger-variants.js';
|
|
10
|
-
import {
|
|
10
|
+
import { agentDisplayName, isMyKortixAgentName } from '../../_vendor/kortix-shared.js';
|
|
11
|
+
import { InlineCodeText } from '../../markdown/inline-code-text.js';
|
|
11
12
|
import { CaretDownIcon, CheckIcon } from '@phosphor-icons/react';
|
|
12
13
|
import { AgentMark } from '../../internal/components/agent-mark.js';
|
|
13
14
|
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
|
@@ -46,7 +47,7 @@ export function agentDisplayLabel(agents, selectedAgent) {
|
|
|
46
47
|
const name = resolveDisplayedAgentName(composerSelectableAgents(agents), selectedAgent);
|
|
47
48
|
if (!name)
|
|
48
49
|
return 'Agent';
|
|
49
|
-
return
|
|
50
|
+
return agentDisplayName(name, agents.find((a) => a.name === name)?.title);
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
53
|
* The agents a composer picker offers and the name it shows for each. One
|
|
@@ -62,7 +63,7 @@ export function useComposerAgentChoices(agents) {
|
|
|
62
63
|
return agents.filter((a) => offeredNames.has(a.name));
|
|
63
64
|
}, [agents, offeredAgents]);
|
|
64
65
|
const primaryAgents = useMemo(() => composerSelectableAgents(offered), [offered]);
|
|
65
|
-
const label = useCallback((name) => agentLabels?.[name] ?? (
|
|
66
|
+
const label = useCallback((name) => agentLabels?.[name] ?? agentDisplayName(name, agents.find((a) => a.name === name)?.title), [agentLabels, agents]);
|
|
66
67
|
return { offered, primaryAgents, label, agentLabels };
|
|
67
68
|
}
|
|
68
69
|
export function AgentSelector({ agents, selectedAgent, onSelect, disabled = false, triggerLabelClassName, unavailableHint, open: controlledOpen, onOpenChange, compact = false, appearance = 'chip', }) {
|
|
@@ -87,6 +88,7 @@ export function AgentSelector({ agents, selectedAgent, onSelect, disabled = fals
|
|
|
87
88
|
return primaryAgents;
|
|
88
89
|
return primaryAgents.filter((a) => a.name.toLowerCase().includes(q) ||
|
|
89
90
|
(agentLabels?.[a.name] ?? '').toLowerCase().includes(q) ||
|
|
91
|
+
(a.title ?? '').toLowerCase().includes(q) ||
|
|
90
92
|
(a.description || '').toLowerCase().includes(q));
|
|
91
93
|
}, [primaryAgents, search, agentLabels]);
|
|
92
94
|
const filteredMeta = useMemo(() => filteredPrimary.filter((a) => isMyKortixAgentName(a.name)), [filteredPrimary]);
|
|
@@ -138,7 +140,7 @@ export function AgentSelector({ agents, selectedAgent, onSelect, disabled = fals
|
|
|
138
140
|
className: cn('items-start gap-2 py-2', isSelected && 'bg-primary/[0.06]'), onSelect: () => {
|
|
139
141
|
onSelect(agent.name);
|
|
140
142
|
setOpen(false);
|
|
141
|
-
}, children: [agent.description || meta ? (_jsx(AgentMark, { slug: agent.name, size: 28, tile: 36 })) : (_jsx(AgentMark, { slug: agent.name, size: 14 })), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground block truncate text-sm font-medium", children: label(agent.name) }), meta ? (_jsx("p", { className: "text-muted-foreground text-xs", children: t('myKortixRoutes') })) : agent.description ? (_jsx("p", { className: "text-muted-foreground line-clamp-2 text-xs text-pretty", children: agent.description })) : null] }), isSelected && (
|
|
143
|
+
}, children: [agent.description || meta ? (_jsx(AgentMark, { slug: agent.name, size: 28, tile: 36 })) : (_jsx(AgentMark, { slug: agent.name, size: 14 })), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-foreground block truncate text-sm font-medium", children: label(agent.name) }), meta ? (_jsx("p", { className: "text-muted-foreground text-xs", children: t('myKortixRoutes') })) : agent.description ? (_jsx("p", { className: "text-muted-foreground line-clamp-2 text-xs text-pretty", children: _jsx(InlineCodeText, { text: agent.description }) })) : null] }), isSelected && (
|
|
142
144
|
// `mt-0.5` optically centres the 16px check against the first line
|
|
143
145
|
// rather than the top edge of the text box.
|
|
144
146
|
_jsx(CheckIcon, { className: "text-foreground mt-0.5 size-4 shrink-0" }))] }, agent.name));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from '../../lib/utils.js';
|
|
4
|
-
import { AnimatePresence, m
|
|
4
|
+
import { AnimatePresence, m } from 'motion/react';
|
|
5
|
+
import { useReducedMotion } from '../../internal/hooks/use-reduced-motion.js';
|
|
5
6
|
import { useTranslations } from '../../i18n/index.js';
|
|
6
7
|
import { useUiHostConfig } from '../../providers/ui-provider.js';
|
|
7
8
|
import { useEffect, useMemo, useState } from 'react';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* as the lifted-surface fill, `text-xs` for the name. The badge is the design
|
|
17
17
|
* system's `Badge` at `size="xs"`, uppercase — the note at the badge says why.
|
|
18
18
|
*/
|
|
19
|
-
import type
|
|
19
|
+
import { type ReactNode } from 'react';
|
|
20
20
|
/** The square every attachment is. `size-28` (~103px on the 0.23rem scale) —
|
|
21
21
|
* Jay's call, 2026-09-06: the 88px square read as cramped beside the name. */
|
|
22
22
|
export declare const TILE_SURFACE = "border-border bg-popover relative block size-28 shrink-0 overflow-hidden rounded-md border text-left";
|
|
@@ -26,7 +26,7 @@ export declare const TILE_SURFACE = "border-border bg-popover relative block siz
|
|
|
26
26
|
*/
|
|
27
27
|
export declare const TILE_INTERACTIVE = "hover:bg-accent cursor-pointer transition-colors duration-fast active:scale-[0.96]";
|
|
28
28
|
/** The five tile rules live once in `@kortix/shared/session/attachment-tile`. */
|
|
29
|
-
export { LONG_NAME_THRESHOLD, NAME_TAIL_CHARS, attachmentExtension, isPreviewableImage, splitFilenameForTile, } from '../../_vendor/shared/session/attachment-tile.js';
|
|
29
|
+
export { LONG_NAME_THRESHOLD, NAME_TAIL_CHARS, attachmentExtension, filenameBreakSegments, isPreviewableImage, splitFilenameForTile, } from '../../_vendor/shared/session/attachment-tile.js';
|
|
30
30
|
/** A tile previews the head of the paste only: the clamp shows four lines, and the DOM need not hold 100 kB. */
|
|
31
31
|
export declare const PASTE_PREVIEW_CHARS = 400;
|
|
32
32
|
export interface AttachmentTileProps {
|
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* THE attachment tile — one component for the composer preview, the sent
|
|
5
|
+
* message, the boot stand-in and the queued row, so a file can never look one
|
|
6
|
+
* way while it is being attached and another the moment it is sent.
|
|
7
|
+
*
|
|
8
|
+
* The shape (2026-09-06, from Jay's reference): a square. A named file shows
|
|
9
|
+
* its name top-left over two lines and its extension as a badge bottom-left.
|
|
10
|
+
* An image IS the picture, edge to edge, with the same badge over its corner.
|
|
11
|
+
* No icon: the extension badge says what the file is, and the name says which
|
|
12
|
+
* one. There is no rows-vs-tiles mode and no second rectangle shape — the
|
|
13
|
+
* earlier 120px "file rectangle" beside 80px "image squares" gave every
|
|
14
|
+
* message a ragged right edge.
|
|
15
|
+
*
|
|
16
|
+
* Every value is a token (`kortix-brand`): `size-24` on the 0.23rem
|
|
17
|
+
* scale (~88px), `rounded-md`, the one `border-border` hairline, `bg-popover`
|
|
18
|
+
* as the lifted-surface fill, `text-xs` for the name. The badge is the design
|
|
19
|
+
* system's `Badge` at `size="xs"`, uppercase — the note at the badge says why.
|
|
20
|
+
*/
|
|
21
|
+
import { Fragment } from 'react';
|
|
3
22
|
import { Badge } from '../../primitives/badge.js';
|
|
4
23
|
import { Close } from '../../icons/close.js';
|
|
5
24
|
import { cn } from '../../lib/utils.js';
|
|
6
|
-
import { attachmentExtension, isPreviewableImage, splitFilenameForTile, } from '../../_vendor/kortix-shared.js';
|
|
25
|
+
import { attachmentExtension, filenameBreakSegments, isPreviewableImage, splitFilenameForTile, } from '../../_vendor/kortix-shared.js';
|
|
7
26
|
/** The square every attachment is. `size-28` (~103px on the 0.23rem scale) —
|
|
8
27
|
* Jay's call, 2026-09-06: the 88px square read as cramped beside the name. */
|
|
9
28
|
export const TILE_SURFACE = 'border-border bg-popover relative block size-28 shrink-0 overflow-hidden rounded-md border text-left';
|
|
@@ -13,7 +32,7 @@ export const TILE_SURFACE = 'border-border bg-popover relative block size-28 shr
|
|
|
13
32
|
*/
|
|
14
33
|
export const TILE_INTERACTIVE = 'hover:bg-accent cursor-pointer transition-colors duration-fast active:scale-[0.96]';
|
|
15
34
|
/** The five tile rules live once in `@kortix/shared/session/attachment-tile`. */
|
|
16
|
-
export { LONG_NAME_THRESHOLD, NAME_TAIL_CHARS, attachmentExtension, isPreviewableImage, splitFilenameForTile, } from '../../_vendor/kortix-shared.js';
|
|
35
|
+
export { LONG_NAME_THRESHOLD, NAME_TAIL_CHARS, attachmentExtension, filenameBreakSegments, isPreviewableImage, splitFilenameForTile, } from '../../_vendor/kortix-shared.js';
|
|
17
36
|
/** A tile previews the head of the paste only: the clamp shows four lines, and the DOM need not hold 100 kB. */
|
|
18
37
|
export const PASTE_PREVIEW_CHARS = 400;
|
|
19
38
|
/**
|
|
@@ -48,7 +67,10 @@ export function AttachmentTile({ filename, mime, imageSrc, corner, overlay, onOp
|
|
|
48
67
|
// A picture is the whole tile: no badge over it. The image says what it is
|
|
49
68
|
// better than `png` could, and a chip on a photo's corner is clutter.
|
|
50
69
|
const picture = imageSrc && isPreviewableImage(filename, mime) ? imageSrc : null;
|
|
51
|
-
const body = picture ? (_jsxs(_Fragment, { children: [_jsx("img", { src: picture, alt: filename, className: "size-full object-cover", draggable: false }), corner && _jsx("span", { className: "absolute right-2 bottom-2 flex", children: corner })] })) : preview !== undefined ? (_jsxs(_Fragment, { children: [_jsxs("span", { className: "flex size-full flex-col justify-between gap-1 px-2.5 pt-2 pb-2.5", children: [_jsx("span", { className: "text-muted-foreground first-line:text-foreground min-h-0 min-w-0 flex-1 overflow-hidden mask-b-from-60% mask-b-to-88% text-[11px] leading-tight break-words whitespace-pre-wrap first-line:font-medium before:float-right before:h-3 before:w-3.5", children: preview }), _jsxs("span", { className: "flex items-end justify-between gap-1", children: [badge, corner && _jsx("span", { className: "flex shrink-0", children: corner })] })] }), _jsx("span", { "aria-hidden": true, className: cn('bg-muted border-border absolute -top-px -right-px size-5 rounded-bl-sm border-b border-l', onOpen && 'group-hover/paste:bg-popover duration-fast transition-colors') })] })) : (_jsx(_Fragment, { children: _jsxs("span", { className: "flex size-full flex-col justify-between gap-1 p-2", children: [split ? (_jsxs("span", { className: "text-foreground min-w-0 text-xs leading-tight font-medium", children: [_jsx("span", { className: "block truncate", children: split.head }), _jsx("span", { className: "block truncate", children: split.tail })] })) : (
|
|
70
|
+
const body = picture ? (_jsxs(_Fragment, { children: [_jsx("img", { src: picture, alt: filename, className: "size-full object-cover", draggable: false }), corner && _jsx("span", { className: "absolute right-2 bottom-2 flex", children: corner })] })) : preview !== undefined ? (_jsxs(_Fragment, { children: [_jsxs("span", { className: "flex size-full flex-col justify-between gap-1 px-2.5 pt-2 pb-2.5", children: [_jsx("span", { className: "text-muted-foreground first-line:text-foreground min-h-0 min-w-0 flex-1 overflow-hidden mask-b-from-60% mask-b-to-88% text-[11px] leading-tight break-words whitespace-pre-wrap first-line:font-medium before:float-right before:h-3 before:w-3.5", children: preview }), _jsxs("span", { className: "flex items-end justify-between gap-1", children: [badge, corner && _jsx("span", { className: "flex shrink-0", children: corner })] })] }), _jsx("span", { "aria-hidden": true, className: cn('bg-muted border-border absolute -top-px -right-px size-5 rounded-bl-sm border-b border-l', onOpen && 'group-hover/paste:bg-popover duration-fast transition-colors') })] })) : (_jsx(_Fragment, { children: _jsxs("span", { className: "flex size-full flex-col justify-between gap-1 p-2", children: [split ? (_jsxs("span", { className: "text-foreground min-w-0 text-xs leading-tight font-medium", children: [_jsx("span", { className: "block truncate", children: split.head }), _jsx("span", { className: "block truncate", children: split.tail })] })) : (
|
|
71
|
+
// Breaks only at `-`, `_`, a space or before the extension (`<wbr>`);
|
|
72
|
+
// `break-words` splits a piece only when it alone is wider than the tile.
|
|
73
|
+
_jsx("span", { className: "text-foreground line-clamp-2 min-w-0 text-xs leading-tight font-medium break-words", children: filenameBreakSegments(filename).map((segment, index) => (_jsxs(Fragment, { children: [index > 0 && _jsx("wbr", {}), segment] }, index))) })), _jsxs("span", { className: "flex items-end justify-between gap-1", children: [badge ?? _jsx("span", {}), corner && _jsx("span", { className: "flex shrink-0", children: corner })] })] }) }));
|
|
52
74
|
if (onOpen) {
|
|
53
75
|
return (_jsx("button", { type: "button", title: tileTitle, "aria-label": preview !== undefined ? tileTitle : undefined, onClick: (event) => {
|
|
54
76
|
event.stopPropagation();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProjectSpace } from '@kortix/sdk';
|
|
1
|
+
import type { ProjectConfigSummary, ProjectSpace } from '@kortix/sdk';
|
|
2
2
|
import type { Agent } from '@kortix/sdk/react';
|
|
3
3
|
/**
|
|
4
4
|
* Which agent the composer will actually run, given the roster the server is
|
|
@@ -65,6 +65,15 @@ export interface ComposerAgentResolution {
|
|
|
65
65
|
* empty picker, and must not read as "we have an agent to run".
|
|
66
66
|
*/
|
|
67
67
|
export declare function composerSelectableAgents(agents: Agent[] | undefined): Agent[];
|
|
68
|
+
/**
|
|
69
|
+
* The agent a new chat starts on when the person has picked none in this
|
|
70
|
+
* workspace. With `builtin_agents.my_kortix` on it is My Kortix, the agent
|
|
71
|
+
* people talk to; else kortix.yaml `default_agent`.
|
|
72
|
+
*
|
|
73
|
+
* Chat only. `default_agent` itself is unchanged: it stays the agent a trigger,
|
|
74
|
+
* a channel or an API call that names none runs, which is what the server runs.
|
|
75
|
+
*/
|
|
76
|
+
export declare function chatStartAgent(config: Pick<ProjectConfigSummary, 'default_agent' | 'builtin_agents'> | null | undefined): string | null;
|
|
68
77
|
/**
|
|
69
78
|
* The agents anyone who posts in this channel may run, granted or not (the
|
|
70
79
|
* server's `channelAgentNames`): the channel's agents,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { composerSelectableAgents as sdkComposerSelectableAgents } from '@kortix/sdk';
|
|
2
|
+
import { MY_KORTIX_AGENT_NAME } from '../../_vendor/kortix-shared.js';
|
|
2
3
|
/**
|
|
3
4
|
* Which agent the composer will actually run, given the roster the server is
|
|
4
5
|
* willing to hand this user.
|
|
@@ -44,9 +45,22 @@ export const NO_AGENT_ACCESS_MESSAGE = 'No agents available to you — ask a man
|
|
|
44
45
|
* empty picker, and must not read as "we have an agent to run".
|
|
45
46
|
*/
|
|
46
47
|
export function composerSelectableAgents(agents) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
return sdkComposerSelectableAgents(agents);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The agent a new chat starts on when the person has picked none in this
|
|
52
|
+
* workspace. With `builtin_agents.my_kortix` on it is My Kortix, the agent
|
|
53
|
+
* people talk to; else kortix.yaml `default_agent`.
|
|
54
|
+
*
|
|
55
|
+
* Chat only. `default_agent` itself is unchanged: it stays the agent a trigger,
|
|
56
|
+
* a channel or an API call that names none runs, which is what the server runs.
|
|
57
|
+
*/
|
|
58
|
+
export function chatStartAgent(config) {
|
|
59
|
+
if (!config)
|
|
60
|
+
return null;
|
|
61
|
+
if (config.builtin_agents?.my_kortix)
|
|
62
|
+
return MY_KORTIX_AGENT_NAME;
|
|
63
|
+
return config.default_agent ?? null;
|
|
50
64
|
}
|
|
51
65
|
/**
|
|
52
66
|
* The agents anyone who posts in this channel may run, granted or not (the
|
|
@@ -6,7 +6,7 @@ import { SessionOverridesComposer } from '../overrides/session-overrides-compose
|
|
|
6
6
|
import { SessionChatInput, } from './session-chat-input.js';
|
|
7
7
|
import { useProjectConfig, useRuntimeAgents, useRuntimeCommands, useRuntimeConfig, useRuntimeProviders, useSessionModelSelection } from '@kortix/sdk/react';
|
|
8
8
|
import { appendMentionRefs } from '../../internal/lib/project-preamble.js';
|
|
9
|
-
import { resolveComposerAgent, withChannelAgents } from './composer-agent-access.js';
|
|
9
|
+
import { chatStartAgent, resolveComposerAgent, withChannelAgents } from './composer-agent-access.js';
|
|
10
10
|
import { inheritedModelFor } from './chat-input/chat-input-summary.js';
|
|
11
11
|
/**
|
|
12
12
|
* The canonical "compose a first message" input: {@link SessionChatInput}
|
|
@@ -24,7 +24,9 @@ export function ComposerChatInput({ onSend, onCommand, sessionId, projectId, isB
|
|
|
24
24
|
const { data: providers, isLoading: providersLoading } = useRuntimeProviders();
|
|
25
25
|
const { data: config } = useRuntimeConfig();
|
|
26
26
|
const projectConfig = useProjectConfig(projectId);
|
|
27
|
-
|
|
27
|
+
// A new chat starts on the place's agent (a channel's), else My Kortix when
|
|
28
|
+
// the workspace runs it, else kortix.yaml `default_agent` (`chatStartAgent`).
|
|
29
|
+
const startAgent = defaultAgentName || chatStartAgent(projectConfig);
|
|
28
30
|
const local = useSessionModelSelection({
|
|
29
31
|
agents,
|
|
30
32
|
providers,
|
|
@@ -32,6 +34,9 @@ export function ComposerChatInput({ onSend, onCommand, sessionId, projectId, isB
|
|
|
32
34
|
sessionId,
|
|
33
35
|
boundAgentName,
|
|
34
36
|
defaultAgentName: startAgent,
|
|
37
|
+
// A new workspace chat remembers the person's pick and starts the next one
|
|
38
|
+
// on it. A place with its own default agent (a channel) keeps that default.
|
|
39
|
+
rememberAgent: !sessionId && !boundAgentName && !defaultAgentName,
|
|
35
40
|
projectSession,
|
|
36
41
|
});
|
|
37
42
|
const setAgent = local.agent.set;
|
|
@@ -370,8 +370,8 @@ export interface SessionChatInputProps {
|
|
|
370
370
|
*
|
|
371
371
|
* The gutter is equal on both sides. It used to carry `md:pr-1`, a right-side
|
|
372
372
|
* trim against the collapsed action-panel chevron rail, which then took ~37px
|
|
373
|
-
* of the row's width.
|
|
374
|
-
* `session-action-panel-column.tsx`), so the trim only shifted the card 5.5px
|
|
373
|
+
* of the row's width. Collapsed, the column now takes no width at all
|
|
374
|
+
* (`session-action-panel-column.tsx`), so the trim only shifted the card 5.5px
|
|
375
375
|
* right of center. A breakpoint may never ZERO this gutter — zero is what let
|
|
376
376
|
* the card touch the panel divider, and `composer-underbar.test.tsx` guards
|
|
377
377
|
* exactly that line.
|
|
@@ -7,7 +7,7 @@ import { cn } from '../../lib/utils.js';
|
|
|
7
7
|
import { isImageFile } from '../../internal/lib/utils/file-utils.js';
|
|
8
8
|
import { useProjectConfig, usePromptAttachments, useRuntimeSessions } from '@kortix/sdk/react';
|
|
9
9
|
import { useActiveSpace } from '../../internal/stores/active-space-store.js';
|
|
10
|
-
import { newPastedContentId, splitPastedContent, trimPastedText } from '../../_vendor/kortix-shared.js';
|
|
10
|
+
import { agentDisplayName, newPastedContentId, splitPastedContent, trimPastedText } from '../../_vendor/kortix-shared.js';
|
|
11
11
|
import { memo, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, } from 'react';
|
|
12
12
|
import { extractClipboardFiles } from './clipboard-files.js';
|
|
13
13
|
import { mergeFailedSubmissionFiles } from './composer-draft-recovery.js';
|
|
@@ -64,8 +64,8 @@ import { createSubmitLatch } from './submit-latch.js';
|
|
|
64
64
|
*
|
|
65
65
|
* The gutter is equal on both sides. It used to carry `md:pr-1`, a right-side
|
|
66
66
|
* trim against the collapsed action-panel chevron rail, which then took ~37px
|
|
67
|
-
* of the row's width.
|
|
68
|
-
* `session-action-panel-column.tsx`), so the trim only shifted the card 5.5px
|
|
67
|
+
* of the row's width. Collapsed, the column now takes no width at all
|
|
68
|
+
* (`session-action-panel-column.tsx`), so the trim only shifted the card 5.5px
|
|
69
69
|
* right of center. A breakpoint may never ZERO this gutter — zero is what let
|
|
70
70
|
* the card touch the panel divider, and `composer-underbar.test.tsx` guards
|
|
71
71
|
* exactly that line.
|
|
@@ -199,7 +199,7 @@ function ComposerImpl(props) {
|
|
|
199
199
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
200
200
|
useMenuRevalidation(menuOpen, projectId);
|
|
201
201
|
const fileInputRef = useRef(null);
|
|
202
|
-
const { takeFiles, modelPickerEnabled, contextMeterEnabled, runtimeSlashEnabled, useSlashActions } = useUiHostConfig();
|
|
202
|
+
const { takeFiles, modelPickerEnabled, contextMeterEnabled, runtimeSlashEnabled, useSlashActions, agentLabels } = useUiHostConfig();
|
|
203
203
|
// The host's own `/` rows. The config is fixed for the app's life, so the hook is the same one every render.
|
|
204
204
|
const hostSlashRows = (useSlashActions ?? useNoSlashActions)();
|
|
205
205
|
// A host that hides the harness lists none of its commands, and a typed "/init" stays text.
|
|
@@ -980,7 +980,8 @@ function ComposerImpl(props) {
|
|
|
980
980
|
});
|
|
981
981
|
return available.map((action) => {
|
|
982
982
|
if (action.id === 'switch-agent' && selectedAgent) {
|
|
983
|
-
|
|
983
|
+
// The name the agent chip shows, not the slug.
|
|
984
|
+
return { ...action, value: agentLabels?.[selectedAgent] ?? agentDisplayName(selectedAgent, agents.find((a) => a.name === selectedAgent)?.title) };
|
|
984
985
|
}
|
|
985
986
|
// The ring icon (via `context`) plus the reading as the row's
|
|
986
987
|
// "current setting" text — same grammar as the agent row's value.
|
|
@@ -990,7 +991,7 @@ function ComposerImpl(props) {
|
|
|
990
991
|
return action;
|
|
991
992
|
}).concat(hostSlashActions(hostSlashRows));
|
|
992
993
|
}, [
|
|
993
|
-
selectedAgent, canSwitchAgent, onCompactClick, onContextClick, contextUsage, tI18nComplete,
|
|
994
|
+
selectedAgent, agents, agentLabels, canSwitchAgent, onCompactClick, onContextClick, contextUsage, tI18nComplete,
|
|
994
995
|
modelPickerEnabled, contextMeterEnabled, runtimeSlashEnabled, hostSlashRows,
|
|
995
996
|
]);
|
|
996
997
|
const handleSelectAction = useCallback((action) => {
|
|
@@ -13,7 +13,17 @@ import type { QueryKey } from '@tanstack/react-query';
|
|
|
13
13
|
* across a session switch must stop reusing its pre-switch entry the moment
|
|
14
14
|
* the active sandbox changes — `server` is what makes both true.
|
|
15
15
|
*/
|
|
16
|
-
export declare const composerFileSearchKey: (server: string, query: string) => readonly ["web", "composer", "file-search", string, string];
|
|
16
|
+
export declare const composerFileSearchKey: (server: string, query: string, workspaceId?: string | null) => readonly ["web", "composer", "file-search", string, string, string | null];
|
|
17
|
+
/**
|
|
18
|
+
* The `@` menu's file rows: the session computer's files first, then the
|
|
19
|
+
* workspace repo's files that the computer does not hold, each path once.
|
|
20
|
+
*
|
|
21
|
+
* The computer's `/workspace` holds no repo unless an agent declares
|
|
22
|
+
* `workspace.repos`, and workspace home has no computer at all. Without the
|
|
23
|
+
* repo rows the menu offered no file there although the placeholder says
|
|
24
|
+
* "Type @ to mention files and agents".
|
|
25
|
+
*/
|
|
26
|
+
export declare function mergeFileResults(runtime: readonly string[], repo: readonly string[]): string[];
|
|
17
27
|
/**
|
|
18
28
|
* Whether a previous query's results may still be shown as placeholder data.
|
|
19
29
|
*
|
|
@@ -28,7 +38,7 @@ export declare const composerFileSearchKey: (server: string, query: string) => r
|
|
|
28
38
|
* never-flash-empty behaviour while a query is merely being retyped, and drops
|
|
29
39
|
* it exactly when the workspace underneath changed.
|
|
30
40
|
*/
|
|
31
|
-
export declare function canKeepPlaceholderFiles(server: string, previousQueryKey: readonly unknown[] | undefined): boolean;
|
|
41
|
+
export declare function canKeepPlaceholderFiles(server: string, previousQueryKey: readonly unknown[] | undefined, workspaceId?: string | null): boolean;
|
|
32
42
|
/**
|
|
33
43
|
* File results for the `@` menu.
|
|
34
44
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { useEffect, useMemo, useRef } from 'react';
|
|
3
3
|
import { searchWorkspaceFiles } from '../../../files/runtime/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { searchWorkspaceFiles as searchWorkspaceRepoFiles } from '@kortix/sdk';
|
|
5
|
+
import { qk, runtimeKeys, useActiveSandboxProxyContext, useKortixRouteWorkspaceId } from '@kortix/sdk/react';
|
|
5
6
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
6
7
|
import { useDebouncedValue } from './use-debounced-value.js';
|
|
7
8
|
/** Stands in for `serverUrl` before a runtime binds, or on self-hosted local
|
|
@@ -24,11 +25,56 @@ const UNBOUND_SERVER = 'unbound';
|
|
|
24
25
|
* across a session switch must stop reusing its pre-switch entry the moment
|
|
25
26
|
* the active sandbox changes — `server` is what makes both true.
|
|
26
27
|
*/
|
|
27
|
-
export const composerFileSearchKey = (server, query) => ['web', 'composer', 'file-search', server, query];
|
|
28
|
+
export const composerFileSearchKey = (server, query, workspaceId = null) => ['web', 'composer', 'file-search', server, query, workspaceId];
|
|
29
|
+
/** The `server` slot of the repo query's key: the repo is not on a computer. */
|
|
30
|
+
const REPO_SOURCE = 'workspace-repo';
|
|
31
|
+
/** Repo rows the `@` menu asks for. The menu shows 20 file rows at most. */
|
|
32
|
+
const REPO_SEARCH_LIMIT = 20;
|
|
33
|
+
/**
|
|
34
|
+
* The `@` menu's file rows: the session computer's files first, then the
|
|
35
|
+
* workspace repo's files that the computer does not hold, each path once.
|
|
36
|
+
*
|
|
37
|
+
* The computer's `/workspace` holds no repo unless an agent declares
|
|
38
|
+
* `workspace.repos`, and workspace home has no computer at all. Without the
|
|
39
|
+
* repo rows the menu offered no file there although the placeholder says
|
|
40
|
+
* "Type @ to mention files and agents".
|
|
41
|
+
*/
|
|
42
|
+
export function mergeFileResults(runtime, repo) {
|
|
43
|
+
const seen = new Set();
|
|
44
|
+
const merged = [];
|
|
45
|
+
for (const path of [...runtime, ...repo]) {
|
|
46
|
+
const key = path.replace(/^\/workspace\//, '').replace(/^\.\//, '');
|
|
47
|
+
if (!key || seen.has(key))
|
|
48
|
+
continue;
|
|
49
|
+
seen.add(key);
|
|
50
|
+
merged.push(path);
|
|
51
|
+
}
|
|
52
|
+
return merged;
|
|
53
|
+
}
|
|
54
|
+
// replica-local: workspaces whose repo search answered 403 in this tab. A
|
|
55
|
+
// member without file read stops asking on every keystroke.
|
|
56
|
+
const repoSearchDenied = new Set();
|
|
57
|
+
async function searchRepoFiles(workspaceId, query) {
|
|
58
|
+
const q = query.trim();
|
|
59
|
+
if (!workspaceId || !q || repoSearchDenied.has(workspaceId))
|
|
60
|
+
return [];
|
|
61
|
+
// Silent: a member without file read gets a 403 here, and the runtime rows still list.
|
|
62
|
+
try {
|
|
63
|
+
const { results } = await searchWorkspaceRepoFiles(workspaceId, q, { limit: REPO_SEARCH_LIMIT, showErrors: false });
|
|
64
|
+
return results.map((match) => match.path);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (error?.status === 403)
|
|
68
|
+
repoSearchDenied.add(workspaceId);
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
28
72
|
/** Index of `server` inside `composerFileSearchKey`'s tuple. Named rather than
|
|
29
73
|
* inlined so the coupling between the key shape and the placeholder guard
|
|
30
74
|
* below is a single, testable fact instead of a magic `3`. */
|
|
31
75
|
const SERVER_KEY_INDEX = 3;
|
|
76
|
+
/** Index of the workspace id inside `composerFileSearchKey`'s tuple. */
|
|
77
|
+
const WORKSPACE_KEY_INDEX = 5;
|
|
32
78
|
/**
|
|
33
79
|
* Whether a previous query's results may still be shown as placeholder data.
|
|
34
80
|
*
|
|
@@ -43,8 +89,10 @@ const SERVER_KEY_INDEX = 3;
|
|
|
43
89
|
* never-flash-empty behaviour while a query is merely being retyped, and drops
|
|
44
90
|
* it exactly when the workspace underneath changed.
|
|
45
91
|
*/
|
|
46
|
-
export function canKeepPlaceholderFiles(server, previousQueryKey) {
|
|
47
|
-
|
|
92
|
+
export function canKeepPlaceholderFiles(server, previousQueryKey, workspaceId = null) {
|
|
93
|
+
// The repo rows belong to one workspace: a switch to another workspace on
|
|
94
|
+
// the same server (or on no server, `unbound`) drops them too.
|
|
95
|
+
return previousQueryKey?.[SERVER_KEY_INDEX] === server && (previousQueryKey?.[WORKSPACE_KEY_INDEX] ?? null) === workspaceId;
|
|
48
96
|
}
|
|
49
97
|
/**
|
|
50
98
|
* File results for the `@` menu.
|
|
@@ -71,7 +119,11 @@ export function useFileSearch(query, enabled) {
|
|
|
71
119
|
// actually calls never drift apart.
|
|
72
120
|
const { serverUrl } = useActiveSandboxProxyContext();
|
|
73
121
|
const server = serverUrl || UNBOUND_SERVER;
|
|
74
|
-
|
|
122
|
+
// The workspace on screen: its repo is the second source of file rows.
|
|
123
|
+
const workspaceId = useKortixRouteWorkspaceId();
|
|
124
|
+
// Two queries, merged at render: the computer's rows show as soon as they
|
|
125
|
+
// arrive and never wait on the git-backed repo search.
|
|
126
|
+
const runtime = useQuery({
|
|
75
127
|
queryKey: composerFileSearchKey(server, debounced),
|
|
76
128
|
queryFn: () => searchWorkspaceFiles(debounced),
|
|
77
129
|
enabled,
|
|
@@ -91,7 +143,19 @@ export function useFileSearch(query, enabled) {
|
|
|
91
143
|
placeholderData: (previous, previousQuery) => canKeepPlaceholderFiles(server, previousQuery?.queryKey) ? previous : undefined,
|
|
92
144
|
retry: false,
|
|
93
145
|
});
|
|
94
|
-
|
|
146
|
+
const repo = useQuery({
|
|
147
|
+
queryKey: composerFileSearchKey(REPO_SOURCE, debounced, workspaceId),
|
|
148
|
+
queryFn: () => searchRepoFiles(workspaceId, debounced),
|
|
149
|
+
enabled: enabled && Boolean(workspaceId) && debounced.trim().length > 0,
|
|
150
|
+
staleTime: 30_000,
|
|
151
|
+
gcTime: 5 * 60_000,
|
|
152
|
+
// The same guard, scoped to the workspace: its repo rows never outlive a switch.
|
|
153
|
+
placeholderData: (previous, previousQuery) => canKeepPlaceholderFiles(REPO_SOURCE, previousQuery?.queryKey, workspaceId) ? previous : undefined,
|
|
154
|
+
retry: false,
|
|
155
|
+
});
|
|
156
|
+
const files = useMemo(() => mergeFileResults(runtime.data ?? [], repo.data ?? []), [runtime.data, repo.data]);
|
|
157
|
+
const isLoading = (runtime.isFetching && !runtime.data) || (repo.isFetching && !repo.data);
|
|
158
|
+
return { files, isLoading };
|
|
95
159
|
}
|
|
96
160
|
/**
|
|
97
161
|
* The pure decision at the heart of `useMenuRevalidation`, below: given the
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { agentDisplayName } from '../../../_vendor/kortix-shared.js';
|
|
1
2
|
import { translateUiCatalogText } from '../../../i18n/ui-catalog/localize-ui-catalog.js';
|
|
2
3
|
import { REMAINING_UI_TRANSLATION_KEYS } from '../../../i18n/ui-catalog/remaining-ui-translation-keys.generated.js';
|
|
3
4
|
export function formatRelativeTime(timestamp, now) {
|
|
@@ -53,9 +54,12 @@ export function buildMentionSections({ agents, sessions, files, query, currentSe
|
|
|
53
54
|
// something to fold into this refactor — see the pinning test below.
|
|
54
55
|
const agentRows = [];
|
|
55
56
|
for (const a of agents) {
|
|
56
|
-
|
|
57
|
+
const name = a.name || '';
|
|
58
|
+
// The row reads the name every other surface shows; the slug stays the value.
|
|
59
|
+
const label = name ? agentDisplayName(name, a.title) : '';
|
|
60
|
+
if (!name.toLowerCase().includes(q) && !label.toLowerCase().includes(q))
|
|
57
61
|
continue;
|
|
58
|
-
agentRows.push({ index: index++, kind: 'agent', label
|
|
62
|
+
agentRows.push({ index: index++, kind: 'agent', label, value: name });
|
|
59
63
|
}
|
|
60
64
|
if (agentRows.length)
|
|
61
65
|
sections.push({ kind: 'agent', heading: heading('Agents'), items: agentRows });
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
* look like it was doing something while changing nothing. The z-index belongs
|
|
14
14
|
* on the mounted element itself and is set in `mount.ts`.
|
|
15
15
|
*/
|
|
16
|
-
export declare function MenuCard({ className, children, }: {
|
|
16
|
+
export declare function MenuCard({ className, children, cardRef, style, }: {
|
|
17
17
|
className?: string;
|
|
18
18
|
children: React.ReactNode;
|
|
19
|
+
cardRef?: React.Ref<HTMLDivElement>;
|
|
20
|
+
style?: React.CSSProperties;
|
|
19
21
|
}): import("react").JSX.Element;
|
|
20
22
|
/** Section label above a group of rows ("Skills", "Agents", "Connectors"). */
|
|
21
23
|
export declare function MenuSectionHeading({ children }: {
|
|
@@ -17,8 +17,8 @@ import { useEffect, useRef } from 'react';
|
|
|
17
17
|
* look like it was doing something while changing nothing. The z-index belongs
|
|
18
18
|
* on the mounted element itself and is set in `mount.ts`.
|
|
19
19
|
*/
|
|
20
|
-
export function MenuCard({ className, children, }) {
|
|
21
|
-
return (_jsx("div", { className: cn('bg-popover text-popover-foreground overflow-hidden rounded-md border shadow-md', className), children: children }));
|
|
20
|
+
export function MenuCard({ className, children, cardRef, style, }) {
|
|
21
|
+
return (_jsx("div", { ref: cardRef, style: style, className: cn('bg-popover text-popover-foreground overflow-hidden rounded-md border shadow-md', className), children: children }));
|
|
22
22
|
}
|
|
23
23
|
/** Section label above a group of rows ("Skills", "Agents", "Connectors"). */
|
|
24
24
|
export function MenuSectionHeading({ children }) {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { SlashRow, SlashSection } from './slash-items.js';
|
|
2
|
+
/**
|
|
3
|
+
* The height left between the card's top edge and the viewport bottom, so a
|
|
4
|
+
* menu docked BELOW the composer (workspace home) never runs past the window.
|
|
5
|
+
* At 1440×900 the home menu ended at y 906. A menu docked above the composer
|
|
6
|
+
* always has the composer below it, so the cap never bites there.
|
|
7
|
+
*/
|
|
8
|
+
export declare function fitHeightBelow(top: number, viewportHeight: number): number;
|
|
2
9
|
/**
|
|
3
10
|
* The `/` palette.
|
|
4
11
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useLayoutEffect, useRef, useState } from 'react';
|
|
3
4
|
import { Kbd } from '../../../primitives/kbd.js';
|
|
4
5
|
import { getFileIcon } from '../../../files/project/components/file-icon.js';
|
|
5
6
|
import { cn } from '../../../lib/utils.js';
|
|
@@ -67,6 +68,50 @@ function SlashRowIcon({ row, heading, className, }) {
|
|
|
67
68
|
return _jsx(PlugsConnectedIcon, { className: className });
|
|
68
69
|
return _jsx(TerminalWindowIcon, { className: className });
|
|
69
70
|
}
|
|
71
|
+
/** Space kept between the menu's bottom edge and the viewport's bottom edge. */
|
|
72
|
+
const VIEWPORT_GAP_PX = 8;
|
|
73
|
+
/** The menu never shrinks below this: a few rows stay usable on a short window. */
|
|
74
|
+
const MIN_FIT_PX = 120;
|
|
75
|
+
/**
|
|
76
|
+
* The height left between the card's top edge and the viewport bottom, so a
|
|
77
|
+
* menu docked BELOW the composer (workspace home) never runs past the window.
|
|
78
|
+
* At 1440×900 the home menu ended at y 906. A menu docked above the composer
|
|
79
|
+
* always has the composer below it, so the cap never bites there.
|
|
80
|
+
*/
|
|
81
|
+
export function fitHeightBelow(top, viewportHeight) {
|
|
82
|
+
return Math.max(MIN_FIT_PX, Math.floor(viewportHeight - top - VIEWPORT_GAP_PX));
|
|
83
|
+
}
|
|
84
|
+
function useViewportFitHeight(mounted) {
|
|
85
|
+
const cardRef = useRef(null);
|
|
86
|
+
const [maxHeight, setMaxHeight] = useState(null);
|
|
87
|
+
useLayoutEffect(() => {
|
|
88
|
+
const measure = () => {
|
|
89
|
+
const el = cardRef.current;
|
|
90
|
+
if (!el || !el.isConnected)
|
|
91
|
+
return;
|
|
92
|
+
const next = fitHeightBelow(el.getBoundingClientRect().top, window.innerHeight);
|
|
93
|
+
setMaxHeight((prev) => (prev === next ? prev : next));
|
|
94
|
+
};
|
|
95
|
+
measure();
|
|
96
|
+
// The suggestion plugin renders this card BEFORE it appends it to the dock
|
|
97
|
+
// (`mountDockedMenu`), so the first measure sees a detached node at top 0.
|
|
98
|
+
// The observer fires once the card has layout in the dock; the frame is
|
|
99
|
+
// the fallback where ResizeObserver does not exist.
|
|
100
|
+
const frame = window.requestAnimationFrame(measure);
|
|
101
|
+
const observer = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(measure);
|
|
102
|
+
if (cardRef.current)
|
|
103
|
+
observer?.observe(cardRef.current);
|
|
104
|
+
window.addEventListener('resize', measure);
|
|
105
|
+
window.addEventListener('scroll', measure, { capture: true, passive: true });
|
|
106
|
+
return () => {
|
|
107
|
+
window.cancelAnimationFrame(frame);
|
|
108
|
+
observer?.disconnect();
|
|
109
|
+
window.removeEventListener('resize', measure);
|
|
110
|
+
window.removeEventListener('scroll', measure, { capture: true });
|
|
111
|
+
};
|
|
112
|
+
}, [mounted]);
|
|
113
|
+
return { cardRef, maxHeight };
|
|
114
|
+
}
|
|
70
115
|
/**
|
|
71
116
|
* The `/` palette.
|
|
72
117
|
*
|
|
@@ -106,6 +151,8 @@ function SlashRowIcon({ row, heading, className, }) {
|
|
|
106
151
|
*/
|
|
107
152
|
export function SlashMenu({ sections, selectedIndex, onSelect, onHover, }) {
|
|
108
153
|
const t = useTranslations('sessionUi.composerMenus');
|
|
154
|
+
// The list card mounts only when a section exists: measure again when it does.
|
|
155
|
+
const { cardRef, maxHeight } = useViewportFitHeight(sections.length > 0);
|
|
109
156
|
// A query that matches nothing keeps the card, with one dead row saying so.
|
|
110
157
|
// Returning `null` made the palette DISAPPEAR mid-word — the user could not
|
|
111
158
|
// tell "no match" from "the menu closed", and one backspace brought it back
|
|
@@ -123,7 +170,7 @@ export function SlashMenu({ sections, selectedIndex, onSelect, onHover, }) {
|
|
|
123
170
|
const activeUsage = active && active.row.type === 'action' && active.row.action?.id === 'show-context'
|
|
124
171
|
? active.row.action.context
|
|
125
172
|
: undefined;
|
|
126
|
-
return (_jsxs(MenuCard, { className: cn('mb-2.5 flex max-h-96 w-full overflow-hidden rounded-lg shadow-xs'), children: [_jsx("div", { role: "listbox", "aria-label": t('commandsAndActions'), "aria-activedescendant": `slash-row-${selectedIndex}`,
|
|
173
|
+
return (_jsxs(MenuCard, { cardRef: cardRef, style: maxHeight === null ? undefined : { maxHeight: `min(calc(var(--spacing) * 96), ${maxHeight}px)` }, className: cn('mb-2.5 flex max-h-96 w-full overflow-hidden rounded-lg shadow-xs'), children: [_jsx("div", { role: "listbox", "aria-label": t('commandsAndActions'), "aria-activedescendant": `slash-row-${selectedIndex}`,
|
|
127
174
|
// `-1`, matching `mention-menu.tsx`: focusable for AT, but never a tab
|
|
128
175
|
// stop. Keyboard interaction stays in the composer editor, which
|
|
129
176
|
// proxies arrow/Enter to this listbox — a real tab stop here trapped
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { onlineManager } from '@tanstack/react-query';
|
|
4
|
+
import { errorToast, infoToast } from '../../primitives/toast.js';
|
|
4
5
|
import { isFirstPromptRow } from './queue-projection.js';
|
|
5
6
|
import { promptFileParts, sentAttachmentsOf } from './uploaded-file-refs.js';
|
|
6
7
|
import { firstPromptAttachments, } from './sent-attachment-previews.js';
|
|
@@ -321,6 +322,7 @@ export function useInstantSessionSend(props) {
|
|
|
321
322
|
const { projectId, sessionId, hydrated, onSubmit, promptInbox } = props;
|
|
322
323
|
const tI18nHardcoded = useTranslations('hardcodedUi');
|
|
323
324
|
const tComposerAttachments = useTranslations('hardcodedUi.composerAttachments');
|
|
325
|
+
const tThreads = useTranslations('threads');
|
|
324
326
|
const { submission, setSubmission, extraSends, setExtraSends, firstSendInFlight, mountedRef } = useSendMemory();
|
|
325
327
|
const { submitted, effectiveSubmission } = useFirstPromptSources({
|
|
326
328
|
sessionId,
|
|
@@ -351,6 +353,9 @@ export function useInstantSessionSend(props) {
|
|
|
351
353
|
firstSendInFlight,
|
|
352
354
|
mountedRef,
|
|
353
355
|
};
|
|
356
|
+
// A new session's first prompt has no row on screen to say it waits: say it once.
|
|
357
|
+
if (send.first && !onlineManager.isOnline())
|
|
358
|
+
infoToast(tThreads('notSentYet'));
|
|
354
359
|
paintSend(send, env);
|
|
355
360
|
const post = buildPost(send, env);
|
|
356
361
|
const { detached } = send;
|
|
@@ -369,6 +374,7 @@ export function useInstantSessionSend(props) {
|
|
|
369
374
|
projectId,
|
|
370
375
|
tI18nHardcoded,
|
|
371
376
|
tComposerAttachments,
|
|
377
|
+
tThreads,
|
|
372
378
|
onSubmit,
|
|
373
379
|
promptInbox.enqueue,
|
|
374
380
|
setSubmission,
|
|
@@ -33,6 +33,7 @@ import { useSessionIds } from '../../providers/session-ids.js';
|
|
|
33
33
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
34
34
|
import { openSessionQuickView } from '../panel/open-session-quick-view.js';
|
|
35
35
|
import { CountdownRing, isFailedReminder, REMINDER_ROW_GRID, ReminderActions, ReminderFacts, ReminderRowCells, sortReminders, useReminderControls, useReminderView, } from './reminder-parts.js';
|
|
36
|
+
import { prefersReducedMotion } from '../../internal/hooks/use-reduced-motion.js';
|
|
36
37
|
/** More live reminders than this open in the side panel, not the popover. */
|
|
37
38
|
export const REMINDERS_POPOVER_MAX = 30;
|
|
38
39
|
/**
|
|
@@ -45,7 +46,7 @@ export function ReminderMark({ count, failed: anyFailed, surface = 'bg-backgroun
|
|
|
45
46
|
const tone = anyFailed
|
|
46
47
|
? { reflection: 'text-kortix-red', disc: 'bg-kortix-red' }
|
|
47
48
|
: { reflection: 'text-kortix-purple', disc: 'bg-kortix-purple' };
|
|
48
|
-
return (_jsxs("span", { className: "relative size-4 shrink-0", children: [_jsx(AlarmIcon, { className:
|
|
49
|
+
return (_jsxs("span", { className: "relative size-4 shrink-0", children: [_jsx(AlarmIcon, { className: "size-4" }), count > 0 ? (_jsxs(_Fragment, { children: [_jsx(AlarmIcon, { "aria-hidden": true, className: cn('absolute inset-0 size-4', tone.reflection), style: { maskImage: BELL_REFLECTION_MASK, WebkitMaskImage: BELL_REFLECTION_MASK } }), _jsx("span", { "aria-hidden": true, className: cn('absolute -right-1.5 -bottom-1.5 flex rounded-full p-px', surface), children: _jsx("span", { "data-slot": "reminder-count", className: cn('text-background flex h-3 min-w-3 items-center justify-center rounded-full px-0.5 text-[9px] leading-none font-semibold tabular-nums', // audit:allow a numeral in an 11px disc on a 16px glyph; no type rung fits
|
|
49
50
|
tone.disc), children: badgeCount(count) }) })] })) : null] }));
|
|
50
51
|
}
|
|
51
52
|
const CARD_OPEN_DELAY_MS = 200;
|
|
@@ -87,7 +88,7 @@ function useGlidingCard() {
|
|
|
87
88
|
return;
|
|
88
89
|
clearTimers();
|
|
89
90
|
const panelRect = panel.getBoundingClientRect();
|
|
90
|
-
const reduce =
|
|
91
|
+
const reduce = prefersReducedMotion();
|
|
91
92
|
const place = (glide) => setActive({
|
|
92
93
|
id,
|
|
93
94
|
top: row.getBoundingClientRect().top - panelRect.top,
|