@kortix/ui 0.15.10 → 0.16.0
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 +769 -76
- package/dist/_vendor/shared/app-config.d.ts +6 -30
- package/dist/_vendor/shared/channel-descriptors.d.ts +0 -34
- package/dist/_vendor/shared/channel-header.d.ts +2 -1
- package/dist/_vendor/shared/connector-sections.d.ts +0 -25
- package/dist/_vendor/shared/file-tags.d.ts +2 -1
- package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
- package/dist/_vendor/shared/pasted-content.d.ts +0 -4
- package/dist/_vendor/shared/pixel-mark.d.ts +0 -17
- package/dist/_vendor/shared/project-glyphs.d.ts +0 -1
- 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-model-view.d.ts +11 -1
- package/dist/customize/agents/agent-model-view.js +12 -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 +25 -34
- package/dist/customize/agents/agent-tabs.d.ts +3 -0
- package/dist/customize/agents/agent-tabs.js +3 -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/detail/connector-triggers.js +1 -1
- 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 +2 -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/component/teams-byo-wizard.js +4 -1
- 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 +33 -3
- package/dist/customize/triggers/schedule/event-trigger-copy.js +1 -1
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +5 -4
- package/dist/customize/triggers/schedule/then-fields.d.ts +5 -1
- package/dist/customize/triggers/schedule/then-fields.js +23 -3
- package/dist/customize/triggers/schedule/trigger-callouts.js +1 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +27 -0
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +51 -5
- package/dist/customize/triggers/schedule/trigger-composer.js +19 -13
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +25 -5
- package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -3
- package/dist/customize/triggers/schedule/trigger-filter.js +7 -6
- package/dist/customize/triggers/schedule/trigger-readonly.js +1 -1
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -1
- package/dist/customize/triggers/schedule/when-event.js +1 -1
- package/dist/customize/triggers/schedule/when-schedule.d.ts +5 -1
- package/dist/customize/triggers/schedule/when-schedule.js +16 -1
- package/dist/customize/triggers/schedule-view.js +6 -3
- 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 +544 -46
- package/dist/i18n/en.js +593 -95
- 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/layout/project-settings-nav.d.ts +17 -0
- package/dist/internal/layout/project-settings-nav.js +24 -0
- package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
- package/dist/internal/lib/capability-tab-routes.d.ts +8 -0
- package/dist/internal/lib/capability-tab-routes.js +11 -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/composer-prefill-store.d.ts +7 -0
- package/dist/internal/stores/composer-prefill-store.js +1 -0
- 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/actions/session-label.js +2 -2
- 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.d.ts +10 -5
- package/dist/session/agents/agent-strip.js +49 -15
- package/dist/session/agents/held-messages.d.ts +6 -2
- package/dist/session/agents/held-messages.js +6 -3
- 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 +7 -1
- package/dist/session/composer/agent-selector.d.ts +2 -0
- package/dist/session/composer/agent-selector.js +11 -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.d.ts +1 -0
- package/dist/session/composer/composer-chat-input.js +7 -2
- package/dist/session/composer/composer-logic.d.ts +7 -0
- package/dist/session/composer/composer-logic.js +18 -0
- package/dist/session/composer/composer-reset.d.ts +8 -14
- package/dist/session/composer/composer-toolbar.d.ts +3 -1
- package/dist/session/composer/composer-toolbar.js +3 -3
- package/dist/session/composer/composer.d.ts +9 -2
- package/dist/session/composer/composer.js +24 -9
- package/dist/session/composer/editor/composer-editor.js +6 -4
- 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.d.ts +3 -1
- package/dist/session/header/session-site-header.js +27 -8
- package/dist/session/media/sandbox-url-detector.js +1 -1
- package/dist/session/models/connect-model-step.d.ts +29 -0
- package/dist/session/models/connect-model-step.js +50 -0
- 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/models/use-workspace-model-gate.d.ts +11 -0
- package/dist/session/models/use-workspace-model-gate.js +62 -0
- package/dist/session/models/workspace-model-gate.d.ts +46 -0
- package/dist/session/models/workspace-model-gate.js +66 -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/prompts/session-connect-card.d.ts +63 -0
- package/dist/session/prompts/{session-connect-prompt.js → session-connect-card.js} +53 -42
- 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 +311 -300
- 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 +3 -3
- package/dist/session/thread/transcript.js +33 -27
- package/dist/session/thread/typing-indicator.d.ts +2 -2
- package/dist/session/thread/typing-indicator.js +10 -3
- package/dist/session/tool/tool-part-renderer.js +7 -2
- package/dist/session/tool/tools/kortix-action-tool.js +10 -2
- 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/session/turn/turn-viewport.d.ts +66 -10
- package/dist/session/turn/turn-viewport.js +92 -12
- package/dist/session/turn/user-message.js +7 -5
- 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 +544 -46
- package/dist/workspace/admin/project-admin-dashboard.js +23 -11
- 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/home/existing-repo-setup-prompt.d.ts +5 -8
- package/dist/workspace/home/existing-repo-setup-prompt.js +16 -42
- package/dist/workspace/home/no-agent-home.d.ts +3 -1
- package/dist/workspace/home/no-agent-home.js +2 -2
- 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 +16 -9
- 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-steps.d.ts +43 -0
- package/dist/workspace/setup/setup-steps.js +38 -0
- package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
- package/dist/workspace/setup/workspace-setup-page.js +124 -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/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/session-grouping.d.ts +1 -1
- package/dist/workspace/sidebar/session-grouping.js +1 -1
- 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-details-panel.js +2 -2
- package/dist/workspace/spaces/space-timeline.js +2 -2
- package/dist/workspace/spaces/space-triggers.js +2 -2
- package/dist/workspace/spaces/space-view.js +11 -5
- package/package.json +79 -10
- package/skills/kortix-ui/SKILL.md +2 -2
- package/skills/kortix-ui/references/modules.md +5 -3
- package/dist/session/prompts/session-connect-prompt.d.ts +0 -40
- 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
|
@@ -5,7 +5,7 @@ import { uiRoutes } from '../../lib/routes.js';
|
|
|
5
5
|
import { isQuestionTool } from '@kortix/sdk';
|
|
6
6
|
import { SessionAccessPrompt } from '../prompts/session-access-prompt.js';
|
|
7
7
|
import { SessionApprovalPrompt } from '../prompts/session-approval-prompt.js';
|
|
8
|
-
import {
|
|
8
|
+
import { SessionConnectRequestsProvider } from '../prompts/session-connect-card.js';
|
|
9
9
|
import { childSessionHref } from '../tool/tools/session-spawn-urls.js';
|
|
10
10
|
import { SessionPermissionPrompt } from '../prompts/session-permission-prompt.js';
|
|
11
11
|
import { useSessionWallpaperLayer } from '../panel/session-wallpaper-layer.js';
|
|
@@ -106,7 +106,7 @@ import { getRetryInfo } from '../../internal/session-types/index.js';
|
|
|
106
106
|
import { useModelPricingLookup } from '../../internal/lib/model-pricing.js';
|
|
107
107
|
import { isAbortError, latestPromptModel, SESSION_NOTICE, turnEndNotice } from '@kortix/sdk';
|
|
108
108
|
import { failureShownByTurn, failureSupersededByTurn, persistedFailureText, } from './persisted-turn-failure.js';
|
|
109
|
-
import { abandonOptimisticSend, applyOptimisticAbort, ascendingId, awaitAbortSettlement, beginOptimisticSend, classifySendError, clearStartStash, formatModelString, formatPromptModel, markOptimisticSendDispatched, markOptimisticSendInboxBacked, mintSessionWireMessageId, readStartStash, recoverFromSendFailure, rejectQuestion, replyToPermission, replyToQuestion, requestRuntimeReconnect, startSessionWithPrompt, useAbortRuntimeSession, useExecuteRuntimeCommand, useProjectConfig, useRuntimeAgents, useProjectSpaces, useRuntimeBootStalled, useRuntimeCommands, useRuntimeConfig, useRuntimeConnectionStore, useRuntimePendingStore, useRuntimePhase, useRuntimeProviders, useRuntimeReady, useRuntimeSession, useRuntimeSessions, useRuntimeSupports, useSessionModelSelection, useSessionPrompts, useSessionStateStore, useSessionSync, useSessionTurnOutcome, useSessionWorking, useSessionWorkingStore, useAnswerSessionAsk, useSessionNeedsYou, } from '@kortix/sdk/react';
|
|
109
|
+
import { abandonOptimisticSend, applyOptimisticAbort, ascendingId, awaitAbortSettlement, beginOptimisticSend, classifySendError, clearStartStash, formatModelString, formatPromptModel, markOptimisticSendDispatched, markOptimisticSendInboxBacked, mintSessionWireMessageId, readStartStash, recoverFromSendFailure, rejectQuestion, replyToPermission, replyToQuestion, requestRuntimeReconnect, startSessionWithPrompt, useAbortRuntimeSession, useExecuteRuntimeCommand, useProjectConfig, useRuntimeAgents, useProjectSpaces, useRuntimeBootStalled, useRuntimeCommands, useRuntimeConfig, useRuntimeConnectionStore, useRuntimePendingStore, useRuntimePhase, useRuntimeProviders, useRuntimeReady, useRuntimeSession, useRuntimeSessions, useRuntimeSupports, useSessionModelSelection, useSessionPrompts, useSessionStateStore, useSessionSync, useSessionTurnOutcome, useSessionWorking, useSessionWorkingStore, useAnswerSessionAsk, useSessionNeedsYou, useNetworkOnline, } from '@kortix/sdk/react';
|
|
110
110
|
import { useStableCallback } from '../../internal/hooks/use-stable-callback.js';
|
|
111
111
|
import { useReloadForensics } from '../status/reload-forensics.js';
|
|
112
112
|
import { resolveLastTurnWorking, serverHoldsOpenTurn, sessionComposerReadiness, } from '../composer/session-composer-readiness.js';
|
|
@@ -734,6 +734,12 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
734
734
|
* it — a refused send, Stop, and leaving the session.
|
|
735
735
|
*/
|
|
736
736
|
const receiptSessionId = projectSessionId ?? '';
|
|
737
|
+
// The browser reports no network: a send waits for it (the SDK holds the
|
|
738
|
+
// POST), so it takes no receipt until it goes out, and the composer shows
|
|
739
|
+
// the offline line instead of a turn that never started (finding 07).
|
|
740
|
+
const networkOnline = useNetworkOnline();
|
|
741
|
+
const networkOnlineRef = useRef(networkOnline);
|
|
742
|
+
networkOnlineRef.current = networkOnline;
|
|
737
743
|
const noteSendReceipt = useCallback((messageId, turnId = messageId) => useSessionWorkingStore
|
|
738
744
|
.getState()
|
|
739
745
|
.noteSendReceipt(receiptSessionId, { messageId, turnId, atMs: Date.now() }), [receiptSessionId]);
|
|
@@ -1500,8 +1506,6 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
1500
1506
|
const [approvalDocked, setApprovalDocked] = useState(false);
|
|
1501
1507
|
// My Kortix asking to give a colleague access docks the same way.
|
|
1502
1508
|
const [accessDocked, setAccessDocked] = useState(false);
|
|
1503
|
-
// A connector sign-in the agent started docks the same way (`SessionConnectPrompt`).
|
|
1504
|
-
const [connectDocked, setConnectDocked] = useState(false);
|
|
1505
1509
|
const questionPromptTimerRef = useRef(null);
|
|
1506
1510
|
useEffect(() => {
|
|
1507
1511
|
const nextQuestion = activePendingQuestion;
|
|
@@ -2655,7 +2659,12 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
2655
2659
|
// The prompt is out of this tab's hands the moment the row lands, so the
|
|
2656
2660
|
// receipt is taken BEFORE the POST: it is what holds the composer on
|
|
2657
2661
|
// "working" until `GET .../turn` reports the turn the inbox admitted.
|
|
2658
|
-
|
|
2662
|
+
// Offline: no receipt yet. The POST waits for the network; the receipt is
|
|
2663
|
+
// taken when the server has the prompt, so no Thinking row stands for a
|
|
2664
|
+
// send that has not left the page.
|
|
2665
|
+
const heldOffline = !networkOnlineRef.current;
|
|
2666
|
+
if (!heldOffline)
|
|
2667
|
+
noteSendReceipt(messageID, receiptTurnId);
|
|
2659
2668
|
const result = await (async () => {
|
|
2660
2669
|
try {
|
|
2661
2670
|
if (!projectId || !projectSessionId) {
|
|
@@ -2694,6 +2703,8 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
2694
2703
|
// for it. `useSessionPrompts` raises the inbox floor at the same
|
|
2695
2704
|
// moment, which is what covers the window before the row is
|
|
2696
2705
|
// delivered and becomes a turn.
|
|
2706
|
+
if (heldOffline)
|
|
2707
|
+
noteSendReceipt(messageID, receiptTurnId);
|
|
2697
2708
|
acceptSendReceipt(messageID);
|
|
2698
2709
|
attachments?.release();
|
|
2699
2710
|
// The durable row now carries this prompt, so the tab-local draft
|
|
@@ -2707,6 +2718,8 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
2707
2718
|
// Resolve that verdict before the composer can restore its draft:
|
|
2708
2719
|
// recoverFromSendFailure checks asynchronously and returns an error now.
|
|
2709
2720
|
if (!keepsPainted && (await inboxRowExists().catch(() => false))) {
|
|
2721
|
+
if (heldOffline)
|
|
2722
|
+
noteSendReceipt(messageID, receiptTurnId);
|
|
2710
2723
|
acceptSendReceipt(messageID);
|
|
2711
2724
|
attachments?.release();
|
|
2712
2725
|
if (!paintTranscript)
|
|
@@ -3439,7 +3452,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
3439
3452
|
// The agents this session started, as one line in the composer's under-row
|
|
3440
3453
|
// (Claude Code's agent panel). It reads its own lists and never holds the composer.
|
|
3441
3454
|
const agentsLineCompact = !!transcriptRows && !isPhone;
|
|
3442
|
-
const chatUnderbarSlot = useMemo(() => _jsx(AgentsLine, { projectId: projectId, sessionId: projectSessionId, compact: agentsLineCompact }), [projectId, projectSessionId, agentsLineCompact]);
|
|
3455
|
+
const chatUnderbarSlot = useMemo(() => (_jsx(AgentsLine, { projectId: projectId, sessionId: projectSessionId, compact: agentsLineCompact, live: isServerBusy })), [projectId, projectSessionId, agentsLineCompact, isServerBusy]);
|
|
3443
3456
|
// A space's thread lists only the queue's live messages in its card: failed
|
|
3444
3457
|
// ones and a Stop hold read as calm lines (`ChatQueueLines`), reports wait behind Resume.
|
|
3445
3458
|
const calmRest = useMemo(() => [...queueRows.rows, ...heldCommandRows(heldCommands)].filter((row) => row.state !== 'failed' && !row.synthetic), [queueRows.rows, heldCommands]);
|
|
@@ -3481,13 +3494,11 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
3481
3494
|
effectiveBusy,
|
|
3482
3495
|
canStop,
|
|
3483
3496
|
]);
|
|
3484
|
-
const chatInputSlot = useMemo(() => (_jsxs(_Fragment, { children: [_jsx(SessionApprovalPrompt, { onDockedChange: setApprovalDocked }), _jsx(SessionAccessPrompt, { projectId: projectId ?? '', asks: accessAsks, onDockedChange: setAccessDocked }),
|
|
3497
|
+
const chatInputSlot = useMemo(() => (_jsxs(_Fragment, { children: [_jsx(SessionApprovalPrompt, { onDockedChange: setApprovalDocked }), _jsx(SessionAccessPrompt, { projectId: projectId ?? '', asks: accessAsks, onDockedChange: setAccessDocked }), _jsx(SessionPermissionPrompt, { sessionId: sessionId, agentName: sessionScopeAgentName, permissions: pendingPermissions, onReply: handlePermissionReply }), renderedQuestion ? (_jsx("div", { className: cn('w-full overflow-hidden transition-[max-height,opacity,transform] ease-in-out', questionPromptVisible
|
|
3485
3498
|
? 'duration-slow max-h-130 translate-y-0 opacity-100'
|
|
3486
3499
|
: 'duration-slow pointer-events-none max-h-0 -translate-y-1 opacity-0'), children: _jsx(QuestionPrompt, { ref: questionPromptRef, request: renderedQuestion, onReply: handleQuestionReply, onReject: handleQuestionReject, onActionChange: handleQuestionActionChange }, renderedQuestion.id) })) : null] })), [
|
|
3487
3500
|
projectId,
|
|
3488
3501
|
accessAsks,
|
|
3489
|
-
effectiveBusy,
|
|
3490
|
-
projectSessionId,
|
|
3491
3502
|
sessionId,
|
|
3492
3503
|
sessionScopeAgentName,
|
|
3493
3504
|
pendingPermissions,
|
|
@@ -3748,299 +3759,299 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
3748
3759
|
}
|
|
3749
3760
|
return (
|
|
3750
3761
|
// A read-only view (the sub-session modal) offers no fix inside a tool card.
|
|
3751
|
-
_jsx(ReadOnlySessionContext.Provider, { value: !!readOnly, children: _jsx(AgentActivateContext.Provider, { value: agentActivate, children: _jsx(SessionPromptContext.Provider, { value: readOnly ? null : sendSessionPrompt, children: _jsx(ProjectFilesProvider, { value: { projectId: projectId ?? '', ref: outcomesBaseRef, defaultBranch: outcomesBaseRef }, children: _jsxs(ComposerDropZone, { className: cn('relative flex h-full flex-col', 'pb-[env(safe-area-inset-bottom)]', // audit:allow device safe-area inset, not a spacing step — the composer column lifts above the home indicator in the installed PWA; desktop reports a 0px inset
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
// `undefined`, not `true`, once released: the composer's own
|
|
3988
|
-
// viewport rule (>= 640px) still decides, so this never forces
|
|
3989
|
-
// focus onto a phone keyboard.
|
|
3990
|
-
// A thread a space's chat opened by itself does not take the focus (`ComposerAutoFocusContext`).
|
|
3991
|
-
, {
|
|
3762
|
+
_jsx(ReadOnlySessionContext.Provider, { value: !!readOnly, children: _jsx(SessionConnectRequestsProvider, { projectId: readOnly ? null : projectId, sessionId: projectSessionId, busy: effectiveBusy, children: _jsx(AgentActivateContext.Provider, { value: agentActivate, children: _jsx(SessionPromptContext.Provider, { value: readOnly ? null : sendSessionPrompt, children: _jsx(ProjectFilesProvider, { value: { projectId: projectId ?? '', ref: outcomesBaseRef, defaultBranch: outcomesBaseRef }, children: _jsxs(ComposerDropZone, { className: cn('relative flex h-full flex-col', 'pb-[env(safe-area-inset-bottom)]', // audit:allow device safe-area inset, not a spacing step — the composer column lifts above the home indicator in the installed PWA; desktop reports a 0px inset
|
|
3763
|
+
// Transparent in the welcome state so the root-level full-bleed wallpaper
|
|
3764
|
+
// (portaled into SessionLayout) reads through; solid once real content
|
|
3765
|
+
// takes over. Same base color either way, so non-welcome is unchanged.
|
|
3766
|
+
shouldShowWelcomeOverlay || transparent ? 'bg-transparent' : 'bg-background'), "data-testid": "session-chat", children: [isPreparingPrint && (_jsxs("div", { "data-print-hide": true, role: "status", className: "bg-popover text-muted-foreground fixed bottom-6 left-1/2 z-50 flex -translate-x-1/2 items-center gap-2 rounded-lg border px-4 py-2 text-xs shadow-lg", children: [_jsx(Loading, { className: "size-3.5 shrink-0" }), tHardcodedUi.raw('i18nComplete.text7dac2ca010fe')] })), wallpaperLayer
|
|
3767
|
+
? welcomeWallpaper && createPortal(welcomeWallpaper, wallpaperLayer)
|
|
3768
|
+
: welcomeWallpaper, !hideHeader && (_jsx(SessionSiteHeader, { sessionId: sessionId, sessionTitle: session?.title || 'Untitled', leadingAction: headerLeadingAction, parent: parentCrumb, live: isServerBusy })), _jsx(ModelSwitchHistory, { history: projectSessionRow?.metadata?.model_switches, current: projectSessionRow?.metadata?.model }), _jsx(SessionContextModal, { open: contextModalOpen, onOpenChange: setContextModalOpen,
|
|
3769
|
+
// A chat with no `useSession` source: the raw explorer lists the
|
|
3770
|
+
// rows `useSessionSync` read for it.
|
|
3771
|
+
detachedRows: sessionState ? undefined : hookMessages, source: sessionState ?? DETACHED_SESSION_MESSAGES, session: session, sessionRow: projectSessionRow, providers: providers, allSessions: allSessions, servedModel: sessionServedModel, billedCost: sessionBilledCost(modelUsage) }), _jsx(CompactModal, { sessionId: sessionId, open: compactModalOpen, onOpenChange: setCompactModalOpen }), _jsx(ChangeRequestDetailDialog, { crId: openCrId, onClose: () => setOpenCrId(null), onOpenChangeRequest: setOpenCrId }), _jsxs(SessionBodyRow, { actionPanel: !hideHeader && !readOnly, children: [isNotFound ? (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col items-center justify-center gap-3 px-6 text-center", children: [_jsx("div", { className: "text-muted-foreground text-sm", children: tHardcodedUi.raw('componentsSessionSessionChat.line5821JsxTextThisSessionIsNotAccessibleRightNow') }), _jsx(Button, { asChild: true, variant: "outline", size: "sm", children: _jsx(Link, { href: "/", prefetch: true, onClick: () => {
|
|
3772
|
+
try {
|
|
3773
|
+
if (sessionId)
|
|
3774
|
+
useTabStore.getState().closeTab?.(sessionId);
|
|
3775
|
+
}
|
|
3776
|
+
catch { }
|
|
3777
|
+
}, children: tHardcodedUi.raw('componentsSessionSessionChat.line5833JsxTextGoToHome') }) })] })) : (_jsxs("div", { ref: chatAreaRef, className: "relative z-10 min-h-0 flex-1", children: [_jsx("div", { ref: scrollContainerCallbackRef, className: cn(
|
|
3778
|
+
// overflow-anchor:none — this scroll area does ALL of its own
|
|
3779
|
+
// anchoring (useAutoScroll's spacer + RAF follow, the send-path
|
|
3780
|
+
// turn anchor, and the history-prepend content-space restore in
|
|
3781
|
+
// session-history-scroll.ts). The browser's native scroll
|
|
3782
|
+
// anchoring (default `overflow-anchor: auto`) tries to
|
|
3783
|
+
// compensate for the SAME prepends independently, and the two
|
|
3784
|
+
// corrections stacking is the other half of the scroll-up
|
|
3785
|
+
// teleport: ours restores the reader's position, then the
|
|
3786
|
+
// native one nudges it again.
|
|
3787
|
+
'scrollbar-hide relative z-10 h-full flex-1 overflow-y-auto [scroll-behavior:auto] [overflow-anchor:none]', shouldShowWelcomeOverlay || transparent ? 'bg-transparent' : 'bg-background'), onMouseUp: handleChatMouseUp, onMouseDown: handleChatMouseDown, onScroll: handleChatScroll, children: _jsxs("div", { ref: contentRef, role: "log",
|
|
3788
|
+
// Width and gutters live in `SESSION_TRANSCRIPT_CLASS`: the
|
|
3789
|
+
// instant shell draws this same column and the two crossfade
|
|
3790
|
+
// into each other, so a difference here is a sideways jump on
|
|
3791
|
+
// screen, not a style opinion. See session-body.tsx.
|
|
3792
|
+
//
|
|
3793
|
+
// No bottom padding, there or here: the space under the last
|
|
3794
|
+
// message is the auto-scroll spacer's job alone. The `pb-32`
|
|
3795
|
+
// that used to sit here stacked 128px of dead space on top of
|
|
3796
|
+
// it — the "extra inset at the bottom of the session".
|
|
3797
|
+
// Rows run edge to edge: each row owns its gutters and its hover fill.
|
|
3798
|
+
className: transcriptRows ? 'w-full min-w-0 pt-4' : SESSION_TRANSCRIPT_CLASS, children: [_jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx(SessionPrintHeader, { title: session?.title || 'Untitled', agentName: composerAgentName }), (hasOlder || showOlderLoading) && (_jsxs("div", { className: "mb-6 flex flex-col items-center gap-2", children: [hasOlder && (_jsx("div", { ref: olderSentinelRef, "aria-hidden": true, className: "h-px w-full" })), showOlderLoading && (_jsxs("div", { role: "status", className: "text-muted-foreground flex items-center gap-2 py-1 text-xs", children: [_jsx(Loading, { className: "size-3.5 shrink-0" }), tHardcodedUi.raw('i18nComplete.text85bf890776a7')] })), !showOlderLoading &&
|
|
3799
|
+
!olderPullFailed &&
|
|
3800
|
+
olderAutoloadExhausted({ hasOlder, autoLoadedPages }) && (_jsx(Button, { type: "button", variant: "outline-ghost", size: "sm", onClick: () => void handleLoadOlder(), children: tHardcodedUi.raw('i18nComplete.textf17671d83db0') })), olderPullFailed && !showOlderLoading && (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground text-xs", children: tHardcodedUi.raw('i18nComplete.textb03a0041ce33') }), _jsx(Button, { type: "button", variant: "outline-ghost", size: "sm", onClick: () => void handleLoadOlder(), children: tHardcodedUi.raw('i18nComplete.text942087cc2d41') })] }))] })), restoreNotice && !restoreDismissed && (_jsx(RestoreNotice, { notice: restoreNotice, onDismiss: () => dismissRestore(historyKey, restoreNotice.generation) })), _jsx(SessionOutcomesProvider, { projectSessionId: projectSessionId, turnSpans: turnSpans, busy: effectiveBusy, onOpen: handleOpenOutcome, onJump: handleJumpToOutcome, jumping: jumpingToOutcome, children: _jsxs(ToolActivateContext.Provider, { value: toolActivate, children: [showFirstPromptPreview &&
|
|
3801
|
+
firstPromptSource &&
|
|
3802
|
+
queuedSyntheticMessages.length === 0 &&
|
|
3803
|
+
rowsContext && (
|
|
3804
|
+
// A channel thread draws the stand-in as rows, the same
|
|
3805
|
+
// rows its boot body drew (`ThreadBootRows`).
|
|
3806
|
+
_jsx(PendingPromptRows, { text: buildOptimisticPromptTextWithUploads(firstPromptSource.text, firstPromptSource.files), author: rowsContext.owner, sessionId: sessionId, busy: turns.length === 0 && (lastTurnWorking || promptInbox.prompts.some(isFirstPromptRow)) })), showFirstPromptPreview &&
|
|
3807
|
+
firstPromptSource &&
|
|
3808
|
+
queuedSyntheticMessages.length === 0 &&
|
|
3809
|
+
!rowsContext && (_jsx(OptimisticTurn, { text: buildOptimisticPromptTextWithUploads(firstPromptSource.text, firstPromptSource.files),
|
|
3810
|
+
// Preserve a real failed-send status through the
|
|
3811
|
+
// boot-shell handover without inventing upload progress.
|
|
3812
|
+
// A first prompt held on its uploads carries its own.
|
|
3813
|
+
uploadStatus: firstPromptSource.uploadStatus ?? firstPromptUploadStatus, agentNames: agentNames, onFileClick: openFileInComputer, sessionId: sessionId,
|
|
3814
|
+
// The first item of the conversation, like turn 0, which has no
|
|
3815
|
+
// top margin. `first:mt-0` misses here: the list opens with a
|
|
3816
|
+
// zero-height <header>, so the stand-in sat 44px lower than turn 0
|
|
3817
|
+
// and every swap between the two jumped the bubble (KRTX-2931).
|
|
3818
|
+
className: "mt-0",
|
|
3819
|
+
// An undelivered first prompt is a turn about to start, as the
|
|
3820
|
+
// shell above this chat shows it: busy from the first frame,
|
|
3821
|
+
// before the working projection has read the inbox (KRTX-2931).
|
|
3822
|
+
busy: turns.length === 0 && (lastTurnWorking || promptInbox.prompts.some(isFirstPromptRow)) })), turns.map((turn, turnIndex) => {
|
|
3823
|
+
// Check if this turn is a compaction summary — and
|
|
3824
|
+
// whether it actually PRODUCED one. A failed/aborted
|
|
3825
|
+
// attempt (compaction-flagged, no content, not the
|
|
3826
|
+
// working turn) renders as one slim row, draws no
|
|
3827
|
+
// divider, and stacks tight against a neighbouring
|
|
3828
|
+
// failed attempt.
|
|
3829
|
+
const compaction = turn.compaction;
|
|
3830
|
+
const hasCompaction = compaction !== null;
|
|
3831
|
+
const isTurnWorking = turn.live;
|
|
3832
|
+
// `inFlight` (message state) alongside the projection:
|
|
3833
|
+
// classifying by projection alone flipped a streaming
|
|
3834
|
+
// compaction to "failed" for the frames where the two
|
|
3835
|
+
// disagree, popping the divider in and out — a layout
|
|
3836
|
+
// bounce right where the reader is looking.
|
|
3837
|
+
const isFailedCompaction = compaction !== null &&
|
|
3838
|
+
!compaction.hasContent &&
|
|
3839
|
+
!compaction.inFlight &&
|
|
3840
|
+
!isTurnWorking;
|
|
3841
|
+
// Retries collapse to ONE visible row, GLOBALLY: a
|
|
3842
|
+
// failed attempt with ANY later compaction turn (a
|
|
3843
|
+
// retry, or the one that finally landed) is history —
|
|
3844
|
+
// it keeps its TurnViewport (stable keys, scroll
|
|
3845
|
+
// anchors) but renders no content, and an empty
|
|
3846
|
+
// TurnViewport costs 0px (turn-viewport.tsx RULE 2).
|
|
3847
|
+
// Adjacency was not enough: attempts whose error landed
|
|
3848
|
+
// on a plain assistant message used to interleave as
|
|
3849
|
+
// unclassified turns, breaking every consecutive run.
|
|
3850
|
+
const suppressedFailedCompaction = isFailedCompaction && turnIndex < lastCompactionTurnIndex;
|
|
3851
|
+
// Notification-only early-return removed: it rendered the
|
|
3852
|
+
// user's pty_* card but skipped the turn's replies,
|
|
3853
|
+
// hiding every subsequent assistant response in that turn.
|
|
3854
|
+
// Fall through to the normal turn renderer instead.
|
|
3855
|
+
const confirmedActive = turnIsConfirmedActive({
|
|
3856
|
+
isTurnWorking,
|
|
3857
|
+
turnId: turn.id,
|
|
3858
|
+
activeTurnId,
|
|
3859
|
+
pendingDelivery: !!working.pendingDelivery,
|
|
3860
|
+
});
|
|
3861
|
+
const pendingPrompt = !confirmedActive && turn.assistant.length === 0
|
|
3862
|
+
? pendingPromptsByMessageId.get(turn.id)
|
|
3863
|
+
: undefined;
|
|
3864
|
+
// A queued prompt is not in the runtime transcript yet;
|
|
3865
|
+
// its author still shows (`authorForTurn`).
|
|
3866
|
+
const promptAuthorId = pendingPromptsByMessageId.get(turn.id)?.author_user_id;
|
|
3867
|
+
const turnAuthor = authorForTurn(transcriptAuthors, messageAuthors, turn.id, pendingPrompt?.wire_message_id) ??
|
|
3868
|
+
participantAuthor(sessionParticipants, promptAuthorId) ??
|
|
3869
|
+
(sentHereIds.current.has(turn.id) ||
|
|
3870
|
+
sentHereIds.current.has(turnRenderKeys.get(turn.id) ?? '') ||
|
|
3871
|
+
(viewerId !== undefined && promptAuthorId === viewerId) ||
|
|
3872
|
+
// The first prompt of a session the viewer started,
|
|
3873
|
+
// sent from another surface (project home), before
|
|
3874
|
+
// the first authors read lands.
|
|
3875
|
+
(messageAuthorsLoading &&
|
|
3876
|
+
viewerId !== undefined &&
|
|
3877
|
+
projectSessionRow?.created_by === viewerId &&
|
|
3878
|
+
turn.id === userMessageIds[0])
|
|
3879
|
+
? viewerAsAuthor
|
|
3880
|
+
: undefined);
|
|
3881
|
+
return (_jsx(TranscriptTurnRow
|
|
3882
|
+
// ONE element per prompt: keyed by the id the
|
|
3883
|
+
// bubble was FIRST painted under, so the swap to a
|
|
3884
|
+
// re-minted echo id re-renders this node instead
|
|
3885
|
+
// of mounting a new one (opacity keeps animating,
|
|
3886
|
+
// hover state survives, nothing jumps).
|
|
3887
|
+
, { turnId: turn.id, modelOptions: modelOptions,
|
|
3888
|
+
// An absorbed run turn keeps its viewport (keys, scroll
|
|
3889
|
+
// anchors) and draws nothing: its anchor folds it.
|
|
3890
|
+
suppressed: suppressedFailedCompaction || agentRunLayout.absorbed.has(turn.id), ...agentRunLayout.propsOf(turn.id), continuedWith: harnessSwitches.get(turn.id)?.harness, fullTextState: loaded.state[turn.id] ?? 'idle', onLoadFullText: loadFullTexts, showBusyRow: showFallbackBusyRow &&
|
|
3891
|
+
fallbackBusyRowTurnId === turn.id,
|
|
3892
|
+
// Queued bubbles STACK: a pending turn right after
|
|
3893
|
+
// another pending turn sits close to it, like a
|
|
3894
|
+
// list of what is waiting — not a turn's width
|
|
3895
|
+
// apart as if each had been answered in between.
|
|
3896
|
+
// (Failed compaction rows need no stacking rule any
|
|
3897
|
+
// more — at most one is visible at a time.)
|
|
3898
|
+
viewportClassName: turnIndex === 0 || transcriptRows
|
|
3899
|
+
? ''
|
|
3900
|
+
: // A compaction, the work after it and another agent's notice continue the turn above.
|
|
3901
|
+
turn.compaction || turn.continues || agentNoticeTurnIds.has(turn.id)
|
|
3902
|
+
? 'mt-6'
|
|
3903
|
+
: lastTurnWorking &&
|
|
3904
|
+
pendingTurnIds.has(turn.id) &&
|
|
3905
|
+
pendingTurnIds.has(turns[turnIndex - 1].id)
|
|
3906
|
+
? 'mt-3'
|
|
3907
|
+
: 'mt-12', turn: turn, author: turnAuthor,
|
|
3908
|
+
// Reserve the sender row while the authors load,
|
|
3909
|
+
// for a queued prompt whose sender is known, and
|
|
3910
|
+
// for a live message until its author resolves.
|
|
3911
|
+
showAuthor: !!turnAuthor ||
|
|
3912
|
+
messageAuthorsLoading ||
|
|
3913
|
+
!!promptAuthorId ||
|
|
3914
|
+
(loadedUserIds?.sessionId === sessionId &&
|
|
3915
|
+
!loadedUserIds.ids.has(turn.id) &&
|
|
3916
|
+
authorsGaveUp !== missingAuthors), stoppedBy: stoppedByName(messageAuthors, turn.id, viewerId), servedModel: servedModelOfTurn(modelUsage, turn.id, turns[turnIndex - 1]?.id), turnOutcome: turnOutcome, isLast: turn.id === lastUserMessageId, ownsPlan: turn.id === planAnchorId, sessionId: sessionId, projectId: projectId, projectSessionId: projectSessionId, sessionStatus: sessionStatus, permissions: pendingPermissions, questions: pendingQuestions, agentNames: agentNames, isFirstTurn: turnIndex === 0,
|
|
3917
|
+
// Handed over only once the stand-in has stepped
|
|
3918
|
+
// aside — while it is up it draws these itself.
|
|
3919
|
+
pendingText: turnIndex === 0 ? firstTurnHandover?.text : undefined, pendingAttachments: sentAttachmentsForTurn({
|
|
3920
|
+
sentByMessage: sentAttachmentsByMessage,
|
|
3921
|
+
messageId: turn.id,
|
|
3922
|
+
originId: optimisticOriginOf(sessionId, turn.id),
|
|
3923
|
+
isFirstTurn: turnIndex === 0,
|
|
3924
|
+
firstTurnHandover: firstTurnHandover?.attachments,
|
|
3925
|
+
firstTurnSent: firstPromptAttachments(projectSessionId),
|
|
3926
|
+
queuedRowAttachments: inboxRowsByMessageId.get(turn.id)?.attachments,
|
|
3927
|
+
}), uploadStatus: heldSendFailures?.[turn.id]
|
|
3928
|
+
? {
|
|
3929
|
+
state: 'failed',
|
|
3930
|
+
message: heldSendFailures[turn.id].message,
|
|
3931
|
+
onRetry: () => retryHeldSend(sessionId, turn.id, resendHeldSend, (error) => classifySessionError(error).message),
|
|
3932
|
+
}
|
|
3933
|
+
: turnIndex === 0 && firstTurnHandover?.attachments.length
|
|
3934
|
+
? firstPromptUploadStatus
|
|
3935
|
+
: undefined, sessionWorking: lastTurnWorking, isWorkingTurn: turn.live, suppressBusyIndicator: suppressWorkingTurnBusy, awaitingUser: awaitingUserInput,
|
|
3936
|
+
// An idle send stays in the inbox until delivery,
|
|
3937
|
+
// but nothing runs ahead of it: queued only while
|
|
3938
|
+
// it waits behind a turn (`turnRendersQueued`).
|
|
3939
|
+
// The first turn, with no turn working, has
|
|
3940
|
+
// nothing ahead of it: a session's first prompt is
|
|
3941
|
+
// starting, not queued, while the computer comes up
|
|
3942
|
+
// and before the turn layer marks it queued or live.
|
|
3943
|
+
pending: turnIndex === 0 && workingTurn.workingTurnId === null && !confirmedActive
|
|
3944
|
+
? pendingPrompt?.state === 'waiting' || pendingPrompt?.state === 'failed'
|
|
3945
|
+
: turnRendersQueued({
|
|
3946
|
+
turnId: turn.id,
|
|
3947
|
+
resolution: workingTurn,
|
|
3948
|
+
sessionWorking: lastTurnWorking,
|
|
3949
|
+
confirmedActive,
|
|
3950
|
+
inboxPrompt: pendingPrompt,
|
|
3951
|
+
}), pendingPrompt: pendingPrompt, onRetryQueued: stableRetryQueued, onRemoveQueued: stableRemoveQueued, queuedPromptViewer: queuedPromptViewer, interruptedBeforeRun: interruptedTurnIds.has(turn.id), isCompaction: hasCompaction, onOpenCompactionSummary: panel ? stableOpenCompactionSummary : undefined, onOpenPastedContent: panel ? stableOpenPastedContent : undefined, providers: providers, commandMessages: commandMessagesRef.current, commands: commands, disableToolNavigation: disableToolNavigation, onPermissionReply: stablePermissionReply, onRewind: stableRewind, editingText: rewindTarget?.messageId === turn.id
|
|
3952
|
+
? rewindTarget.text
|
|
3953
|
+
: null, editPending: editSendPending || !!sessionState?.rewindPending, onEditCancel: stableEditCancel, onEditSend: stableEditSend, rewindDisabled: !!readOnly ||
|
|
3954
|
+
(rewindable !== null && !rewindable.has(turn.id)) ||
|
|
3955
|
+
!runtimeCanRewind ||
|
|
3956
|
+
!sessionState ||
|
|
3957
|
+
isBusy ||
|
|
3958
|
+
sessionState.rewindPending ||
|
|
3959
|
+
// The runtime is not idle while queued prompts
|
|
3960
|
+
// are still on their way to it — a rewind mid-
|
|
3961
|
+
// delivery fails downstream with "Session is
|
|
3962
|
+
// busy" (measured); refuse it up front instead.
|
|
3963
|
+
promptInbox.prompts.length > 0 }, turnRenderKeys.get(turn.id)));
|
|
3964
|
+
})] }) }), isOptimisticCompacting && !hasCompactionTurn && (_jsx("div", { className: turns.length > 0 ? 'mt-12' : 'mt-2', children: _jsx(CompactionMarker, { running: true }) })), [
|
|
3965
|
+
...(turnOutcome.recent_failures ?? []),
|
|
3966
|
+
...(turnOutcome.last_ended?.end_reason === 'failed' &&
|
|
3967
|
+
!turnOutcome.recent_failures?.some((failure) => failure.message_id === turnOutcome.last_ended?.message_id)
|
|
3968
|
+
? [turnOutcome.last_ended]
|
|
3969
|
+
: []),
|
|
3970
|
+
].filter((failure) => !isAbortError(failure.error) &&
|
|
3971
|
+
!failureShownByTurn(failure, turns) &&
|
|
3972
|
+
!failureSupersededByTurn(failure, turns) &&
|
|
3973
|
+
(!failure.error?.message || failure.error.message !== commandError?.message)).map((failure) => {
|
|
3974
|
+
const messageId = failure.message_id ?? 'persisted-turn-failure';
|
|
3975
|
+
// Use the SDK's settle window for a cause that may arrive
|
|
3976
|
+
// one frame later, including an unnamed failed last turn.
|
|
3977
|
+
const notice = turnEndNotice({
|
|
3978
|
+
...turnOutcome,
|
|
3979
|
+
recent_failures: [{ ...failure, message_id: messageId, error: failure.error ?? null }],
|
|
3980
|
+
}, messageId, { hasError: false, isAbort: false });
|
|
3981
|
+
return notice ? (_jsx(TurnErrorDisplay, { errorText: notice.kind === 'unexplained'
|
|
3982
|
+
? tHardcodedUi.raw('i18nComplete.text73112526c03a')
|
|
3983
|
+
: persistedFailureText(failure.error), className: "mt-2" }, messageId)) : null;
|
|
3984
|
+
}), commandError && (_jsx(TurnErrorDisplay, { error: commandError, isAbort: isAbortError(commandError.cause), modelOptions: modelOptions, className: "mt-2" })), showFallbackBusyRow && fallbackBusyRowTurnId === null && (rowsContext ? (
|
|
3985
|
+
// A channel thread waits in the agent's answer row.
|
|
3986
|
+
_jsx(AgentBusyRow, { sessionId: sessionId })) : (_jsx(SessionBusyIndicator, { sessionId: sessionId,
|
|
3987
|
+
// Matches the stand-in's row spacing under a bubble
|
|
3988
|
+
// (`OptimisticTurn`), so the crossfade into the real
|
|
3989
|
+
// transcript does not move it. Nothing above it when
|
|
3990
|
+
// the transcript is empty, so no margin there.
|
|
3991
|
+
className: turns.length === 0 ? undefined : 'mt-6' })))] }), _jsx("div", { ref: spacerElRef, "data-scroll-spacer": true })] }) }), selectionPopup && (_jsx("div", { "data-reply-popup": true, className: "absolute z-50", style: {
|
|
3992
|
+
left: `${selectionPopup.x}px`,
|
|
3993
|
+
top: `${selectionPopup.y}px`,
|
|
3994
|
+
transform: 'translate(-50%, -100%)',
|
|
3995
|
+
}, children: _jsxs(Button, { onClick: handleSelectionReply, size: "sm", className: "animate-in fade-in-0 zoom-in-95 duration-normal origin-bottom px-3 text-xs ease-out has-[>svg]:px-3", children: [tHardcodedUi.raw('i18nComplete.textc253f451bdd5'), _jsx(ArrowBendUpLeftIcon, { className: "size-4 shrink-0" })] }) })), transcriptRows ? null : (_jsx(ChatMinimap, { turns: turns, scrollRef: scrollRef, contentRef: contentRef })), _jsx("div", { className: cn('absolute inset-x-0 bottom-4 z-20 flex justify-center', !showScrollButton && 'pointer-events-none'), children: _jsx(Button, { variant: "outline", size: "icon-md", "aria-hidden": !showScrollButton, tabIndex: showScrollButton ? undefined : -1, className: cn('hit-area-2 bg-background hover:bg-muted rounded-full', 'transition-[opacity,scale] ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.96] motion-reduce:scale-100 motion-reduce:transition-opacity', showScrollButton
|
|
3996
|
+
? 'duration-normal scale-100 opacity-100'
|
|
3997
|
+
: 'duration-fast scale-[0.97] opacity-0'), onClick: smoothScrollToAbsoluteBottom, children: _jsx(CaretDownIcon, { className: "size-4" }) }) })] })), readOnly && inputReplacement ? (_jsx("div", { className: cn(COMPOSER_SHELL_CLASS, 'pb-4'), children: inputReplacement })) : null, !readOnly && (_jsxs(_Fragment, { children: [!networkOnline && (_jsx("div", { className: cn(COMPOSER_SHELL_CLASS, 'pb-1.5'), children: _jsx("p", { role: "status", "aria-live": "polite", className: "text-muted-foreground text-xs", children: tQueue('offlineReconnecting') }) })), _jsx(SessionChatInput
|
|
3992
3998
|
// `undefined`, not `true`, once released: the composer's own
|
|
3993
3999
|
// viewport rule (>= 640px) still decides, so this never forces
|
|
3994
4000
|
// focus onto a phone keyboard.
|
|
3995
4001
|
// A thread a space's chat opened by itself does not take the focus (`ComposerAutoFocusContext`).
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
//
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4002
|
+
, {
|
|
4003
|
+
// `undefined`, not `true`, once released: the composer's own
|
|
4004
|
+
// viewport rule (>= 640px) still decides, so this never forces
|
|
4005
|
+
// focus onto a phone keyboard.
|
|
4006
|
+
// A thread a space's chat opened by itself does not take the focus (`ComposerAutoFocusContext`).
|
|
4007
|
+
autoFocus: deferComposerFocus || !composerAutoFocus ? false : undefined, onSend: async (text, files, mentions, attachments, placement) => {
|
|
4008
|
+
if (await queueEdit.save(text))
|
|
4009
|
+
return;
|
|
4010
|
+
// Enter or Cmd/Ctrl+Enter while a turn runs steers it (one delivery mode).
|
|
4011
|
+
await handleSend(text, files, mentions, attachments, composerSendDelivery(placement ?? 'transcript', isBusyRef.current));
|
|
4012
|
+
}, prefill: composerPrefill, onPrefillApplied: (id) => {
|
|
4013
|
+
useSessionComposerPrefillStore.getState().clearPrefill(sessionId, id);
|
|
4014
|
+
},
|
|
4015
|
+
// Up from the first row takes the queue back; the placeholder
|
|
4016
|
+
// says so while there is something to take.
|
|
4017
|
+
onArrowUpAtStart: () => queueEdit.takeBack(),
|
|
4018
|
+
// A host placeholder ("Reply…") is static: the rotating tips would replace it.
|
|
4019
|
+
hint: canTakeBackQueue ? tHardcodedUi.raw('i18nComplete.text03a01dd53ffa') : composerPlaceholder,
|
|
4020
|
+
// Editing a queued message: the send saves it back into the
|
|
4021
|
+
// queue, so the control says Submit, never Stop.
|
|
4022
|
+
submitLabel: queueEdit.editing ? tQueue('submitEdit') : null, draftScope: composerDraftScope, draftActive: !deferComposerFocus, attachRequestId: attachRequestId, isBusy: isBusy,
|
|
4023
|
+
// The ONE projection, not the 300 ms busy fade: it is what
|
|
4024
|
+
// decides whether a `/` command may be dispatched, and a fade
|
|
4025
|
+
// timer that has already lapsed would let one abort a live turn.
|
|
4026
|
+
// `effectiveBusy` folds in optimistic compaction (not a turn, so
|
|
4027
|
+
// not in `working`) and the retrying-turn predicate, so this
|
|
4028
|
+
// site reads one value instead of re-OR-ing a term onto it.
|
|
4029
|
+
sessionWorking: effectiveBusy,
|
|
4030
|
+
// Gates `/` COMMANDS only. A prompt typed at a sleeping box is
|
|
4031
|
+
// an inbox row and goes out when the box answers; a command has
|
|
4032
|
+
// no row, and `runCommand` swallows it silently until the
|
|
4033
|
+
// runtime is switched.
|
|
4034
|
+
runtimeReady: runtimeReady, rewind: composerRewind, onStop: handleStop, canStop: canStop, escCount: escCount, agents: local.agent.list, selectedAgent: composerAgentName, onAgentChange: handleAgentChange, noAccessibleAgents: noAccessibleAgents, commands: chatCommands, commandsResolved: agentCommands !== undefined, slashFiles: chatSlashFiles, onOpenPastedContent: panel ? stableOpenPastedContent : undefined, onCommand: handleCommand, onHoldCommand: handleHoldCommand, models: local.model.list, selectedModel: local.model.currentKey ?? null, onModelChange: handleModelChange, modelDefaultControls: chatModelDefaultControls, inheritedModel: inheritedModelFor(local.model, composerAgentName), variants: local.model.variant.list, selectedVariant: local.model.variant.current ?? null, onVariantChange: handleVariantChange, messages: messages, sessionId: sessionId, projectId: projectId, providers: providers, modelRequired: true, modelsLoading: providersLoading, onContextClick: handleContextClick, onCompactClick: runtimeCanCompact ? handleCompactClick : undefined, quoteRequests: quoteRequests, onQuoteRequestsApplied: handleQuoteRequestsApplied,
|
|
4035
|
+
// Locks while the docked question is answerable — a live
|
|
4036
|
+
// question or a parked ask — see `questionLock` above.
|
|
4037
|
+
lockForQuestion: questionLock,
|
|
4038
|
+
// Same dead-prompt guard as questions: only lock while the agent is
|
|
4039
|
+
// actually paused on the decision (isBusy), so a stale card can't
|
|
4040
|
+
// swallow the composer on an idle session.
|
|
4041
|
+
lockForApproval: runtimePermissionLocksComposer(livePermissions.length, isBusy), onCustomAnswer: handleCustomAnswer, questionButtonLabel: renderedQuestion ? questionAction.label : null, questionActive: !!renderedQuestion || approvalDocked || accessDocked, questionCanAct: questionAction.canAct, onQuestionAction: handleQuestionAction, aboveSlot: chatAboveSlot, inputSlot: chatInputSlot, toolbarSlot: chatToolbarSlot, underbarSlot: chatUnderbarSlot,
|
|
4042
|
+
// The shell can now render on a cached transcript alone, i.e. before
|
|
4043
|
+
// the sandbox answers — so sending has to be gated separately from
|
|
4044
|
+
// reading. See sessionComposerReadiness.
|
|
4045
|
+
notice: hostNotice(composerReadiness.notice, rowsContext?.notices),
|
|
4046
|
+
// Inside the thread panel's bordered box, as the channel composer.
|
|
4047
|
+
// A phone keeps the row under the card; a 720px desktop window does not.
|
|
4048
|
+
underbarPlacement: transcriptRows && !isPhone ? 'inline' : undefined,
|
|
4049
|
+
// The panel's toolbar is narrow: the agent is its tile, the model keeps its name.
|
|
4050
|
+
agentPickerCompact: transcriptRows && !isPhone,
|
|
4051
|
+
// A thread panel's rows run `px-5`, and the channel composer
|
|
4052
|
+
// beside it sits `pb-4` off the window's bottom edge: the same
|
|
4053
|
+
// margins, so the two boxes line up.
|
|
4054
|
+
parentClassName: transcriptRows ? 'max-w-none px-5 pb-4' : undefined, call: composerCall, onNoticeRetry: composerReadiness.notice && composerReadiness.retryable
|
|
4055
|
+
? requestRuntimeReconnect
|
|
4056
|
+
: undefined }), _jsx("div", { className: cn(COMPOSER_SHELL_CLASS, 'pb-3 empty:hidden', transcriptRows && 'max-w-none px-5'), children: _jsx(HeldMessages, { projectId: projectId, sessionId: projectSessionId, live: isServerBusy }) })] }))] })] }) }) }) }) }) }));
|
|
4046
4057
|
}
|