@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,68 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useWorkspaceEvalCompare } from '@kortix/sdk/react';
|
|
4
|
+
import { ArrowDownIcon, ArrowUpIcon, EqualsIcon, MinusIcon } from '@phosphor-icons/react';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
7
|
+
import { cn } from '../../internal/lib/utils.js';
|
|
8
|
+
import { Button } from '../../primitives/button.js';
|
|
9
|
+
import { EmptyState } from '../../primitives/empty-state.js';
|
|
10
|
+
import { ErrorState } from '../../primitives/error-state.js';
|
|
11
|
+
import { LocalTime } from '../../primitives/local-time.js';
|
|
12
|
+
import { Skeleton } from '../../primitives/skeleton.js';
|
|
13
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../../primitives/table.js';
|
|
14
|
+
import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
|
|
15
|
+
import { Tag } from '../../primitives/tag.js';
|
|
16
|
+
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
17
|
+
import { agentLabel, evalJobHref, evalJobScore, evalJobsHref, jobSource, percent } from './eval-meta.js';
|
|
18
|
+
import { EVAL_FRAME, EVAL_TIME, EvalDetailPage, InfoHint, ScoreValue } from './eval-ui.js';
|
|
19
|
+
const VIEWS = ['all', 'changed', 'worse', 'better'];
|
|
20
|
+
const CHANGE = {
|
|
21
|
+
better: { icon: ArrowUpIcon, className: 'text-kortix-green' },
|
|
22
|
+
worse: { icon: ArrowDownIcon, className: 'text-kortix-red' },
|
|
23
|
+
same: { icon: EqualsIcon, className: 'text-muted-foreground' },
|
|
24
|
+
only_one: { icon: MinusIcon, className: 'text-muted-foreground' },
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Customize → Evals → Jobs → Compare (`/admin/eval-jobs/compare?jobs=a,b`):
|
|
28
|
+
* jobs side by side, task by task. The first job is the baseline; `change`
|
|
29
|
+
* reads the last job against it. The way to tell whether an agent got better
|
|
30
|
+
* or worse on the same tasks, and on which ones.
|
|
31
|
+
*/
|
|
32
|
+
export function EvalCompareView({ projectId, jobIds }) {
|
|
33
|
+
const t = useTranslations('evals');
|
|
34
|
+
const [by, setBy] = useState('task');
|
|
35
|
+
const [view, setView] = useState('changed');
|
|
36
|
+
const query = useWorkspaceEvalCompare(projectId, jobIds, by);
|
|
37
|
+
const data = query.data;
|
|
38
|
+
const rows = (data?.rows ?? []).filter((row) => view === 'all' ||
|
|
39
|
+
(view === 'changed' ? row.change === 'better' || row.change === 'worse' : row.change === view));
|
|
40
|
+
const manyAgents = (data?.jobs ?? []).some((job) => job.stats.agents.length > 1);
|
|
41
|
+
return (_jsx(EvalDetailPage, { wide: true, crumbs: [{ label: t('jobsTitle'), href: evalJobsHref(projectId) }, { label: t('compare') }], children: jobIds.length < 2 ? (_jsx(EmptyState, { size: "sm", title: t('compareNeedsTwo'), action: _jsx(Button, { asChild: true, size: "sm", variant: "outline", children: _jsx(Link, { href: evalJobsHref(projectId), children: t('jobsTitle') }) }) })) : query.isError ? (_jsx(ErrorState, { size: "sm", title: t('loadError'), description: query.error instanceof Error ? query.error.message : undefined, action: _jsx(Button, { size: "sm", variant: "outline", onClick: () => query.refetch(), children: t('retry') }) })) : !data ? (_jsxs("div", { className: "flex flex-col gap-3", "aria-busy": true, children: [_jsx(Skeleton, { className: "h-7 w-72" }), _jsx(Skeleton, { className: "h-24 w-full rounded-md" }), _jsx(Skeleton, { className: "h-64 w-full rounded-md" })] })) : (_jsxs(_Fragment, { children: [_jsxs("header", { className: "flex flex-col gap-1.5", children: [_jsxs("h1", { className: "text-foreground flex items-center gap-1.5 text-lg font-medium", children: [t('compareTitle', { count: data.jobs.length }), _jsx(InfoHint, { text: t('compareInfo') })] }), _jsx("p", { className: "text-muted-foreground text-sm", "data-testid": "evals-compare-summary", children: t('compareSummary', {
|
|
42
|
+
better: data.summary.better,
|
|
43
|
+
worse: data.summary.worse,
|
|
44
|
+
same: data.summary.same,
|
|
45
|
+
only: data.summary.only_one,
|
|
46
|
+
}) })] }), _jsx("div", { className: cn('grid gap-3', data.jobs.length > 2 ? 'sm:grid-cols-3' : 'sm:grid-cols-2'), children: data.jobs.map((job, i) => {
|
|
47
|
+
const score = evalJobScore(job);
|
|
48
|
+
return (_jsxs(Link, { href: evalJobHref(projectId, job.job_id), className: cn(EVAL_FRAME, 'hover:bg-hover flex flex-col gap-1 px-4 py-3 transition-colors'), "data-testid": "evals-compare-job", children: [_jsxs("span", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-foreground min-w-0 truncate text-sm font-medium", children: job.job_name }), i === 0 ? _jsx(Tag, { children: t('baseline') }) : null] }), _jsx("span", { className: "text-muted-foreground truncate text-xs", children: [jobSource(job), score ? agentLabel(score.agent, score.model) : null].filter(Boolean).join(' · ') }), _jsxs("span", { className: "flex items-baseline justify-between gap-2 pt-1", children: [_jsx(ScoreValue, { rate: score?.passAt1 ?? score?.mean, n: score?.validTrials ?? 0 }), _jsx("span", { className: "text-muted-foreground text-xs", children: _jsx(LocalTime, { value: job.created_at, options: EVAL_TIME }) })] })] }, job.job_id));
|
|
49
|
+
}) }), _jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx(Tabs, { value: view, onValueChange: (value) => setView(value), children: _jsx(TabsList, { variant: "segmented", "aria-label": t('compareView'), children: VIEWS.map((value) => (_jsxs(TabsTrigger, { value: value, "data-testid": `evals-compare-view-${value}`, children: [t(`compareViews.${value}`), _jsx("span", { className: "text-muted-foreground ml-1 tabular-nums", children: value === 'all'
|
|
50
|
+
? data.rows.length
|
|
51
|
+
: value === 'changed'
|
|
52
|
+
? data.summary.better + data.summary.worse
|
|
53
|
+
: data.summary[value] })] }, value))) }) }), manyAgents ? (_jsx(Tabs, { value: by, onValueChange: (value) => setBy(value), children: _jsxs(TabsList, { variant: "segmented", "aria-label": t('compareBy'), children: [_jsx(TabsTrigger, { value: "task", children: t('byTask') }), _jsx(TabsTrigger, { value: "task_agent_model", children: t('byTaskAgent') })] }) })) : null] }), rows.length === 0 ? (_jsx("div", { className: `${EVAL_FRAME} text-muted-foreground px-4 py-6 text-center text-sm`, children: view === 'all' ? t('noCompareRows') : t('noChanges') })) : (_jsxs(Table, { "data-testid": "evals-compare-table", children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t('colTask') }), data.jobs.map((job, i) => (_jsx(TableHead, { className: "max-w-40 truncate text-right", title: job.job_name, children: i === 0 ? t('baseline') : job.job_name }, job.job_id))), _jsx(TableHead, { className: "w-24 text-right", children: t('colChange') })] }) }), _jsx(TableBody, { children: rows.map((row) => (_jsx(CompareRow, { row: row }, `${row.task_name}-${row.agent}-${row.model}`))) })] }))] })) }));
|
|
54
|
+
}
|
|
55
|
+
function CompareRow({ row }) {
|
|
56
|
+
const t = useTranslations('evals');
|
|
57
|
+
const change = CHANGE[row.change];
|
|
58
|
+
const Icon = change.icon;
|
|
59
|
+
return (_jsxs(TableRow, { "data-testid": "evals-compare-row", "data-change": row.change, children: [_jsxs(TableCell, { className: "max-w-72", children: [_jsx("span", { className: "text-foreground block truncate font-mono text-sm", children: row.task_name }), row.agent ? (_jsx("span", { className: "text-muted-foreground block truncate text-xs", children: agentLabel(row.agent, row.model) })) : null] }), row.cells.map((cell) => (_jsx(TableCell, { className: "text-right", children: _jsx(Cell, { cell: cell }) }, cell.job_id))), _jsx(TableCell, { className: "w-24 text-right", children: _jsxs("span", { className: cn('inline-flex items-center gap-1 text-xs', change.className), children: [_jsx(Icon, { weight: "bold", className: "size-3", "aria-hidden": true }), t(`changeKind.${row.change}`)] }) })] }));
|
|
60
|
+
}
|
|
61
|
+
/** One job on one task: the pass rate over its counted attempts, or the error that left none. */
|
|
62
|
+
function Cell({ cell }) {
|
|
63
|
+
const t = useTranslations('evals');
|
|
64
|
+
if (cell.n === 0)
|
|
65
|
+
return (_jsx("span", { className: "text-muted-foreground text-xs", title: cell.exception_type ?? undefined, children: cell.exception_type ? t('tone.error') : t('notRun') }));
|
|
66
|
+
const tint = cell.pass_rate === 1 ? 'bg-kortix-green/15' : cell.pass_rate === 0 ? 'bg-kortix-red/15' : 'bg-kortix-orange/15';
|
|
67
|
+
return (_jsxs("span", { className: cn('inline-flex items-baseline gap-1.5 rounded-sm px-1.5 py-0.5 tabular-nums', tint), children: [_jsx("span", { className: "text-foreground text-sm font-medium", children: percent(cell.pass_rate) }), cell.n > 1 ? _jsx("span", { className: "text-muted-foreground text-xs", children: `${cell.n_passed}/${cell.n}` }) : null] }));
|
|
68
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorkspaceEvalTask } from '@kortix/sdk';
|
|
2
|
+
import { type EvalDatasetRef } from './eval-meta.js';
|
|
3
|
+
/** `403` from a task read: the caller may not read the repository's files. */
|
|
4
|
+
export declare const isNoFileAccess: (error: unknown) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Customize → Evals → Datasets → one dataset (`/admin/eval-datasets/<kind>/<name>`),
|
|
7
|
+
* the Harbor Hub's dataset page: the name, New job, the CLI command, a version
|
|
8
|
+
* select, then README, Tasks, Leaderboard (this dataset's agents × models) and
|
|
9
|
+
* Jobs. A tab with nothing in it is left out.
|
|
10
|
+
*/
|
|
11
|
+
export declare function EvalDatasetView({ projectId, dataset }: {
|
|
12
|
+
projectId: string;
|
|
13
|
+
dataset: EvalDatasetRef;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
/** The tasks of one dataset: searchable by name, category and tag; a row opens the task. */
|
|
16
|
+
export declare function TaskTable({ projectId, dataset, tasks, }: {
|
|
17
|
+
projectId: string;
|
|
18
|
+
dataset: EvalDatasetRef;
|
|
19
|
+
tasks: WorkspaceEvalTask[];
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useVisibleAgents, useWorkspaceEvalDatasets, useWorkspaceEvalJobs, useWorkspaceEvalSuites, useWorkspaceEvalTasks, } from '@kortix/sdk/react';
|
|
4
|
+
import { PlayIcon } from '@phosphor-icons/react';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
7
|
+
import { UnifiedMarkdown } from '../../markdown/index.js';
|
|
8
|
+
import { Button } from '../../primitives/button.js';
|
|
9
|
+
import { EmptyState } from '../../primitives/empty-state.js';
|
|
10
|
+
import { ErrorState } from '../../primitives/error-state.js';
|
|
11
|
+
import { PageSearchBar } from '../../primitives/page-search-bar.js';
|
|
12
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../../primitives/select.js';
|
|
13
|
+
import { Skeleton } from '../../primitives/skeleton.js';
|
|
14
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../../primitives/table.js';
|
|
15
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '../../primitives/tabs.js';
|
|
16
|
+
import { Tag } from '../../primitives/tag.js';
|
|
17
|
+
import { UiLink as Link, useUiRouter } from '../../providers/ui-provider.js';
|
|
18
|
+
import { datasetLabel, evalDatasetHref, evalDatasetsHref, evalTaskHref, leaderboard, runCommand, } from './eval-meta.js';
|
|
19
|
+
import { EVAL_FRAME, EvalDetailPage, EvalTitle, JobsTable, LeaderboardTable, ListFooter, RunCommand, ShareButton, useUrlTab, } from './eval-ui.js';
|
|
20
|
+
import { RunEvalModal } from './run-eval-modal.js';
|
|
21
|
+
const TABS = ['readme', 'tasks', 'leaderboard', 'jobs'];
|
|
22
|
+
/** `403` from a task read: the caller may not read the repository's files. */
|
|
23
|
+
export const isNoFileAccess = (error) => error?.status === 403;
|
|
24
|
+
/**
|
|
25
|
+
* Customize → Evals → Datasets → one dataset (`/admin/eval-datasets/<kind>/<name>`),
|
|
26
|
+
* the Harbor Hub's dataset page: the name, New job, the CLI command, a version
|
|
27
|
+
* select, then README, Tasks, Leaderboard (this dataset's agents × models) and
|
|
28
|
+
* Jobs. A tab with nothing in it is left out.
|
|
29
|
+
*/
|
|
30
|
+
export function EvalDatasetView({ projectId, dataset }) {
|
|
31
|
+
const t = useTranslations('evals');
|
|
32
|
+
const router = useUiRouter();
|
|
33
|
+
const suites = useWorkspaceEvalSuites(projectId);
|
|
34
|
+
const catalog = useWorkspaceEvalDatasets(dataset.kind === 'dataset' ? projectId : null);
|
|
35
|
+
const agents = useVisibleAgents({ projectId });
|
|
36
|
+
const tasks = useWorkspaceEvalTasks(projectId, dataset.kind === 'suite' ? { suite: dataset.name } : { dataset: dataset.name, version: dataset.version });
|
|
37
|
+
const jobs = useWorkspaceEvalJobs(projectId, dataset.kind === 'suite' ? { suite: dataset.name } : { dataset: dataset.name });
|
|
38
|
+
const [running, setRunning] = useState(false);
|
|
39
|
+
const suite = dataset.kind === 'suite' ? suites.data?.find((s) => s.name === dataset.name) : undefined;
|
|
40
|
+
const meta = dataset.kind === 'dataset' ? catalog.data?.datasets.find((d) => d.name === dataset.name) : undefined;
|
|
41
|
+
const version = dataset.kind === 'dataset' ? (dataset.version ?? meta?.version ?? null) : null;
|
|
42
|
+
const ref = dataset.kind === 'dataset' ? { ...dataset, version } : dataset;
|
|
43
|
+
const jobList = jobs.data ?? [];
|
|
44
|
+
// A dataset's jobs can name several versions: the board keeps this one's.
|
|
45
|
+
const board = leaderboard(version ? jobList.filter((job) => !job.config.datasets.some((d) => d.version && d.version !== version)) : jobList);
|
|
46
|
+
const readme = tasks.data?.readme ?? null;
|
|
47
|
+
const tabs = TABS.filter((tab) => (tab !== 'readme' || !!readme) &&
|
|
48
|
+
(tab !== 'leaderboard' || board.length > 0) &&
|
|
49
|
+
(tab !== 'jobs' || jobList.length > 0));
|
|
50
|
+
const [tab, setTab] = useUrlTab(tabs);
|
|
51
|
+
const firstAgent = suite ? null : (agents.find((agent) => agent.name !== 'kortix')?.name ?? null);
|
|
52
|
+
const unknown = (dataset.kind === 'suite' && suites.isSuccess && !suite) ||
|
|
53
|
+
(dataset.kind === 'dataset' && catalog.isSuccess && !meta && tasks.isError);
|
|
54
|
+
const description = dataset.kind === 'suite'
|
|
55
|
+
? suite?.error
|
|
56
|
+
? `${t('suiteError')}: ${suite.error}`
|
|
57
|
+
: suite?.source === 'config' && suite.config_path
|
|
58
|
+
? t('suiteFromConfig', { path: suite.config_path })
|
|
59
|
+
: t('suiteInline')
|
|
60
|
+
: (meta?.description ?? null);
|
|
61
|
+
return (_jsxs(EvalDetailPage, { crumbs: [{ label: t('datasetsTitle'), href: evalDatasetsHref(projectId) }, { label: dataset.name }], children: [_jsx(RunEvalModal, { projectId: projectId, suites: suites.data ?? [], target: dataset.kind === 'suite' ? { kind: 'suite', name: dataset.name } : { kind: 'dataset', name: dataset.name, version }, open: running, onOpenChange: setRunning }), unknown ? (_jsx(EmptyState, { size: "sm", title: t('datasetNotFound'), action: _jsx(Button, { asChild: true, size: "sm", variant: "outline", children: _jsx(Link, { href: evalDatasetsHref(projectId), children: t('datasetsTitle') }) }) })) : (_jsxs(_Fragment, { children: [_jsxs("header", { className: "flex flex-wrap items-start justify-between gap-x-4 gap-y-3", children: [_jsx(EvalTitle, { name: dataset.name, badge: _jsx(Tag, { children: t(`origin.${dataset.kind === 'suite' ? 'suite' : meta?.kind === 'builtin' ? 'builtin' : 'registry'}`) }), description: description }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [meta && meta.versions.length > 1 ? (_jsxs(Select, { value: version ?? meta.version, onValueChange: (next) => router.push(evalDatasetHref(projectId, { kind: 'dataset', name: dataset.name, version: next })), children: [_jsx(SelectTrigger, { size: "sm", className: "w-36", "aria-label": t('version'), "data-testid": "evals-version", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: meta.versions.map((v) => (_jsx(SelectItem, { value: v, children: v === meta.version ? t('versionLatest', { version: v }) : v }, v))) })] })) : null, _jsx(ShareButton, {}), _jsxs(Button, { size: "sm", className: "gap-1.5", onClick: () => setRunning(true), disabled: dataset.kind === 'suite' && !suite?.config, "data-testid": "evals-dataset-run", children: [_jsx(PlayIcon, { weight: "fill", className: "size-3.5 shrink-0", "aria-hidden": true }), t('newJob')] })] })] }), _jsx(RunCommand, { command: runCommand(ref, { agent: firstAgent }) }), tasks.isLoading ? (_jsxs("div", { className: "flex flex-col gap-2", "aria-busy": true, children: [_jsx(Skeleton, { className: "h-8 w-64" }), _jsx(Skeleton, { className: "h-40 w-full rounded-md" })] })) : (_jsxs(Tabs, { value: tab, onValueChange: (value) => setTab(value), children: [_jsx(TabsList, { className: "w-fit", children: tabs.map((value) => (_jsxs(TabsTrigger, { value: value, "data-testid": `evals-tab-${value}`, children: [t(`datasetTab.${value}`), value === 'tasks' && tasks.data ? (_jsx("span", { className: "text-muted-foreground ml-1 tabular-nums", children: tasks.data.tasks.length })) : value === 'jobs' ? (_jsx("span", { className: "text-muted-foreground ml-1 tabular-nums", children: jobs.total })) : null] }, value))) }), readme ? (_jsx(TabsContent, { value: "readme", className: "pt-4", children: _jsx("article", { className: `${EVAL_FRAME} px-6 py-5`, "data-testid": "evals-readme", children: _jsx(UnifiedMarkdown, { content: readme, trust: "untrusted", variant: "document" }) }) })) : null, _jsx(TabsContent, { value: "tasks", className: "pt-4", children: tasks.isError ? (_jsx(ErrorState, { size: "sm", title: isNoFileAccess(tasks.error) ? t('noFileAccess') : t('tasksLoadError'), description: isNoFileAccess(tasks.error)
|
|
62
|
+
? t('noFileAccessDescription')
|
|
63
|
+
: tasks.error instanceof Error
|
|
64
|
+
? tasks.error.message
|
|
65
|
+
: undefined, action: isNoFileAccess(tasks.error) ? undefined : (_jsx(Button, { size: "sm", variant: "outline", onClick: () => tasks.refetch(), children: t('retry') })) })) : (_jsx(TaskTable, { projectId: projectId, dataset: ref, tasks: tasks.data?.tasks ?? [] })) }), board.length ? (_jsx(TabsContent, { value: "leaderboard", className: "pt-4", children: _jsx(LeaderboardTable, { projectId: projectId, rows: board, showDataset: false }) })) : null, jobList.length ? (_jsxs(TabsContent, { value: "jobs", className: "flex flex-col gap-3 pt-4", children: [_jsx(JobsTable, { projectId: projectId, jobs: jobList, showDataset: false }), jobs.total > jobList.length ? (_jsx(ListFooter, { children: t('displayingJobs', { shown: jobList.length, total: jobs.total }) })) : null] })) : null] }))] }))] }));
|
|
66
|
+
}
|
|
67
|
+
/** The tasks of one dataset: searchable by name, category and tag; a row opens the task. */
|
|
68
|
+
export function TaskTable({ projectId, dataset, tasks, }) {
|
|
69
|
+
const t = useTranslations('evals');
|
|
70
|
+
const router = useUiRouter();
|
|
71
|
+
const [search, setSearch] = useState('');
|
|
72
|
+
const needle = search.trim().toLowerCase();
|
|
73
|
+
const shown = tasks.filter((task) => !needle ||
|
|
74
|
+
task.name.toLowerCase().includes(needle) ||
|
|
75
|
+
(task.category ?? '').toLowerCase().includes(needle) ||
|
|
76
|
+
task.tags.some((tag) => tag.toLowerCase().includes(needle)));
|
|
77
|
+
return (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx(PageSearchBar, { value: search, onChange: setSearch, placeholder: t('searchTasks') }), shown.length === 0 ? (_jsx("div", { className: `${EVAL_FRAME} text-muted-foreground px-4 py-6 text-center text-sm`, children: needle ? t('noTaskMatch') : t('noTasks') })) : (_jsxs(Table, { "data-testid": "evals-tasks", children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t('colTask') }), _jsx(TableHead, { className: "hidden md:table-cell", children: t('colCategory') }), _jsx(TableHead, { className: "hidden sm:table-cell", children: t('colDifficulty') }), _jsx(TableHead, { className: "hidden lg:table-cell", children: t('colTags') })] }) }), _jsx(TableBody, { children: shown.map((task) => {
|
|
78
|
+
const href = evalTaskHref(projectId, task.task_id, dataset);
|
|
79
|
+
return (_jsxs(TableRow, { className: "hover:bg-hover cursor-pointer", onClick: () => router.push(href), "data-testid": "evals-task-row", children: [_jsx(TableCell, { className: "max-w-80", children: _jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Link, { href: href, className: "text-foreground truncate font-mono text-sm", onClick: (e) => e.stopPropagation(), children: task.name }), task.unsupported ? _jsx(Tag, { title: task.unsupported, children: t('unsupported') }) : null] }) }), _jsx(TableCell, { className: "text-muted-foreground hidden text-sm md:table-cell", children: task.category ?? '—' }), _jsx(TableCell, { className: "text-muted-foreground hidden text-sm sm:table-cell", children: task.difficulty ?? '—' }), _jsx(TableCell, { className: "hidden lg:table-cell", children: _jsxs("span", { className: "flex flex-wrap gap-1", children: [task.tags.slice(0, 3).map((tag) => (_jsx(Tag, { children: tag }, tag))), task.tags.length > 3 ? (_jsx("span", { className: "text-muted-foreground text-xs", children: `+${task.tags.length - 3}` })) : null] }) })] }, task.task_id));
|
|
80
|
+
}) })] })), _jsxs(ListFooter, { children: [t('displayingTasks', { shown: shown.length, total: tasks.length }), dataset ? ` · ${datasetLabel(dataset)}` : ''] })] }));
|
|
81
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { WorkspaceEvalJob } from '@kortix/sdk';
|
|
2
|
+
import { type EvalDatasetRef } from './eval-meta.js';
|
|
3
|
+
export type DatasetOrigin = 'suite' | 'builtin' | 'registry';
|
|
4
|
+
export interface DatasetRow {
|
|
5
|
+
ref: EvalDatasetRef;
|
|
6
|
+
origin: DatasetOrigin;
|
|
7
|
+
description: string;
|
|
8
|
+
/** Null: unknown without reading the dataset (a suite reads its own count). */
|
|
9
|
+
nTasks: number | null;
|
|
10
|
+
error: string | null;
|
|
11
|
+
}
|
|
12
|
+
/** The newest completed job of each dataset, and how many jobs each has. */
|
|
13
|
+
export declare function jobsByDataset(jobs: WorkspaceEvalJob[]): {
|
|
14
|
+
latest: Map<string, WorkspaceEvalJob>;
|
|
15
|
+
count: Map<string, number>;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Customize → Evals → Datasets: every dataset a job can run, in one table —
|
|
19
|
+
* the suites of kortix.yaml, Kortix's built-in datasets and Harbor's (Harbor
|
|
20
|
+
* Hub packages and the legacy registry) — with its task count and its latest score here. A row opens the
|
|
21
|
+
* dataset (README, tasks, leaderboard, jobs).
|
|
22
|
+
*/
|
|
23
|
+
export declare function EvalDatasetsPage({ projectId }: {
|
|
24
|
+
projectId: string;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useWorkspaceEvalDatasets, useWorkspaceEvalJobs, useWorkspaceEvalSuites, useWorkspaceEvalTasks, } from '@kortix/sdk/react';
|
|
4
|
+
import { DatabaseIcon } from '@phosphor-icons/react';
|
|
5
|
+
import { useMemo, useState } from 'react';
|
|
6
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
7
|
+
import { Alert, AlertDescription } from '../../primitives/alert.js';
|
|
8
|
+
import { Button } from '../../primitives/button.js';
|
|
9
|
+
import { EmptyState } from '../../primitives/empty-state.js';
|
|
10
|
+
import { ErrorState } from '../../primitives/error-state.js';
|
|
11
|
+
import { PageSearchBar } from '../../primitives/page-search-bar.js';
|
|
12
|
+
import { Skeleton } from '../../primitives/skeleton.js';
|
|
13
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../../primitives/table.js';
|
|
14
|
+
import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
|
|
15
|
+
import { Tag } from '../../primitives/tag.js';
|
|
16
|
+
import { UiLink as Link, useUiRouter } from '../../providers/ui-provider.js';
|
|
17
|
+
import { CapabilityPageShell } from '../shared/capability-page-shell.js';
|
|
18
|
+
import { datasetKey, evalDatasetHref, evalJobScore, jobDataset, } from './eval-meta.js';
|
|
19
|
+
import { InfoHint, ListFooter, ScoreValue } from './eval-ui.js';
|
|
20
|
+
const FILTERS = ['all', 'suite', 'builtin', 'registry'];
|
|
21
|
+
/** The newest completed job of each dataset, and how many jobs each has. */
|
|
22
|
+
export function jobsByDataset(jobs) {
|
|
23
|
+
const latest = new Map();
|
|
24
|
+
const count = new Map();
|
|
25
|
+
for (const job of jobs) {
|
|
26
|
+
const ref = jobDataset(job);
|
|
27
|
+
if (!ref)
|
|
28
|
+
continue;
|
|
29
|
+
const key = datasetKey(ref);
|
|
30
|
+
count.set(key, (count.get(key) ?? 0) + 1);
|
|
31
|
+
if (job.status === 'completed' && !latest.has(key))
|
|
32
|
+
latest.set(key, job);
|
|
33
|
+
}
|
|
34
|
+
return { latest, count };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Customize → Evals → Datasets: every dataset a job can run, in one table —
|
|
38
|
+
* the suites of kortix.yaml, Kortix's built-in datasets and Harbor's (Harbor
|
|
39
|
+
* Hub packages and the legacy registry) — with its task count and its latest score here. A row opens the
|
|
40
|
+
* dataset (README, tasks, leaderboard, jobs).
|
|
41
|
+
*/
|
|
42
|
+
export function EvalDatasetsPage({ projectId }) {
|
|
43
|
+
const t = useTranslations('evals');
|
|
44
|
+
const router = useUiRouter();
|
|
45
|
+
const suites = useWorkspaceEvalSuites(projectId);
|
|
46
|
+
const datasets = useWorkspaceEvalDatasets(projectId);
|
|
47
|
+
const jobs = useWorkspaceEvalJobs(projectId);
|
|
48
|
+
const [search, setSearch] = useState('');
|
|
49
|
+
const [filter, setFilter] = useState('all');
|
|
50
|
+
const rows = useMemo(() => [
|
|
51
|
+
...(suites.data ?? []).map((suite) => ({
|
|
52
|
+
ref: { kind: 'suite', name: suite.name },
|
|
53
|
+
origin: 'suite',
|
|
54
|
+
description: suite.source === 'config' && suite.config_path
|
|
55
|
+
? suite.config_path
|
|
56
|
+
: (suite.config?.agents ?? []).map((a) => a.name).join(', '),
|
|
57
|
+
nTasks: null,
|
|
58
|
+
error: suite.error,
|
|
59
|
+
})),
|
|
60
|
+
...(datasets.data?.datasets ?? []).map((dataset) => ({
|
|
61
|
+
ref: { kind: 'dataset', name: dataset.name, version: dataset.version },
|
|
62
|
+
// Harbor Hub and Harbor's legacy registry are one source to a reader: Harbor.
|
|
63
|
+
origin: dataset.kind === 'builtin' ? 'builtin' : 'registry',
|
|
64
|
+
description: dataset.description,
|
|
65
|
+
nTasks: dataset.n_tasks,
|
|
66
|
+
error: null,
|
|
67
|
+
})),
|
|
68
|
+
], [suites.data, datasets.data]);
|
|
69
|
+
const { latest, count } = jobsByDataset(jobs.data ?? []);
|
|
70
|
+
const needle = search.trim().toLowerCase();
|
|
71
|
+
const shown = rows.filter((row) => (filter === 'all' || row.origin === filter) &&
|
|
72
|
+
(!needle ||
|
|
73
|
+
row.ref.name.toLowerCase().includes(needle) ||
|
|
74
|
+
row.description.toLowerCase().includes(needle)));
|
|
75
|
+
const loading = suites.isLoading || datasets.isLoading;
|
|
76
|
+
const counts = (origin) => origin === 'all' ? rows.length : rows.filter((row) => row.origin === origin).length;
|
|
77
|
+
return (_jsx(CapabilityPageShell, { title: t('datasetsTitle'), description: t('datasetsDescription'), titleAddon: _jsx(InfoHint, { text: t('datasetsInfo') }), search: _jsx(PageSearchBar, { value: search, onChange: setSearch, placeholder: t('searchDatasets') }), children: suites.isError && datasets.isError ? (_jsx(ErrorState, { size: "sm", title: t('loadError'), action: _jsx(Button, { size: "sm", variant: "outline", onClick: () => void Promise.all([suites.refetch(), datasets.refetch()]), children: t('retry') }) })) : loading ? (_jsx("div", { className: "flex flex-col gap-2", "aria-busy": true, children: [0, 1, 2, 3, 4].map((i) => (_jsx(Skeleton, { className: "h-12 w-full rounded-md" }, i))) })) : (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx(Tabs, { value: filter, onValueChange: (value) => setFilter(value), children: _jsx(TabsList, { variant: "segmented", className: "w-fit", "aria-label": t('datasetFilter'), children: FILTERS.map((value) => (_jsxs(TabsTrigger, { value: value, "data-testid": `evals-datasets-filter-${value}`, children: [t(`origin.${value}`), _jsx("span", { className: "text-muted-foreground ml-1 tabular-nums", children: counts(value) })] }, value))) }) }), datasets.data?.registry_error ? (_jsx(Alert, { children: _jsx(AlertDescription, { children: t('registryUnavailable', { reason: datasets.data.registry_error }) }) })) : null, shown.length === 0 ? (_jsx(EmptyState, { size: "sm", media: _jsx(DatabaseIcon, { className: "text-muted-foreground size-6" }), title: needle ? t('noDatasetMatch') : t('noDatasets'), action: needle ? (_jsx(Button, { size: "sm", variant: "outline", onClick: () => setSearch(''), children: t('clearSearch') })) : undefined })) : (_jsxs(Table, { "data-testid": "evals-datasets", children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t('colDataset') }), _jsx(TableHead, { className: "hidden sm:table-cell", children: t('colSource') }), _jsx(TableHead, { className: "text-right", children: t('colTaskCount') }), _jsx(TableHead, { className: "hidden text-right md:table-cell", children: t('colLastScore') }), _jsx(TableHead, { className: "hidden text-right md:table-cell", children: t('colJobs') })] }) }), _jsx(TableBody, { children: shown.map((row) => {
|
|
78
|
+
const key = datasetKey(row.ref);
|
|
79
|
+
const last = latest.get(key);
|
|
80
|
+
const score = last ? evalJobScore(last) : null;
|
|
81
|
+
const href = evalDatasetHref(projectId, row.ref);
|
|
82
|
+
return (_jsxs(TableRow, { className: "hover:bg-hover cursor-pointer", onClick: () => router.push(href), "data-testid": "evals-dataset-row", children: [_jsxs(TableCell, { className: "max-w-96", children: [_jsx(Link, { href: href, className: "text-foreground block truncate font-mono text-sm", onClick: (e) => e.stopPropagation(), children: row.ref.name }), _jsx("span", { className: "text-muted-foreground line-clamp-1 text-xs", children: row.error ? `${t('suiteError')}: ${row.error}` : row.description })] }), _jsx(TableCell, { className: "hidden sm:table-cell", children: _jsx(Tag, { children: t(`origin.${row.origin}`) }) }), _jsx(TableCell, { className: "text-muted-foreground text-right tabular-nums", children: row.origin === 'suite' ? (_jsx(SuiteTaskCount, { projectId: projectId, suite: row.ref.name })) : row.nTasks === null ? ('—') : (row.nTasks.toLocaleString()) }), _jsx(TableCell, { className: "hidden text-right md:table-cell", children: score ? (_jsx(ScoreValue, { rate: score.passAt1 ?? score.mean, n: score.validTrials })) : (_jsx("span", { className: "text-muted-foreground", children: "\u2014" })) }), _jsx(TableCell, { className: "text-muted-foreground hidden text-right tabular-nums md:table-cell", children: count.get(key) ?? 0 })] }, key));
|
|
83
|
+
}) })] })), _jsx(ListFooter, { children: t('displayingDatasets', { shown: shown.length, total: rows.length }) })] })) }));
|
|
84
|
+
}
|
|
85
|
+
/** A suite's task count, read from its task list (the same request its Tasks tab makes). */
|
|
86
|
+
function SuiteTaskCount({ projectId, suite }) {
|
|
87
|
+
const tasks = useWorkspaceEvalTasks(projectId, { suite });
|
|
88
|
+
if (!tasks.data)
|
|
89
|
+
return _jsx(_Fragment, { children: "\u2014" });
|
|
90
|
+
return _jsx(_Fragment, { children: tasks.data.tasks.length.toLocaleString() });
|
|
91
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Customize → Evals → Jobs → one job (`/admin/eval-jobs/<id>`), the Harbor
|
|
3
|
+
* Hub's job page: the progress bar (each bucket filters the trials), then
|
|
4
|
+
* Overview (cost, tokens, the score of each agent × model), Run health (the
|
|
5
|
+
* task × attempt matrix and where errors concentrate), Trials and Config. A
|
|
6
|
+
* trial opens beside the page (`?trial=<id>`). Re-reads every 5 seconds until
|
|
7
|
+
* the job ends.
|
|
8
|
+
*/
|
|
9
|
+
export declare function EvalJobView({ projectId, jobId }: {
|
|
10
|
+
projectId: string;
|
|
11
|
+
jobId: string;
|
|
12
|
+
}): import("react").JSX.Element;
|