@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
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* The Context section's usage meter: how full the model's context window is,
|
|
5
|
+
* and what fills it.
|
|
6
|
+
*
|
|
7
|
+
* One stacked bar over the whole window, then one legend row per part with its
|
|
8
|
+
* tokens and its share of the window. The parts are the ones the transcript
|
|
9
|
+
* actually measures for the last reply (`getLastAssistantTokenBreakdown`):
|
|
10
|
+
* cached input reused from earlier turns, new input, and the reply. Nothing is
|
|
11
|
+
* estimated or invented. Without a known window (a model the catalog does not
|
|
12
|
+
* list) the meter shows the tokens and drops the percentages and free space.
|
|
13
|
+
*
|
|
14
|
+
* Nearly full shows as the composer context ring's tone (a yellow dot from
|
|
15
|
+
* 70%, red from 85%, `contextTone`), so the two never disagree.
|
|
16
|
+
*/
|
|
17
|
+
import { flattenModels } from '@kortix/sdk';
|
|
18
|
+
import { useProjectSession, useRuntimeProviders, useSessionLogThread, useSessionModelUsage, } from '@kortix/sdk/react';
|
|
19
|
+
import { useMemo } from 'react';
|
|
20
|
+
import { useTranslations } from '../../../i18n/index.js';
|
|
21
|
+
import { cn } from '../../../lib/utils.js';
|
|
22
|
+
import { STATUS_DOT } from '../../../primitives/status.js';
|
|
23
|
+
import { formatContextCount, getContextUsage } from '../../composer/context-usage.js';
|
|
24
|
+
import { useOptionalSessionPanel } from '../session-panel-provider.js';
|
|
25
|
+
/**
|
|
26
|
+
* The catalog entry a recorded model key names. The session row carries the
|
|
27
|
+
* provider prefix ("kortix/codex/gpt-6.1-sol"); the gateway's served model
|
|
28
|
+
* does not ("codex/gpt-6.1-sol"). Both resolve to the same entry.
|
|
29
|
+
*/
|
|
30
|
+
export function findModelKey(models, key) {
|
|
31
|
+
if (!key)
|
|
32
|
+
return null;
|
|
33
|
+
const hit = models.find((m) => `${m.providerID}/${m.modelID}` === key || m.modelID === key);
|
|
34
|
+
return hit ? { providerID: hit.providerID, modelID: hit.modelID } : null;
|
|
35
|
+
}
|
|
36
|
+
/** The live session's context usage, or null outside a session panel / before the first reply. */
|
|
37
|
+
export function useSessionContextUsage() {
|
|
38
|
+
const panel = useOptionalSessionPanel();
|
|
39
|
+
const projectId = panel?.projectId;
|
|
40
|
+
const sessionId = panel?.projectSessionId;
|
|
41
|
+
const session = useProjectSession(projectId, sessionId).data;
|
|
42
|
+
const served = useSessionModelUsage(projectId, sessionId).data?.latest?.served_model;
|
|
43
|
+
const { data: providers } = useRuntimeProviders();
|
|
44
|
+
// Throttled: the meter restates a total, it does not need every streamed token.
|
|
45
|
+
const thread = useSessionLogThread({ projectId: projectId ?? '', sessionId: sessionId ?? '', runtimeSessionId: panel?.sessionId ?? '' }, null, { throttleMs: 1000 });
|
|
46
|
+
const models = useMemo(() => flattenModels(providers), [providers]);
|
|
47
|
+
const messages = thread?.messages;
|
|
48
|
+
const modelKey = served ?? session?.model ?? null;
|
|
49
|
+
return useMemo(() => {
|
|
50
|
+
if (!panel)
|
|
51
|
+
return null;
|
|
52
|
+
const usage = getContextUsage(messages, models, findModelKey(models, modelKey));
|
|
53
|
+
return usage.breakdown.total > 0 ? usage : null;
|
|
54
|
+
}, [panel, messages, models, modelKey]);
|
|
55
|
+
}
|
|
56
|
+
export function ContextMeter({ usage }) {
|
|
57
|
+
const t = useTranslations('hardcodedUi.i18nComplete');
|
|
58
|
+
const { breakdown, limit } = usage;
|
|
59
|
+
// The bar's scale: the window when known, else the tokens themselves.
|
|
60
|
+
const scale = limit ?? breakdown.total;
|
|
61
|
+
const share = (n) => (scale > 0 ? n / scale : 0);
|
|
62
|
+
const pct = (n) => {
|
|
63
|
+
const p = share(n) * 100;
|
|
64
|
+
return p > 0 && p < 0.1 ? '<0.1%' : `${p.toFixed(1)}%`;
|
|
65
|
+
};
|
|
66
|
+
const free = limit ? Math.max(0, limit - breakdown.total) : null;
|
|
67
|
+
const parts = [
|
|
68
|
+
{ key: 'cache', label: t.raw('texta251c18205f1'), value: breakdown.cache, swatch: 'bg-kortix-blue' },
|
|
69
|
+
{ key: 'input', label: t.raw('text36ecb4f86691'), value: breakdown.input, swatch: 'bg-kortix-purple' },
|
|
70
|
+
{ key: 'output', label: t.raw('textb2439bcb8dee'), value: breakdown.output, swatch: 'bg-kortix-green' },
|
|
71
|
+
].filter((p) => p.value > 0);
|
|
72
|
+
return (_jsxs("div", { className: "px-4 pb-1", children: [_jsxs("div", { className: "flex items-baseline justify-between gap-2", children: [_jsxs("span", { className: "text-foreground flex items-center gap-1.5 text-sm tabular-nums", children: [limit && usage.tone !== 'info' && (_jsx("span", { className: cn('size-1.5 rounded-full', STATUS_DOT[usage.tone]), "aria-hidden": true })), limit ? `${usage.percent}% ${t.raw('textf83916135509')}` : formatContextCount(breakdown.total)] }), limit && (_jsxs("span", { className: "text-muted-foreground text-xs tabular-nums", children: [formatContextCount(breakdown.total), " / ", formatContextCount(limit)] }))] }), _jsx("div", { className: "bg-muted mt-2 flex h-1.5 w-full gap-px overflow-hidden rounded-full", "aria-hidden": true, children: parts.map((p) => (_jsx("span", { className: p.swatch, style: { width: `${share(p.value) * 100}%` } }, p.key))) }), _jsxs("dl", { className: "mt-2.5 flex flex-col", children: [parts.map((p) => (_jsxs("div", { className: "flex h-7 items-center gap-2.5 text-sm", children: [_jsx("span", { className: cn('size-2 shrink-0 rounded-full', p.swatch), "aria-hidden": true }), _jsx("dt", { className: "text-muted-foreground min-w-0 flex-1 truncate", children: p.label }), _jsx("dd", { className: "text-foreground tabular-nums", children: formatContextCount(p.value) }), limit && _jsx("dd", { className: "text-muted-foreground w-12 text-right tabular-nums", children: pct(p.value) })] }, p.key))), free != null && (_jsxs("div", { className: "flex h-7 items-center gap-2.5 text-sm", children: [_jsx("span", { className: "bg-muted size-2 shrink-0 rounded-full ring-1 ring-border ring-inset", "aria-hidden": true }), _jsx("dt", { className: "text-muted-foreground min-w-0 flex-1 truncate", children: t.raw('text64cd989efc14') }), _jsx("dd", { className: "text-foreground tabular-nums", children: formatContextCount(free) }), _jsx("dd", { className: "text-muted-foreground w-12 text-right tabular-nums", children: pct(free) })] }))] })] }));
|
|
73
|
+
}
|
|
@@ -4,7 +4,7 @@ import { type ReactNode } from 'react';
|
|
|
4
4
|
import { CloseButton, DetailSidebarToggle } from '../../../files/viewer/viewer-chrome.js';
|
|
5
5
|
export { CloseButton, DetailSidebarToggle };
|
|
6
6
|
/**
|
|
7
|
-
* A layer that lives inside the detail
|
|
7
|
+
* A layer that lives inside the docked detail frame but must NEVER unmount.
|
|
8
8
|
*
|
|
9
9
|
* The terminal is the only one: `SessionTerminalPanel` owns a long-lived PTY
|
|
10
10
|
* WebSocket, and the keyed `AnimatePresence` below tears a `Detail`'s body down
|
|
@@ -24,24 +24,18 @@ import { isPlanWriteTool } from '../../turn/plan-anchor.js';
|
|
|
24
24
|
import { cn } from '../../../lib/utils.js';
|
|
25
25
|
import { hasOpenFloatingLayer } from '../../../lib/z-stack.js';
|
|
26
26
|
import { focusWithoutScroll } from '../../../internal/lib/utils/focus-without-scroll.js';
|
|
27
|
+
import { useKortixComputerStore } from '../../../internal/stores/kortix-computer-store.js';
|
|
27
28
|
import { CaretLeftIcon as ChevronLeft, CaretRightIcon as ChevronRight, } from '@phosphor-icons/react';
|
|
28
|
-
import { AnimatePresence, m
|
|
29
|
+
import { AnimatePresence, m } from 'motion/react';
|
|
30
|
+
import { useReducedMotion } from '../../../internal/hooks/use-reduced-motion.js';
|
|
29
31
|
import { useEffect, useRef, useState, } from 'react';
|
|
30
32
|
import { ToolPartRenderer, ToolSurfaceContext } from '../../tool/tool-renderers.js';
|
|
31
33
|
import { PanelWidthButton } from '../../../files/viewer/viewer-actions.js';
|
|
34
|
+
import { DOCKED_LAYER_CLASS, SESSION_BAR_CLASS } from '../../../internal/layout/panel-chrome.js';
|
|
32
35
|
import { CloseButton, DetailSidebarToggle } from '../../../files/viewer/viewer-chrome.js';
|
|
33
36
|
export { CloseButton, DetailSidebarToggle };
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
* ONE constant, because they are two states of one shell: inset from the top,
|
|
37
|
-
* left and bottom so the card reads as sitting IN the panel rather than nailed
|
|
38
|
-
* over it, flush to the right edge so an arrival slides in from off-panel.
|
|
39
|
-
*
|
|
40
|
-
* This used to be copy-pasted into `easy-panel.tsx`'s standalone terminal
|
|
41
|
-
* `m.div`, which is exactly how the terminal drifted into looking like its
|
|
42
|
-
* own sidebar instead of a view inside this shell. Shared, the two cannot drift.
|
|
43
|
-
*/
|
|
44
|
-
const CARD_FRAME = 'bg-popover border-border absolute inset-y-3 right-3 left-3 flex min-w-0 flex-col overflow-hidden rounded-md border shadow-md';
|
|
37
|
+
/** The layer's header bar — the same bar as the chat's session header. */
|
|
38
|
+
const LAYER_BAR_CLASS = cn(SESSION_BAR_CLASS, 'justify-between gap-2 px-3');
|
|
45
39
|
/**
|
|
46
40
|
* The prev/next row, shared by the desktop card and the mobile drawer so the
|
|
47
41
|
* two never drift. Both pin it as a slim bar under the scrollable body —
|
|
@@ -127,6 +121,13 @@ function useDetailKeyboard(detail, isMobile, onBack, detailRef) {
|
|
|
127
121
|
// (`session-chat.tsx`) skips a `defaultPrevented` Escape. Without it,
|
|
128
122
|
// closing three full-screen images in a row stopped a running turn.
|
|
129
123
|
event.preventDefault();
|
|
124
|
+
// Full screen is one level above the docked detail: the first Escape
|
|
125
|
+
// leaves it and keeps the same view docked; the next one closes (D-07).
|
|
126
|
+
const store = useKortixComputerStore.getState();
|
|
127
|
+
if (store.isExpanded) {
|
|
128
|
+
store.toggleExpanded();
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
130
131
|
onBack();
|
|
131
132
|
return;
|
|
132
133
|
}
|
|
@@ -326,25 +327,27 @@ export function DetailLayer({ detail, onBack, isMobile, persistentLayer, childre
|
|
|
326
327
|
// `terminalOpen` for the exit, since the exiting card's last
|
|
327
328
|
// rendered props predate the state flip that removed it.
|
|
328
329
|
custom: !!detail.swapIn, variants: cardVariants, initial: "hidden", animate: "visible", exit: "hidden",
|
|
329
|
-
// `
|
|
330
|
+
// `DOCKED_LAYER_CLASS` is shared with the persistent layer below
|
|
331
|
+
// (`panel-chrome.ts`): docked edge to edge, and an arrival still
|
|
332
|
+
// slides in from the right edge, which the panel clips. Shared, so the
|
|
330
333
|
// two states of this shell can never drift apart visually.
|
|
331
334
|
// `outline-none`: this container is programmatically focused on
|
|
332
335
|
// open (the a11y focus management above). A keyboard-initiated
|
|
333
336
|
// open — the ⌘K "Open Browser"/"Open Terminal" commands — makes
|
|
334
337
|
// that focus :focus-visible, which drew a focus ring around the
|
|
335
338
|
// whole card. The container is a focus TARGET (tabIndex -1), not
|
|
336
|
-
// a control;
|
|
337
|
-
className: cn(
|
|
338
|
-
//
|
|
339
|
-
//
|
|
340
|
-
//
|
|
341
|
-
//
|
|
342
|
-
_jsxs("div", { className:
|
|
339
|
+
// a control; the panel's `border-l` frames it, never an outline.
|
|
340
|
+
className: cn(DOCKED_LAYER_CLASS, 'outline-none'), children: _jsx(AnimatePresence, { mode: "popLayout", initial: false, children: _jsxs(m.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: crossfadeTransition, className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", children: [!detail.hideHeader && (
|
|
341
|
+
// The rule under the header lines up with the chat header's
|
|
342
|
+
// rule (`SESSION_BAR_CLASS`). Close sits far right, where a
|
|
343
|
+
// close always is — a back chevron implies a stack the user
|
|
344
|
+
// isn't in.
|
|
345
|
+
_jsxs("div", { className: LAYER_BAR_CLASS, children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(DetailSidebarToggle, { className: "size-7" }), detail.icon, _jsx("span", { className: "text-foreground truncate text-sm font-semibold", children: detail.title }), detail.meta && _jsx("span", { className: "shrink-0", children: detail.meta })] }), _jsxs(ButtonGroup, { className: "shrink-0", children: [detail.actions, _jsx(CloseButton, { onClose: onBack })] })] })), _jsx("div", { className: cn('min-h-0 min-w-0 flex-1 overflow-auto', detail.padded !== false && 'p-4'), children: detail.body }), detail.nav && _jsx(DetailNav, { nav: detail.nav })] }, detail.key) }) }, "detail-card"
|
|
343
346
|
// No aria-modal: the detail replaces only the panel's cards — the
|
|
344
347
|
// chat beside it stays live, so claiming page modality would lie
|
|
345
348
|
// to assistive tech. Containment is panel-scoped instead (inert
|
|
346
349
|
// home + the Tab wrap scoped to focus inside this dialog).
|
|
347
|
-
)) }), persistentActivated && persistentLayer && (_jsxs(m.div, { initial: { x: '100%', opacity: 0 }, animate: persistentMotion.target, transition: persistentMotion.transition, "aria-hidden": !persistentOpen, inert: !persistentOpen || undefined, className: cn(
|
|
350
|
+
)) }), persistentActivated && persistentLayer && (_jsxs(m.div, { initial: { x: '100%', opacity: 0 }, animate: persistentMotion.target, transition: persistentMotion.transition, "aria-hidden": !persistentOpen, inert: !persistentOpen || undefined, className: cn(DOCKED_LAYER_CLASS, !persistentOpen && 'pointer-events-none'), children: [_jsxs("div", { className: LAYER_BAR_CLASS, children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(DetailSidebarToggle, { className: "size-7" }), persistentLayer.icon, _jsx("span", { className: "text-foreground truncate text-sm font-semibold", children: persistentLayer.title })] }), _jsxs(ButtonGroup, { className: "shrink-0", children: [_jsx(PanelWidthButton, { isMobile: isMobile }), _jsx(CloseButton, { onClose: persistentLayer.onClose })] })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-hidden", children: persistentLayer.body })] }))] }));
|
|
348
351
|
}
|
|
349
352
|
/** Tools that re-send their ENTIRE state on every call rather than a delta. */
|
|
350
353
|
function isSnapshotTool(tool) {
|
|
@@ -5,10 +5,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* (Outputs / Context / Preview / Plan) over the same tool-call data the
|
|
6
6
|
* Advanced stepper renders one-at-a-time.
|
|
7
7
|
*
|
|
8
|
-
* It is the
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* container around them would only box a box.
|
|
8
|
+
* It is the docked cards column's whole content: flat sections, one hairline
|
|
9
|
+
* under each, no header, no tab strip, no wrapper. The column draws the
|
|
10
|
+
* vertical rule beside the chat (`session-action-panel-column.tsx`).
|
|
12
11
|
*
|
|
13
12
|
* It owns no state — everything it reads (the derived outputs, the context
|
|
14
13
|
* groups, the running apps, the callback that opens any of them) comes from
|
|
@@ -32,7 +31,9 @@ import { useOptionalSessionPanel } from '../session-panel-provider.js';
|
|
|
32
31
|
import { useSessionChangeRequestsPanel } from '../../outcomes/session-outcomes-bridge.js';
|
|
33
32
|
import { ChangeRequestsCard } from './change-requests-card.js';
|
|
34
33
|
import { AppsCard } from './apps-card.js';
|
|
34
|
+
import { ChangesCard } from './changes-card.js';
|
|
35
35
|
import { ContextCard } from './context-card.js';
|
|
36
|
+
import { useSessionContextUsage } from './context-meter.js';
|
|
36
37
|
import { pathOutput } from './easy-panel-logic.js';
|
|
37
38
|
import { OutputsCard } from './outputs-card.js';
|
|
38
39
|
import { PlanPanelCard } from './plan-card.js';
|
|
@@ -46,6 +47,7 @@ export function EasyPanel() {
|
|
|
46
47
|
// (see `planBelongsToChat`). `usePlanInChat` is that one decision, shared
|
|
47
48
|
// with `session-chat.tsx` so the two cannot disagree.
|
|
48
49
|
const planInChat = usePlanInChat();
|
|
50
|
+
const contextUsage = useSessionContextUsage();
|
|
49
51
|
// Null outside a `SessionPanelProvider` — `SessionChat` also renders
|
|
50
52
|
// read-only inside `legacy-subagent-chat.tsx`, which has no panel at all.
|
|
51
53
|
if (!panel)
|
|
@@ -65,5 +67,5 @@ export function EasyPanel() {
|
|
|
65
67
|
// Preview keep `shrink-0` and stay on screen at their full height, always.
|
|
66
68
|
// `min-h-0` is what lets this shrink at all — a flex container defaults to
|
|
67
69
|
// its content's minimum height and would otherwise refuse.
|
|
68
|
-
_jsxs("div", { className: "flex h-full min-h-0 flex-col
|
|
70
|
+
_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsx(OutputsCard, { fill: !changeRequests?.requests.length, outputs: files, defaultExpanded: outputsDefaultOpen || files.length > 0, onOpenOutput: (o) => handleOpenOutput(o, files) }), _jsx(ChangesCard, { onOpenDetail: openDetail, onOpenAll: () => panel.openFiles(true) }), _jsx(ContextCard, { usage: contextUsage, files: context.files, web: context.web, tools: context.tools, sessionId: sessionId, onOpenDetail: openDetail, onOpenFile: (path, allPaths) => handleOpenOutput(pathOutput(path), allPaths.map(pathOutput)), onAddContext: () => useSessionComposerPrefillStore.getState().requestAttach(sessionId) }), apps.length > 0 && _jsx(AppsCard, { apps: apps, onOpenApp: (a) => handleOpenOutput(a, apps) }), !planInChat && _jsx(PlanPanelCard, { sessionId: sessionId }), changeRequests && _jsx(ChangeRequestsCard, { ...changeRequests })] }));
|
|
69
71
|
}
|
|
@@ -34,6 +34,8 @@ import { useCallback, useEffect, useSyncExternalStore } from 'react';
|
|
|
34
34
|
import { CloseButton, DetailSidebarToggle } from './detail-view.js';
|
|
35
35
|
import { FileViewer, isSvg } from '../../../files/viewer/file-viewer.js';
|
|
36
36
|
import { PanelWidthButton, RefreshButton, ViewerActions, ViewerDownloadAction, ViewerPathPill, fileShareInput, } from '../../../files/viewer/viewer-actions.js';
|
|
37
|
+
import { SESSION_BAR_CLASS } from '../../../internal/layout/panel-chrome.js';
|
|
38
|
+
import { cn } from '../../../lib/utils.js';
|
|
37
39
|
const getSandboxAliveSnapshot = () => {
|
|
38
40
|
const s = useRuntimeConnectionStore.getState();
|
|
39
41
|
return s.status === 'connected' && s.healthy === true;
|
|
@@ -49,7 +51,7 @@ const getSandboxAliveSnapshot = () => {
|
|
|
49
51
|
function PreviewShell({ name, fileName = name, path, shareContext, onClose, onPresent, copy, refresh, children, }) {
|
|
50
52
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
51
53
|
const isMobile = useIsMobile();
|
|
52
|
-
return (_jsxs("div", { className: "flex h-full min-h-0 min-w-0 flex-col", children: [_jsxs("div", { className:
|
|
54
|
+
return (_jsxs("div", { className: "flex h-full min-h-0 min-w-0 flex-col", children: [_jsxs("div", { className: cn(SESSION_BAR_CLASS, 'gap-1 px-2.5'), children: [_jsx(DetailSidebarToggle, { className: "size-7" }), _jsxs(ViewerPathPill, { icon: getFileIcon(fileName, { className: 'size-4', variant: 'monochrome' }), path: path, fileName: name, children: [_jsx(RefreshButton, { onRefresh: refresh.onRefresh, refreshing: refresh.refreshing }), _jsx(ViewerActions, { copy: copy, shareContext: shareContext, shareInput: fileShareInput(path, fileName) })] }), _jsxs(ButtonGroup, { className: "shrink-0 *:size-8", children: [onPresent && (_jsx(Hint, { label: tI18nComplete.raw('text43f9b89c0b9d'), side: "bottom", children: _jsx(Button, { variant: "secondary", size: "icon", "aria-label": tI18nComplete.raw('text43f9b89c0b9d'), onClick: onPresent, className: "active:scale-[0.96]", children: _jsx(Presentation, { className: "size-3.5" }) }) })), _jsx(ViewerDownloadAction, { download: { path, fileName } }), _jsx(PanelWidthButton, { isMobile: isMobile }), _jsx(CloseButton, { onClose: onClose })] })] }), _jsx("div", { className: "min-h-0 min-w-0 flex-1 overflow-auto", children: children })] }));
|
|
53
55
|
}
|
|
54
56
|
/**
|
|
55
57
|
* Put the picture itself on the clipboard — a sibling to Download, not a
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/** Same string as `PREVIEW_LOCATION_MESSAGE` in the API's preview-bridge.ts. */
|
|
2
|
+
export declare const PREVIEW_LOCATION_MESSAGE = "kortix:preview-location";
|
|
3
|
+
/** Internal (localhost) URLs, oldest first; `index` is the page on screen. */
|
|
4
|
+
export interface FrameHistory {
|
|
5
|
+
entries: string[];
|
|
6
|
+
index: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function currentEntry(history: FrameHistory): string;
|
|
9
|
+
/** A new page opened by the panel itself: drops the forward entries. */
|
|
10
|
+
export declare function pushEntry(history: FrameHistory, url: string): FrameHistory;
|
|
11
|
+
/**
|
|
12
|
+
* The internal URL a bridge message reports, on the port of the page the frame
|
|
13
|
+
* loaded, or null when the message is not a location report.
|
|
14
|
+
*/
|
|
15
|
+
export declare function reportedFrameUrl(data: unknown, frameUrl: string): string | null;
|
|
16
|
+
/** What one bridge report says, beyond the URL. */
|
|
17
|
+
export interface FrameReport {
|
|
18
|
+
url: string;
|
|
19
|
+
/** The first report after the panel loaded the frame. */
|
|
20
|
+
settling: boolean;
|
|
21
|
+
/** The frame's `navigation.currentEntry.index`; null without the Navigation API. */
|
|
22
|
+
index: number | null;
|
|
23
|
+
/** The frame's `history.length`; null when the frame sent none. */
|
|
24
|
+
length: number | null;
|
|
25
|
+
/** The frame's `navigation.currentEntry.key`: one id per history slot. */
|
|
26
|
+
key: string | null;
|
|
27
|
+
}
|
|
28
|
+
export declare function frameReportOf(data: unknown, url: string, settling: boolean): FrameReport;
|
|
29
|
+
/**
|
|
30
|
+
* What the panel remembers between reports of one frame: which panel entry
|
|
31
|
+
* the frame's own history position `frame` mapped to at the load (`panel`),
|
|
32
|
+
* and the last `history.length` (the fallback signal).
|
|
33
|
+
*/
|
|
34
|
+
export interface FrameTracker {
|
|
35
|
+
base: {
|
|
36
|
+
panel: number;
|
|
37
|
+
frame: number;
|
|
38
|
+
} | null;
|
|
39
|
+
length: number | null;
|
|
40
|
+
/** Panel entry index -> the frame's entry key seen there. */
|
|
41
|
+
keys: Record<number, string>;
|
|
42
|
+
}
|
|
43
|
+
export declare const NEW_FRAME_TRACKER: FrameTracker;
|
|
44
|
+
/**
|
|
45
|
+
* Apply one report, the way a browser moves through its own history.
|
|
46
|
+
*
|
|
47
|
+
* - The first report after a load replaces the entry the panel opened (a
|
|
48
|
+
* server redirect lands here) and maps the frame's position to it.
|
|
49
|
+
* - With the Navigation API the frame says WHERE in its own history it is,
|
|
50
|
+
* and which slot (`key`): the same position is a `replaceState` (an auth
|
|
51
|
+
* redirect `/login` -> `/dashboard`); a position whose slot key the panel
|
|
52
|
+
* saw there is a traversal (`history.back()`, the tab's Back); anything else
|
|
53
|
+
* is a push, which drops the entries after it, as a browser does. A push to
|
|
54
|
+
* a URL equal to the old forward entry is still a push: the key differs.
|
|
55
|
+
* A frame without keys falls back to URL equality.
|
|
56
|
+
* - Without it, `history.length` is the signal: growth is a push; no growth is
|
|
57
|
+
* a step to a neighbor entry with this URL, else a replace. A push that
|
|
58
|
+
* drops forward entries keeps the length, so this fallback can misread it.
|
|
59
|
+
* - A report with neither (no Navigation API and no `length`) pushes.
|
|
60
|
+
*/
|
|
61
|
+
export declare function reduceFrameReport(history: FrameHistory, tracker: FrameTracker, report: FrameReport): {
|
|
62
|
+
history: FrameHistory;
|
|
63
|
+
tracker: FrameTracker;
|
|
64
|
+
};
|
|
65
|
+
export declare function rememberFrameHistory(key: string, history: FrameHistory): void;
|
|
66
|
+
export declare function recallFrameHistory(key: string): FrameHistory | undefined;
|
|
67
|
+
export declare function forgetFrameHistory(key: string): void;
|
|
68
|
+
/** Records the session's app list when its Browser opens, by any route (the
|
|
69
|
+
* header, a chat link, an app card, an Outputs row). */
|
|
70
|
+
export declare function noteBrowserApps(key: string, apps: readonly string[]): void;
|
|
71
|
+
/**
|
|
72
|
+
* The history an untargeted Browser open (the header, the palette) resumes,
|
|
73
|
+
* or undefined to open the first app as before. It resumes only a real page,
|
|
74
|
+
* never the empty landing, and only while no app appeared since the Browser
|
|
75
|
+
* last opened (`noteBrowserApps`): a new app the agent started is what the
|
|
76
|
+
* user wants to see. `apps` is the session's app URLs in panel order.
|
|
77
|
+
*/
|
|
78
|
+
export declare function resumableFrameHistory(key: string, apps: readonly string[]): FrameHistory | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* The history an `AppPreview` opened on `url` starts from: the session's
|
|
81
|
+
* remembered history when its current page IS `url` (the panel is resuming),
|
|
82
|
+
* else a fresh one-entry history.
|
|
83
|
+
*/
|
|
84
|
+
export declare function initialFrameHistory(key: string | undefined, url: string): FrameHistory;
|
|
85
|
+
/**
|
|
86
|
+
* The authenticated preview URL for the page on screen. `previewUrl` was
|
|
87
|
+
* minted for `frameUrl`, the page the frame loaded; after a navigation inside
|
|
88
|
+
* the frame, `currentUrl` differs. Swap the app path and query, keep the
|
|
89
|
+
* proxy prefix and the access parameters the URL carries.
|
|
90
|
+
*/
|
|
91
|
+
export declare function retargetPreviewUrl(previewUrl: string, frameUrl: string, currentUrl: string): string;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Browser panel's history model (`AppPreview`).
|
|
3
|
+
*
|
|
4
|
+
* The frame is cross-origin, so the panel cannot read its address. The preview
|
|
5
|
+
* proxy adds a bridge to framed pages (`apps/api/src/sandbox-proxy/preview-bridge.ts`)
|
|
6
|
+
* that posts `{ type: PREVIEW_LOCATION_MESSAGE, path }` to the panel. These
|
|
7
|
+
* functions turn those reports into the address bar and Back/Forward (D-05).
|
|
8
|
+
*
|
|
9
|
+
* The history also outlives the `AppPreview` that built it, per session, so a
|
|
10
|
+
* switch to Terminal and back reopens the same page with the same Back/Forward
|
|
11
|
+
* (D-06). The session-change effect in `session-panel-provider.tsx` forgets it.
|
|
12
|
+
*/
|
|
13
|
+
import { parseLocalhostUrl, toInternalUrl } from '@kortix/sdk';
|
|
14
|
+
/** Same string as `PREVIEW_LOCATION_MESSAGE` in the API's preview-bridge.ts. */
|
|
15
|
+
export const PREVIEW_LOCATION_MESSAGE = 'kortix:preview-location';
|
|
16
|
+
export function currentEntry(history) {
|
|
17
|
+
return history.entries[history.index] ?? '';
|
|
18
|
+
}
|
|
19
|
+
/** A new page opened by the panel itself: drops the forward entries. */
|
|
20
|
+
export function pushEntry(history, url) {
|
|
21
|
+
return { entries: [...history.entries.slice(0, history.index + 1), url], index: history.index + 1 };
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The internal URL a bridge message reports, on the port of the page the frame
|
|
25
|
+
* loaded, or null when the message is not a location report.
|
|
26
|
+
*/
|
|
27
|
+
export function reportedFrameUrl(data, frameUrl) {
|
|
28
|
+
if (!data || typeof data !== 'object')
|
|
29
|
+
return null;
|
|
30
|
+
const { type, path } = data;
|
|
31
|
+
if (type !== PREVIEW_LOCATION_MESSAGE || typeof path !== 'string' || !path.startsWith('/'))
|
|
32
|
+
return null;
|
|
33
|
+
const port = parseLocalhostUrl(frameUrl)?.port;
|
|
34
|
+
return port ? toInternalUrl(port, path) : null;
|
|
35
|
+
}
|
|
36
|
+
/** A number field of a bridge message (`length`, `index`), when present. */
|
|
37
|
+
function reportedNumber(data, key) {
|
|
38
|
+
const value = data && typeof data === 'object' ? data[key] : undefined;
|
|
39
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
40
|
+
}
|
|
41
|
+
export function frameReportOf(data, url, settling) {
|
|
42
|
+
const index = reportedNumber(data, 'index');
|
|
43
|
+
const key = data && typeof data === 'object' ? data.key : undefined;
|
|
44
|
+
return {
|
|
45
|
+
url,
|
|
46
|
+
settling,
|
|
47
|
+
index: index !== null && index >= 0 ? index : null,
|
|
48
|
+
length: reportedNumber(data, 'length'),
|
|
49
|
+
key: typeof key === 'string' && key ? key : null,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export const NEW_FRAME_TRACKER = { base: null, length: null, keys: {} };
|
|
53
|
+
function replaceCurrent(history, url) {
|
|
54
|
+
if (url === currentEntry(history))
|
|
55
|
+
return history;
|
|
56
|
+
const entries = history.entries.slice();
|
|
57
|
+
entries[history.index] = url;
|
|
58
|
+
return { entries, index: history.index };
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Apply one report, the way a browser moves through its own history.
|
|
62
|
+
*
|
|
63
|
+
* - The first report after a load replaces the entry the panel opened (a
|
|
64
|
+
* server redirect lands here) and maps the frame's position to it.
|
|
65
|
+
* - With the Navigation API the frame says WHERE in its own history it is,
|
|
66
|
+
* and which slot (`key`): the same position is a `replaceState` (an auth
|
|
67
|
+
* redirect `/login` -> `/dashboard`); a position whose slot key the panel
|
|
68
|
+
* saw there is a traversal (`history.back()`, the tab's Back); anything else
|
|
69
|
+
* is a push, which drops the entries after it, as a browser does. A push to
|
|
70
|
+
* a URL equal to the old forward entry is still a push: the key differs.
|
|
71
|
+
* A frame without keys falls back to URL equality.
|
|
72
|
+
* - Without it, `history.length` is the signal: growth is a push; no growth is
|
|
73
|
+
* a step to a neighbor entry with this URL, else a replace. A push that
|
|
74
|
+
* drops forward entries keeps the length, so this fallback can misread it.
|
|
75
|
+
* - A report with neither (no Navigation API and no `length`) pushes.
|
|
76
|
+
*/
|
|
77
|
+
export function reduceFrameReport(history, tracker, report) {
|
|
78
|
+
const { url, settling, index, length } = report;
|
|
79
|
+
const { key } = report;
|
|
80
|
+
if (settling) {
|
|
81
|
+
return {
|
|
82
|
+
history: replaceCurrent(history, url),
|
|
83
|
+
tracker: {
|
|
84
|
+
base: index === null ? null : { panel: history.index, frame: index },
|
|
85
|
+
length,
|
|
86
|
+
keys: key ? { [history.index]: key } : {},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const next = { base: tracker.base, length, keys: tracker.keys };
|
|
91
|
+
if (index !== null && tracker.base) {
|
|
92
|
+
const target = Math.max(0, Math.min(history.entries.length, tracker.base.panel + index - tracker.base.frame));
|
|
93
|
+
const keys = (upTo) => {
|
|
94
|
+
const kept = {};
|
|
95
|
+
for (const [at, k] of Object.entries(tracker.keys))
|
|
96
|
+
if (Number(at) < upTo)
|
|
97
|
+
kept[Number(at)] = k;
|
|
98
|
+
if (key)
|
|
99
|
+
kept[target] = key;
|
|
100
|
+
return kept;
|
|
101
|
+
};
|
|
102
|
+
if (target === history.index) {
|
|
103
|
+
return { history: replaceCurrent(history, url), tracker: { ...next, keys: { ...tracker.keys, ...(key ? { [target]: key } : {}) } } };
|
|
104
|
+
}
|
|
105
|
+
const seen = tracker.keys[target];
|
|
106
|
+
const traversal = key && seen ? seen === key : !key && history.entries[target] === url;
|
|
107
|
+
if (traversal) {
|
|
108
|
+
return { history: replaceCurrent({ entries: history.entries, index: target }, url), tracker: next };
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
history: { entries: [...history.entries.slice(0, target), url], index: target },
|
|
112
|
+
tracker: { ...next, keys: keys(target) },
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (url === currentEntry(history))
|
|
116
|
+
return { history, tracker: next };
|
|
117
|
+
if (tracker.length !== null && length !== null && length <= tracker.length) {
|
|
118
|
+
for (const neighbor of [history.index - 1, history.index + 1]) {
|
|
119
|
+
if (history.entries[neighbor] === url)
|
|
120
|
+
return { history: { entries: history.entries, index: neighbor }, tracker: next };
|
|
121
|
+
}
|
|
122
|
+
return { history: replaceCurrent(history, url), tracker: next };
|
|
123
|
+
}
|
|
124
|
+
return { history: pushEntry(history, url), tracker: next };
|
|
125
|
+
}
|
|
126
|
+
// Per-session memory. Module scope because the `AppPreview` that owns the
|
|
127
|
+
// history unmounts on every switch to Terminal; keyed by the provider's
|
|
128
|
+
// session id, so two sessions never share a page.
|
|
129
|
+
const remembered = new Map();
|
|
130
|
+
export function rememberFrameHistory(key, history) {
|
|
131
|
+
remembered.set(key, history);
|
|
132
|
+
}
|
|
133
|
+
export function recallFrameHistory(key) {
|
|
134
|
+
return remembered.get(key);
|
|
135
|
+
}
|
|
136
|
+
export function forgetFrameHistory(key) {
|
|
137
|
+
remembered.delete(key);
|
|
138
|
+
appsAtOpen.delete(key);
|
|
139
|
+
}
|
|
140
|
+
// The session's app list (as one string) when its Browser last opened.
|
|
141
|
+
const appsAtOpen = new Map();
|
|
142
|
+
/** Records the session's app list when its Browser opens, by any route (the
|
|
143
|
+
* header, a chat link, an app card, an Outputs row). */
|
|
144
|
+
export function noteBrowserApps(key, apps) {
|
|
145
|
+
appsAtOpen.set(key, apps.join('\n'));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The history an untargeted Browser open (the header, the palette) resumes,
|
|
149
|
+
* or undefined to open the first app as before. It resumes only a real page,
|
|
150
|
+
* never the empty landing, and only while no app appeared since the Browser
|
|
151
|
+
* last opened (`noteBrowserApps`): a new app the agent started is what the
|
|
152
|
+
* user wants to see. `apps` is the session's app URLs in panel order.
|
|
153
|
+
*/
|
|
154
|
+
export function resumableFrameHistory(key, apps) {
|
|
155
|
+
const resumed = remembered.get(key);
|
|
156
|
+
if (!resumed || !currentEntry(resumed))
|
|
157
|
+
return undefined;
|
|
158
|
+
const seen = appsAtOpen.get(key);
|
|
159
|
+
if (seen !== undefined && seen !== apps.join('\n'))
|
|
160
|
+
return undefined;
|
|
161
|
+
return resumed;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The history an `AppPreview` opened on `url` starts from: the session's
|
|
165
|
+
* remembered history when its current page IS `url` (the panel is resuming),
|
|
166
|
+
* else a fresh one-entry history.
|
|
167
|
+
*/
|
|
168
|
+
export function initialFrameHistory(key, url) {
|
|
169
|
+
const resumed = key ? remembered.get(key) : undefined;
|
|
170
|
+
return resumed && currentEntry(resumed) === url ? resumed : { entries: [url], index: 0 };
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* The authenticated preview URL for the page on screen. `previewUrl` was
|
|
174
|
+
* minted for `frameUrl`, the page the frame loaded; after a navigation inside
|
|
175
|
+
* the frame, `currentUrl` differs. Swap the app path and query, keep the
|
|
176
|
+
* proxy prefix and the access parameters the URL carries.
|
|
177
|
+
*/
|
|
178
|
+
export function retargetPreviewUrl(previewUrl, frameUrl, currentUrl) {
|
|
179
|
+
if (!previewUrl || !currentUrl || currentUrl === frameUrl)
|
|
180
|
+
return previewUrl;
|
|
181
|
+
try {
|
|
182
|
+
const out = new URL(previewUrl);
|
|
183
|
+
const from = new URL(frameUrl);
|
|
184
|
+
const to = new URL(currentUrl);
|
|
185
|
+
if (from.port !== to.port || !out.pathname.endsWith(from.pathname))
|
|
186
|
+
return previewUrl;
|
|
187
|
+
out.pathname = out.pathname.slice(0, out.pathname.length - from.pathname.length) + to.pathname;
|
|
188
|
+
for (const key of new Set(from.searchParams.keys()))
|
|
189
|
+
out.searchParams.delete(key);
|
|
190
|
+
for (const [key, value] of to.searchParams)
|
|
191
|
+
out.searchParams.append(key, value);
|
|
192
|
+
out.hash = to.hash;
|
|
193
|
+
return out.toString();
|
|
194
|
+
}
|
|
195
|
+
catch {
|
|
196
|
+
return previewUrl;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { OutputItem } from '../shared/derive-panels.js';
|
|
2
|
+
/** The chalk key: a file's extension, else its kind. */
|
|
3
|
+
export declare function chalkLabel(output: {
|
|
4
|
+
kind: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}): string;
|
|
7
|
+
/** A 24px chalk tile, fill only (no border); the glyph takes the chalk ink, whatever its own color class. */
|
|
8
|
+
export declare function ChalkTile({ label, children }: {
|
|
9
|
+
label: string;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
2
12
|
export declare function OutputRows({ outputs, onOpenOutput, initialShowAll, }: {
|
|
3
13
|
outputs: OutputItem[];
|
|
4
14
|
/** Only called for outputs that are actually openable — see `isOpenable`. */
|