@kortix/ui 0.15.10 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_vendor/kortix-shared.js +769 -76
- package/dist/_vendor/shared/app-config.d.ts +6 -30
- package/dist/_vendor/shared/channel-descriptors.d.ts +0 -34
- package/dist/_vendor/shared/channel-header.d.ts +2 -1
- package/dist/_vendor/shared/connector-sections.d.ts +0 -25
- package/dist/_vendor/shared/file-tags.d.ts +2 -1
- package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
- package/dist/_vendor/shared/pasted-content.d.ts +0 -4
- package/dist/_vendor/shared/pixel-mark.d.ts +0 -17
- package/dist/_vendor/shared/project-glyphs.d.ts +0 -1
- package/dist/_vendor/shared/session/attachment-tile.d.ts +8 -0
- package/dist/_vendor/shared/workspace-settings.d.ts +3 -0
- package/dist/access/access/copy-row.d.ts +7 -1
- package/dist/access/access/copy-row.js +2 -2
- package/dist/animated-copy-icon.js +2 -1
- package/dist/browser/sandbox-browser-chrome.d.ts +2 -1
- package/dist/browser/sandbox-browser-chrome.js +1 -1
- package/dist/customize/agents/agent-cover-card.d.ts +1 -1
- package/dist/customize/agents/agent-cover-card.js +10 -2
- package/dist/customize/agents/agent-filter.js +3 -1
- package/dist/customize/agents/agent-model-view.d.ts +11 -1
- package/dist/customize/agents/agent-model-view.js +12 -1
- package/dist/customize/agents/agent-overview.d.ts +10 -0
- package/dist/customize/agents/agent-overview.js +5 -4
- package/dist/customize/agents/agent-page-chrome.d.ts +5 -6
- package/dist/customize/agents/agent-page-chrome.js +16 -13
- package/dist/customize/agents/agent-page.js +25 -34
- package/dist/customize/agents/agent-tabs.d.ts +3 -0
- package/dist/customize/agents/agent-tabs.js +3 -0
- package/dist/customize/agents/agents-page.js +3 -3
- package/dist/customize/agents/create-agent-modal.d.ts +9 -0
- package/dist/customize/agents/create-agent-modal.js +21 -3
- package/dist/customize/agents/use-default-agent.js +2 -2
- package/dist/customize/connectors/connector-identity.d.ts +11 -2
- package/dist/customize/connectors/connector-identity.js +16 -4
- package/dist/customize/connectors/connectors-page.js +10 -6
- package/dist/customize/connectors/detail/app-page.js +2 -2
- package/dist/customize/connectors/detail/connector-triggers.js +1 -1
- package/dist/customize/connectors/install/install-dialog.d.ts +2 -0
- package/dist/customize/connectors/install/install-dialog.js +6 -1
- package/dist/customize/connectors/use-agent-access.d.ts +2 -0
- package/dist/customize/evals/eval-compare-view.d.ts +10 -0
- package/dist/customize/evals/eval-compare-view.js +68 -0
- package/dist/customize/evals/eval-dataset-view.d.ts +20 -0
- package/dist/customize/evals/eval-dataset-view.js +81 -0
- package/dist/customize/evals/eval-datasets-page.d.ts +25 -0
- package/dist/customize/evals/eval-datasets-page.js +91 -0
- package/dist/customize/evals/eval-job-view.d.ts +12 -0
- package/dist/customize/evals/eval-job-view.js +360 -0
- package/dist/customize/evals/eval-jobs-page.d.ts +4 -0
- package/dist/customize/evals/eval-jobs-page.js +69 -0
- package/dist/customize/evals/eval-meta.d.ts +97 -0
- package/dist/customize/evals/eval-meta.js +228 -0
- package/dist/customize/evals/eval-task-view.d.ts +13 -0
- package/dist/customize/evals/eval-task-view.js +123 -0
- package/dist/customize/evals/eval-tasks-page.d.ts +8 -0
- package/dist/customize/evals/eval-tasks-page.js +56 -0
- package/dist/customize/evals/eval-ui.d.ts +97 -0
- package/dist/customize/evals/eval-ui.js +153 -0
- package/dist/customize/evals/evals-page.d.ts +10 -0
- package/dist/customize/evals/evals-page.js +56 -0
- package/dist/customize/evals/run-eval-modal.d.ts +28 -0
- package/dist/customize/evals/run-eval-modal.js +167 -0
- package/dist/customize/project-settings/project-admin-sections.d.ts +3 -2
- package/dist/customize/project-settings/project-admin-sections.js +6 -1
- package/dist/customize/providers/provider-connect.d.ts +13 -0
- package/dist/customize/providers/provider-connect.js +29 -5
- package/dist/customize/providers/provider-sheet.js +5 -4
- package/dist/customize/sections/component/teams-byo-wizard.js +4 -1
- package/dist/customize/sections/view/gateway/gateway-overview.d.ts +5 -0
- package/dist/customize/sections/view/gateway/gateway-overview.js +32 -6
- package/dist/customize/sections/view/gateway/routing-parts.d.ts +6 -0
- package/dist/customize/sections/view/gateway/routing-parts.js +21 -13
- package/dist/customize/sections/view/git-view.d.ts +19 -1
- package/dist/customize/sections/view/git-view.js +7 -3
- package/dist/customize/sections/view/manifest-issue-list.d.ts +16 -0
- package/dist/customize/sections/view/manifest-issue-list.js +41 -0
- package/dist/customize/sections/view/manifest-issues-row.d.ts +24 -0
- package/dist/customize/sections/view/manifest-issues-row.js +39 -0
- package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +7 -1
- package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -5
- package/dist/customize/sections/view/secrets-view.d.ts +13 -0
- package/dist/customize/sections/view/secrets-view.js +10 -6
- package/dist/customize/sections/view/subscription-usage.d.ts +2 -7
- package/dist/customize/sections/view/subscription-usage.js +4 -8
- package/dist/customize/settings/settings-tab-header.js +12 -3
- package/dist/customize/settings/tabs/experimental-tab.d.ts +16 -5
- package/dist/customize/settings/tabs/experimental-tab.js +36 -11
- package/dist/customize/settings/tabs/general-tab.js +1 -1
- package/dist/customize/settings/tabs/sandbox-tab.d.ts +10 -0
- package/dist/customize/settings/tabs/sandbox-tab.js +27 -4
- package/dist/customize/settings/tabs/snapshots-tab.d.ts +31 -0
- package/dist/customize/settings/tabs/snapshots-tab.js +61 -5
- package/dist/customize/settings/tabs/workspace-keys.js +6 -3
- package/dist/customize/shared/capability-page-shell.js +9 -1
- package/dist/customize/shared/catalog/catalog-card.d.ts +1 -1
- package/dist/customize/shared/catalog/catalog-card.js +15 -5
- package/dist/customize/shared/customize-tab-bar.js +1 -1
- package/dist/customize/shared/new-entity-menu.d.ts +1 -1
- package/dist/customize/shared/new-entity-menu.js +38 -1
- package/dist/customize/triggers/runtime-triggers.d.ts +4 -0
- package/dist/customize/triggers/runtime-triggers.js +33 -3
- package/dist/customize/triggers/schedule/event-trigger-copy.js +1 -1
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +5 -4
- package/dist/customize/triggers/schedule/then-fields.d.ts +5 -1
- package/dist/customize/triggers/schedule/then-fields.js +23 -3
- package/dist/customize/triggers/schedule/trigger-callouts.js +1 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +27 -0
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +51 -5
- package/dist/customize/triggers/schedule/trigger-composer.js +19 -13
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +25 -5
- package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -3
- package/dist/customize/triggers/schedule/trigger-filter.js +7 -6
- package/dist/customize/triggers/schedule/trigger-readonly.js +1 -1
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -1
- package/dist/customize/triggers/schedule/when-event.js +1 -1
- package/dist/customize/triggers/schedule/when-schedule.d.ts +5 -1
- package/dist/customize/triggers/schedule/when-schedule.js +16 -1
- package/dist/customize/triggers/schedule-view.js +6 -3
- package/dist/files/project/components/drive-explorer.js +33 -70
- package/dist/files/project/components/drive-grid-view.d.ts +2 -31
- package/dist/files/project/components/drive-grid-view.js +12 -22
- package/dist/files/project/components/drive-list-view.d.ts +3 -30
- package/dist/files/project/components/drive-list-view.js +8 -18
- package/dist/files/project/components/drive-selection-bar.d.ts +4 -5
- package/dist/files/project/components/drive-selection-bar.js +13 -20
- package/dist/files/project/components/explorer-listing.d.ts +48 -0
- package/dist/files/project/components/explorer-listing.js +64 -0
- package/dist/files/project/components/file-explorer-page.js +7 -204
- package/dist/files/project/components/file-thumbnail.js +3 -1
- package/dist/files/project/components/manifest-issue-mark.d.ts +9 -0
- package/dist/files/project/components/manifest-issue-mark.js +26 -0
- package/dist/files/project/hooks/use-change-requests.d.ts +10 -0
- package/dist/files/project/hooks/use-change-requests.js +17 -0
- package/dist/files/project/manifest-annotations.d.ts +16 -0
- package/dist/files/project/manifest-annotations.js +19 -0
- package/dist/files/project/store/version-store.d.ts +1 -1
- package/dist/files/project/upload-batch.d.ts +20 -0
- package/dist/files/project/upload-batch.js +20 -0
- package/dist/files/runtime/hooks/use-binary-blob.js +3 -2
- package/dist/files/runtime/hooks/use-file-content.js +3 -2
- package/dist/files/runtime/hooks/use-file-list.js +1 -2
- package/dist/files/runtime/hooks/use-file-mutations.js +69 -6
- package/dist/files/runtime/hooks/use-file-refresh.d.ts +4 -0
- package/dist/files/runtime/hooks/use-file-refresh.js +6 -0
- package/dist/files/tree/components/file-tree-item.js +1 -4
- package/dist/files/viewer/file-annotations.d.ts +18 -0
- package/dist/files/viewer/file-annotations.js +21 -0
- package/dist/files/viewer/file-content-renderer.js +1 -1
- package/dist/files/viewer/file-viewer.js +2 -1
- package/dist/files/viewer/index.d.ts +1 -0
- package/dist/files/viewer/index.js +1 -0
- package/dist/files/viewer/use-file-content-state.js +8 -1
- package/dist/i18n/en.d.ts +544 -46
- package/dist/i18n/en.js +593 -95
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -4
- package/dist/icons/caret-right-solid.d.ts +11 -0
- package/dist/icons/caret-right-solid.js +15 -0
- package/dist/internal/auth/auth-art.d.ts +12 -0
- package/dist/internal/auth/auth-art.js +118 -0
- package/dist/internal/auth/auth-card-shell.d.ts +14 -10
- package/dist/internal/auth/auth-card-shell.js +20 -31
- package/dist/internal/auth/auth-consent.d.ts +3 -1
- package/dist/internal/auth/auth-consent.js +2 -2
- package/dist/internal/auth/auth-primitives.d.ts +26 -1
- package/dist/internal/auth/auth-primitives.js +37 -8
- package/dist/internal/connector-logo/connector-logo.d.ts +2 -1
- package/dist/internal/connector-logo/connector-logo.js +11 -2
- package/dist/internal/files/file-read-retry.d.ts +18 -2
- package/dist/internal/files/file-read-retry.js +42 -4
- package/dist/internal/hooks/projects/use-new-project-session.js +5 -10
- package/dist/internal/hooks/use-auto-scroll-physics.d.ts +1 -1
- package/dist/internal/hooks/use-auto-scroll-physics.js +2 -10
- package/dist/internal/hooks/use-reduced-motion.d.ts +4 -0
- package/dist/internal/hooks/use-reduced-motion.js +12 -0
- package/dist/internal/hooks/use-save-shortcut.d.ts +8 -0
- package/dist/internal/hooks/use-save-shortcut.js +28 -0
- package/dist/internal/layout/connect-mcp-modal.d.ts +1 -1
- package/dist/internal/layout/connect-mcp-modal.js +9 -4
- package/dist/internal/layout/panel-chrome.d.ts +28 -0
- package/dist/internal/layout/panel-chrome.js +27 -0
- package/dist/internal/layout/project-page-header.js +5 -1
- package/dist/internal/layout/project-settings-nav.d.ts +17 -0
- package/dist/internal/layout/project-settings-nav.js +24 -0
- package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
- package/dist/internal/lib/capability-tab-routes.d.ts +8 -0
- package/dist/internal/lib/capability-tab-routes.js +11 -0
- package/dist/internal/lib/manifest-health.d.ts +25 -1
- package/dist/internal/lib/manifest-health.js +56 -0
- package/dist/internal/lib/project-preamble.js +1 -1
- package/dist/internal/lib/web-notifications.d.ts +1 -1
- package/dist/internal/lib/web-notifications.js +3 -0
- package/dist/internal/notifications/notification-inbox.js +2 -1
- package/dist/internal/notifications/notification-rows.d.ts +1 -1
- package/dist/internal/notifications/notification-rows.js +15 -1
- package/dist/internal/selection/selection-bar.d.ts +2 -8
- package/dist/internal/selection/selection-bar.js +15 -38
- package/dist/internal/stores/active-space-store.d.ts +1 -1
- package/dist/internal/stores/browser-recents-store.d.ts +1 -1
- package/dist/internal/stores/composer-prefill-store.d.ts +7 -0
- package/dist/internal/stores/composer-prefill-store.js +1 -0
- package/dist/internal/stores/current-account-store.d.ts +1 -1
- package/dist/internal/stores/first-chat-store.d.ts +1 -1
- package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
- package/dist/internal/stores/session-browser-store.d.ts +1 -1
- package/dist/internal/stores/session-expanded-store.d.ts +1 -1
- package/dist/internal/stores/session-filter-store.d.ts +1 -1
- package/dist/internal/stores/session-history-view-store.d.ts +1 -1
- package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
- package/dist/internal/stores/sound-store.d.ts +1 -1
- package/dist/internal/stores/tab-store.d.ts +1 -1
- package/dist/internal/stores/user-preferences-store.d.ts +9 -1
- package/dist/internal/stores/user-preferences-store.js +2 -0
- package/dist/internal/stores/web-notification-store.d.ts +1 -1
- package/dist/lib/base-ui-compat.js +28 -1
- package/dist/lib/dotmatrix-hooks.d.ts +1 -0
- package/dist/lib/dotmatrix-hooks.js +3 -13
- package/dist/lib/reduced-motion.d.ts +10 -0
- package/dist/lib/reduced-motion.js +104 -0
- package/dist/lib/routes.d.ts +9 -0
- package/dist/lib/routes.js +7 -4
- package/dist/markdown/artifact-link.d.ts +11 -0
- package/dist/markdown/artifact-link.js +62 -0
- package/dist/markdown/code/index.d.ts +1 -1
- package/dist/markdown/code/index.js +1 -1
- package/dist/markdown/code/inline-code.d.ts +1 -1
- package/dist/markdown/code/inline-code.js +1 -1
- package/dist/markdown/genui/components/map-canvas.js +2 -1
- package/dist/markdown/index.d.ts +3 -1
- package/dist/markdown/index.js +2 -1
- package/dist/markdown/{code/inline-chip.js → inline-chip.js} +2 -2
- package/dist/markdown/inline-code-text.d.ts +34 -0
- package/dist/markdown/inline-code-text.js +68 -0
- package/dist/markdown/setup-links/approval-decision.js +3 -3
- package/dist/markdown/soft-breaks.d.ts +21 -0
- package/dist/markdown/soft-breaks.js +33 -0
- package/dist/markdown/unified-markdown.d.ts +9 -1
- package/dist/markdown/unified-markdown.js +31 -9
- package/dist/primitives/action-bar.d.ts +50 -0
- package/dist/primitives/action-bar.js +87 -0
- package/dist/primitives/calendar.js +4 -2
- package/dist/primitives/inline-meta.js +2 -2
- package/dist/primitives/kortix-loader.js +2 -1
- package/dist/primitives/modal.d.ts +1 -1
- package/dist/primitives/paper-wallpaper-shaders.d.ts +1 -0
- package/dist/primitives/paper-wallpaper-shaders.js +6 -0
- package/dist/primitives/resizable.d.ts +1 -1
- package/dist/primitives/resize-seam.d.ts +3 -2
- package/dist/primitives/resize-seam.js +4 -3
- package/dist/primitives/settings-section-header.d.ts +30 -1
- package/dist/primitives/settings-section-header.js +37 -0
- package/dist/primitives/sliding-tab-indicator.js +2 -1
- package/dist/primitives/switch.js +15 -8
- package/dist/primitives/text-shimmer.js +6 -0
- package/dist/primitives/toast-clearance.d.ts +52 -0
- package/dist/primitives/toast-clearance.js +116 -0
- package/dist/primitives/toast.d.ts +3 -1
- package/dist/primitives/toast.js +2 -0
- package/dist/primitives/typed-title.js +1 -1
- package/dist/primitives/wallpaper-shaders.js +1 -1
- package/dist/session/actions/project-session-list-helpers.d.ts +16 -0
- package/dist/session/actions/project-session-list-helpers.js +18 -0
- package/dist/session/actions/session-label.js +2 -2
- package/dist/session/agents/agent-model.d.ts +1 -0
- package/dist/session/agents/agent-model.js +2 -1
- package/dist/session/agents/agent-strip.d.ts +10 -5
- package/dist/session/agents/agent-strip.js +49 -15
- package/dist/session/agents/held-messages.d.ts +6 -2
- package/dist/session/agents/held-messages.js +6 -3
- package/dist/session/agents/workflow-run-controls.d.ts +27 -4
- package/dist/session/agents/workflow-run-controls.js +63 -10
- package/dist/session/composer/ComposerCard.js +7 -1
- package/dist/session/composer/agent-selector.d.ts +2 -0
- package/dist/session/composer/agent-selector.js +11 -4
- package/dist/session/composer/animated-placeholder.js +2 -1
- package/dist/session/composer/attachment-tile.d.ts +2 -2
- package/dist/session/composer/attachment-tile.js +25 -3
- package/dist/session/composer/composer-agent-access.d.ts +10 -1
- package/dist/session/composer/composer-agent-access.js +18 -4
- package/dist/session/composer/composer-chat-input.d.ts +1 -0
- package/dist/session/composer/composer-chat-input.js +7 -2
- package/dist/session/composer/composer-logic.d.ts +7 -0
- package/dist/session/composer/composer-logic.js +18 -0
- package/dist/session/composer/composer-reset.d.ts +8 -14
- package/dist/session/composer/composer-toolbar.d.ts +3 -1
- package/dist/session/composer/composer-toolbar.js +3 -3
- package/dist/session/composer/composer.d.ts +9 -2
- package/dist/session/composer/composer.js +24 -9
- package/dist/session/composer/editor/composer-editor.js +6 -4
- package/dist/session/composer/hooks/use-file-search.d.ts +12 -2
- package/dist/session/composer/hooks/use-file-search.js +71 -7
- package/dist/session/composer/menus/menu-items.js +6 -2
- package/dist/session/composer/menus/menu-shell.d.ts +3 -1
- package/dist/session/composer/menus/menu-shell.js +2 -2
- package/dist/session/composer/menus/slash-menu.d.ts +7 -0
- package/dist/session/composer/menus/slash-menu.js +48 -1
- package/dist/session/composer/use-instant-session-send.js +7 -1
- package/dist/session/header/session-reminders-indicator.js +3 -2
- package/dist/session/header/session-site-header.d.ts +3 -1
- package/dist/session/header/session-site-header.js +27 -8
- package/dist/session/media/sandbox-url-detector.js +1 -1
- package/dist/session/models/connect-model-step.d.ts +29 -0
- package/dist/session/models/connect-model-step.js +50 -0
- package/dist/session/models/model-connection-gate.js +2 -1
- package/dist/session/models/model-selector.js +1 -1
- package/dist/session/models/subscription-switcher.d.ts +7 -0
- package/dist/session/models/subscription-switcher.js +52 -10
- package/dist/session/models/subscription-windows.d.ts +2 -0
- package/dist/session/models/subscription-windows.js +2 -0
- package/dist/session/models/use-workspace-model-gate.d.ts +11 -0
- package/dist/session/models/use-workspace-model-gate.js +62 -0
- package/dist/session/models/workspace-model-gate.d.ts +46 -0
- package/dist/session/models/workspace-model-gate.js +66 -0
- package/dist/session/outcomes/session-outcomes-provider.js +14 -7
- package/dist/session/panel/action-panel.js +8 -19
- package/dist/session/panel/easy/app-preview.d.ts +4 -1
- package/dist/session/panel/easy/app-preview.js +95 -33
- package/dist/session/panel/easy/apps-card.js +6 -11
- package/dist/session/panel/easy/change-requests-card.js +1 -1
- package/dist/session/panel/easy/changes-card.d.ts +14 -0
- package/dist/session/panel/easy/changes-card.js +60 -0
- package/dist/session/panel/easy/context-card.d.ts +5 -1
- package/dist/session/panel/easy/context-card.js +13 -28
- package/dist/session/panel/easy/context-meter.d.ts +18 -0
- package/dist/session/panel/easy/context-meter.js +73 -0
- package/dist/session/panel/easy/detail-view.d.ts +1 -1
- package/dist/session/panel/easy/detail-view.js +24 -21
- package/dist/session/panel/easy/easy-panel.js +7 -5
- package/dist/session/panel/easy/file-preview.js +3 -1
- package/dist/session/panel/easy/frame-history.d.ts +91 -0
- package/dist/session/panel/easy/frame-history.js +198 -0
- package/dist/session/panel/easy/outputs-card.d.ts +10 -0
- package/dist/session/panel/easy/outputs-card.js +28 -31
- package/dist/session/panel/easy/panel-card.d.ts +1 -3
- package/dist/session/panel/easy/panel-card.js +24 -8
- package/dist/session/panel/easy/plan-card.js +2 -2
- package/dist/session/panel/easy/step-icon.d.ts +4 -1
- package/dist/session/panel/easy/step-icon.js +2 -2
- package/dist/session/panel/session-action-panel-column.d.ts +5 -0
- package/dist/session/panel/session-action-panel-column.js +198 -101
- package/dist/session/panel/session-desktop.js +5 -1
- package/dist/session/panel/session-diff-viewer.d.ts +3 -1
- package/dist/session/panel/session-diff-viewer.js +7 -4
- package/dist/session/panel/session-panel-provider.js +29 -5
- package/dist/session/panel/shared/derive-panels.js +64 -4
- package/dist/session/prompts/session-connect-card.d.ts +63 -0
- package/dist/session/prompts/{session-connect-prompt.js → session-connect-card.js} +53 -42
- package/dist/session/status/session-busy-indicator.js +2 -1
- package/dist/session/status/session-error-banner.js +1 -1
- package/dist/session/thread/chat-minimap.js +2 -1
- package/dist/session/thread/session-body.js +4 -1
- package/dist/session/thread/session-chat.js +311 -300
- package/dist/session/thread/session-turn-meta-rows.d.ts +13 -5
- package/dist/session/thread/session-turn-meta-rows.js +33 -5
- package/dist/session/thread/transcript.d.ts +3 -3
- package/dist/session/thread/transcript.js +33 -27
- package/dist/session/thread/typing-indicator.d.ts +2 -2
- package/dist/session/thread/typing-indicator.js +10 -3
- package/dist/session/tool/tool-part-renderer.js +7 -2
- package/dist/session/tool/tools/kortix-action-tool.js +10 -2
- package/dist/session/tool/tools/session-spawn-tool.js +3 -3
- package/dist/session/tool/tools/workflow-run-card.d.ts +11 -1
- package/dist/session/tool/tools/workflow-run-card.js +31 -7
- package/dist/session/tool/tools/workflow-run-cost.d.ts +29 -0
- package/dist/session/tool/tools/workflow-run-cost.js +75 -0
- package/dist/session/tool/tools/workflow-tool.d.ts +1 -1
- package/dist/session/tool/tools/workflow-tool.js +40 -15
- package/dist/session/turn/peer-message-row.js +1 -1
- package/dist/session/turn/queued-prompt-bubbles.d.ts +3 -2
- package/dist/session/turn/queued-prompt-bubbles.js +1 -1
- package/dist/session/turn/throttled-markdown.js +1 -1
- package/dist/session/turn/turn-viewport.d.ts +66 -10
- package/dist/session/turn/turn-viewport.js +92 -12
- package/dist/session/turn/user-message.js +7 -5
- package/dist/styles/theme.css +68 -0
- package/dist/styles.css +1 -1
- package/dist/terminal/pty-terminal.js +1 -1
- package/dist/terminal/session-terminal-connect-bar.js +2 -1
- package/dist/test-utils/intl.d.ts +544 -46
- package/dist/workspace/admin/project-admin-dashboard.js +23 -11
- package/dist/workspace/admin/settings-search-landing.js +2 -1
- package/dist/workspace/calendar/calendar-dates.d.ts +31 -0
- package/dist/workspace/calendar/calendar-dates.js +64 -0
- package/dist/workspace/calendar/calendar-new-item.d.ts +11 -0
- package/dist/workspace/calendar/calendar-new-item.js +47 -0
- package/dist/workspace/calendar/calendar-page.d.ts +3 -0
- package/dist/workspace/calendar/calendar-page.js +177 -0
- package/dist/workspace/calendar/calendar-panel.d.ts +13 -0
- package/dist/workspace/calendar/calendar-panel.js +103 -0
- package/dist/workspace/calendar/calendar-people.d.ts +52 -0
- package/dist/workspace/calendar/calendar-people.js +117 -0
- package/dist/workspace/calendar/calendar-scheduled.d.ts +29 -0
- package/dist/workspace/calendar/calendar-scheduled.js +118 -0
- package/dist/workspace/calendar/calendar-views.d.ts +32 -0
- package/dist/workspace/calendar/calendar-views.js +124 -0
- package/dist/workspace/calendar/calendar-when.d.ts +14 -0
- package/dist/workspace/calendar/calendar-when.js +81 -0
- package/dist/workspace/calendar/mention-textarea.d.ts +19 -0
- package/dist/workspace/calendar/mention-textarea.js +84 -0
- package/dist/workspace/home/access-requests-bell.js +2 -1
- package/dist/workspace/home/existing-repo-setup-prompt.d.ts +5 -8
- package/dist/workspace/home/existing-repo-setup-prompt.js +16 -42
- package/dist/workspace/home/no-agent-home.d.ts +3 -1
- package/dist/workspace/home/no-agent-home.js +2 -2
- package/dist/workspace/inbox/workspace-inbox.d.ts +1 -1
- package/dist/workspace/inbox/workspace-inbox.js +1 -1
- package/dist/workspace/layout/project-files-view.js +2 -1
- package/dist/workspace/layout/project-home.js +16 -9
- package/dist/workspace/memory/memory-page-list.js +1 -1
- package/dist/workspace/new/workspace-handoff.js +2 -1
- package/dist/workspace/projects/modal/project-icon-field.js +2 -1
- package/dist/workspace/session-workspace.js +13 -12
- package/dist/workspace/setup/setup-steps.d.ts +43 -0
- package/dist/workspace/setup/setup-steps.js +38 -0
- package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
- package/dist/workspace/setup/workspace-setup-page.js +124 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
- package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
- package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
- package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
- package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
- package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
- package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
- package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
- package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
- package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
- package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
- package/dist/workspace/sidebar/footer/promo-card.js +47 -0
- package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
- package/dist/workspace/sidebar/project-nav-items.js +12 -4
- package/dist/workspace/sidebar/project-session-list.js +58 -26
- package/dist/workspace/sidebar/project-sidebar.js +2 -5
- package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
- package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
- package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
- package/dist/workspace/sidebar/session-group-sections.js +121 -41
- package/dist/workspace/sidebar/session-grouping.d.ts +1 -1
- package/dist/workspace/sidebar/session-grouping.js +1 -1
- package/dist/workspace/sidebar/sidebar-drill.js +6 -0
- package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
- package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
- package/dist/workspace/sidebar/use-workspace-list.js +11 -1
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
- package/dist/workspace/space/space-tab-panels.js +1 -1
- package/dist/workspace/spaces/space-details-panel.js +2 -2
- package/dist/workspace/spaces/space-timeline.js +2 -2
- package/dist/workspace/spaces/space-triggers.js +2 -2
- package/dist/workspace/spaces/space-view.js +11 -5
- package/package.json +79 -10
- package/skills/kortix-ui/SKILL.md +2 -2
- package/skills/kortix-ui/references/modules.md +5 -3
- package/dist/session/prompts/session-connect-prompt.d.ts +0 -40
- package/dist/session/thread/turn-share.d.ts +0 -16
- package/dist/session/thread/turn-share.js +0 -161
- package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
- package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
- /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
|
@@ -44,7 +44,7 @@ import { createContext, useCallback, useContext, useEffect, useMemo, useRef } fr
|
|
|
44
44
|
import { useProjectContext } from '../../files/project/context.js';
|
|
45
45
|
// NOT `@kortix/sdk/react`'s change-request hook. See the note above — this is
|
|
46
46
|
// a cache-coherence requirement, not a style preference.
|
|
47
|
-
import {
|
|
47
|
+
import { changeRequestKeys, invalidateTurnChangeRequestReads, useSessionChangeRequests, } from '../../files/project/hooks/use-change-requests.js';
|
|
48
48
|
import { usePublishSessionChangeRequests } from './session-outcomes-bridge.js';
|
|
49
49
|
import { useProjectCan } from '../../internal/lib/use-project-can.js';
|
|
50
50
|
import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
|
|
@@ -67,7 +67,7 @@ export function SessionOutcomesProvider({ projectSessionId, turnSpans, busy, onO
|
|
|
67
67
|
const { allowed } = useProjectCan(projectId, PROJECT_ACTIONS.PROJECT_GITOPS_READ);
|
|
68
68
|
const { data } = useSessionChangeRequests(projectSessionId, { refetchInterval: busy ? 5_000 : 60_000, enabled: allowed });
|
|
69
69
|
const requests = useMemo(() => allowed ? (data?.change_requests ?? []) : [], [allowed, data?.change_requests]);
|
|
70
|
-
useRefreshChangeRequestsOnTurnEnd(busy);
|
|
70
|
+
useRefreshChangeRequestsOnTurnEnd(busy, projectSessionId);
|
|
71
71
|
const all = useMemo(
|
|
72
72
|
// Change requests are the only outcome a turn produces. The derived
|
|
73
73
|
// pipeline (files, schedules, background tasks, connector links) was built
|
|
@@ -109,20 +109,27 @@ export function SessionOutcomesProvider({ projectSessionId, turnSpans, busy, onO
|
|
|
109
109
|
* (KRTX-3009, KRTX-3010). Only the busy -> idle edge reads: mounting an idle
|
|
110
110
|
* session already fetches.
|
|
111
111
|
*/
|
|
112
|
-
function useRefreshChangeRequestsOnTurnEnd(busy) {
|
|
112
|
+
function useRefreshChangeRequestsOnTurnEnd(busy, sessionId) {
|
|
113
113
|
const qc = useQueryClient();
|
|
114
114
|
const projectId = useProjectContext()?.projectId ?? '';
|
|
115
|
-
|
|
115
|
+
// Now: this session's cards. After the settle delay, once, while the session
|
|
116
|
+
// stays idle: the cards again, the sidebar list and the review summary. A
|
|
117
|
+
// busy flicker cancels the settle read, so it costs only the cards' read.
|
|
118
|
+
const refreshCards = useCallback(() => {
|
|
119
|
+
if (projectId && sessionId)
|
|
120
|
+
void qc.invalidateQueries({ queryKey: changeRequestKeys.sessionList(projectId, sessionId), exact: true });
|
|
121
|
+
}, [qc, projectId, sessionId]);
|
|
122
|
+
const refreshAll = useCallback(() => invalidateTurnChangeRequestReads(qc, projectId, sessionId), [qc, projectId, sessionId]);
|
|
116
123
|
const wasBusy = useRef(busy);
|
|
117
124
|
useEffect(() => {
|
|
118
125
|
const ended = wasBusy.current && !busy;
|
|
119
126
|
wasBusy.current = busy;
|
|
120
127
|
if (!ended)
|
|
121
128
|
return;
|
|
122
|
-
|
|
123
|
-
const timer = setTimeout(
|
|
129
|
+
refreshCards();
|
|
130
|
+
const timer = setTimeout(refreshAll, CHANGE_REQUEST_SETTLE_MS);
|
|
124
131
|
return () => clearTimeout(timer);
|
|
125
|
-
}, [busy,
|
|
132
|
+
}, [busy, refreshCards, refreshAll]);
|
|
126
133
|
}
|
|
127
134
|
/** A turn's outcomes, oldest first. `EMPTY` is a module constant so a turn with
|
|
128
135
|
* no outcomes gets the SAME array every render and never re-renders for it. */
|
|
@@ -1,28 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The action panel column's root (`session-action-panel-column.tsx` renders it
|
|
5
|
+
* beside the chat). It takes no props: everything the sections below need
|
|
6
|
+
* comes from `SessionPanelProvider`, which owns the session's panel state for
|
|
7
|
+
* both surfaces.
|
|
5
8
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
9
|
+
* ADVANCED PANEL TEMPORARILY DISABLED: Easy is the one panel presentation
|
|
10
|
+
* (Easy Panel v2 spec, 2026-07-17). On desktop the Easy panel is the plan's
|
|
11
|
+
* ONLY surface (`planBelongsToChat` in turn/plan-anchor.ts): restoring
|
|
12
|
+
* `AdvancedPanel` without a Plan card of its own hides the plan.
|
|
10
13
|
*/
|
|
11
|
-
// import { AdvancedPanel } from './advanced/advanced-panel.js'; // ADVANCED PANEL TEMPORARILY DISABLED
|
|
12
14
|
import { EasyPanel } from './easy/easy-panel.js';
|
|
13
15
|
export function ActionPanel() {
|
|
14
|
-
// ADVANCED PANEL TEMPORARILY DISABLED — Easy is the one panel presentation
|
|
15
|
-
// (Easy Panel v2 spec, 2026-07-17). AdvancedPanel and the panelMode
|
|
16
|
-
// preference remain; do not restore the old request-discard effects.
|
|
17
|
-
//
|
|
18
|
-
// RE-ENABLING THIS LOSES THE PLAN unless Advanced grows a Plan card too.
|
|
19
|
-
// On desktop the Easy panel is the plan's ONLY surface — the transcript no
|
|
20
|
-
// longer takes it back when the panel is not drawing it (`planBelongsToChat`
|
|
21
|
-
// in turn/plan-anchor.ts, which explains why). `AdvancedPanel` is a
|
|
22
|
-
// tool-call stepper with no cards, so an advanced-mode user would see no
|
|
23
|
-
// plan anywhere. Give Advanced its own `PlanPanelCard`, or make this a
|
|
24
|
-
// condition in `planBelongsToChat` as a deliberate product call.
|
|
25
|
-
//
|
|
26
|
-
// return mode === 'advanced' ? <AdvancedPanel … /> : (
|
|
27
16
|
return _jsx(EasyPanel, {});
|
|
28
17
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type ShareContext } from '../../../files/viewer/viewer-actions.js';
|
|
3
|
-
export declare function AppPreview({ url, name, projectId, shareContext, onClose, onSendToAgent, }: {
|
|
3
|
+
export declare function AppPreview({ url, name, projectId, shareContext, onClose, onSendToAgent, historyKey, }: {
|
|
4
4
|
/** The internal sandbox URL the agent handed over, e.g. http://localhost:3000. */
|
|
5
5
|
url: string;
|
|
6
|
+
/** Keeps the page and its Back/Forward across remounts (a switch to
|
|
7
|
+
* Terminal and back), per session. See `frame-history.ts`. */
|
|
8
|
+
historyKey?: string;
|
|
6
9
|
name: string;
|
|
7
10
|
/** Lists the project's Apps on the no-app landing. */
|
|
8
11
|
projectId?: string;
|
|
@@ -36,12 +36,15 @@ import { useBrowserRecentsStore } from '../../../internal/stores/browser-recents
|
|
|
36
36
|
import { probePreviewPort } from '@kortix/sdk';
|
|
37
37
|
import { useRuntimeConnectionStore } from '@kortix/sdk/react';
|
|
38
38
|
import { ArrowSquareOutIcon, GlobeIcon as Globe, SparkleIcon as SparklesSolid, WarningIcon, } from '@phosphor-icons/react';
|
|
39
|
-
import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore, } from 'react';
|
|
39
|
+
import { useCallback, useEffect, useMemo, useLayoutEffect, useRef, useState, useSyncExternalStore, } from 'react';
|
|
40
40
|
import { PreviewLoadingOverlay, SandboxAddressBar, } from '../../../browser/sandbox-browser-chrome.js';
|
|
41
41
|
import { BrowserLanding } from '../../../browser/browser-landing.js';
|
|
42
42
|
import { CloseButton, DetailSidebarToggle } from './detail-view.js';
|
|
43
43
|
import { PREVIEW_MAX_WAIT_MS, PREVIEW_SLOW_MS, PREVIEW_PROBE_INTERVAL_MS, previewErrorReason, previewSlowReason, previewLoadSuccessState, previewLoadVerdict, runtimeSandboxHealth, sandboxRecents, shouldArmLoadTimeout, shouldKeepProbingPort, } from './easy-panel-logic.js';
|
|
44
44
|
import { PanelWidthButton, ViewerActions } from '../../../files/viewer/viewer-actions.js';
|
|
45
|
+
import { currentEntry, frameReportOf, initialFrameHistory, NEW_FRAME_TRACKER, pushEntry, reduceFrameReport, rememberFrameHistory, reportedFrameUrl, retargetPreviewUrl, } from './frame-history.js';
|
|
46
|
+
import { SESSION_BAR_CLASS } from '../../../internal/layout/panel-chrome.js';
|
|
47
|
+
import { cn } from '../../../lib/utils.js';
|
|
45
48
|
// zustand v5's own hook feeds React's `useSyncExternalStore` a
|
|
46
49
|
// `getServerSnapshot` pinned to `getInitialState()` — correct for real SSR
|
|
47
50
|
// (sandbox health can only ever be learned from a client-side poll, so it is
|
|
@@ -58,26 +61,41 @@ const getSandboxHealthSnapshot = () => {
|
|
|
58
61
|
initialCheckDone: s.initialCheckDone,
|
|
59
62
|
});
|
|
60
63
|
};
|
|
61
|
-
export function AppPreview({ url, name, projectId, shareContext, onClose, onSendToAgent, }) {
|
|
64
|
+
export function AppPreview({ url, name, projectId, shareContext, onClose, onSendToAgent, historyKey, }) {
|
|
62
65
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
63
66
|
// The app runs on localhost *inside the sandbox*, which the browser cannot
|
|
64
67
|
// reach. The proxy is what makes it openable at all.
|
|
65
68
|
const { proxyUrl } = useSandboxProxy();
|
|
66
|
-
// History of internal (localhost) URLs. Back/forward are real, not decorative
|
|
67
|
-
|
|
68
|
-
const [
|
|
69
|
-
const current =
|
|
69
|
+
// History of internal (localhost) URLs. Back/forward are real, not decorative:
|
|
70
|
+
// the frame's own navigations land here through the preview bridge (D-05).
|
|
71
|
+
const [frameHistory, setFrameHistory] = useState(() => initialFrameHistory(historyKey, url));
|
|
72
|
+
const current = currentEntry(frameHistory);
|
|
73
|
+
// The address the frame was LOADED with. It differs from `current` after a
|
|
74
|
+
// navigation inside the frame: the frame got there itself, so its `src`
|
|
75
|
+
// must not change, or the panel would reload the page it is already on.
|
|
76
|
+
const [frameUrl, setFrameUrl] = useState(current);
|
|
77
|
+
// True until the frame reports the address of the page the panel loaded.
|
|
78
|
+
const settlingRef = useRef(true);
|
|
79
|
+
// What `reduceFrameReport` remembers between this frame's reports, and the
|
|
80
|
+
// history it last produced (reports can outrun a render).
|
|
81
|
+
const trackerRef = useRef(NEW_FRAME_TRACKER);
|
|
82
|
+
const historyRef = useRef(frameHistory);
|
|
83
|
+
const iframeRef = useRef(null);
|
|
70
84
|
// The quick-view "Open Browser" with no running app hands over url: '' —
|
|
71
85
|
// no port to load, nothing to spin on. Land on the address bar instead.
|
|
72
|
-
const noApp = !
|
|
86
|
+
const noApp = !frameUrl;
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (historyKey)
|
|
89
|
+
rememberFrameHistory(historyKey, frameHistory);
|
|
90
|
+
}, [historyKey, frameHistory]);
|
|
73
91
|
// The landing's "Recents" — the shared history BrowserPanel also shows,
|
|
74
92
|
// filtered to sandbox ports (the only URLs this address bar will open).
|
|
75
93
|
const recents = useBrowserRecentsStore((s) => s.recents);
|
|
76
94
|
const localhostRecents = useMemo(() => sandboxRecents(recents), [recents]);
|
|
77
95
|
const port = useMemo(() => parseLocalhostUrl(current)?.port ?? 0, [current]);
|
|
78
|
-
const proxied = useMemo(() => proxyUrl(
|
|
96
|
+
const proxied = useMemo(() => proxyUrl(frameUrl) ?? frameUrl, [proxyUrl, frameUrl]);
|
|
79
97
|
// Null while the token or the host's URL (`UiProvider resolvePreviewUrl`) resolves.
|
|
80
|
-
const hostPreview = usePreviewFrameUrl(
|
|
98
|
+
const hostPreview = usePreviewFrameUrl(frameUrl, proxied, shareContext ?? (projectId ? { projectId } : undefined));
|
|
81
99
|
const authenticatedUrl = hostPreview.url;
|
|
82
100
|
// A project App frames signed in, on its own origin (`useAppInBrowser`).
|
|
83
101
|
const { app, apps, src: previewUrl } = useAppInBrowser(projectId, authenticatedUrl);
|
|
@@ -207,34 +225,78 @@ export function AppPreview({ url, name, projectId, shareContext, onClose, onSend
|
|
|
207
225
|
if (noApp)
|
|
208
226
|
focusWithoutScroll(addressRef.current);
|
|
209
227
|
}, [noApp]);
|
|
210
|
-
|
|
228
|
+
// Every load the panel starts goes through here. The frame is keyed on its
|
|
229
|
+
// resolved `src` (below), so a new address mounts a fresh frame once its
|
|
230
|
+
// authenticated URL resolves. Only the SAME address needs `refreshKey`.
|
|
231
|
+
// Bumping it for a new address remounted the OLD `src` while the new one
|
|
232
|
+
// resolved: two requests for one Refresh or Back. A fresh frame, never a
|
|
233
|
+
// `src` change, also keeps the tab's own history free of frame entries.
|
|
234
|
+
const frameUrlRef = useRef(frameUrl);
|
|
235
|
+
// Mirror the latest state for the callbacks above, after each commit.
|
|
236
|
+
useLayoutEffect(() => {
|
|
237
|
+
historyRef.current = frameHistory;
|
|
238
|
+
frameUrlRef.current = frameUrl;
|
|
239
|
+
}, [frameHistory, frameUrl]);
|
|
240
|
+
const load = useCallback((next) => {
|
|
241
|
+
settlingRef.current = true;
|
|
211
242
|
setIsLoading(true);
|
|
212
243
|
setHasError(false);
|
|
213
|
-
|
|
244
|
+
if (next === frameUrlRef.current)
|
|
245
|
+
setRefreshKey((k) => k + 1);
|
|
246
|
+
else
|
|
247
|
+
setFrameUrl(next);
|
|
214
248
|
}, []);
|
|
249
|
+
// Reload the page on screen, which can be one the frame navigated to.
|
|
250
|
+
const reload = useCallback(() => load(current), [load, current]);
|
|
251
|
+
// The bridge in the framed page reports each address it reaches
|
|
252
|
+
// (`apps/api/src/sandbox-proxy/preview-bridge.ts`). Only the frame this
|
|
253
|
+
// panel mounted is heard. A page without the bridge (a strict CSP, a Kortix
|
|
254
|
+
// App on its own origin) reports nothing, and the address stays on what the
|
|
255
|
+
// panel loaded.
|
|
256
|
+
useEffect(() => {
|
|
257
|
+
const onMessage = (event) => {
|
|
258
|
+
const frame = iframeRef.current?.contentWindow;
|
|
259
|
+
if (!frame || event.source !== frame)
|
|
260
|
+
return;
|
|
261
|
+
const reported = reportedFrameUrl(event.data, frameUrl);
|
|
262
|
+
if (!reported)
|
|
263
|
+
return;
|
|
264
|
+
const result = reduceFrameReport(historyRef.current, trackerRef.current, frameReportOf(event.data, reported, settlingRef.current));
|
|
265
|
+
settlingRef.current = false;
|
|
266
|
+
trackerRef.current = result.tracker;
|
|
267
|
+
historyRef.current = result.history;
|
|
268
|
+
setFrameHistory(result.history);
|
|
269
|
+
};
|
|
270
|
+
window.addEventListener('message', onMessage);
|
|
271
|
+
return () => window.removeEventListener('message', onMessage);
|
|
272
|
+
}, [frameUrl]);
|
|
215
273
|
const navigateTo = useCallback((next) => {
|
|
216
274
|
// Feed the shared recents (the same list BrowserPanel's landing shows)
|
|
217
275
|
// so the port map builds up from either surface.
|
|
218
276
|
useBrowserRecentsStore.getState().addRecent(next);
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
277
|
+
setFrameHistory((history) => pushEntry(history, next));
|
|
278
|
+
load(next);
|
|
279
|
+
}, [load]);
|
|
280
|
+
const canGoBack = frameHistory.index > 0;
|
|
281
|
+
const canGoForward = frameHistory.index < frameHistory.entries.length - 1;
|
|
282
|
+
// Back/Forward reload the frame at the remembered address. A cross-origin
|
|
283
|
+
// frame's own `history` is not reachable from here.
|
|
284
|
+
const goTo = useCallback((index) => {
|
|
285
|
+
const target = frameHistory.entries[index];
|
|
286
|
+
if (target === undefined)
|
|
227
287
|
return;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}, [
|
|
288
|
+
setFrameHistory((history) => ({ ...history, index }));
|
|
289
|
+
load(target);
|
|
290
|
+
}, [frameHistory.entries, load]);
|
|
291
|
+
const goBack = useCallback(() => {
|
|
292
|
+
if (canGoBack)
|
|
293
|
+
goTo(frameHistory.index - 1);
|
|
294
|
+
}, [canGoBack, goTo, frameHistory.index]);
|
|
231
295
|
const goForward = useCallback(() => {
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}, [canGoForward, reload]);
|
|
237
|
-
return (_jsxs("div", { className: "bg-background flex h-full min-h-0 min-w-0 flex-col", children: [_jsx(AppPreviewToolbar, { previewUrl: previewUrl, onClose: onClose, displayValue: current, isLoading: isLoading, canGoBack: canGoBack, canGoForward: canGoForward, onBack: goBack, onForward: goForward, onReload: reload, onHome: () => navigateTo(''), onNavigate: navigateTo, suggestions: suggestions, inputRef: addressRef, trailing:
|
|
296
|
+
if (canGoForward)
|
|
297
|
+
goTo(frameHistory.index + 1);
|
|
298
|
+
}, [canGoForward, goTo, frameHistory.index]);
|
|
299
|
+
return (_jsxs("div", { className: "bg-background flex h-full min-h-0 min-w-0 flex-col", children: [_jsx(AppPreviewToolbar, { previewUrl: previewUrl, openUrl: previewUrl ? retargetPreviewUrl(previewUrl, frameUrl, current) : previewUrl, onClose: onClose, displayValue: current, isLoading: isLoading, canGoBack: canGoBack, canGoForward: canGoForward, onBack: goBack, onForward: goForward, onReload: reload, onHome: () => navigateTo(''), onNavigate: navigateTo, suggestions: suggestions, inputRef: addressRef, trailing:
|
|
238
300
|
// An app has no file to save and no text to put on a clipboard, so
|
|
239
301
|
// `Copy link` is the one copy action — the thing you can hand
|
|
240
302
|
// someone for a running port.
|
|
@@ -249,7 +311,7 @@ export function AppPreview({ url, name, projectId, shareContext, onClose, onSend
|
|
|
249
311
|
_jsx("div", { className: "flex h-full flex-col overflow-y-auto", children: _jsx(BrowserLanding, { projectId: projectId, recents: localhostRecents, empty: _jsx(SearchHint, {}), onOpen: (url) => {
|
|
250
312
|
const parsed = parseLocalhostUrl(url);
|
|
251
313
|
navigateTo(parsed ? toInternalUrl(parsed.port, parsed.path) : url);
|
|
252
|
-
} }) })) : hasPreview ? (_jsx("iframe", { src: previewUrl, title: title, className: "h-full w-full border-0", sandbox: framePolicy('app', previewUrl).sandbox, onLoad: () => {
|
|
314
|
+
} }) })) : hasPreview ? (_jsx("iframe", { ref: iframeRef, src: previewUrl, title: title, className: "h-full w-full border-0", sandbox: framePolicy('app', previewUrl).sandbox, onLoad: () => {
|
|
253
315
|
// A load is positive evidence the app is up, which overrides a
|
|
254
316
|
// `hasError` an earlier verdict set — otherwise the error card
|
|
255
317
|
// (absolute inset-0 z-10) keeps covering a working app until a
|
|
@@ -263,7 +325,7 @@ export function AppPreview({ url, name, projectId, shareContext, onClose, onSend
|
|
|
263
325
|
// A real error event is its own evidence — no probe needed.
|
|
264
326
|
setIsLoading(false);
|
|
265
327
|
setHasError(true);
|
|
266
|
-
} }, refreshKey)) : (
|
|
328
|
+
} }, `${refreshKey}:${previewUrl}`)) : (
|
|
267
329
|
// Auth token still resolving. A spinner, not an empty frame — an empty
|
|
268
330
|
// frame reads as "your app is broken".
|
|
269
331
|
_jsx("div", { className: "flex h-full items-center justify-center", children: _jsx(Loading, { className: "size-4" }) }))] })] }));
|
|
@@ -273,14 +335,14 @@ export function AppPreview({ url, name, projectId, shareContext, onClose, onSend
|
|
|
273
335
|
* width, close. Shared by the live preview and the booting card, so the two
|
|
274
336
|
* cannot drift.
|
|
275
337
|
*/
|
|
276
|
-
function AppPreviewToolbar({ previewUrl, onClose, ...address }) {
|
|
338
|
+
function AppPreviewToolbar({ previewUrl, openUrl, onClose, ...address }) {
|
|
277
339
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
278
340
|
const isMobile = useIsMobile();
|
|
279
|
-
return (_jsxs("div", { className:
|
|
341
|
+
return (_jsxs("div", { className: cn(SESSION_BAR_CLASS, 'gap-0.5 px-2'), children: [_jsx(DetailSidebarToggle, {}), _jsx(SandboxAddressBar, { ...address, hasPreview: !!previewUrl, placeholder: tI18nComplete.raw('text878abd024f27') }), _jsxs(ButtonGroup, { className: "shrink-0", children: [_jsx(Hint, { label: tI18nComplete.raw('text306ef19c8ac3'), side: "bottom", children: _jsx(Button, { variant: "secondary", size: "icon", disabled: !previewUrl, "aria-label": tI18nComplete.raw('text306ef19c8ac3'), onClick: () => {
|
|
280
342
|
if (!previewUrl)
|
|
281
343
|
return;
|
|
282
344
|
track('app_opened_new_tab');
|
|
283
|
-
window.open(previewUrl, '_blank', 'noopener,noreferrer');
|
|
345
|
+
window.open(openUrl || previewUrl, '_blank', 'noopener,noreferrer');
|
|
284
346
|
}, className: "size-7 shrink-0 active:scale-[0.96]", children: _jsx(ArrowSquareOutIcon, { className: "size-3.5" }) }) }), _jsx(PanelWidthButton, { isMobile: isMobile }), _jsx(CloseButton, { onClose: onClose })] })] }));
|
|
285
347
|
}
|
|
286
348
|
const noop = () => { };
|
|
@@ -51,17 +51,12 @@ export function AppsCard({ apps, onOpenApp, }) {
|
|
|
51
51
|
return (_jsx(PanelCard, { title: tI18nComplete.raw('text324b134f57c7'), count: apps.length, isEmpty: apps.length === 0,
|
|
52
52
|
// The payoff: if the agent got something running, that is the single most
|
|
53
53
|
// interesting fact in the panel. It should not take a click to learn it.
|
|
54
|
-
defaultExpanded: apps.length > 0,
|
|
54
|
+
defaultExpanded: apps.length > 0, emptyText: tI18nComplete.raw('texte0687cb3046c'), contentClassName: "pb-2", children: _jsx("ul", { className: "flex flex-col gap-0", children: apps.map((app) => {
|
|
55
55
|
const port = portOf(app.url);
|
|
56
|
-
return (_jsx("li", { children: _jsxs("button", { type: "button", onClick: () => onOpenApp(app), className: cn('hover:bg-accent
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
'transition-[background-color,transform] active:scale-[0.98]'), children: [_jsx("span", { className: "flex size-7 shrink-0 items-center justify-center", "aria-hidden": true, children: _jsxs("span", { className: "relative flex size-2", children: [sandboxAlive && (_jsx("span", { className: "bg-kortix-green absolute inline-flex size-2 animate-ping rounded-full opacity-60 motion-reduce:animate-none" })), _jsx("span", { className: cn('relative inline-flex size-2 rounded-full', sandboxAlive ? 'bg-kortix-green' : 'bg-muted-foreground/40') })] }) }), _jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm", children: app.name }), !sandboxAlive && (_jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: tI18nComplete.raw('text8322e87d2458') })), sandboxAlive && port > 0 && (_jsxs("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: [":", port] }))] }) }, app.url));
|
|
56
|
+
return (_jsx("li", { children: _jsxs("button", { type: "button", onClick: () => onOpenApp(app), className: cn('hover:bg-accent flex w-full items-center gap-2.5 px-4 py-2 text-left',
|
|
57
|
+
// Full-width row: the brand's full-width press value (0.998),
|
|
58
|
+
// shared with the Outputs and Context rows. The background
|
|
59
|
+
// change carries the press; the scale only confirms it.
|
|
60
|
+
'transition-[background-color,transform] active:scale-[0.998]'), children: [_jsx("span", { className: "flex size-7 shrink-0 items-center justify-center", "aria-hidden": true, children: _jsxs("span", { className: "relative flex size-2", children: [sandboxAlive && (_jsx("span", { className: "bg-kortix-green absolute inline-flex size-2 animate-ping rounded-full opacity-60 motion-reduce:animate-none" })), _jsx("span", { className: cn('relative inline-flex size-2 rounded-full', sandboxAlive ? 'bg-kortix-green' : 'bg-muted-foreground/40') })] }) }), _jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm", children: app.name }), !sandboxAlive && (_jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: tI18nComplete.raw('text8322e87d2458') })), sandboxAlive && port > 0 && (_jsxs("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: [":", port] }))] }) }, app.url));
|
|
62
61
|
}) }) }));
|
|
63
62
|
}
|
|
64
|
-
/** Soft placeholder art — a browser window, matching the other cards' empty states. */
|
|
65
|
-
function AppsArt() {
|
|
66
|
-
return (_jsxs("div", { "aria-hidden": true, className: "border-border/60 bg-muted/30 flex h-16 w-20 flex-col gap-1.5 rounded-md border p-2", children: [_jsxs("div", { className: "flex gap-1", children: [_jsx("span", { className: "bg-muted-foreground/30 size-1 rounded-full" }), _jsx("span", { className: "bg-muted-foreground/30 size-1 rounded-full" }), _jsx("span", { className: "bg-muted-foreground/30 size-1 rounded-full" })] }), _jsx("span", { className: "bg-muted-foreground/20 h-full w-full rounded-sm" })] }));
|
|
67
|
-
}
|
|
@@ -13,5 +13,5 @@ export function ChangeRequestsCard({ requests, onOpen, onJump, jumping = false }
|
|
|
13
13
|
const locale = useLocale();
|
|
14
14
|
if (requests.length === 0)
|
|
15
15
|
return null;
|
|
16
|
-
return (_jsx(PanelCard, { title: t('title'), count: requests.length, isEmpty: false, defaultExpanded: true, fill: true, contentClassName: "min-h-0 overflow-y-auto
|
|
16
|
+
return (_jsx(PanelCard, { title: t('title'), count: requests.length, isEmpty: false, defaultExpanded: true, fill: true, contentClassName: "min-h-0 overflow-y-auto pb-2", children: _jsx("ul", { children: [...requests].sort((a, b) => Date.parse(b.created_at) - Date.parse(a.created_at)).map((cr) => (_jsxs("li", { className: "hover:bg-accent flex items-center gap-1 pr-2", children: [_jsxs("button", { type: "button", "data-cr-id": cr.cr_id, onClick: () => onOpen(cr.cr_id), className: "flex min-w-0 flex-1 flex-col gap-1 py-2 pl-4 text-left", children: [_jsxs("span", { className: "flex w-full min-w-0 items-baseline gap-2", children: [_jsxs("span", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: ["#", cr.number] }), _jsx("span", { className: "text-foreground truncate text-sm", children: cr.title })] }), _jsxs("span", { className: "flex flex-wrap items-center gap-2", children: [cr.status === 'open' ? _jsx(Badge, { variant: "secondary", size: "sm", children: t('open') }) : _jsx(ChangeRequestStatusBadge, { cr: cr }), _jsx("time", { dateTime: cr.created_at, className: "text-muted-foreground text-xs", children: relativeTime(cr.created_at, locale) })] })] }), _jsx(Hint, { label: t('jump', { number: cr.number }), children: _jsx(Button, { variant: "ghost", size: "icon", disabled: jumping, "aria-label": t('jump', { number: cr.number }), onClick: () => onJump(cr.cr_id), children: _jsx(ArrowBendUpLeftIcon, { className: "size-3.5 shrink-0" }) }) })] }, cr.cr_id))) }) }));
|
|
17
17
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { VcsFileDiff } from '@kortix/sdk/react';
|
|
2
|
+
import type { Detail } from './detail-view.js';
|
|
3
|
+
type ChangesCardProps = {
|
|
4
|
+
/** Opens one file's diff in the detail panel. */
|
|
5
|
+
onOpenDetail: (detail: Detail) => void;
|
|
6
|
+
/** Opens the full comparison (Files → Changes). */
|
|
7
|
+
onOpenAll: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function ChangesCard(props: ChangesCardProps): import("react").JSX.Element | null;
|
|
10
|
+
/** The section itself, from a known non-empty file list. Pure: tests render it directly. */
|
|
11
|
+
export declare function ChangesSection({ files, onOpenDetail, onOpenAll, }: ChangesCardProps & {
|
|
12
|
+
files: VcsFileDiff[];
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* `ChangesCard` — the files this session changed against its base, one row per
|
|
5
|
+
* file. A row opens THAT file's diff in the detail panel; the last row
|
|
6
|
+
* ("Review changes") opens the full comparison. Same row rhythm as Outputs, so the two sections read as
|
|
7
|
+
* one list.
|
|
8
|
+
*
|
|
9
|
+
* Renders nothing until the answer is known and non-empty: a booting runtime,
|
|
10
|
+
* a project without git, or a session with no edits adds no section, which
|
|
11
|
+
* keeps an empty or chat-only session to the sections it actually has.
|
|
12
|
+
*/
|
|
13
|
+
import { ArrowRightIcon, FileTextIcon } from '@phosphor-icons/react';
|
|
14
|
+
import { useTranslations } from '../../../i18n/index.js';
|
|
15
|
+
import { SessionDiffViewer } from '../session-diff-viewer.js';
|
|
16
|
+
import { CHANGE_STATUS_META, useSessionChanges } from '../session-changes-shared.js';
|
|
17
|
+
import { CountBadge } from '../../../primitives/count-badge.js';
|
|
18
|
+
import { STATUS_DOT } from '../../../primitives/status.js';
|
|
19
|
+
import { useLocalizedUiCatalog } from '../../../i18n/ui-catalog/use-localized-ui-catalog.js';
|
|
20
|
+
import { cn } from '../../../lib/utils.js';
|
|
21
|
+
import { ChalkTile, chalkLabel } from './outputs-card.js';
|
|
22
|
+
import { PanelCard } from './panel-card.js';
|
|
23
|
+
import { getFileIcon } from '../../../files/project/components/file-icon.js';
|
|
24
|
+
/** Rows shown before the fold; the fold opens the full comparison. */
|
|
25
|
+
const VISIBLE_ROWS = 5;
|
|
26
|
+
function splitPath(file) {
|
|
27
|
+
const cut = file.lastIndexOf('/');
|
|
28
|
+
return cut < 0 ? { name: file, dir: '' } : { name: file.slice(cut + 1), dir: file.slice(0, cut) };
|
|
29
|
+
}
|
|
30
|
+
export function ChangesCard(props) {
|
|
31
|
+
const { files, isPending, isTracked } = useSessionChanges();
|
|
32
|
+
if (isPending || !isTracked || files.length === 0)
|
|
33
|
+
return null;
|
|
34
|
+
return _jsx(ChangesSection, { files: files, ...props });
|
|
35
|
+
}
|
|
36
|
+
/** The section itself, from a known non-empty file list. Pure: tests render it directly. */
|
|
37
|
+
export function ChangesSection({ files, onOpenDetail, onOpenAll, }) {
|
|
38
|
+
const t = useTranslations('hardcodedUi.i18nComplete');
|
|
39
|
+
const statusMeta = useLocalizedUiCatalog(CHANGE_STATUS_META);
|
|
40
|
+
const count = files.length;
|
|
41
|
+
const visible = files.slice(0, VISIBLE_ROWS);
|
|
42
|
+
const hidden = count - visible.length;
|
|
43
|
+
const openFile = (file) => {
|
|
44
|
+
const { name } = splitPath(file);
|
|
45
|
+
onOpenDetail({
|
|
46
|
+
key: `diff:${file}`,
|
|
47
|
+
title: name,
|
|
48
|
+
icon: _jsx(FileTextIcon, { className: "text-foreground size-4 shrink-0" }),
|
|
49
|
+
padded: false,
|
|
50
|
+
body: _jsx(SessionDiffViewer, { filePath: file }),
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
return (_jsxs(PanelCard, { title: t.raw('textbbd4b6a86bc6'), count: count, isEmpty: false, defaultExpanded: true, contentClassName: "pb-2", children: [_jsx("ul", { children: visible.map((f) => {
|
|
54
|
+
const { name, dir } = splitPath(f.file);
|
|
55
|
+
// Added / Edited / Removed, as the full comparison shows it: a line
|
|
56
|
+
// count alone cannot tell a deleted file from an edit that removed lines.
|
|
57
|
+
const status = f.status ? statusMeta[f.status] : undefined;
|
|
58
|
+
return (_jsx("li", { children: _jsxs("button", { type: "button", title: status ? `${status.label}: ${f.file}` : f.file, onClick: () => openFile(f.file), className: "hover:bg-accent flex w-full items-center gap-2.5 px-4 py-1.5 text-left transition-[background-color,transform] active:scale-[0.998]", children: [_jsx(ChalkTile, { label: chalkLabel({ kind: 'file', name }), children: getFileIcon(name, { className: 'size-3.5', variant: 'monochrome' }) }), status && (_jsx("span", { "data-status": f.status, className: cn('size-1.5 shrink-0 rounded-full', STATUS_DOT[status.tone]), "aria-label": status.label, role: "img" })), _jsxs("span", { className: "min-w-0 flex-1 truncate text-sm", children: [_jsx("span", { className: "text-foreground", children: name }), dir && _jsx("span", { className: "text-muted-foreground ml-1.5 text-xs", children: dir })] }), (f.additions > 0 || f.deletions > 0) && (_jsxs("span", { className: "flex shrink-0 gap-1.5 text-xs tabular-nums", children: [f.additions > 0 && _jsxs("span", { className: "text-kortix-green", children: ["+", f.additions] }), f.deletions > 0 && _jsxs("span", { className: "text-kortix-red", children: ["\u2212", f.deletions] })] }))] }) }, f.file));
|
|
59
|
+
}) }), hidden > 0 && (_jsxs("button", { type: "button", onClick: onOpenAll, className: "text-muted-foreground hover:text-foreground hover:bg-accent mt-0.5 flex w-full items-center gap-2.5 px-4 py-1.5 text-left text-sm transition-[background-color,color,transform] active:scale-[0.998]", children: [_jsx("span", { className: "flex size-6 shrink-0 items-center justify-center", children: _jsx(ArrowRightIcon, { className: "size-3.5" }) }), _jsx("span", { className: "flex-1 truncate", children: t.raw('text6a47708f4e14') }), _jsx(CountBadge, { count: hidden })] }))] }));
|
|
60
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { ContextUsage } from '../../composer/context-usage.js';
|
|
1
2
|
import type { ContextItem } from '../shared/derive-panels.js';
|
|
2
3
|
import type { Detail } from './detail-view.js';
|
|
3
|
-
export declare function ContextCard({ files, web, tools, sessionId, onOpenDetail, onOpenFile, onAddContext, }: {
|
|
4
|
+
export declare function ContextCard({ files, web, tools, sessionId, onOpenDetail, onOpenFile, onAddContext, usage, }: {
|
|
5
|
+
/** How full the model's context window is (`useSessionContextUsage`). Drawn
|
|
6
|
+
* as the meter on top; null before the first reply. */
|
|
7
|
+
usage?: ContextUsage | null;
|
|
4
8
|
files: ContextItem[];
|
|
5
9
|
web: ContextItem[];
|
|
6
10
|
tools: ContextItem[];
|
|
@@ -30,18 +30,19 @@ import { useTranslations } from '../../../i18n/index.js';
|
|
|
30
30
|
* `EasyPanel`, and the `projectId` prop this card no longer needs. This was
|
|
31
31
|
* the whole surface — nothing else in the panel referenced it.
|
|
32
32
|
*/
|
|
33
|
-
import { Badge } from '../../../primitives/badge.js';
|
|
34
33
|
import { Button } from '../../../primitives/button.js';
|
|
35
34
|
import { FaviconAvatar } from '../../../primitives/favicon-avatar.js';
|
|
36
35
|
import { getFileIcon } from '../../../files/project/components/file-icon.js';
|
|
36
|
+
import { ContextMeter } from './context-meter.js';
|
|
37
37
|
import { cn } from '../../../lib/utils.js';
|
|
38
|
-
import {
|
|
38
|
+
import { FileTextIcon as FileText, GlobeIcon as Globe, PlusIcon as Plus, } from '@phosphor-icons/react';
|
|
39
39
|
import { familyForTool, narrateFailedStep, narrateStep } from '@kortix/sdk';
|
|
40
40
|
import { safeHttpUrl } from '../../../_vendor/kortix-shared.js';
|
|
41
41
|
import { ToolParts } from './detail-view.js';
|
|
42
42
|
import { PanelCard } from './panel-card.js';
|
|
43
43
|
import { StepIcon } from './step-icon.js';
|
|
44
|
-
|
|
44
|
+
import { CaretRightSolidIcon } from '../../../icons/caret-right-solid.js';
|
|
45
|
+
export function ContextCard({ files, web, tools, sessionId, onOpenDetail, onOpenFile, onAddContext, usage, }) {
|
|
45
46
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
46
47
|
const groups = [];
|
|
47
48
|
if (web.length) {
|
|
@@ -49,7 +50,7 @@ export function ContextCard({ files, web, tools, sessionId, onOpenDetail, onOpen
|
|
|
49
50
|
id: 'web',
|
|
50
51
|
label: tI18nComplete.raw('text033c214ae9a3'),
|
|
51
52
|
count: web.length,
|
|
52
|
-
icon: _jsx(Globe, { className: "text-
|
|
53
|
+
icon: _jsx(Globe, { className: "text-foreground size-4 shrink-0" }),
|
|
53
54
|
body: _jsx(WebSourceList, { items: web }),
|
|
54
55
|
});
|
|
55
56
|
}
|
|
@@ -58,7 +59,7 @@ export function ContextCard({ files, web, tools, sessionId, onOpenDetail, onOpen
|
|
|
58
59
|
id: 'files',
|
|
59
60
|
label: tI18nComplete.raw('text83480f565627'),
|
|
60
61
|
count: files.length,
|
|
61
|
-
icon: _jsx(FileText, { className: "text-
|
|
62
|
+
icon: _jsx(FileText, { className: "text-foreground size-4 shrink-0" }),
|
|
62
63
|
body: _jsx(FileList, { items: files, onOpenFile: onOpenFile }),
|
|
63
64
|
});
|
|
64
65
|
}
|
|
@@ -86,15 +87,15 @@ export function ContextCard({ files, web, tools, sessionId, onOpenDetail, onOpen
|
|
|
86
87
|
id: tool.callID,
|
|
87
88
|
label: tool.label,
|
|
88
89
|
count: tool.calls?.length ?? 1,
|
|
89
|
-
icon: _jsx(StepIcon, { family: family, status: failed ? 'error' : 'done' }),
|
|
90
|
+
icon: _jsx(StepIcon, { family: family, status: failed ? 'error' : 'done', tone: "foreground" }),
|
|
90
91
|
body: _jsx(ToolParts, { calls: tool.calls ?? [], sessionId: sessionId, summary: summary }),
|
|
91
92
|
});
|
|
92
93
|
}
|
|
93
|
-
return (
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
contentClassName: "
|
|
94
|
+
return (_jsxs(PanelCard, { title: tI18nComplete.raw('texta6e600a10fed'), isEmpty: groups.length === 0 && !usage, emptyText: tI18nComplete.raw('textc63adab9bd56'), emptyActions: _jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: onAddContext, children: [_jsx(Plus, { className: "size-3.5" }), tI18nComplete.raw('text0f01d14cacf0')] }),
|
|
95
|
+
// No header count on purpose: the meter states how full the window is,
|
|
96
|
+
// and each row carries its own number (web sources, files read, calls
|
|
97
|
+
// per tool). Rows carry their own `px-4` and fill the width on hover.
|
|
98
|
+
contentClassName: "pb-2", defaultExpanded: files.length + web.length + tools.length > 0 || !!usage, children: [usage && _jsx(ContextMeter, { usage: usage }), _jsx("ul", { className: cn('flex flex-col gap-0', usage && groups.length > 0 && 'mt-2'), children: groups.map((g) => (_jsx("li", { className: "flex items-center", children: _jsxs("button", { type: "button", onClick: () => onOpenDetail({ key: g.id, title: g.label, icon: g.icon, body: g.body }), className: "hover:bg-accent flex h-8 w-full cursor-pointer items-center gap-2.5 px-4 text-left transition-[background-color,transform] active:scale-[0.998]", children: [_jsx("span", { className: "flex size-4 shrink-0 items-center justify-center", children: g.icon }), _jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm", children: g.label }), _jsx("span", { className: "text-muted-foreground text-sm tabular-nums", children: g.count }), _jsx(CaretRightSolidIcon, { className: "text-muted-foreground size-3.5 shrink-0" })] }) }, g.id))) })] }));
|
|
98
99
|
}
|
|
99
100
|
const ROW = cn('flex min-h-12 w-full items-center gap-3 rounded-md px-2.5 py-2 text-left', 'bg-muted/40 transition-colors');
|
|
100
101
|
/**
|
|
@@ -119,7 +120,7 @@ function WebSourceList({ items }) {
|
|
|
119
120
|
*/
|
|
120
121
|
function FileList({ items, onOpenFile, }) {
|
|
121
122
|
const allPaths = items.flatMap((it) => (it.path ? [it.path] : []));
|
|
122
|
-
return (_jsx("ul", { className: "flex min-w-0 flex-col gap-1.5", children: items.map((it) => it.path ? (_jsx("li", { children: _jsxs("button", { type: "button", onClick: () => onOpenFile(it.path, allPaths), className: cn(ROW, 'hover:bg-muted cursor-pointer transition-[background-color,transform] active:scale-[0.
|
|
123
|
+
return (_jsx("ul", { className: "flex min-w-0 flex-col gap-1.5", children: items.map((it) => it.path ? (_jsx("li", { children: _jsxs("button", { type: "button", onClick: () => onOpenFile(it.path, allPaths), className: cn(ROW, 'hover:bg-muted cursor-pointer transition-[background-color,transform] active:scale-[0.998]'), children: [_jsx("span", { className: "bg-muted/70 flex size-7 shrink-0 items-center justify-center rounded-sm", children: getFileIcon(basename(it.label), { className: 'size-4', variant: 'monochrome' }) }), _jsx("span", { className: "text-foreground truncate text-sm", children: it.label })] }) }, it.callID)) : (_jsxs("li", { className: ROW, children: [_jsx("span", { className: "bg-muted/70 flex size-7 shrink-0 items-center justify-center rounded-sm", children: _jsx(FileText, { className: "text-muted-foreground size-3.5" }) }), _jsx("span", { className: "text-foreground truncate text-sm", children: it.label })] }, it.callID))) }));
|
|
123
124
|
}
|
|
124
125
|
/** Last path segment — `getFileIcon` keys off the extension, and `it.label`
|
|
125
126
|
* can occasionally BE a full path (`deriveContext`'s `label: ... || path`
|
|
@@ -132,19 +133,3 @@ function basename(path) {
|
|
|
132
133
|
function prettyUrl(url) {
|
|
133
134
|
return url.replace(/^https?:\/\//, '').replace(/\/$/, '');
|
|
134
135
|
}
|
|
135
|
-
/**
|
|
136
|
-
* Soft placeholder art — overlapping note cards, matching the reference.
|
|
137
|
-
*
|
|
138
|
-
* The hairlines are `border-border` at full alpha, not `border-border/60`.
|
|
139
|
-
* Dark's `--border` (oklch 0.2686) already sits only 0.077 L above the card it
|
|
140
|
-
* draws on (`--card`, oklch 0.1913) — that IS the theme's hairline contrast —
|
|
141
|
-
* so taking 60% of it left the whole illustration effectively unrendered on
|
|
142
|
-
* dark. The fills are the same story: `bg-muted/30` over dark's card resolves
|
|
143
|
-
* to ~0.201 L against a 0.1913 ground, a 0.01 difference. `/50` and `/70` keep
|
|
144
|
-
* the two-card depth order while landing where the eye can find them. Light is
|
|
145
|
-
* unaffected in kind — `--border` is that theme's hairline too — and the fills
|
|
146
|
-
* stay soft there because `--muted` is only 0.024 L off `--card`.
|
|
147
|
-
*/
|
|
148
|
-
function ContextArt() {
|
|
149
|
-
return (_jsxs("div", { "aria-hidden": true, className: "relative h-16 w-24", children: [_jsx("span", { className: "border-border bg-muted/50 absolute top-3 left-0 h-10 w-8 rounded-sm border" }), _jsx("span", { className: "border-border bg-muted/70 absolute top-1.5 left-6 h-12 w-9 rounded-sm border" }), _jsx("span", { className: "border-border absolute top-3 left-14 h-10 w-8 rounded-sm border border-dashed bg-transparent" })] }));
|
|
150
|
-
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ContextUsage } from '../../composer/context-usage.js';
|
|
2
|
+
/**
|
|
3
|
+
* The catalog entry a recorded model key names. The session row carries the
|
|
4
|
+
* provider prefix ("kortix/codex/gpt-6.1-sol"); the gateway's served model
|
|
5
|
+
* does not ("codex/gpt-6.1-sol"). Both resolve to the same entry.
|
|
6
|
+
*/
|
|
7
|
+
export declare function findModelKey(models: {
|
|
8
|
+
providerID: string;
|
|
9
|
+
modelID: string;
|
|
10
|
+
}[], key: string | null | undefined): {
|
|
11
|
+
providerID: string;
|
|
12
|
+
modelID: string;
|
|
13
|
+
} | null;
|
|
14
|
+
/** The live session's context usage, or null outside a session panel / before the first reply. */
|
|
15
|
+
export declare function useSessionContextUsage(): ContextUsage | null;
|
|
16
|
+
export declare function ContextMeter({ usage }: {
|
|
17
|
+
usage: ContextUsage;
|
|
18
|
+
}): import("react").JSX.Element;
|