@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
|
@@ -26,17 +26,7 @@ import type { UiTranslator } from '../../i18n/index.js';
|
|
|
26
26
|
*
|
|
27
27
|
* Two gates from the old set are deliberately NOT here:
|
|
28
28
|
*
|
|
29
|
-
* - `revertStaged`.
|
|
30
|
-
* the user had asked to discard. There is no auto-drain, and a staged
|
|
31
|
-
* revert is precisely the state in which the user types their REPLACEMENT
|
|
32
|
-
* prompt — refusing it would make edit-and-resend impossible. The
|
|
33
|
-
* replacement prompt IS what commits the revert: OpenCode truncates on the
|
|
34
|
-
* next delivery, from any producer. The server's own guard
|
|
35
|
-
* (`queuedContinueHasStagedRevert`,
|
|
36
|
-
* `apps/api/src/projects/session-lifecycle/engine.ts`) lets a prompt that
|
|
37
|
-
* never waited commit the revert for that reason, and refuses the rows that
|
|
38
|
-
* queued BEFORE it — for every client, which a gate in this tab could never
|
|
39
|
-
* do.
|
|
29
|
+
* - `revertStaged`. No runtime stages a revert: pi answers rewind `501`.
|
|
40
30
|
* - `isServerBusy`, for a PROMPT. That is the inbox's decision now.
|
|
41
31
|
* - `runtimeReady`, for a PROMPT. A prompt typed at a sleeping box becomes an
|
|
42
32
|
* inbox row and is delivered when the box answers. A COMMAND cannot: see
|
|
@@ -25,17 +25,7 @@
|
|
|
25
25
|
*
|
|
26
26
|
* Two gates from the old set are deliberately NOT here:
|
|
27
27
|
*
|
|
28
|
-
* - `revertStaged`.
|
|
29
|
-
* the user had asked to discard. There is no auto-drain, and a staged
|
|
30
|
-
* revert is precisely the state in which the user types their REPLACEMENT
|
|
31
|
-
* prompt — refusing it would make edit-and-resend impossible. The
|
|
32
|
-
* replacement prompt IS what commits the revert: OpenCode truncates on the
|
|
33
|
-
* next delivery, from any producer. The server's own guard
|
|
34
|
-
* (`queuedContinueHasStagedRevert`,
|
|
35
|
-
* `apps/api/src/projects/session-lifecycle/engine.ts`) lets a prompt that
|
|
36
|
-
* never waited commit the revert for that reason, and refuses the rows that
|
|
37
|
-
* queued BEFORE it — for every client, which a gate in this tab could never
|
|
38
|
-
* do.
|
|
28
|
+
* - `revertStaged`. No runtime stages a revert: pi answers rewind `501`.
|
|
39
29
|
* - `isServerBusy`, for a PROMPT. That is the inbox's decision now.
|
|
40
30
|
* - `runtimeReady`, for a PROMPT. A prompt typed at a sleeping box becomes an
|
|
41
31
|
* inbox row and is delivered when the box answers. A COMMAND cannot: see
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
* — the composer stays usable, and this module's job shrinks to one thing:
|
|
27
27
|
* saying what is going on.
|
|
28
28
|
*/
|
|
29
|
-
import { type SessionConnection } from '@kortix/sdk';
|
|
30
29
|
export interface SessionComposerReadiness {
|
|
31
30
|
/** The runtime is up. False means a submit becomes a queued inbox row rather
|
|
32
31
|
* than a delivery. */
|
|
@@ -86,11 +85,6 @@ export declare function serverHoldsOpenTurn(working: {
|
|
|
86
85
|
}): boolean;
|
|
87
86
|
export declare function sessionComposerReadiness(input: {
|
|
88
87
|
runtimeReady: boolean;
|
|
89
|
-
/** A prompt sent from this page is waiting for the computer. Its turn
|
|
90
|
-
* already shows it working; do not ask for another message. */
|
|
91
|
-
pendingPrompt?: boolean;
|
|
92
|
-
/** A queued status already describes this send; do not ask for another. */
|
|
93
|
-
pendingDelivery?: boolean;
|
|
94
88
|
/**
|
|
95
89
|
* The CONTROL PLANE holds an open turn for this session right now — pass
|
|
96
90
|
* `serverHoldsOpenTurn(working)`, never `working.source === 'server'`.
|
|
@@ -115,27 +109,6 @@ export declare function sessionComposerReadiness(input: {
|
|
|
115
109
|
* "indistinguishable from stuck" failure this module exists to prevent.
|
|
116
110
|
*/
|
|
117
111
|
stalled?: boolean;
|
|
118
|
-
/**
|
|
119
|
-
* This page's own `/start` is bringing the computer up: its stage is
|
|
120
|
-
* `provisioning` or `starting`, or it has not answered yet. A stopped
|
|
121
|
-
* computer is then WAKING, not idle, and the composer must not claim the
|
|
122
|
-
* next message is what wakes it.
|
|
123
|
-
*/
|
|
124
|
-
starting?: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* The shared connection projection (`projectSessionConnection`).
|
|
127
|
-
*
|
|
128
|
-
* This is what replaced a settle TIMER here. The timer was the same mistake
|
|
129
|
-
* this module keeps having to unlearn: it guessed how long to stay quiet
|
|
130
|
-
* instead of asking whether anything was actually wrong, so it was always
|
|
131
|
-
* either too short (the notice flashed over a live session) or too long (a
|
|
132
|
-
* genuinely parked box announced itself late).
|
|
133
|
-
*
|
|
134
|
-
* `unknown` and `connecting` are WAITS. Only `waking` with no wake under
|
|
135
|
-
* way — the control plane saying the box is down, and nothing bringing it
|
|
136
|
-
* up — earns a notice: the asleep one.
|
|
137
|
-
*/
|
|
138
|
-
connection?: SessionConnection;
|
|
139
112
|
}): SessionComposerReadiness;
|
|
140
113
|
/**
|
|
141
114
|
* The last turn's shimmer, decided once in `SessionChat` and passed down to
|
|
@@ -145,7 +118,7 @@ export declare function sessionComposerReadiness(input: {
|
|
|
145
118
|
* `GET .../turn`), already delay-hidden 300ms by the caller — never the raw
|
|
146
119
|
* SSE slot, which this tab can miss frames from: a dropped end-of-turn frame
|
|
147
120
|
* latched the slot busy and shimmered a finished answer until reload. A
|
|
148
|
-
* transient sub-session (`
|
|
121
|
+
* transient sub-session (`legacy-subagent-chat.tsx` mounts `SessionChat` with no
|
|
149
122
|
* `projectSessionId`) has no Kortix session row for `/turn` to answer about,
|
|
150
123
|
* so it keeps the raw slot — the same split `session-layout.tsx` makes for
|
|
151
124
|
* its busy indicator. A non-last turn is NEVER working: that is a fact about
|
|
@@ -92,22 +92,11 @@ export function sessionComposerReadiness(input) {
|
|
|
92
92
|
retryable: true,
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
// A PARKED / idle box: the control plane says the sandbox is not up, and
|
|
97
|
-
// nothing is actively booting — a genuine boot-stall is caught by `stalled`
|
|
98
|
-
// above, and the SDK no longer arms the stall clock for a parked box
|
|
99
|
-
// (`setOpenCodeHealth({ parked })`), so this never escalates to an infinite
|
|
100
|
-
// "taking longer than usual" spinner. The box resumes on the next SEND, so
|
|
101
|
-
// say exactly that: an honest idle state (RC-3). A wake already under way
|
|
102
|
-
// says nothing: opening the session wakes its computer in the background,
|
|
103
|
-
// and a send goes out as soon as it is up.
|
|
104
|
-
const waking = input.pendingPrompt || input.pendingDelivery || input.starting;
|
|
105
|
-
return { ready: false, notice: waking ? null : SESSION_NOTICE.idle, retryable: false };
|
|
106
|
-
}
|
|
107
|
-
// A wait is not a fault, and a routine wake is silent: `unknown` means
|
|
95
|
+
// A wait is not a fault, and sleep and wake are silent: `unknown` means
|
|
108
96
|
// nothing has answered, `connecting` that the box is up and the runtime has
|
|
109
|
-
// not reached us yet, and
|
|
110
|
-
//
|
|
97
|
+
// not reached us yet, and `waking` that the box is parked or coming up. A
|
|
98
|
+
// parked box wakes on the next send, so the user never needs to know it
|
|
99
|
+
// slept. A wake that goes wrong speaks through `stalled` or
|
|
111
100
|
// `unreachable` above.
|
|
112
101
|
return { ready: false, notice: null, retryable: false };
|
|
113
102
|
}
|
|
@@ -119,7 +108,7 @@ export function sessionComposerReadiness(input) {
|
|
|
119
108
|
* `GET .../turn`), already delay-hidden 300ms by the caller — never the raw
|
|
120
109
|
* SSE slot, which this tab can miss frames from: a dropped end-of-turn frame
|
|
121
110
|
* latched the slot busy and shimmered a finished answer until reload. A
|
|
122
|
-
* transient sub-session (`
|
|
111
|
+
* transient sub-session (`legacy-subagent-chat.tsx` mounts `SessionChat` with no
|
|
123
112
|
* `projectSessionId`) has no Kortix session row for `/turn` to answer about,
|
|
124
113
|
* so it keeps the raw slot — the same split `session-layout.tsx` makes for
|
|
125
114
|
* its busy indicator. A non-last turn is NEVER working: that is a fact about
|
|
@@ -22,7 +22,7 @@ export declare function useReminderView(now: number): (reminder: SessionReminder
|
|
|
22
22
|
nextAt: number;
|
|
23
23
|
countdown: [string, string | null];
|
|
24
24
|
share: number | null;
|
|
25
|
-
tone: "
|
|
25
|
+
tone: "red" | "purple";
|
|
26
26
|
pauseLabel: string;
|
|
27
27
|
schedule: string;
|
|
28
28
|
meta: string;
|
|
@@ -25,7 +25,8 @@ import { SessionPendingApprovalsIndicator } from './session-pending-approvals-in
|
|
|
25
25
|
import { SessionGoalIndicator } from './session-goal-indicator.js';
|
|
26
26
|
import { SessionRemindersIndicator } from './session-reminders-indicator.js';
|
|
27
27
|
import { SessionTitleInput } from './session-title-input.js';
|
|
28
|
-
import {
|
|
28
|
+
import { subagentTitle } from '../agents/agent-model.js';
|
|
29
|
+
import { SubagentHoverCard } from './subagent-hover-card.js';
|
|
29
30
|
import { Copy } from '../../icons/copy.js';
|
|
30
31
|
import { Home } from '../../internal/icons/home.js';
|
|
31
32
|
import { openSessionQuickView } from '../panel/open-session-quick-view.js';
|
|
@@ -41,7 +42,7 @@ import { cn } from '../../lib/utils.js';
|
|
|
41
42
|
import { useSessionHistoryViewStore } from '../../internal/stores/session-history-view-store.js';
|
|
42
43
|
import { useIsActionPanelOpen, useReadyChip, useToggleActionPanel, } from '../../internal/stores/kortix-computer-store.js';
|
|
43
44
|
import { createProjectSession, directSubsessions, restartProjectSession, stopProjectSession } from '@kortix/sdk';
|
|
44
|
-
import { qk, useProjectSession, useRuntimeSupports, useSessionParticipants, useSessionWatch, } from '@kortix/sdk/react';
|
|
45
|
+
import { qk, useHasSessionDesktop, useProjectSession, useRuntimeSupports, useSessionParticipants, useSessionWatch, } from '@kortix/sdk/react';
|
|
45
46
|
import { ArchiveIcon, ArrowsClockwiseIcon, BellIcon, BellSlashIcon, CaretDoubleLeftIcon, GitForkIcon, LinkSimpleIcon, CaretDownIcon, CodeSimpleIcon as Code2, FileArrowDownIcon as FileDown, FolderSimpleIcon, GlobeSimpleIcon, MonitorIcon, StackIcon as Layers, PencilSimpleIcon, PushPinIcon, PushPinSlashIcon, ArrowCounterClockwiseIcon as RotateCcw, ShareIcon as Share, SquareIcon as Square, TerminalIcon, TrashIcon, } from '@phosphor-icons/react';
|
|
46
47
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
47
48
|
import { useMemo, useRef, useState } from 'react';
|
|
@@ -64,7 +65,9 @@ export function SessionSiteHeader({ sessionId, sessionTitle, isMobileView, leadi
|
|
|
64
65
|
const localizedDevTools = useLocalizedUiCatalog(DEV_TOOLS);
|
|
65
66
|
// A host that cannot reach the pty WebSocket turns the terminal off (`config.terminalEnabled`).
|
|
66
67
|
const { terminalEnabled } = useUiHostConfig();
|
|
67
|
-
|
|
68
|
+
// A template on a base other than Ubuntu 24.04, or an old image, has no desktop.
|
|
69
|
+
const hasDesktop = useHasSessionDesktop() === true;
|
|
70
|
+
const devTools = useMemo(() => localizedDevTools.filter((tool) => (tool.view !== 'terminal' || terminalEnabled) && (tool.view !== 'desktop' || hasDesktop)), [localizedDevTools, terminalEnabled, hasDesktop]);
|
|
68
71
|
const router = useUiRouter();
|
|
69
72
|
const pathname = useUiPathname();
|
|
70
73
|
const queryClient = useQueryClient();
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { ProjectRuntimeSession } from '@kortix/sdk';
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
|
-
/** A subsession's own title, without OpenCode's "(@general subagent)" suffix. */
|
|
4
|
-
export declare function subagentTitle(title: string): string;
|
|
5
3
|
/**
|
|
6
4
|
* The parent session's title, on hover: the subagent sessions it spawned.
|
|
7
5
|
*
|
|
@@ -9,11 +9,8 @@ import { shortRelative } from '../actions/project-session-list-helpers.js';
|
|
|
9
9
|
import { useTranslations } from '../../i18n/index.js';
|
|
10
10
|
import { formatDistanceToNowStrict } from 'date-fns';
|
|
11
11
|
import { useState } from 'react';
|
|
12
|
+
import { subagentTitle } from '../agents/agent-model.js';
|
|
12
13
|
import { childSessionHref } from '../tool/tools/session-spawn-urls.js';
|
|
13
|
-
/** A subsession's own title, without OpenCode's "(@general subagent)" suffix. */
|
|
14
|
-
export function subagentTitle(title) {
|
|
15
|
-
return title.replace(/\s*\(@[^)]*subagent\)$/, '');
|
|
16
|
-
}
|
|
17
14
|
/**
|
|
18
15
|
* The parent session's title, on hover: the subagent sessions it spawned.
|
|
19
16
|
*
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Which Claude fix a failed turn needs, from the error text, if any. */
|
|
2
|
+
export declare function claudeConnectionAction(text: string | null | undefined): 'connect' | 'reconnect' | null;
|
|
3
|
+
/**
|
|
4
|
+
* The fix for a turn that failed on the viewer's Claude login: the provider
|
|
5
|
+
* list (Customize → Models → Providers), where Anthropic signs in with Claude,
|
|
6
|
+
* as every other subscription does. Renders on a project route only.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ClaudeConnectionSlot({ action, className }: {
|
|
9
|
+
action: 'connect' | 'reconnect';
|
|
10
|
+
className?: string;
|
|
11
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Button } from '../../primitives/button.js';
|
|
4
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
5
|
+
import { useModelConnectionGate } from './use-model-connection-gate.js';
|
|
6
|
+
/** The turn error kortixd writes when the session user has no Claude login (`CLAUDE_CONNECT_MESSAGE`). */
|
|
7
|
+
const CLAUDE_CONNECT_MESSAGE = 'Connect your Claude subscription to use Claude models.';
|
|
8
|
+
/** The turn error kortixd writes when Anthropic refused the stored login (`CLAUDE_RECONNECT_MESSAGE`). */
|
|
9
|
+
const CLAUDE_RECONNECT_MESSAGE = 'Your Claude subscription login stopped working. Reconnect Claude to continue.';
|
|
10
|
+
/** Which Claude fix a failed turn needs, from the error text, if any. */
|
|
11
|
+
export function claudeConnectionAction(text) {
|
|
12
|
+
const value = (text ?? '').trim();
|
|
13
|
+
if (value.includes(CLAUDE_CONNECT_MESSAGE))
|
|
14
|
+
return 'connect';
|
|
15
|
+
if (value.includes(CLAUDE_RECONNECT_MESSAGE))
|
|
16
|
+
return 'reconnect';
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The fix for a turn that failed on the viewer's Claude login: the provider
|
|
21
|
+
* list (Customize → Models → Providers), where Anthropic signs in with Claude,
|
|
22
|
+
* as every other subscription does. Renders on a project route only.
|
|
23
|
+
*/
|
|
24
|
+
export function ClaudeConnectionSlot({ action, className = 'mt-2 pl-7' }) {
|
|
25
|
+
const t = useTranslations('claudeSubscription');
|
|
26
|
+
const { canConnectProvider, openConnectProvider, modal } = useModelConnectionGate();
|
|
27
|
+
if (!canConnectProvider)
|
|
28
|
+
return null;
|
|
29
|
+
return (_jsxs("div", { className: className, children: [modal, _jsx(Button, { size: "sm", className: "active:scale-[0.96]", onClick: () => openConnectProvider('providers'), children: t(action === 'reconnect' ? 'reconnectClaude' : 'connectClaude') })] }));
|
|
30
|
+
}
|
|
@@ -21,9 +21,11 @@ export declare function unavailableModelConnection(model: {
|
|
|
21
21
|
enabled?: boolean;
|
|
22
22
|
available?: boolean;
|
|
23
23
|
availability?: 'login' | 'provider';
|
|
24
|
+
providerID?: string;
|
|
25
|
+
provider?: string | null;
|
|
24
26
|
}, options: {
|
|
25
27
|
chatGptAvailable: boolean;
|
|
26
|
-
}): 'chatgpt' | 'provider' | null;
|
|
28
|
+
}): 'chatgpt' | 'claude' | 'provider' | null;
|
|
27
29
|
export declare function resolveAvailableSelectedModel(selectedModel: ModelKey | null | undefined, isSelectableModel: (model: ModelKey) => boolean): ModelKey | null;
|
|
28
30
|
/**
|
|
29
31
|
* The name of the selected model when it cannot read an attached image, else null.
|
|
@@ -18,6 +18,9 @@ export function isRunnableModel(model) {
|
|
|
18
18
|
export function unavailableModelConnection(model, options) {
|
|
19
19
|
if (model.available !== false)
|
|
20
20
|
return null;
|
|
21
|
+
// A Claude subscription model needs the caller's own Claude login, never a project provider.
|
|
22
|
+
if (model.providerID === 'claude-agent' || model.provider === 'claude-agent')
|
|
23
|
+
return 'claude';
|
|
21
24
|
return model.availability === 'login' && options.chatGptAvailable ? 'chatgpt' : 'provider';
|
|
22
25
|
}
|
|
23
26
|
export function resolveAvailableSelectedModel(selectedModel, isSelectableModel) {
|
|
@@ -14,10 +14,10 @@ import { useSessionIds } from '../../providers/session-ids.js';
|
|
|
14
14
|
import { useUiComponents } from '../../providers/ui-provider.js';
|
|
15
15
|
import { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
|
|
16
16
|
import { ModelSearchEmpty } from './model-search-empty.js';
|
|
17
|
-
import {
|
|
17
|
+
import { resolveAvailableSelectedModel, unavailableModelConnection, } from './model-availability.js';
|
|
18
18
|
import { isPickerGroupOpen, modelItemValue, pickerGroupId, pickerGroupLabel, buildPickerSections, splitModelLabel, } from './model-grouping.js';
|
|
19
19
|
import { modelInDefaultView } from '@kortix/sdk';
|
|
20
|
-
import { isSubscriptionModel, pickerModelName, shouldShowFreeTag } from './model-tags.js';
|
|
20
|
+
import { isClaudeSubscriptionModel, isSubscriptionModel, pickerModelName, shouldShowFreeTag } from './model-tags.js';
|
|
21
21
|
import { useModelConnectionGate } from './use-model-connection-gate.js';
|
|
22
22
|
// Re-export for consumers
|
|
23
23
|
export { Tag };
|
|
@@ -199,6 +199,9 @@ export function ModelSelector({ models, selectedModel, onSelect, defaultControls
|
|
|
199
199
|
const q = search.toLowerCase();
|
|
200
200
|
return models
|
|
201
201
|
.filter((m) => m.enabled !== false &&
|
|
202
|
+
// Claude subscription models appear once the member signed in to Claude
|
|
203
|
+
// (Customize → Models → Anthropic), like ChatGPT subscription models.
|
|
204
|
+
!(isClaudeSubscriptionModel(m) && m.available === false) &&
|
|
202
205
|
(!q ||
|
|
203
206
|
(m.modelName || '').toLowerCase().includes(q) ||
|
|
204
207
|
(m.modelID || '').toLowerCase().includes(q) ||
|
|
@@ -213,10 +216,7 @@ export function ModelSelector({ models, selectedModel, onSelect, defaultControls
|
|
|
213
216
|
/** Is there anything to pick AT ALL, ignoring the search box? The empty
|
|
214
217
|
* state below branches on this: "no models match your search" and "you have
|
|
215
218
|
* no models" are different problems with different ways out. */
|
|
216
|
-
const hasAnyModel = useMemo(() => models.some((m) => m.enabled !== false), [models]);
|
|
217
|
-
/** Does this member already have ChatGPT subscription models? Then the row
|
|
218
|
-
* manages their accounts instead of offering to connect one. */
|
|
219
|
-
const hasChatGptModels = useMemo(() => models.some((m) => isRunnableModel(m) && pickerGroupId(m) === 'codex'), [models]);
|
|
219
|
+
const hasAnyModel = useMemo(() => models.some((m) => m.enabled !== false && !(isClaudeSubscriptionModel(m) && m.available === false)), [models]);
|
|
220
220
|
const grouped = useMemo(() => {
|
|
221
221
|
const groups = new Map();
|
|
222
222
|
for (const m of visibleModels) {
|
|
@@ -295,7 +295,8 @@ export function ModelSelector({ models, selectedModel, onSelect, defaultControls
|
|
|
295
295
|
const connect = unavailableModelConnection(model, { chatGptAvailable });
|
|
296
296
|
if (connect === 'chatgpt')
|
|
297
297
|
return handleOpenChatGpt();
|
|
298
|
-
|
|
298
|
+
// A Claude model signs in under Anthropic, in the provider list.
|
|
299
|
+
if (connect === 'claude' || connect === 'provider')
|
|
299
300
|
return handleOpenProviderModal('providers');
|
|
300
301
|
onSelect({ providerID: model.providerID, modelID: model.modelID });
|
|
301
302
|
setOpen(false);
|
|
@@ -327,15 +328,13 @@ export function ModelSelector({ models, selectedModel, onSelect, defaultControls
|
|
|
327
328
|
section.models.map((model) => (_jsx(ModelRow, { model: model, groupProviderID: section.providerID, groupProviderName: section.label, isSelected: availableSelectedModel?.providerID === model.providerID &&
|
|
328
329
|
availableSelectedModel?.modelID === model.modelID, isAccountDefault: defaultControls?.accountDefault?.providerID === model.providerID &&
|
|
329
330
|
defaultControls?.accountDefault?.modelID === model.modelID, defaultControls: rowDefaultControls, onSelect: handleSelect, connectLabel: tPooled('connect'), scope: "model", showSubscriptionTag: false }, `${section.id}:${model.providerID}:${model.modelID}`)))] })] }, section.id));
|
|
330
|
-
})
|
|
331
|
-
? tPooled('manageChatGptAccounts')
|
|
332
|
-
: tPooled('useYourChatGpt') }), !hasChatGptModels && (_jsx("span", { className: "text-muted-foreground text-xs", children: tPooled('connect') }))] }) })] }))] })) : hasAnyModel ? (
|
|
331
|
+
})] })) : hasAnyModel ? (
|
|
333
332
|
/* Models ARE connected — the SEARCH matched none of them.
|
|
334
333
|
`grouped` is built from `visibleModels`, which is already
|
|
335
334
|
filtered by `search`, so the branch below could not tell the
|
|
336
335
|
two apart: typing "zzz" with 40 models connected showed
|
|
337
336
|
"No models available" and a Connect-provider CTA. */
|
|
338
|
-
_jsx(ModelSearchEmpty, { search: search, modelCount: models.filter((model) => model.enabled !== false).length, onClear: () => setSearch(''), onUpgrade: showUpgradeOption ? handleUpgrade : undefined })) : (_jsxs("div", { className: "px-3 py-5 text-center", children: [_jsx("div", { className: "text-foreground text-sm font-medium", children: tModel('empty.title') }), _jsx("p", { className: "text-muted-foreground mx-auto mt-1 max-w-[220px] text-xs leading-5", children: showUpgradeOption
|
|
337
|
+
_jsx(ModelSearchEmpty, { search: search, modelCount: models.filter((model) => model.enabled !== false && !(isClaudeSubscriptionModel(model) && model.available === false)).length, onClear: () => setSearch(''), onUpgrade: showUpgradeOption ? handleUpgrade : undefined })) : (_jsxs("div", { className: "px-3 py-5 text-center", children: [_jsx("div", { className: "text-foreground text-sm font-medium", children: tModel('empty.title') }), _jsx("p", { className: "text-muted-foreground mx-auto mt-1 max-w-[220px] text-xs leading-5", children: showUpgradeOption
|
|
339
338
|
? tModel('empty.upgradeDescription')
|
|
340
|
-
: tModel('empty.description') }), _jsxs("div", { className: "mt-4 flex items-center justify-center gap-2", children: [showUpgradeOption && (_jsxs(Button, { type: "button", size: "xs", onClick: handleUpgrade, children: [_jsx(CreditCard, { className: "size-3.5" }), tModel('upgrade')] })), canConnectProvider && (_jsxs(Button, { type: "button", size: "xs", variant: showUpgradeOption ? 'outline' : 'default', onClick: () => handleOpenProviderModal('providers'), children: [_jsx(KeyRound, { className: "size-3.5" }), tModel('connectProvider')] }))
|
|
339
|
+
: tModel('empty.description') }), _jsxs("div", { className: "mt-4 flex items-center justify-center gap-2", children: [showUpgradeOption && (_jsxs(Button, { type: "button", size: "xs", onClick: handleUpgrade, children: [_jsx(CreditCard, { className: "size-3.5" }), tModel('upgrade')] })), canConnectProvider && (_jsxs(Button, { type: "button", size: "xs", variant: showUpgradeOption ? 'outline' : 'default', onClick: () => handleOpenProviderModal('providers'), children: [_jsx(KeyRound, { className: "size-3.5" }), tModel('connectProvider')] }))] })] })) })] }) })] })] }));
|
|
341
340
|
}
|
|
@@ -9,6 +9,15 @@ export declare function shouldShowFreeTag(model: Pick<FlatModel, 'free' | 'model
|
|
|
9
9
|
export declare function isSubscriptionModel(model: Pick<FlatModel, 'modelID'> & {
|
|
10
10
|
provider?: string | null;
|
|
11
11
|
}): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* A model that runs through Claude Code on the caller's own Claude Pro or Max
|
|
14
|
+
* plan (`claude-agent/<id>`, `@kortix/api-contract/claude-agent`). It never
|
|
15
|
+
* reaches the LLM gateway.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isClaudeSubscriptionModel(model: {
|
|
18
|
+
provider?: string | null;
|
|
19
|
+
providerID?: string;
|
|
20
|
+
}): boolean;
|
|
12
21
|
/**
|
|
13
22
|
* What the picker prints for a model.
|
|
14
23
|
*
|
|
@@ -13,6 +13,14 @@ export function shouldShowFreeTag(model) {
|
|
|
13
13
|
export function isSubscriptionModel(model) {
|
|
14
14
|
return model.provider === 'codex' || model.modelID.startsWith('codex/');
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A model that runs through Claude Code on the caller's own Claude Pro or Max
|
|
18
|
+
* plan (`claude-agent/<id>`, `@kortix/api-contract/claude-agent`). It never
|
|
19
|
+
* reaches the LLM gateway.
|
|
20
|
+
*/
|
|
21
|
+
export function isClaudeSubscriptionModel(model) {
|
|
22
|
+
return model.providerID === 'claude-agent' || model.provider === 'claude-agent';
|
|
23
|
+
}
|
|
16
24
|
/**
|
|
17
25
|
* What the picker prints for a model.
|
|
18
26
|
*
|
|
@@ -47,7 +47,7 @@ export function EasyPanel() {
|
|
|
47
47
|
// with `session-chat.tsx` so the two cannot disagree.
|
|
48
48
|
const planInChat = usePlanInChat();
|
|
49
49
|
// Null outside a `SessionPanelProvider` — `SessionChat` also renders
|
|
50
|
-
// read-only inside `
|
|
50
|
+
// read-only inside `legacy-subagent-chat.tsx`, which has no panel at all.
|
|
51
51
|
if (!panel)
|
|
52
52
|
return null;
|
|
53
53
|
const { files, context, apps, outputsDefaultOpen, sessionId, handleOpenOutput, openDetail } = panel;
|
|
@@ -11,7 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
* "what is it?".
|
|
12
12
|
*/
|
|
13
13
|
import { cn } from '../../../lib/utils.js';
|
|
14
|
-
import { ArchiveIcon as Archive, RobotIcon as Bot, BrainIcon as Brain, CodeIcon as Code, QuestionIcon as CircleHelp, NotePencilIcon as FilePen, FolderOpenIcon as FolderOpen, GlobeIcon as Globe, ClockCounterClockwiseIcon as History, ListChecksIcon as ListChecks, PlugIcon as Plug, MagnifyingGlassIcon as Search, SparkleIcon as Sparkles, TerminalIcon as Terminal, MagicWandIcon as Wand2, WrenchIcon as Wrench, LightningIcon as Zap, } from '@phosphor-icons/react';
|
|
14
|
+
import { ArchiveIcon as Archive, RobotIcon as Bot, BrainIcon as Brain, CodeIcon as Code, QuestionIcon as CircleHelp, NotePencilIcon as FilePen, FlowArrowIcon as FlowArrow, FolderOpenIcon as FolderOpen, GlobeIcon as Globe, ClockCounterClockwiseIcon as History, ListChecksIcon as ListChecks, PlugIcon as Plug, MagnifyingGlassIcon as Search, SlidersHorizontalIcon as Sliders, SparkleIcon as Sparkles, TerminalIcon as Terminal, MagicWandIcon as Wand2, WrenchIcon as Wrench, LightningIcon as Zap, } from '@phosphor-icons/react';
|
|
15
15
|
const FAMILY_ICON = {
|
|
16
16
|
explore: Search,
|
|
17
17
|
edit: FilePen,
|
|
@@ -23,6 +23,10 @@ const FAMILY_ICON = {
|
|
|
23
23
|
create: Sparkles,
|
|
24
24
|
plan: ListChecks,
|
|
25
25
|
delegate: Bot,
|
|
26
|
+
// pi's workflow: several agents on one run.
|
|
27
|
+
workflow: FlowArrow,
|
|
28
|
+
// My Kortix's platform tools: settings of the project (agents, schedules, members, …).
|
|
29
|
+
platform: Sliders,
|
|
26
30
|
sessions: History,
|
|
27
31
|
memory: Brain,
|
|
28
32
|
connectors: Plug,
|
|
@@ -38,7 +38,7 @@ const TOOL_META = {
|
|
|
38
38
|
browser: { label: 'Browser', Icon: GlobeIcon },
|
|
39
39
|
files: { label: 'Files', Icon: FolderOpenIcon },
|
|
40
40
|
audit: { label: 'Audit', Icon: ScrollIcon },
|
|
41
|
-
reminders: { label: '
|
|
41
|
+
reminders: { label: 'Loops', Icon: AlarmIcon },
|
|
42
42
|
desktop: { label: 'Desktop', Icon: MonitorIcon },
|
|
43
43
|
};
|
|
44
44
|
export function MobileToolDrawer({ sessionId, projectId, projectSessionId, }) {
|
|
@@ -134,7 +134,7 @@ hotkey = true, } = {}) {
|
|
|
134
134
|
};
|
|
135
135
|
}, [shouldHandleHotkey, toggleRight]);
|
|
136
136
|
// No provider means no panel to render: `SessionChat` also renders read-only
|
|
137
|
-
// inside `
|
|
137
|
+
// inside `legacy-subagent-chat.tsx`, outside `SessionLayout`. Mobile has no
|
|
138
138
|
// column either — at 375px a side column is the whole screen, so the cards
|
|
139
139
|
// stay in the bottom drawer they have always used.
|
|
140
140
|
if (!panel || isMobile)
|
|
@@ -17,6 +17,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
17
17
|
* viewer to the slowest one, and a background tab stops acking frames, so a
|
|
18
18
|
* forgotten tab would slow the stream for everyone watching. It reconnects,
|
|
19
19
|
* on a fresh keyframe, when the tab is shown again.
|
|
20
|
+
*
|
|
21
|
+
* A computer without a desktop (a template on another base, or a computer
|
|
22
|
+
* that booted an image built before it had one) says so; the header does not offer the panel there. The
|
|
23
|
+
* control bar appears only once the desktop answers, never over the proxy's
|
|
24
|
+
* "not answering" page.
|
|
20
25
|
*/
|
|
21
26
|
import { useTranslations } from '../../i18n/index.js';
|
|
22
27
|
import { Button } from '../../primitives/button.js';
|
|
@@ -30,9 +35,17 @@ import { PanelWidthButton } from '../../files/viewer/viewer-actions.js';
|
|
|
30
35
|
import { CloseButton, DetailSidebarToggle } from '../../files/viewer/viewer-chrome.js';
|
|
31
36
|
import { cn } from '../../lib/utils.js';
|
|
32
37
|
import { probePreviewPort } from '@kortix/sdk';
|
|
38
|
+
import { useHasSessionDesktop } from '@kortix/sdk/react';
|
|
33
39
|
import { ArrowSquareOutIcon, MonitorIcon } from '@phosphor-icons/react';
|
|
34
40
|
import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
35
41
|
export const DESKTOP_URL = 'http://localhost:6901/';
|
|
42
|
+
/** How often the panel asks again until the desktop answers. */
|
|
43
|
+
const PROBE_INTERVAL_MS = 3_000;
|
|
44
|
+
/**
|
|
45
|
+
* The proxy answers 502 for a stopped desktop only after ~5 s (measured 4.8 s:
|
|
46
|
+
* it retries the port first). The probe's 3 s default reads that as `unknown`.
|
|
47
|
+
*/
|
|
48
|
+
const PROBE_TIMEOUT_MS = 10_000;
|
|
36
49
|
const subscribeVisibility = (onChange) => {
|
|
37
50
|
document.addEventListener('visibilitychange', onChange);
|
|
38
51
|
return () => document.removeEventListener('visibilitychange', onChange);
|
|
@@ -48,27 +61,41 @@ export function SessionDesktop({ projectId, projectSessionId, onClose, }) {
|
|
|
48
61
|
}).url;
|
|
49
62
|
const frameRef = useRef(null);
|
|
50
63
|
const [control, setControl] = useState(false);
|
|
51
|
-
//
|
|
52
|
-
const
|
|
64
|
+
// `undefined` until the session's daemon answers its health probe.
|
|
65
|
+
const hasDesktop = useHasSessionDesktop();
|
|
66
|
+
// `unreachable` = the proxy answered 502/503/504: nothing listens on 6901.
|
|
67
|
+
const [probe, setProbe] = useState('unknown');
|
|
53
68
|
const [attempt, setAttempt] = useState(0);
|
|
54
69
|
const visible = useSyncExternalStore(subscribeVisibility, tabVisible, () => true);
|
|
55
|
-
const live =
|
|
70
|
+
const live = probe === 'reachable';
|
|
71
|
+
// Ask until the desktop answers. The first answer is often `unknown`: the
|
|
72
|
+
// preview cookie arrives with the frame's first load. A stopped desktop
|
|
73
|
+
// answers `unreachable`, and the panel shows it again once it starts.
|
|
56
74
|
useEffect(() => {
|
|
57
|
-
if (!src)
|
|
75
|
+
if (!src || !hasDesktop || !visible)
|
|
58
76
|
return;
|
|
59
77
|
const abort = new AbortController();
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
78
|
+
let timer;
|
|
79
|
+
const ask = async () => {
|
|
80
|
+
const result = await probePreviewPort(src, { signal: abort.signal, timeoutMs: PROBE_TIMEOUT_MS });
|
|
81
|
+
if (abort.signal.aborted)
|
|
82
|
+
return;
|
|
83
|
+
setProbe(result);
|
|
84
|
+
if (result !== 'reachable')
|
|
85
|
+
timer = setTimeout(ask, PROBE_INTERVAL_MS);
|
|
86
|
+
};
|
|
87
|
+
void ask();
|
|
88
|
+
return () => {
|
|
89
|
+
abort.abort();
|
|
90
|
+
clearTimeout(timer);
|
|
91
|
+
};
|
|
92
|
+
}, [src, hasDesktop, visible, attempt]);
|
|
66
93
|
const takeOver = () => {
|
|
67
94
|
setControl(true);
|
|
68
95
|
frameRef.current?.focus();
|
|
69
96
|
};
|
|
70
|
-
return (_jsxs("div", { className: "bg-background flex h-full min-h-0 min-w-0 flex-col", children: [_jsxs("div", { className: "flex shrink-0 items-center gap-1 px-2 py-1", children: [_jsx(DetailSidebarToggle, { className: "size-7" }), _jsx(MonitorIcon, { className: "text-muted-foreground ml-1 size-3.5 shrink-0" }), _jsx("span", { className: "truncate text-sm font-medium", children: t('title') }), _jsx("div", { className: "flex-1" }), _jsxs(ButtonGroup, { className: "shrink-0", children: [_jsx(Button, { variant: "secondary", size: "icon", className: "size-7", disabled: !live, "aria-label": t('openTab'), onClick: () => src && window.open(src, '_blank', 'noopener,noreferrer'), children: _jsx(ArrowSquareOutIcon, { className: "size-3.5" }) }), _jsx(PanelWidthButton, { isMobile: isMobile }), _jsx(CloseButton, { onClose: onClose })] })] }), _jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-2 px-3 pb-3", children: [_jsx("div", { "data-slot": "desktop-screen", "data-control": control ? 'user' : 'agent', className: cn('bg-muted relative min-h-0 flex-1 overflow-hidden rounded-xl ring-1 ring-border transition-shadow', control && 'ring-2 ring-primary'), children:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
97
|
+
return (_jsxs("div", { className: "bg-background flex h-full min-h-0 min-w-0 flex-col", children: [_jsxs("div", { className: "flex shrink-0 items-center gap-1 px-2 py-1", children: [_jsx(DetailSidebarToggle, { className: "size-7" }), _jsx(MonitorIcon, { className: "text-muted-foreground ml-1 size-3.5 shrink-0" }), _jsx("span", { className: "truncate text-sm font-medium", children: t('title') }), _jsx("div", { className: "flex-1" }), _jsxs(ButtonGroup, { className: "shrink-0", children: [_jsx(Button, { variant: "secondary", size: "icon", className: "size-7", disabled: !live, "aria-label": t('openTab'), onClick: () => src && window.open(src, '_blank', 'noopener,noreferrer'), children: _jsx(ArrowSquareOutIcon, { className: "size-3.5" }) }), _jsx(PanelWidthButton, { isMobile: isMobile }), _jsx(CloseButton, { onClose: onClose })] })] }), _jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-2 px-3 pb-3", children: [_jsx("div", { "data-slot": "desktop-screen", "data-control": control ? 'user' : 'agent', className: cn('bg-muted relative min-h-0 flex-1 overflow-hidden rounded-xl ring-1 ring-border transition-shadow', control && 'ring-2 ring-primary'), children: hasDesktop === false ? (_jsx(DesktopNotice, { title: t('noDesktop'), hint: t('noDesktopHint') })) : probe === 'unreachable' ? (_jsx(DesktopNotice, { title: t('offline'), hint: _jsxs(_Fragment, { children: [t('start'), " ", _jsx("code", { children: "kortix-desktop start" }), "."] }), children: _jsx(Button, { variant: "secondary", size: "sm", onClick: () => setAttempt((n) => n + 1), children: t('retry') }) })) : !hasDesktop || !src || !visible ? (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsx(Loading, { className: "size-4" }) })) : (_jsxs(_Fragment, { children: [_jsx("iframe", { ref: frameRef, src: src, title: t('title'), className: "h-full w-full border-0", sandbox: framePolicy('app', src).sandbox, allow: "clipboard-read; clipboard-write; autoplay; fullscreen", tabIndex: control ? 0 : -1 }), !control && (_jsx("button", { type: "button", "aria-label": t('takeOver'), "data-slot": "desktop-shield", className: "absolute inset-0 cursor-pointer", onClick: takeOver }))] })) }), _jsx("div", { className: "flex h-9 shrink-0 items-center justify-center gap-3 text-sm", children: live && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground", children: control ? t('userControl') : t('agentControl') }), _jsx(Button, { variant: control ? 'secondary' : 'default', size: "sm", className: "h-7 rounded-full px-3", "aria-pressed": control, onClick: control ? () => setControl(false) : takeOver, children: control ? t('returnControl') : t('takeOver') })] })) })] })] }));
|
|
98
|
+
}
|
|
99
|
+
function DesktopNotice({ title, hint, children }) {
|
|
100
|
+
return (_jsxs("div", { className: "text-muted-foreground flex h-full flex-col items-center justify-center gap-3 px-6 text-center text-sm", children: [_jsx(MonitorIcon, { className: "size-10 opacity-20" }), _jsx("p", { children: title }), _jsx("p", { className: "text-xs", children: hint }), children] }));
|
|
74
101
|
}
|
|
@@ -45,7 +45,7 @@ export declare const SessionPanelContext: import("react").Context<SessionPanelVa
|
|
|
45
45
|
* The panel value, or null outside a provider.
|
|
46
46
|
*
|
|
47
47
|
* Optional on purpose, exactly as `useOptionalSidebar` is: `SessionChat` has a
|
|
48
|
-
* second call site in `
|
|
48
|
+
* second call site in `legacy-subagent-chat.tsx` that renders it read-only and
|
|
49
49
|
* OUTSIDE `SessionLayout`. The floating overlay self-gates to null there rather
|
|
50
50
|
* than every call site having to know which tree it is in.
|
|
51
51
|
*/
|
|
@@ -44,9 +44,7 @@ import { useSessionComposerPrefillStore } from '../composer/stores/session-compo
|
|
|
44
44
|
import { panelToRestore, rememberedPanelOf, useSessionPanelMemoryStore, } from '../../internal/stores/session-panel-memory-store.js';
|
|
45
45
|
import { useUserPreferencesStore } from '../../internal/stores/user-preferences-store.js';
|
|
46
46
|
import { getProjectSession, SANDBOX_PORTS } from '@kortix/sdk';
|
|
47
|
-
import { qk } from '@kortix/sdk/react';
|
|
48
47
|
import { FileTextIcon as FileText } from '@phosphor-icons/react';
|
|
49
|
-
import { useQueryClient } from '@tanstack/react-query';
|
|
50
48
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, } from 'react';
|
|
51
49
|
import { AppPreview, AppPreviewBooting } from './easy/app-preview.js';
|
|
52
50
|
import { isWideDeliverable, neighborOutputs, outputKey, quickBrowserOutput, } from './easy/easy-panel-logic.js';
|
|
@@ -67,7 +65,7 @@ export const SessionPanelContext = createContext(null);
|
|
|
67
65
|
* The panel value, or null outside a provider.
|
|
68
66
|
*
|
|
69
67
|
* Optional on purpose, exactly as `useOptionalSidebar` is: `SessionChat` has a
|
|
70
|
-
* second call site in `
|
|
68
|
+
* second call site in `legacy-subagent-chat.tsx` that renders it read-only and
|
|
71
69
|
* OUTSIDE `SessionLayout`. The floating overlay self-gates to null there rather
|
|
72
70
|
* than every call site having to know which tree it is in.
|
|
73
71
|
*/
|
|
@@ -479,7 +477,6 @@ export function SessionPanelProvider({ sessionId, isSessionBusy = false, project
|
|
|
479
477
|
const sidePanelOpen = useKortixComputerStore((s) => s.isSidePanelOpen);
|
|
480
478
|
const advancedPanel = useUserPreferencesStore((s) => s.preferences.panelMode === 'advanced');
|
|
481
479
|
const isMobile = useIsMobile();
|
|
482
|
-
const queryClient = useQueryClient();
|
|
483
480
|
// Nothing is recorded before the arrival is decided: until then the panel is
|
|
484
481
|
// closed by the arrival itself, not by the person.
|
|
485
482
|
const [restoreSettled, setRestoreSettled] = useState(false);
|
|
@@ -497,12 +494,11 @@ export function SessionPanelProvider({ sessionId, isSessionBusy = false, project
|
|
|
497
494
|
let alive = true;
|
|
498
495
|
// A FRESH row, never the cached one: it can be 30 s old, and reopening a
|
|
499
496
|
// Terminal on a session stopped since then wakes its computer (measured).
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
})
|
|
497
|
+
// Its own request, not the query cache's: `fetchQuery` joins the page's
|
|
498
|
+
// in-flight fetch of the same row, a refetch on arrival cancels that
|
|
499
|
+
// (`CancelledError`), and the restore was dropped on about half the
|
|
500
|
+
// returns from another session (measured).
|
|
501
|
+
void getProjectSession(projectId, projectSessionId, { showErrors: false })
|
|
506
502
|
.then((row) => {
|
|
507
503
|
if (!alive)
|
|
508
504
|
return;
|
|
@@ -531,7 +527,7 @@ export function SessionPanelProvider({ sessionId, isSessionBusy = false, project
|
|
|
531
527
|
alive = false;
|
|
532
528
|
setRestoreSettled(true);
|
|
533
529
|
};
|
|
534
|
-
}, [isActivePanel, memoryKey, isMobile, projectId, projectSessionId,
|
|
530
|
+
}, [isActivePanel, memoryKey, isMobile, projectId, projectSessionId, sessionId]);
|
|
535
531
|
// A file preview reopens once the transcript has derived its output, and only
|
|
536
532
|
// if the person has not opened something else meanwhile.
|
|
537
533
|
useEffect(() => {
|
|
@@ -21,7 +21,9 @@ import { Close } from '../../icons/close.js';
|
|
|
21
21
|
// ---------------------------------------------------------------------------
|
|
22
22
|
function QuestionMarkdown({ content, className }) {
|
|
23
23
|
return (_jsx("div", { className: cn('question-md', className), children: _jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], components: {
|
|
24
|
-
|
|
24
|
+
// `pre-line`: a single newline is a line break. A question's lines (a workflow's
|
|
25
|
+
// title, phases and agent count) would otherwise run together as one paragraph.
|
|
26
|
+
p: ({ children }) => _jsx("p", { className: "my-1 leading-relaxed whitespace-pre-line", children: children }),
|
|
25
27
|
strong: ({ children }) => (_jsx("strong", { className: "text-foreground font-semibold", children: children })),
|
|
26
28
|
em: ({ children }) => _jsx("em", { className: "text-muted-foreground", children: children }),
|
|
27
29
|
ul: ({ children }) => _jsx("ul", { className: "my-0.5 list-disc pl-4", children: children }),
|