@kortix/ui 0.14.12 → 0.14.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_vendor/kortix-shared.js +521 -7045
- package/dist/_vendor/shared/app-config.d.ts +8 -0
- package/dist/_vendor/shared/artifact-annotations.d.ts +708 -0
- package/dist/_vendor/shared/artifact-comments.d.ts +327 -0
- package/dist/_vendor/shared/index.d.ts +3 -1
- package/dist/_vendor/shared/my-kortix-agent.d.ts +40 -0
- package/dist/_vendor/shared/peer-message-prompt.d.ts +35 -0
- package/dist/_vendor/shared/pixel-mark.d.ts +11 -0
- package/dist/_vendor/shared/prompt-attachments.d.ts +1 -0
- package/dist/_vendor/shared/reminder-prompt.d.ts +8 -2
- package/dist/_vendor/shared/runtime-versions.d.ts +8 -0
- package/dist/artifacts/artifact-frame.d.ts +1 -0
- package/dist/artifacts/artifact-frame.js +18 -5
- package/dist/artifacts/frame-policy.d.ts +1 -1
- package/dist/artifacts/frame-policy.js +10 -5
- package/dist/customize/agents/agent-access-text.d.ts +16 -0
- package/dist/customize/agents/agent-access-text.js +54 -0
- package/dist/customize/agents/agent-approval-rules.d.ts +8 -0
- package/dist/customize/agents/agent-approval-rules.js +26 -0
- package/dist/customize/agents/agent-authority-card.js +4 -1
- package/dist/customize/agents/agent-cover-card.d.ts +4 -1
- package/dist/customize/agents/agent-cover-card.js +2 -2
- package/dist/customize/agents/agent-detail-aside.d.ts +1 -2
- package/dist/customize/agents/agent-detail-aside.js +8 -11
- package/dist/customize/agents/agent-drives-section.d.ts +23 -7
- package/dist/customize/agents/agent-drives-section.js +107 -41
- package/dist/customize/agents/agent-instructions.d.ts +11 -0
- package/dist/customize/agents/agent-instructions.js +114 -0
- package/dist/customize/agents/agent-model-view.d.ts +17 -0
- package/dist/customize/agents/agent-model-view.js +67 -0
- package/dist/customize/agents/agent-overview.d.ts +53 -0
- package/dist/customize/agents/agent-overview.js +242 -0
- package/dist/customize/agents/agent-page-chrome.d.ts +128 -0
- package/dist/customize/agents/agent-page-chrome.js +145 -0
- package/dist/customize/agents/agent-page.d.ts +13 -1
- package/dist/customize/agents/agent-page.js +478 -367
- package/dist/customize/agents/agent-pin-button.d.ts +10 -0
- package/dist/customize/agents/agent-pin-button.js +20 -0
- package/dist/customize/agents/agent-policy-sets-section.d.ts +16 -0
- package/dist/customize/agents/agent-policy-sets-section.js +80 -0
- package/dist/customize/agents/agent-policy-sets.js +1 -1
- package/dist/customize/agents/agent-section-rail.d.ts +21 -0
- package/dist/customize/agents/agent-section-rail.js +23 -0
- package/dist/customize/agents/agent-share-control.d.ts +4 -3
- package/dist/customize/agents/agent-share-control.js +15 -16
- package/dist/customize/agents/{agent-people-section.d.ts → agent-share-dialog.d.ts} +3 -1
- package/dist/customize/agents/{agent-people-section.js → agent-share-dialog.js} +21 -21
- package/dist/customize/agents/agent-tabs.d.ts +95 -0
- package/dist/customize/agents/agent-tabs.js +199 -0
- package/dist/customize/agents/agents-page.d.ts +0 -21
- package/dist/customize/agents/agents-page.js +104 -118
- package/dist/customize/agents/connectors-required.d.ts +16 -0
- package/dist/customize/agents/connectors-required.js +19 -0
- package/dist/customize/agents/create-agent-modal.d.ts +19 -0
- package/dist/customize/agents/create-agent-modal.js +94 -0
- package/dist/customize/connectors/agent-access.d.ts +4 -4
- package/dist/customize/connectors/agent-access.js +7 -10
- package/dist/customize/connectors/connector-identity.d.ts +12 -0
- package/dist/customize/connectors/connector-identity.js +15 -2
- package/dist/customize/connectors/connector-routes.js +2 -2
- package/dist/customize/connectors/connectors-page.d.ts +14 -1
- package/dist/customize/connectors/connectors-page.js +101 -32
- package/dist/customize/connectors/detail/app-page.js +1 -1
- package/dist/customize/connectors/detail/connector-agents.js +0 -3
- package/dist/customize/connectors/detail/connector-page.d.ts +1 -1
- package/dist/customize/connectors/detail/connector-page.js +5 -2
- package/dist/customize/connectors/detail/connector-policy-sets.js +1 -1
- package/dist/customize/connectors/detail/connector-triggers.js +2 -2
- package/dist/customize/connectors/use-agent-access.d.ts +7 -5
- package/dist/customize/connectors/use-agent-access.js +2 -6
- package/dist/customize/models/models-page.d.ts +7 -1
- package/dist/customize/models/models-page.js +2 -2
- package/dist/customize/project-settings/project-admin-sections.d.ts +63 -0
- package/dist/customize/project-settings/project-admin-sections.js +80 -0
- package/dist/customize/project-settings/project-settings-page.d.ts +1 -1
- package/dist/customize/project-settings/project-settings-page.js +4 -13
- package/dist/customize/project-settings/project-settings-sections.d.ts +5 -5
- package/dist/customize/project-settings/project-settings-sections.js +6 -20
- package/dist/customize/providers/provider-accordion.js +29 -17
- package/dist/customize/providers/provider-connect.js +1 -1
- package/dist/customize/providers/provider-sheet.d.ts +4 -1
- package/dist/customize/providers/provider-sheet.js +15 -5
- package/dist/customize/secrets/secrets-page.d.ts +5 -1
- package/dist/customize/secrets/secrets-page.js +2 -2
- package/dist/customize/sections/gateway-view.d.ts +10 -2
- package/dist/customize/sections/gateway-view.js +16 -4
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.d.ts +12 -5
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +131 -8
- package/dist/customize/sections/llm-provider/claude-code-step.d.ts +10 -0
- package/dist/customize/sections/llm-provider/claude-code-step.js +32 -0
- package/dist/customize/sections/llm-provider/models-tab.js +5 -1
- package/dist/customize/sections/view/account-secret-resources-panel.d.ts +5 -3
- package/dist/customize/sections/view/account-secret-resources-panel.js +122 -19
- package/dist/customize/sections/view/agent-editor-access-fields.d.ts +1 -1
- package/dist/customize/sections/view/agent-editor-access-fields.js +8 -4
- package/dist/customize/sections/view/agent-editor-basics-fields.d.ts +4 -1
- package/dist/customize/sections/view/agent-editor-basics-fields.js +33 -4
- package/dist/customize/sections/view/agent-editor-catalog.d.ts +2 -2
- package/dist/customize/sections/view/agent-editor-catalog.js +10 -12
- package/dist/customize/sections/view/agent-editor-primitives.d.ts +1 -1
- package/dist/customize/sections/view/agent-editor-primitives.js +4 -4
- package/dist/customize/sections/view/agent-editor.d.ts +37 -26
- package/dist/customize/sections/view/agent-editor.js +19 -19
- package/dist/customize/sections/view/grant-mode-field.d.ts +8 -20
- package/dist/customize/sections/view/grant-mode-field.js +31 -57
- package/dist/customize/sections/view/permission-editor.d.ts +3 -1
- package/dist/customize/sections/view/permission-editor.js +19 -10
- package/dist/customize/sections/view/review-view.d.ts +8 -0
- package/dist/customize/sections/view/review-view.js +12 -1
- package/dist/customize/sections/view/secret-delivery.js +1 -4
- package/dist/customize/sections/view/secrets-view.d.ts +7 -1
- package/dist/customize/sections/view/secrets-view.js +42 -6
- package/dist/customize/settings/rail.js +2 -8
- package/dist/customize/settings/settings-tabs.d.ts +2 -2
- package/dist/customize/settings/settings-tabs.js +17 -19
- package/dist/customize/settings/tabs/experimental-tab.d.ts +3 -0
- package/dist/customize/settings/tabs/experimental-tab.js +6 -1
- package/dist/customize/settings/tabs/sandbox-tab.d.ts +4 -6
- package/dist/customize/settings/tabs/sandbox-tab.js +9 -9
- package/dist/customize/shared/access-list.d.ts +39 -0
- package/dist/customize/shared/access-list.js +62 -0
- package/dist/customize/shared/agent-resource-scope.d.ts +87 -0
- package/dist/customize/shared/agent-resource-scope.js +123 -0
- package/dist/customize/shared/capability-library.d.ts +41 -0
- package/dist/customize/shared/capability-library.js +271 -0
- package/dist/customize/shared/capability-page-shell.d.ts +18 -1
- package/dist/customize/shared/capability-page-shell.js +21 -1
- package/dist/customize/shared/catalog/catalog-space-tabs.d.ts +14 -0
- package/dist/customize/shared/catalog/catalog-space-tabs.js +20 -0
- package/dist/customize/shared/customize-tab-bar.d.ts +13 -0
- package/dist/customize/shared/customize-tab-bar.js +95 -0
- package/dist/customize/shared/entity/entity-modal.d.ts +17 -1
- package/dist/customize/shared/entity/entity-modal.js +10 -9
- package/dist/customize/shared/leave-guard.d.ts +23 -0
- package/dist/customize/shared/leave-guard.js +87 -0
- package/dist/customize/shared/standalone-settings-nav.js +4 -1
- package/dist/customize/shared/tool-rules.d.ts +11 -0
- package/dist/customize/shared/tool-rules.js +29 -0
- package/dist/customize/skills/builtin-skill-modal.d.ts +6 -0
- package/dist/customize/skills/builtin-skill-modal.js +41 -0
- package/dist/customize/skills/skills-page.d.ts +21 -18
- package/dist/customize/skills/skills-page.js +16 -110
- package/dist/customize/triggers/runtime-triggers.d.ts +17 -0
- package/dist/customize/triggers/runtime-triggers.js +57 -0
- package/dist/customize/triggers/schedule/event-trigger-copy.js +2 -2
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule/schedule-copy.d.ts +11 -6
- package/dist/customize/triggers/schedule/schedule-copy.js +29 -8
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +7 -3
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +26 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +64 -3
- package/dist/customize/triggers/schedule/trigger-composer.js +57 -20
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +18 -5
- package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -0
- package/dist/customize/triggers/schedule/trigger-filter.js +16 -0
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -0
- package/dist/customize/triggers/schedule/trigger-toast.js +2 -1
- package/dist/customize/triggers/schedule/use-trigger-mutations.d.ts +1 -1
- package/dist/customize/triggers/schedule/use-trigger-mutations.js +1 -1
- package/dist/customize/triggers/schedule/when-app.d.ts +15 -0
- package/dist/customize/triggers/schedule/when-app.js +21 -0
- package/dist/customize/triggers/schedule/when-change-request.d.ts +10 -0
- package/dist/customize/triggers/schedule/when-change-request.js +15 -0
- package/dist/customize/triggers/schedule-view.d.ts +17 -3
- package/dist/customize/triggers/schedule-view.js +46 -16
- package/dist/customize/triggers/triggers-page.d.ts +3 -3
- package/dist/customize/triggers/triggers-page.js +2 -2
- package/dist/customize/use-configure-thread.d.ts +8 -2
- package/dist/customize/use-configure-thread.js +30 -18
- package/dist/files/project/components/change-request-detail-dialog.js +2 -3
- package/dist/files/project/components/drive-explorer.js +6 -5
- package/dist/files/project/explorer-source.d.ts +3 -0
- package/dist/files/project/upload-batch.d.ts +3 -3
- package/dist/files/project/upload-batch.js +7 -6
- package/dist/files/runtime/sandbox-explorer-source.js +3 -3
- package/dist/i18n/en.d.ts +1330 -53
- package/dist/i18n/en.js +1422 -145
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +16 -7
- package/dist/internal/auth/auth-primitives.d.ts +1 -3
- package/dist/internal/auth/auth-primitives.js +2 -2
- package/dist/internal/billing/session-cost-format.d.ts +1 -0
- package/dist/internal/billing/session-cost-format.js +11 -0
- package/dist/internal/components/agent-mark.d.ts +12 -1
- package/dist/internal/components/agent-mark.js +34 -11
- package/dist/internal/components/nav-rail.d.ts +22 -0
- package/dist/internal/components/nav-rail.js +16 -0
- package/dist/internal/components/repository-disconnected.js +2 -2
- package/dist/internal/goals/goal-meta.d.ts +15 -1
- package/dist/internal/goals/goal-meta.js +42 -2
- package/dist/internal/hooks/projects/use-agent-config.d.ts +11 -7
- package/dist/internal/hooks/projects/use-agent-config.js +28 -11
- package/dist/internal/hooks/use-slash-focus.d.ts +7 -1
- package/dist/internal/hooks/use-slash-focus.js +9 -3
- package/dist/internal/layout/project-capability-nav.d.ts +24 -0
- package/dist/internal/layout/project-capability-nav.js +86 -0
- package/dist/internal/layout/project-page-header.d.ts +1 -1
- package/dist/internal/layout/project-page-header.js +1 -1
- package/dist/internal/layout/project-settings-nav.d.ts +3 -2
- package/dist/internal/layout/project-settings-nav.js +5 -3
- package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
- package/dist/internal/lib/capability-tab-routes.d.ts +34 -3
- package/dist/internal/lib/capability-tab-routes.js +76 -8
- package/dist/internal/lib/manifest-health.d.ts +10 -0
- package/dist/internal/lib/manifest-health.js +20 -0
- package/dist/internal/lib/pixel-mark.d.ts +4 -1
- package/dist/internal/lib/pixel-mark.js +33 -6
- package/dist/internal/lib/project-actions.d.ts +1 -1
- package/dist/internal/lib/project-actions.js +0 -4
- package/dist/internal/lib/provider-branding.js +2 -0
- package/dist/internal/lib/space-scope.d.ts +29 -0
- package/dist/internal/lib/space-scope.js +28 -0
- package/dist/internal/lib/use-project-feature-flags.js +3 -3
- package/dist/internal/lib/web-notifications.d.ts +74 -8
- package/dist/internal/lib/web-notifications.js +243 -117
- package/dist/internal/notifications/notification-rows.d.ts +14 -7
- package/dist/internal/notifications/notification-rows.js +21 -14
- package/dist/internal/notifications/session-toast-cards.d.ts +2 -2
- package/dist/internal/reminders/reminder-format.d.ts +6 -2
- package/dist/internal/reminders/reminder-format.js +7 -1
- package/dist/internal/stores/active-space-store.d.ts +35 -0
- package/dist/internal/stores/active-space-store.js +29 -0
- package/dist/internal/stores/kortix-computer-store.js +13 -4
- package/dist/internal/stores/pinned-agents-store.d.ts +26 -0
- package/dist/internal/stores/pinned-agents-store.js +20 -0
- package/dist/internal/stores/session-panel-memory-store.js +3 -0
- package/dist/internal/stores/turn-attention-store.d.ts +5 -4
- package/dist/lib/routes.d.ts +16 -1
- package/dist/lib/routes.js +15 -3
- package/dist/markdown/doc-editor/doc-embed.d.ts +31 -0
- package/dist/markdown/doc-editor/doc-embed.js +168 -0
- package/dist/markdown/doc-editor/doc-extensions.d.ts +26 -0
- package/dist/markdown/doc-editor/doc-extensions.js +149 -0
- package/dist/markdown/doc-editor/doc-menus.d.ts +9 -0
- package/dist/markdown/doc-editor/doc-menus.js +56 -0
- package/dist/markdown/doc-editor/markdown.d.ts +12 -0
- package/dist/markdown/doc-editor/markdown.js +140 -0
- package/dist/markdown/genui/components/inline.d.ts +1 -1
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/pixel-kortix-mark.d.ts +5 -4
- package/dist/primitives/pixel-kortix-mark.js +5 -15
- package/dist/primitives/tag.d.ts +1 -1
- package/dist/primitives/textarea.js +14 -0
- package/dist/primitives/toast.d.ts +2 -0
- package/dist/primitives/toast.js +4 -2
- package/dist/providers/ui-provider.d.ts +16 -0
- package/dist/session/actions/session-label.d.ts +1 -1
- package/dist/session/actions/session-label.js +3 -3
- package/dist/session/agents/agent-model.d.ts +92 -0
- package/dist/session/agents/agent-model.js +123 -0
- package/dist/session/agents/agent-state-mark.d.ts +10 -0
- package/dist/session/agents/agent-state-mark.js +22 -0
- package/dist/session/agents/agent-strip.d.ts +58 -0
- package/dist/session/agents/agent-strip.js +259 -0
- package/dist/session/agents/held-messages.d.ts +33 -0
- package/dist/session/agents/held-messages.js +50 -0
- package/dist/session/agents/legacy-subagent-chat.d.ts +11 -0
- package/dist/session/agents/legacy-subagent-chat.js +19 -0
- package/dist/session/agents/session-peek.d.ts +20 -0
- package/dist/session/agents/session-peek.js +67 -0
- package/dist/session/agents/session-prompt.d.ts +13 -0
- package/dist/session/agents/session-prompt.js +18 -0
- package/dist/session/agents/steer-session.d.ts +13 -0
- package/dist/session/agents/steer-session.js +29 -0
- package/dist/session/agents/subagent-dialog-content.d.ts +11 -0
- package/dist/session/agents/subagent-dialog-content.js +115 -0
- package/dist/session/agents/subagent-view.d.ts +8 -0
- package/dist/session/agents/subagent-view.js +18 -0
- package/dist/session/agents/tasks-panel.d.ts +13 -0
- package/dist/session/agents/tasks-panel.js +41 -0
- package/dist/session/agents/workflow-run-controls.d.ts +43 -0
- package/dist/session/agents/workflow-run-controls.js +141 -0
- package/dist/session/composer/ComposerCard.d.ts +1 -1
- package/dist/session/composer/ComposerCard.js +3 -3
- package/dist/session/composer/agent-selector.js +13 -19
- package/dist/session/composer/composer-underbar.d.ts +3 -1
- package/dist/session/composer/composer-underbar.js +2 -2
- package/dist/session/composer/composer.d.ts +5 -0
- package/dist/session/composer/composer.js +16 -10
- package/dist/session/composer/editor/composer-editor.js +19 -8
- package/dist/session/composer/editor/ultracode.d.ts +34 -0
- package/dist/session/composer/editor/ultracode.js +127 -0
- package/dist/session/composer/send-blockers.d.ts +1 -11
- package/dist/session/composer/send-blockers.js +1 -11
- package/dist/session/composer/session-composer-readiness.d.ts +1 -28
- package/dist/session/composer/session-composer-readiness.js +5 -16
- package/dist/session/header/reminder-parts.d.ts +1 -1
- package/dist/session/header/session-site-header.js +6 -3
- package/dist/session/header/subagent-hover-card.d.ts +0 -2
- package/dist/session/header/subagent-hover-card.js +1 -4
- package/dist/session/models/claude-connection-slot.d.ts +11 -0
- package/dist/session/models/claude-connection-slot.js +30 -0
- package/dist/session/models/model-availability.d.ts +3 -1
- package/dist/session/models/model-availability.js +3 -0
- package/dist/session/models/model-selector.js +11 -12
- package/dist/session/models/model-tags.d.ts +9 -0
- package/dist/session/models/model-tags.js +8 -0
- package/dist/session/panel/easy/easy-panel.js +1 -1
- package/dist/session/panel/easy/step-icon.js +5 -1
- package/dist/session/panel/mobile-tool-drawer.js +1 -1
- package/dist/session/panel/session-action-panel-column.js +1 -1
- package/dist/session/panel/session-desktop.js +41 -14
- package/dist/session/panel/session-panel-provider.d.ts +1 -1
- package/dist/session/panel/session-panel-provider.js +7 -11
- package/dist/session/prompts/question-prompt.js +3 -1
- package/dist/session/status/session-error-banner.js +4 -1
- package/dist/session/thread/session-chat.js +286 -296
- package/dist/session/thread/session-context-modal.js +29 -10
- package/dist/session/thread/session-context-spawned-sessions.d.ts +13 -0
- package/dist/session/thread/session-context-spawned-sessions.js +44 -0
- package/dist/session/thread/session-context-sub-sessions.js +3 -8
- package/dist/session/thread/transcript.d.ts +3 -0
- package/dist/session/thread/transcript.js +32 -8
- package/dist/session/tool/shared/full-view-action.d.ts +29 -0
- package/dist/session/tool/shared/full-view-action.js +43 -0
- package/dist/session/tool/tool-part-renderer.js +10 -2
- package/dist/session/tool/tools/agent-message-tool.js +2 -2
- package/dist/session/tool/tools/agent-spawn-tool.js +2 -2
- package/dist/session/tool/tools/agent-status-tool.js +2 -2
- package/dist/session/tool/tools/kortix-action-tool.d.ts +2 -0
- package/dist/session/tool/tools/kortix-action-tool.js +148 -0
- package/dist/session/tool/tools/kortix-tool-card.d.ts +83 -0
- package/dist/session/tool/tools/kortix-tool-card.js +186 -0
- package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +11 -0
- package/dist/session/tool/tools/multi-agent-tool-bodies.js +141 -0
- package/dist/session/tool/tools/multi-agent-tool-data.d.ts +63 -0
- package/dist/session/tool/tools/multi-agent-tool-data.js +118 -0
- package/dist/session/tool/tools/multi-agent-tools.d.ts +9 -0
- package/dist/session/tool/tools/multi-agent-tools.js +38 -0
- package/dist/session/tool/tools/question-tool.js +1 -1
- package/dist/session/tool/tools/register.d.ts +3 -0
- package/dist/session/tool/tools/register.js +3 -0
- package/dist/session/tool/tools/session-spawn-tool.js +2 -2
- package/dist/session/tool/tools/task-tool.d.ts +1 -1
- package/dist/session/tool/tools/task-tool.js +29 -41
- package/dist/session/tool/tools/workflow-progress.d.ts +34 -0
- package/dist/session/tool/tools/workflow-progress.js +186 -0
- package/dist/session/tool/tools/workflow-run.d.ts +128 -0
- package/dist/session/tool/tools/workflow-run.js +251 -0
- package/dist/session/tool/tools/workflow-tool.d.ts +9 -0
- package/dist/session/tool/tools/workflow-tool.js +253 -0
- package/dist/session/turn/notice-batch-group.d.ts +12 -0
- package/dist/session/turn/notice-batch-group.js +17 -0
- package/dist/session/turn/peer-message-row.d.ts +14 -0
- package/dist/session/turn/peer-message-row.js +57 -0
- package/dist/session/turn/subagent-notice-row.d.ts +4 -0
- package/dist/session/turn/subagent-notice-row.js +50 -0
- package/dist/session/turn/subagent-notice.d.ts +58 -0
- package/dist/session/turn/subagent-notice.js +111 -0
- package/dist/session/turn/user-message.js +24 -5
- package/dist/styles/tokens.css +2 -0
- package/dist/styles.css +1 -1
- package/dist/terminal/session-terminal-connect-bar.js +1 -1
- package/dist/workspace/admin/project-admin-dashboard.d.ts +53 -0
- package/dist/workspace/admin/project-admin-dashboard.js +252 -0
- package/dist/workspace/admin/project-admin-nav.d.ts +20 -0
- package/dist/workspace/admin/project-admin-nav.js +41 -0
- package/dist/workspace/home/welcome-body.js +25 -3
- package/dist/workspace/index.d.ts +6 -2
- package/dist/workspace/index.js +12 -2
- package/dist/workspace/layout/new-session-create.js +3 -3
- package/dist/workspace/layout/project-home.js +3 -3
- package/dist/workspace/memory/memory-labels.js +5 -0
- package/dist/workspace/repository-disconnected.js +2 -2
- package/dist/workspace/sessions/board-dispatch.d.ts +52 -0
- package/dist/workspace/sessions/board-dispatch.js +110 -0
- package/dist/workspace/sessions/board-grouping.d.ts +63 -0
- package/dist/workspace/sessions/board-grouping.js +141 -0
- package/dist/workspace/sessions/board-peek.d.ts +15 -0
- package/dist/workspace/sessions/board-peek.js +54 -0
- package/dist/workspace/sessions/board-state-mark.d.ts +15 -0
- package/dist/workspace/sessions/board-state-mark.js +24 -0
- package/dist/workspace/sessions/project-sessions-view.js +42 -31
- package/dist/workspace/sessions/sessions-board.d.ts +12 -0
- package/dist/workspace/sessions/sessions-board.js +214 -0
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +46 -0
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +85 -0
- package/dist/workspace/sidebar/footer/sidebar-alert.js +1 -1
- package/dist/workspace/sidebar/new-agent-modal-provider.d.ts +12 -0
- package/dist/workspace/sidebar/new-agent-modal-provider.js +19 -0
- package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
- package/dist/workspace/sidebar/project-nav-items.js +53 -5
- package/dist/workspace/sidebar/project-session-list.js +35 -12
- package/dist/workspace/sidebar/project-sidebar.js +6 -3
- package/dist/workspace/sidebar/session-filter-menu.js +2 -1
- package/dist/workspace/space/space-blocks.d.ts +25 -0
- package/dist/workspace/space/space-blocks.js +124 -0
- package/dist/workspace/space/space-filter-tabs.d.ts +17 -0
- package/dist/workspace/space/space-filter-tabs.js +31 -0
- package/dist/workspace/space/space-page.d.ts +24 -0
- package/dist/workspace/space/space-page.js +157 -0
- package/dist/workspace/space/space-room.d.ts +20 -0
- package/dist/workspace/space/space-room.js +27 -0
- package/dist/workspace/space/space-tab-menu.d.ts +14 -0
- package/dist/workspace/space/space-tab-menu.js +127 -0
- package/dist/workspace/space/space-tab-panels.d.ts +9 -0
- package/dist/workspace/space/space-tab-panels.js +203 -0
- package/dist/workspace/space/space-templates.d.ts +34 -0
- package/dist/workspace/space/space-templates.js +71 -0
- package/dist/workspace/space/use-space-filter.d.ts +10 -0
- package/dist/workspace/space/use-space-filter.js +40 -0
- package/dist/workspace/space/use-space-manifest.d.ts +8 -0
- package/dist/workspace/space/use-space-manifest.js +27 -0
- package/dist/workspace/spaces/space-timeline.js +2 -2
- package/package.json +56 -53
- package/skills/kortix-ui/SKILL.md +1 -1
- package/skills/kortix-ui/references/custom-dashboard.md +10 -4
- package/skills/kortix-ui/references/modules.md +10 -8
- package/dist/_vendor/shared/meta-agent.d.ts +0 -7
- package/dist/customize/agents/agent-grant-pages.d.ts +0 -37
- package/dist/customize/agents/agent-grant-pages.js +0 -226
- package/dist/customize/agents/agent-triggers-section.d.ts +0 -17
- package/dist/customize/agents/agent-triggers-section.js +0 -109
- package/dist/customize/migrate-to-v2/index.d.ts +0 -5
- package/dist/customize/migrate-to-v2/index.js +0 -5
- package/dist/customize/migrate-to-v2/migration-prompt.d.ts +0 -16
- package/dist/customize/migrate-to-v2/migration-prompt.js +0 -59
- package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +0 -30
- package/dist/customize/migrate-to-v2/upgrade-defs.js +0 -43
- package/dist/customize/migrate-to-v2/upgrade-view.d.ts +0 -32
- package/dist/customize/migrate-to-v2/upgrade-view.js +0 -152
- package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +0 -18
- package/dist/customize/migrate-to-v2/use-run-upgrade.js +0 -16
- package/dist/customize/shared/capability-tabs.d.ts +0 -3
- package/dist/customize/shared/capability-tabs.js +0 -137
- package/dist/customize/skills/skill-scope.d.ts +0 -14
- package/dist/customize/skills/skill-scope.js +0 -18
- package/dist/internal/lib/manifest-version.d.ts +0 -21
- package/dist/internal/lib/manifest-version.js +0 -55
- package/dist/session/composer/hooks/use-composer-escape-stop.d.ts +0 -6
- package/dist/session/composer/hooks/use-composer-escape-stop.js +0 -28
- package/dist/session/thread/sub-session-modal-content.d.ts +0 -8
- package/dist/session/thread/sub-session-modal-content.js +0 -23
- package/dist/session/thread/sub-session-modal.d.ts +0 -2
- package/dist/session/thread/sub-session-modal.js +0 -14
- package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.d.ts +0 -13
- package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +0 -48
|
@@ -9,7 +9,7 @@ import { useSessionWallpaperLayer } from '../panel/session-wallpaper-layer.js';
|
|
|
9
9
|
import { useTranslations } from '../../i18n/index.js';
|
|
10
10
|
import { errorMessageOf, isDeliveredButDisconnected } from '../../internal/lib/delivered-but-disconnected.js';
|
|
11
11
|
import { useQueuedDraftStore, useQueuedDrafts } from '../composer/stores/queued-draft-store.js';
|
|
12
|
-
import { SESSION_LOG_MINOR, SESSION_LOG_SCHEMA, listSessionPrompts,
|
|
12
|
+
import { SESSION_LOG_MINOR, SESSION_LOG_SCHEMA, listSessionPrompts, sessionLogOfV1Rows, sessionLogPromptMessage, sessionLogRetrying, sessionLogTurns, fetchSessionAttachment, sessionLogFullTextPlan, sessionLogHarnessSwitches, sessionLogRestoreNotice, sessionLogWithFullTexts, } from '@kortix/sdk';
|
|
13
13
|
import { useProjectSession, useSessionLogOlder, useSessionLogRecord, useSessionLogThread, useSessionMessageAuthors, useSessionModelUsage, useSessionParticipants, } from '@kortix/sdk/react';
|
|
14
14
|
import { ArrowBendUpLeftIcon, CaretDownIcon, StackIcon as Layers, } from '@phosphor-icons/react';
|
|
15
15
|
import { jumpToOutcome } from '../outcomes/jump-to-outcome.js';
|
|
@@ -39,6 +39,9 @@ import { ProjectFilesProvider } from '../../files/project/context.js';
|
|
|
39
39
|
import { useOptionalSessionPanel } from '../panel/session-panel-provider.js';
|
|
40
40
|
import { COMPOSER_SHELL_CLASS, Composer as SessionChatInput, } from '../composer/composer.js';
|
|
41
41
|
import { ComposerDropZone } from '../composer/composer-drop-zone.js';
|
|
42
|
+
import { AgentsLine } from '../agents/agent-strip.js';
|
|
43
|
+
import { HeldMessages } from '../agents/held-messages.js';
|
|
44
|
+
import { SessionPromptContext } from '../agents/session-prompt.js';
|
|
42
45
|
import { channelRunnableAgents, resolveComposerAgent, withChannelAgents } from '../composer/composer-agent-access.js';
|
|
43
46
|
import { acknowledgeQuoteRequests, } from '../composer/composer-logic.js';
|
|
44
47
|
import { sessionSlashFiles } from '../composer/menus/slash-files.js';
|
|
@@ -349,7 +352,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
349
352
|
// useSessionSync is the SINGLE source of truth for messages (matches OpenCode SolidJS).
|
|
350
353
|
// It fetches on first access, then SSE events keep it up to date.
|
|
351
354
|
// No React Query fallback — prevents stale refetches from overwriting live data.
|
|
352
|
-
// A chat with no `useSession` (a sub-agent's: `
|
|
355
|
+
// A chat with no `useSession` (a sub-agent's: `legacy-subagent-chat`, the `?rs=` route) runs
|
|
353
356
|
// inside the route's session. While that session reads its log (v2: the store holds it),
|
|
354
357
|
// the sub-agent's thread and its older pages are the log's, and no saved copy is read.
|
|
355
358
|
const [scopeProjectId = '', scopeSessionId = ''] = savedHistoryScope?.split('/') ?? [];
|
|
@@ -370,7 +373,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
370
373
|
// failure that needs a retry affordance. Neither is an empty session: a
|
|
371
374
|
// swallowed 503 used to render exactly that, blank and "complete".
|
|
372
375
|
freshness: transcriptFreshness, retryTranscript, } = sessionState ?? localSync;
|
|
373
|
-
// A chat with no `useSession` (a sub-agent's, `
|
|
376
|
+
// A chat with no `useSession` (a sub-agent's, `legacy-subagent-chat`) reads its
|
|
374
377
|
// runtime session's rows through `useSessionSync`: the same `fromV1` view.
|
|
375
378
|
// On v2 that is the fallback while the log does not hold the sub-agent's thread yet.
|
|
376
379
|
const detachedThread = useMemo(() => sessionState || hookMessages.length === 0
|
|
@@ -785,7 +788,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
785
788
|
* turn authority first (`GET .../turn`), the stream second, and this tab's
|
|
786
789
|
* own send receipt only until either of them answers.
|
|
787
790
|
*/
|
|
788
|
-
// A child-session mount (`
|
|
791
|
+
// A child-session mount (`legacy-subagent-chat.tsx` passes no project ids) has
|
|
789
792
|
// no Kortix session row for `/turn` to answer about, so the projection below
|
|
790
793
|
// is disabled and every working read falls back to the raw stream slot —
|
|
791
794
|
// the same split `session-layout.tsx` makes for its busy indicator.
|
|
@@ -3289,6 +3292,10 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
3289
3292
|
}), [panelOutputs, panelContextFiles]);
|
|
3290
3293
|
const sessionScopeAgentName = composerAgentName ?? undefined;
|
|
3291
3294
|
const chatToolbarSlot = useMemo(() => projectId && projectSessionId ? (_jsx(SessionOverridesComposer, { projectId: projectId, sessionId: projectSessionId, selectedAgent: sessionScopeAgentName ?? null })) : undefined, [projectId, projectSessionId, sessionScopeAgentName]);
|
|
3295
|
+
// The agents this session started, as one line in the composer's under-row
|
|
3296
|
+
// (Claude Code's agent panel). It reads its own lists and never holds the composer.
|
|
3297
|
+
const agentsLineCompact = !!transcriptRows && !isPhone;
|
|
3298
|
+
const chatUnderbarSlot = useMemo(() => _jsx(AgentsLine, { projectId: projectId, sessionId: projectSessionId, compact: agentsLineCompact }), [projectId, projectSessionId, agentsLineCompact]);
|
|
3292
3299
|
// The queued messages and the one Resume while a Stop holds the queue: their
|
|
3293
3300
|
// own full-width card above the composer stack, not inside the strip.
|
|
3294
3301
|
const chatAboveSlot = useMemo(() => (_jsx(QueuedPromptList, { rows: heldCommands.length > 0 ? [...queueRows.rows, ...heldCommandRows(heldCommands)] : queueRows.rows, heldCount: queueRows.heldCount, resumePending: resumePending, onResume: () => void handleResumeQueue(), onEdit: (id) => {
|
|
@@ -3385,22 +3392,8 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
3385
3392
|
// its cause attached instead of a shrug. An actionable cause reports to
|
|
3386
3393
|
// Sentry; a routine browser tab discard only leaves a breadcrumb.
|
|
3387
3394
|
useReloadForensics(projectSessionId);
|
|
3388
|
-
// ONE answer for every surface that draws this session's runtime, and the
|
|
3389
|
-
// reason the composer no longer guesses: `unknown` and `connecting` are
|
|
3390
|
-
// waits, and a wait is not a fault. A routine wake says nothing either; only
|
|
3391
|
-
// a parked box with no wake under way earns the asleep notice.
|
|
3392
|
-
const sessionConnection = projectSessionConnection({
|
|
3393
|
-
sandbox: projectSessionRow?.status ?? null,
|
|
3394
|
-
runtimeReady,
|
|
3395
|
-
unreachable: runtimePhase === 'unreachable' || runtimeUnreachable,
|
|
3396
|
-
stalled: runtimeStalled,
|
|
3397
|
-
activityFresh: working.state === 'working' && working.source === 'stream',
|
|
3398
|
-
});
|
|
3399
3395
|
const composerReadiness = sessionComposerReadiness({
|
|
3400
3396
|
runtimeReady,
|
|
3401
|
-
pendingPrompt: allowSendBeforeReady && working.state === 'working',
|
|
3402
|
-
pendingDelivery: working.pendingDelivery,
|
|
3403
|
-
connection: sessionConnection,
|
|
3404
3397
|
// Only an OPEN TURN the control plane is holding counts here. This tab's
|
|
3405
3398
|
// optimistic receipt and a stream frame both survive a box that died
|
|
3406
3399
|
// mid-turn, and a durable inbox row (which the projection also sources to
|
|
@@ -3409,12 +3402,6 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
3409
3402
|
serverTurnLive: serverHoldsOpenTurn(working),
|
|
3410
3403
|
unreachable: runtimePhase === 'unreachable' || runtimeUnreachable,
|
|
3411
3404
|
stalled: runtimeStalled,
|
|
3412
|
-
// The route's `/start` is bringing the computer up (or has not answered):
|
|
3413
|
-
// the same fact the boot pill above the thread shows.
|
|
3414
|
-
starting: !!sessionState &&
|
|
3415
|
-
(sessionState.stage == null ||
|
|
3416
|
-
sessionState.stage === 'provisioning' ||
|
|
3417
|
-
sessionState.stage === 'starting'),
|
|
3418
3405
|
});
|
|
3419
3406
|
// #6509's `promptLikelyDropped` notice is deliberately NOT carried over: it
|
|
3420
3407
|
// instrumented the deleted prompt-observation stall machinery to warn about
|
|
@@ -3480,7 +3467,7 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
3480
3467
|
// about which ref backs a change request.
|
|
3481
3468
|
const outcomesBaseRef = useSessionBaseRef(projectId, projectSessionId);
|
|
3482
3469
|
const searchParams = useUiSearchParams();
|
|
3483
|
-
// `readOnly` is the nested sub-session modal (`
|
|
3470
|
+
// `readOnly` is the nested sub-session modal (`legacy-subagent-chat.tsx`) — it
|
|
3484
3471
|
// shares this component but must not rewrite the parent route's URL.
|
|
3485
3472
|
const [openCrId, setOpenCrIdState] = useState(() => readOnly ? null : (searchParams?.get('cr') ?? null));
|
|
3486
3473
|
const setOpenCrId = useCallback((id) => {
|
|
@@ -3523,6 +3510,9 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
3523
3510
|
// the loader exists to avoid). The connection keeps running in the parent
|
|
3524
3511
|
// ProjectSessionRuntimeConnection, so as soon as the runtime is ready
|
|
3525
3512
|
// isDataLoading flips and the full shell renders in one shot.
|
|
3513
|
+
// A control outside the composer ("Save as workflow" on a workflow card) sends through the
|
|
3514
|
+
// same path as a typed prompt: a running turn is steered, an idle session starts a turn.
|
|
3515
|
+
const sendSessionPrompt = useCallback((text) => handleSend(text, undefined, undefined, undefined, composerSendDelivery('transcript', isBusyRef.current)), [handleSend]);
|
|
3526
3516
|
if (isDataLoading) {
|
|
3527
3517
|
// A transcript read that genuinely FAILED (not a waking box — the SDK keeps
|
|
3528
3518
|
// those on `loading` and retries them itself) gets an explicit retry, not
|
|
@@ -3535,275 +3525,275 @@ export function SessionChat({ sessionId, projectSessionId, sessionState, project
|
|
|
3535
3525
|
}
|
|
3536
3526
|
return (
|
|
3537
3527
|
// A read-only view (the sub-session modal) offers no fix inside a tool card.
|
|
3538
|
-
_jsx(ReadOnlySessionContext.Provider, { value: !!readOnly, children: _jsx(ProjectFilesProvider, { value: { projectId: projectId ?? '', ref: outcomesBaseRef, defaultBranch: outcomesBaseRef }, children: _jsxs(ComposerDropZone, { className: cn('relative flex h-full flex-col',
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
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
|
-
|
|
3528
|
+
_jsx(ReadOnlySessionContext.Provider, { value: !!readOnly, 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',
|
|
3529
|
+
// Transparent in the welcome state so the root-level full-bleed wallpaper
|
|
3530
|
+
// (portaled into SessionLayout) reads through; solid once real content
|
|
3531
|
+
// takes over. Same base color either way, so non-welcome is unchanged.
|
|
3532
|
+
shouldShowWelcomeOverlay ? '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
|
|
3533
|
+
? welcomeWallpaper && createPortal(welcomeWallpaper, wallpaperLayer)
|
|
3534
|
+
: welcomeWallpaper, !hideHeader && (_jsx(SessionSiteHeader, { sessionId: sessionId, sessionTitle: session?.title || 'Untitled', leadingAction: headerLeadingAction, parent: parentCrumb })), _jsx(SessionContextModal, { open: contextModalOpen, onOpenChange: setContextModalOpen,
|
|
3535
|
+
// A chat with no `useSession` source: the raw explorer lists the
|
|
3536
|
+
// rows `useSessionSync` read for it.
|
|
3537
|
+
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: () => {
|
|
3538
|
+
try {
|
|
3539
|
+
if (sessionId)
|
|
3540
|
+
useTabStore.getState().closeTab?.(sessionId);
|
|
3541
|
+
}
|
|
3542
|
+
catch { }
|
|
3543
|
+
}, 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(
|
|
3544
|
+
// overflow-anchor:none — this scroll area does ALL of its own
|
|
3545
|
+
// anchoring (useAutoScroll's spacer + RAF follow, the send-path
|
|
3546
|
+
// turn anchor, and the history-prepend content-space restore in
|
|
3547
|
+
// session-history-scroll.ts). The browser's native scroll
|
|
3548
|
+
// anchoring (default `overflow-anchor: auto`) tries to
|
|
3549
|
+
// compensate for the SAME prepends independently, and the two
|
|
3550
|
+
// corrections stacking is the other half of the scroll-up
|
|
3551
|
+
// teleport: ours restores the reader's position, then the
|
|
3552
|
+
// native one nudges it again.
|
|
3553
|
+
'scrollbar-hide relative z-10 h-full flex-1 overflow-y-auto [scroll-behavior:auto] [overflow-anchor:none]', shouldShowWelcomeOverlay ? 'bg-transparent' : 'bg-background'), onMouseUp: handleChatMouseUp, onMouseDown: handleChatMouseDown, onScroll: handleChatScroll, children: _jsxs("div", { ref: contentRef, role: "log",
|
|
3554
|
+
// Width and gutters live in `SESSION_TRANSCRIPT_CLASS`: the
|
|
3555
|
+
// instant shell draws this same column and the two crossfade
|
|
3556
|
+
// into each other, so a difference here is a sideways jump on
|
|
3557
|
+
// screen, not a style opinion. See session-body.tsx.
|
|
3558
|
+
//
|
|
3559
|
+
// No bottom padding, there or here: the space under the last
|
|
3560
|
+
// message is the auto-scroll spacer's job alone. The `pb-32`
|
|
3561
|
+
// that used to sit here stacked 128px of dead space on top of
|
|
3562
|
+
// it — the "extra inset at the bottom of the session".
|
|
3563
|
+
// Rows run edge to edge: each row owns its gutters and its hover fill.
|
|
3564
|
+
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 &&
|
|
3565
|
+
!olderPullFailed &&
|
|
3566
|
+
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 &&
|
|
3567
|
+
firstPromptSource &&
|
|
3568
|
+
queuedSyntheticMessages.length === 0 &&
|
|
3569
|
+
rowsContext && (
|
|
3570
|
+
// A channel thread draws the stand-in as rows, the same
|
|
3571
|
+
// rows its boot body drew (`ThreadBootRows`).
|
|
3572
|
+
_jsx(PendingPromptRows, { text: buildOptimisticPromptTextWithUploads(firstPromptSource.text, firstPromptSource.files), author: rowsContext.owner, sessionId: sessionId, busy: turns.length === 0 && (lastTurnWorking || promptInbox.prompts.some(isFirstPromptRow)) })), showFirstPromptPreview &&
|
|
3573
|
+
firstPromptSource &&
|
|
3574
|
+
queuedSyntheticMessages.length === 0 &&
|
|
3575
|
+
!rowsContext && (_jsx(OptimisticTurn, { text: buildOptimisticPromptTextWithUploads(firstPromptSource.text, firstPromptSource.files),
|
|
3576
|
+
// Preserve a real failed-send status through the
|
|
3577
|
+
// boot-shell handover without inventing upload progress.
|
|
3578
|
+
// A first prompt held on its uploads carries its own.
|
|
3579
|
+
uploadStatus: firstPromptSource.uploadStatus ?? firstPromptUploadStatus, agentNames: agentNames, onFileClick: openFileInComputer, sessionId: sessionId,
|
|
3580
|
+
// The first item of the conversation, like turn 0, which has no
|
|
3581
|
+
// top margin. `first:mt-0` misses here: the list opens with a
|
|
3582
|
+
// zero-height <header>, so the stand-in sat 44px lower than turn 0
|
|
3583
|
+
// and every swap between the two jumped the bubble (KRTX-2931).
|
|
3584
|
+
className: "mt-0",
|
|
3585
|
+
// An undelivered first prompt is a turn about to start, as the
|
|
3586
|
+
// shell above this chat shows it: busy from the first frame,
|
|
3587
|
+
// before the working projection has read the inbox (KRTX-2931).
|
|
3588
|
+
busy: turns.length === 0 && (lastTurnWorking || promptInbox.prompts.some(isFirstPromptRow)) })), turns.map((turn, turnIndex) => {
|
|
3589
|
+
// Check if this turn is a compaction summary — and
|
|
3590
|
+
// whether it actually PRODUCED one. A failed/aborted
|
|
3591
|
+
// attempt (compaction-flagged, no content, not the
|
|
3592
|
+
// working turn) renders as one slim row, draws no
|
|
3593
|
+
// divider, and stacks tight against a neighbouring
|
|
3594
|
+
// failed attempt.
|
|
3595
|
+
const compaction = turn.compaction;
|
|
3596
|
+
const hasCompaction = compaction !== null;
|
|
3597
|
+
const isTurnWorking = turn.live;
|
|
3598
|
+
// `inFlight` (message state) alongside the projection:
|
|
3599
|
+
// classifying by projection alone flipped a streaming
|
|
3600
|
+
// compaction to "failed" for the frames where the two
|
|
3601
|
+
// disagree, popping the divider in and out — a layout
|
|
3602
|
+
// bounce right where the reader is looking.
|
|
3603
|
+
const isFailedCompaction = compaction !== null &&
|
|
3604
|
+
!compaction.hasContent &&
|
|
3605
|
+
!compaction.inFlight &&
|
|
3606
|
+
!isTurnWorking;
|
|
3607
|
+
// Retries collapse to ONE visible row, GLOBALLY: a
|
|
3608
|
+
// failed attempt with ANY later compaction turn (a
|
|
3609
|
+
// retry, or the one that finally landed) is history —
|
|
3610
|
+
// it keeps its TurnViewport (stable keys, scroll
|
|
3611
|
+
// anchors) but renders no content, and an empty
|
|
3612
|
+
// TurnViewport costs 0px (turn-viewport.tsx RULE 2).
|
|
3613
|
+
// Adjacency was not enough: attempts whose error landed
|
|
3614
|
+
// on a plain assistant message used to interleave as
|
|
3615
|
+
// unclassified turns, breaking every consecutive run.
|
|
3616
|
+
const suppressedFailedCompaction = isFailedCompaction && turnIndex < lastCompactionTurnIndex;
|
|
3617
|
+
// Notification-only early-return removed: it rendered the
|
|
3618
|
+
// user's pty_* card but skipped the turn's replies,
|
|
3619
|
+
// hiding every subsequent assistant response in that turn.
|
|
3620
|
+
// Fall through to the normal turn renderer instead.
|
|
3621
|
+
const confirmedActive = turnIsConfirmedActive({
|
|
3622
|
+
isTurnWorking,
|
|
3623
|
+
turnId: turn.id,
|
|
3624
|
+
activeTurnId,
|
|
3625
|
+
pendingDelivery: !!working.pendingDelivery,
|
|
3626
|
+
});
|
|
3627
|
+
const pendingPrompt = !confirmedActive && turn.assistant.length === 0
|
|
3628
|
+
? pendingPromptsByMessageId.get(turn.id)
|
|
3629
|
+
: undefined;
|
|
3630
|
+
// A queued prompt is not in the runtime transcript yet;
|
|
3631
|
+
// its author still shows (`authorForTurn`).
|
|
3632
|
+
const turnAuthor = authorForTurn(transcriptAuthors, messageAuthors, turn.id, pendingPrompt?.wire_message_id);
|
|
3633
|
+
return (_jsx(TranscriptTurnRow
|
|
3634
|
+
// ONE element per prompt: keyed by the id the
|
|
3635
|
+
// bubble was FIRST painted under, so the swap to a
|
|
3636
|
+
// re-minted echo id re-renders this node instead
|
|
3637
|
+
// of mounting a new one (opacity keeps animating,
|
|
3638
|
+
// hover state survives, nothing jumps).
|
|
3639
|
+
, { turnId: turn.id, modelOptions: modelOptions, suppressed: suppressedFailedCompaction, continuedWith: harnessSwitches.get(turn.id)?.harness, fullTextState: loaded.state[turn.id] ?? 'idle', onLoadFullText: loadFullTexts, showBusyRow: showFallbackBusyRow &&
|
|
3640
|
+
fallbackBusyRowTurnId === turn.id,
|
|
3641
|
+
// Queued bubbles STACK: a pending turn right after
|
|
3642
|
+
// another pending turn sits close to it, like a
|
|
3643
|
+
// list of what is waiting — not a turn's width
|
|
3644
|
+
// apart as if each had been answered in between.
|
|
3645
|
+
// (Failed compaction rows need no stacking rule any
|
|
3646
|
+
// more — at most one is visible at a time.)
|
|
3647
|
+
viewportClassName: turnIndex === 0 || transcriptRows
|
|
3648
|
+
? ''
|
|
3649
|
+
: // A compaction and the work after it continue the turn above.
|
|
3650
|
+
turn.compaction || turn.continues
|
|
3651
|
+
? 'mt-6'
|
|
3652
|
+
: lastTurnWorking &&
|
|
3653
|
+
pendingTurnIds.has(turn.id) &&
|
|
3654
|
+
pendingTurnIds.has(turns[turnIndex - 1].id)
|
|
3655
|
+
? 'mt-3'
|
|
3656
|
+
: 'mt-12', turn: turn, author: turnAuthor, showAuthor: showAuthorName(turnAuthor, groupChat, viewerId), 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,
|
|
3657
|
+
// Handed over only once the stand-in has stepped
|
|
3658
|
+
// aside — while it is up it draws these itself.
|
|
3659
|
+
pendingText: turnIndex === 0 ? firstTurnHandover?.text : undefined, pendingAttachments: sentAttachmentsForTurn({
|
|
3660
|
+
sentByMessage: sentAttachmentsByMessage,
|
|
3661
|
+
messageId: turn.id,
|
|
3662
|
+
originId: optimisticOriginOf(sessionId, turn.id),
|
|
3663
|
+
isFirstTurn: turnIndex === 0,
|
|
3664
|
+
firstTurnHandover: firstTurnHandover?.attachments,
|
|
3665
|
+
firstTurnSent: firstPromptAttachments(projectSessionId),
|
|
3666
|
+
queuedRowAttachments: inboxRowsByMessageId.get(turn.id)?.attachments,
|
|
3667
|
+
}), uploadStatus: heldSendFailures?.[turn.id]
|
|
3668
|
+
? {
|
|
3669
|
+
state: 'failed',
|
|
3670
|
+
message: heldSendFailures[turn.id].message,
|
|
3671
|
+
onRetry: () => retryHeldSend(sessionId, turn.id, resendHeldSend, (error) => classifySessionError(error).message),
|
|
3672
|
+
}
|
|
3673
|
+
: turnIndex === 0 && firstTurnHandover?.attachments.length
|
|
3674
|
+
? firstPromptUploadStatus
|
|
3675
|
+
: undefined, sessionWorking: lastTurnWorking, isWorkingTurn: turn.live, suppressBusyIndicator: suppressWorkingTurnBusy, awaitingUser: awaitingUserInput,
|
|
3676
|
+
// An idle send stays in the inbox until delivery,
|
|
3677
|
+
// but nothing runs ahead of it: queued only while
|
|
3678
|
+
// it waits behind a turn (`turnRendersQueued`).
|
|
3679
|
+
// The first turn, with no turn working, has
|
|
3680
|
+
// nothing ahead of it: a session's first prompt is
|
|
3681
|
+
// starting, not queued, while the computer comes up
|
|
3682
|
+
// and before the turn layer marks it queued or live.
|
|
3683
|
+
pending: turnIndex === 0 && workingTurn.workingTurnId === null && !confirmedActive
|
|
3684
|
+
? pendingPrompt?.state === 'waiting' || pendingPrompt?.state === 'failed'
|
|
3685
|
+
: turnRendersQueued({
|
|
3686
|
+
turnId: turn.id,
|
|
3687
|
+
resolution: workingTurn,
|
|
3688
|
+
sessionWorking: lastTurnWorking,
|
|
3689
|
+
confirmedActive,
|
|
3690
|
+
inboxPrompt: pendingPrompt,
|
|
3691
|
+
}), 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
|
|
3692
|
+
? rewindTarget.text
|
|
3693
|
+
: null, editPending: editSendPending || !!sessionState?.rewindPending, onEditCancel: stableEditCancel, onEditSend: stableEditSend, rewindDisabled: !!readOnly ||
|
|
3694
|
+
(rewindable !== null && !rewindable.has(turn.id)) ||
|
|
3695
|
+
!runtimeCanRewind ||
|
|
3696
|
+
!sessionState ||
|
|
3697
|
+
isBusy ||
|
|
3698
|
+
sessionState.rewindPending ||
|
|
3699
|
+
// The runtime is not idle while queued prompts
|
|
3700
|
+
// are still on their way to it — a rewind mid-
|
|
3701
|
+
// delivery fails downstream with "Session is
|
|
3702
|
+
// busy" (measured); refuse it up front instead.
|
|
3703
|
+
promptInbox.prompts.length > 0 }, turnRenderKeys.get(turn.id)));
|
|
3704
|
+
})] }) }), isOptimisticCompacting && !hasCompactionTurn && (_jsx("div", { className: turns.length > 0 ? 'mt-12' : 'mt-2', children: _jsx(CompactionMarker, { running: true }) })), [
|
|
3705
|
+
...(turnOutcome.recent_failures ?? []),
|
|
3706
|
+
...(turnOutcome.last_ended?.end_reason === 'failed' &&
|
|
3707
|
+
!turnOutcome.recent_failures?.some((failure) => failure.message_id === turnOutcome.last_ended?.message_id)
|
|
3708
|
+
? [turnOutcome.last_ended]
|
|
3709
|
+
: []),
|
|
3710
|
+
].filter((failure) => !isAbortError(failure.error) &&
|
|
3711
|
+
!failureShownByTurn(failure, turns) &&
|
|
3712
|
+
!failureSupersededByTurn(failure, turns) &&
|
|
3713
|
+
(!failure.error?.message || failure.error.message !== commandError?.message)).map((failure) => {
|
|
3714
|
+
const messageId = failure.message_id ?? 'persisted-turn-failure';
|
|
3715
|
+
// Use the SDK's settle window for a cause that may arrive
|
|
3716
|
+
// one frame later, including an unnamed failed last turn.
|
|
3717
|
+
const notice = turnEndNotice({
|
|
3718
|
+
...turnOutcome,
|
|
3719
|
+
recent_failures: [{ ...failure, message_id: messageId, error: failure.error ?? null }],
|
|
3720
|
+
}, messageId, { hasError: false, isAbort: false });
|
|
3721
|
+
return notice ? (_jsx(TurnErrorDisplay, { errorText: notice.kind === 'unexplained'
|
|
3722
|
+
? tHardcodedUi.raw('i18nComplete.text73112526c03a')
|
|
3723
|
+
: persistedFailureText(failure.error), className: "mt-2" }, messageId)) : null;
|
|
3724
|
+
}), commandError && (_jsx(TurnErrorDisplay, { error: commandError, isAbort: isAbortError(commandError.cause), modelOptions: modelOptions, className: "mt-2" })), showFallbackBusyRow && fallbackBusyRowTurnId === null && (rowsContext ? (
|
|
3725
|
+
// A channel thread waits in the agent's answer row.
|
|
3726
|
+
_jsx(AgentBusyRow, { sessionId: sessionId })) : (_jsx(SessionBusyIndicator, { sessionId: sessionId,
|
|
3727
|
+
// Matches the stand-in's row spacing under a bubble
|
|
3728
|
+
// (`OptimisticTurn`), so the crossfade into the real
|
|
3729
|
+
// transcript does not move it. Nothing above it when
|
|
3730
|
+
// the transcript is empty, so no margin there.
|
|
3731
|
+
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: {
|
|
3732
|
+
left: `${selectionPopup.x}px`,
|
|
3733
|
+
top: `${selectionPopup.y}px`,
|
|
3734
|
+
transform: 'translate(-50%, -100%)',
|
|
3735
|
+
}, 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
|
|
3736
|
+
? 'duration-normal scale-100 opacity-100'
|
|
3737
|
+
: '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: [_jsx(SessionChatInput
|
|
3738
|
+
// `undefined`, not `true`, once released: the composer's own
|
|
3739
|
+
// viewport rule (>= 640px) still decides, so this never forces
|
|
3740
|
+
// focus onto a phone keyboard.
|
|
3741
|
+
, {
|
|
3742
|
+
// `undefined`, not `true`, once released: the composer's own
|
|
3743
|
+
// viewport rule (>= 640px) still decides, so this never forces
|
|
3744
|
+
// focus onto a phone keyboard.
|
|
3745
|
+
autoFocus: deferComposerFocus ? false : undefined, onSend: async (text, files, mentions, attachments, placement) => {
|
|
3746
|
+
if (await queueEdit.save(text))
|
|
3747
|
+
return;
|
|
3748
|
+
// Enter while a turn runs steers it (D9.1); Cmd/Ctrl+Enter is Queue List.
|
|
3749
|
+
await handleSend(text, files, mentions, attachments, composerSendDelivery(placement ?? 'transcript', isBusyRef.current));
|
|
3750
|
+
}, prefill: composerPrefill, onPrefillApplied: (id) => {
|
|
3751
|
+
useSessionComposerPrefillStore.getState().clearPrefill(sessionId, id);
|
|
3752
|
+
},
|
|
3753
|
+
// Up from the first row takes the queue back; the placeholder
|
|
3754
|
+
// says so while there is something to take.
|
|
3755
|
+
onArrowUpAtStart: () => queueEdit.takeBack(),
|
|
3756
|
+
// A host placeholder ("Reply…") is static: the rotating tips would replace it.
|
|
3757
|
+
hint: canTakeBackQueue ? tHardcodedUi.raw('i18nComplete.text03a01dd53ffa') : composerPlaceholder,
|
|
3758
|
+
// Editing a queued message: the send saves it back into the
|
|
3759
|
+
// queue, so the control says Submit, never Stop.
|
|
3760
|
+
submitLabel: queueEdit.editing ? tQueue('submitEdit') : null, draftScope: composerDraftScope, draftActive: !deferComposerFocus, attachRequestId: attachRequestId, isBusy: isBusy,
|
|
3761
|
+
// The ONE projection, not the 300 ms busy fade: it is what
|
|
3762
|
+
// decides whether a `/` command may be dispatched, and a fade
|
|
3763
|
+
// timer that has already lapsed would let one abort a live turn.
|
|
3764
|
+
// `effectiveBusy` folds in optimistic compaction (not a turn, so
|
|
3765
|
+
// not in `working`) and the retrying-turn predicate, so this
|
|
3766
|
+
// site reads one value instead of re-OR-ing a term onto it.
|
|
3767
|
+
sessionWorking: effectiveBusy,
|
|
3768
|
+
// Gates `/` COMMANDS only. A prompt typed at a sleeping box is
|
|
3769
|
+
// an inbox row and goes out when the box answers; a command has
|
|
3770
|
+
// no row, and `runCommand` swallows it silently until the
|
|
3771
|
+
// runtime is switched.
|
|
3772
|
+
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, 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,
|
|
3773
|
+
// Only lock the input into question-answer mode while the session is
|
|
3774
|
+
// actually busy (a live question keeps the run busy). If a question
|
|
3775
|
+
// chip is ever showing while the session is idle — e.g. a dead /
|
|
3776
|
+
// abandoned question the agent left behind — the input stays unlocked
|
|
3777
|
+
// so a typed message is sent to the agent instead of being swallowed
|
|
3778
|
+
// as a custom answer.
|
|
3779
|
+
lockForQuestion: !!renderedQuestion && isBusy,
|
|
3780
|
+
// Same dead-prompt guard as questions: only lock while the agent is
|
|
3781
|
+
// actually paused on the decision (isBusy), so a stale card can't
|
|
3782
|
+
// swallow the composer on an idle session.
|
|
3783
|
+
lockForApproval: runtimePermissionLocksComposer(pendingPermissions.length, isBusy), onCustomAnswer: handleCustomAnswer, questionButtonLabel: renderedQuestion ? questionAction.label : null, questionActive: !!renderedQuestion || approvalDocked, questionCanAct: questionAction.canAct, onQuestionAction: handleQuestionAction, aboveSlot: chatAboveSlot, inputSlot: chatInputSlot, toolbarSlot: chatToolbarSlot, underbarSlot: chatUnderbarSlot,
|
|
3784
|
+
// The shell can now render on a cached transcript alone, i.e. before
|
|
3785
|
+
// the sandbox answers — so sending has to be gated separately from
|
|
3786
|
+
// reading. See sessionComposerReadiness.
|
|
3787
|
+
notice: hostNotice(composerReadiness.notice, rowsContext?.notices),
|
|
3788
|
+
// Inside the thread panel's bordered box, as the channel composer.
|
|
3789
|
+
// A phone keeps the row under the card; a 720px desktop window does not.
|
|
3790
|
+
underbarPlacement: transcriptRows && !isPhone ? 'inline' : undefined,
|
|
3791
|
+
// The panel's toolbar is narrow: the agent is its tile, the model keeps its name.
|
|
3792
|
+
agentPickerCompact: transcriptRows && !isPhone,
|
|
3793
|
+
// A thread panel's rows run `px-5`, and the channel composer
|
|
3794
|
+
// beside it sits `pb-4` off the window's bottom edge: the same
|
|
3795
|
+
// margins, so the two boxes line up.
|
|
3796
|
+
parentClassName: transcriptRows ? 'max-w-none px-5 pb-4' : undefined, onNoticeRetry: composerReadiness.notice && composerReadiness.retryable
|
|
3797
|
+
? requestRuntimeReconnect
|
|
3798
|
+
: 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 }) })] }))] })] }) }) }) }));
|
|
3809
3799
|
}
|