@kortix/ui 0.15.11 → 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 +478 -179
- package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
- 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-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 +6 -28
- package/dist/customize/agents/agent-tabs.d.ts +1 -0
- package/dist/customize/agents/agent-tabs.js +1 -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/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 +1 -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/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 +21 -2
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule-view.js +2 -1
- 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 +495 -46
- package/dist/i18n/en.js +536 -87
- 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/lib/browser-noise/rules/webview.js +16 -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/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/agents/agent-model.d.ts +1 -0
- package/dist/session/agents/agent-model.js +2 -1
- package/dist/session/agents/agent-strip.js +10 -4
- 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 +3 -0
- package/dist/session/composer/agent-selector.js +6 -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.js +7 -2
- package/dist/session/composer/composer.d.ts +2 -2
- package/dist/session/composer/composer.js +7 -6
- 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.js +24 -6
- package/dist/session/media/sandbox-url-detector.js +1 -1
- 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/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/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 +18 -3
- 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 +1 -2
- package/dist/session/thread/transcript.js +26 -24
- package/dist/session/thread/typing-indicator.d.ts +2 -2
- package/dist/session/thread/typing-indicator.js +10 -3
- 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/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 +495 -46
- package/dist/workspace/admin/project-admin-dashboard.js +21 -7
- 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/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/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/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-timeline.js +2 -2
- package/package.json +67 -10
- package/skills/kortix-ui/SKILL.md +2 -2
- package/skills/kortix-ui/references/modules.md +5 -3
- 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
|
@@ -40,8 +40,10 @@ export declare const BUILTIN_AGENT_KEYS: BuiltinAgentKey[];
|
|
|
40
40
|
export declare function builtinAgentKeyOf(agentName: string | null | undefined): BuiltinAgentKey | null;
|
|
41
41
|
/**
|
|
42
42
|
* An agent's name as a person reads it: My Kortix for the built-in agent,
|
|
43
|
-
*
|
|
43
|
+
* then its `kortix.yaml` `title` as written ("GitHub PR reviewer"), otherwise
|
|
44
|
+
* the manifest key in sentence case with its separators as spaces
|
|
44
45
|
* (`session-reviewer` → "Session reviewer"). One helper, so the web app, the
|
|
45
|
-
* sidebar and channel posts (Slack) name an agent the same way.
|
|
46
|
+
* sidebar and channel posts (Slack) name an agent the same way. Pass `title`
|
|
47
|
+
* wherever the agent record is in hand; a bare slug keeps the derived name.
|
|
46
48
|
*/
|
|
47
|
-
export declare function agentDisplayName(slug: string): string;
|
|
49
|
+
export declare function agentDisplayName(slug: string, title?: string | null): string;
|
|
@@ -30,3 +30,11 @@ export declare function splitFilenameForTile(name: string): {
|
|
|
30
30
|
head: string;
|
|
31
31
|
tail: string;
|
|
32
32
|
} | null;
|
|
33
|
+
/**
|
|
34
|
+
* A short name cut into the pieces a line may break between: after `-`, `_`
|
|
35
|
+
* or a space, and before the extension's dot. The tile puts a `<wbr>` between
|
|
36
|
+
* pieces and lets the browser break nowhere else unless one piece alone is
|
|
37
|
+
* wider than the tile, so `dsa-c-attach.txt` wraps as `dsa-c-attach` /
|
|
38
|
+
* `.txt`, never `dsa-c-attach.t` / `xt` (dev audit, 2026-11-14).
|
|
39
|
+
*/
|
|
40
|
+
export declare function filenameBreakSegments(name: string): string[];
|
|
@@ -16,6 +16,9 @@ export declare const WORKSPACE_SETTINGS_GROUPS: readonly [{
|
|
|
16
16
|
}, {
|
|
17
17
|
readonly id: "library";
|
|
18
18
|
readonly sections: readonly ["agents", "models", "connectors", "secrets", "skills", "drives", "apps", "triggers", "sandbox", "git", "repo"];
|
|
19
|
+
}, {
|
|
20
|
+
readonly id: "evals";
|
|
21
|
+
readonly sections: readonly ["evals", "eval-datasets", "eval-tasks", "eval-jobs"];
|
|
19
22
|
}, {
|
|
20
23
|
readonly id: "people";
|
|
21
24
|
readonly sections: readonly ["members", "groups", "roles", "identity", "audit"];
|
|
@@ -14,6 +14,12 @@ export interface CopyRowProps {
|
|
|
14
14
|
successMessage?: string;
|
|
15
15
|
/** Extra controls between the value and the copy button (Reveal, Rotate…). */
|
|
16
16
|
actions?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Show the whole value: it sizes the row to the value and wraps at any
|
|
19
|
+
* character when the row has no room, instead of cutting it off. For an id
|
|
20
|
+
* a person reads out or compares (the Workspace ID).
|
|
21
|
+
*/
|
|
22
|
+
wrap?: boolean;
|
|
17
23
|
className?: string;
|
|
18
24
|
}
|
|
19
|
-
export declare function CopyRow({ value, label, display, successMessage, actions, className, }: CopyRowProps): import("react").JSX.Element;
|
|
25
|
+
export declare function CopyRow({ value, label, display, successMessage, actions, wrap, className, }: CopyRowProps): import("react").JSX.Element;
|
|
@@ -29,7 +29,7 @@ export async function copyValue(value, successMsg, failureMsg) {
|
|
|
29
29
|
return false;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
export function CopyRow({ value, label, display, successMessage, actions, className, }) {
|
|
32
|
+
export function CopyRow({ value, label, display, successMessage, actions, wrap = false, className, }) {
|
|
33
33
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
34
34
|
const { copy, copied } = useCopy({
|
|
35
35
|
successMessage: successMessage ?? tI18nComplete.raw('textd37078fe6a1f'),
|
|
@@ -37,5 +37,5 @@ export function CopyRow({ value, label, display, successMessage, actions, classN
|
|
|
37
37
|
const copyLabel = copied
|
|
38
38
|
? tI18nComplete.raw('text8d525e5f158b')
|
|
39
39
|
: tI18nComplete.raw('texte21f935f11d7');
|
|
40
|
-
return (_jsxs("div", { className: cn('space-y-1.5', className), children: [label ? _jsx("span", { className: "text-muted-foreground text-xs font-medium", children: label }) : null, _jsxs("div", { className: "bg-popover flex items-center gap-2 rounded-md border px-3 py-2", children: [_jsx("code", { className:
|
|
40
|
+
return (_jsxs("div", { className: cn('space-y-1.5', className), children: [label ? _jsx("span", { className: "text-muted-foreground text-xs font-medium", children: label }) : null, _jsxs("div", { className: "bg-popover flex items-center gap-2 rounded-md border px-3 py-2", children: [_jsx("code", { className: cn('text-foreground min-w-0 flex-1 font-mono text-xs', wrap ? 'break-all' : 'truncate'), children: display ?? value }), actions, _jsx(Hint, { label: copyLabel, children: _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", "aria-label": copyLabel, onClick: () => void copy(value), className: "text-muted-foreground hover:text-foreground shrink-0", children: _jsx("span", { className: "relative inline-flex size-3.5 items-center justify-center", children: _jsx(AnimatePresence, { initial: false, mode: "popLayout", children: _jsx(m.span, { initial: { scale: 0.25, opacity: 0, filter: 'blur(4px)' }, animate: { scale: 1, opacity: 1, filter: 'blur(0px)' }, exit: { scale: 0.25, opacity: 0, filter: 'blur(4px)' }, transition: { type: 'spring', duration: 0.3, bounce: 0 }, className: "absolute inset-0 inline-flex items-center justify-center", children: copied ? (_jsx(CheckIcon, { className: "text-kortix-green size-3.5" })) : (_jsx(CopyIcon, { className: "size-3.5" })) }, copied ? 'check' : 'copy') }) }) }) })] })] }));
|
|
41
41
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { AnimatePresence, m
|
|
3
|
+
import { AnimatePresence, m } from "motion/react";
|
|
4
|
+
import { useReducedMotion } from "./internal/hooks/use-reduced-motion.js";
|
|
4
5
|
export function AnimatedCopyIcon({ copied, children, }) {
|
|
5
6
|
const reducedMotion = useReducedMotion();
|
|
6
7
|
if (reducedMotion)
|
|
@@ -59,7 +59,8 @@ export declare function SandboxAddressBar({ displayValue, hasPreview, isLoading,
|
|
|
59
59
|
* `AppPreview` puts `Copy link` here. */
|
|
60
60
|
trailing?: ReactNode;
|
|
61
61
|
/** The address takes no input (the session's computer is booting). Pair it
|
|
62
|
-
* with `hasPreview={false}`, which disables the buttons.
|
|
62
|
+
* with `hasPreview={false}`, which disables the page buttons. Back/Forward
|
|
63
|
+
* follow the history alone, so a landing page can still go Forward. */
|
|
63
64
|
disabled?: boolean;
|
|
64
65
|
}): import("react").JSX.Element;
|
|
65
66
|
/**
|
|
@@ -121,7 +121,7 @@ export function SandboxAddressBar({ displayValue, hasPreview, isLoading, canGoBa
|
|
|
121
121
|
onNavigate(internal);
|
|
122
122
|
}, [addressValue, onNavigate, suggestions]);
|
|
123
123
|
const suggestionsId = useId();
|
|
124
|
-
return (_jsxs(_Fragment, { children: [_jsxs(ButtonGroup, { className: "shrink-0", children: [_jsx(Hint, { label: tI18nComplete.raw('text76900f1bfd16'), side: "bottom", children: _jsx(Button, { variant: "secondary", size: "icon", onClick: onBack, disabled:
|
|
124
|
+
return (_jsxs(_Fragment, { children: [_jsxs(ButtonGroup, { className: "shrink-0", children: [_jsx(Hint, { label: tI18nComplete.raw('text76900f1bfd16'), side: "bottom", children: _jsx(Button, { variant: "secondary", size: "icon", onClick: onBack, disabled: disabled || !canGoBack, "aria-label": tI18nComplete.raw('text76900f1bfd16'), children: _jsx(ArrowLeft, { className: "size-4" }) }) }), _jsx(Hint, { label: tI18nComplete.raw('textf1c65e14817e'), side: "bottom", children: _jsx(Button, { variant: "secondary", size: "icon", onClick: onForward, disabled: disabled || !canGoForward, "aria-label": tI18nComplete.raw('textf1c65e14817e'), children: _jsx(ArrowRight, { className: "size-4" }) }) })] }), _jsx("form", { onSubmit: handleAddressSubmit, className: "flex min-w-0 flex-1 items-center px-1", children: _jsxs(ButtonGroup, { className: "w-full min-w-0", children: [_jsx(Hint, { label: tI18nComplete.raw('text3a78695388b3'), side: "bottom", children: _jsx(Button, { type: "button", variant: "secondary", size: "icon", onClick: onHome, disabled: !hasPreview, "aria-label": tI18nComplete.raw('text3a78695388b3'), children: _jsx(Home, { className: "size-3.5" }) }) }), _jsxs("div", { className: cn('bg-muted flex h-7 min-w-0 flex-1 items-center gap-1 rounded-md border border-transparent px-2 text-xs tracking-tight transition-colors', addressError && 'border-kortix-red/60 focus-within:border-kortix-red/60 animate-shake'), children: [_jsxs("div", { className: "group/address relative flex h-full min-w-0 flex-1 items-center", children: [_jsx(Input, { ref: inputRef, type: "text", size: "xs", disabled: disabled, value: urlParts ? displayValue : addressValue, "aria-label": ariaLabel, list: suggestions.length ? suggestionsId : undefined, onChange: (e) => {
|
|
125
125
|
setAddressValue(e.target.value);
|
|
126
126
|
if (addressError)
|
|
127
127
|
setAddressError(false);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
3
4
|
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
4
5
|
import { AgentMarkGlyph, agentMarkVars } from '../../internal/components/agent-mark.js';
|
|
6
|
+
import { plainTextFromMarkdown, shortSummary } from '../../markdown/inline-code-text.js';
|
|
5
7
|
import { cn } from '../../internal/lib/utils.js';
|
|
6
8
|
/**
|
|
7
9
|
* An Agents-page card led by the agent's pixel-mark cover. The cover gives
|
|
@@ -9,5 +11,11 @@ import { cn } from '../../internal/lib/utils.js';
|
|
|
9
11
|
* list is scanned by shape and tone before names are read.
|
|
10
12
|
*/
|
|
11
13
|
export function AgentCoverCard({ slug, href, onIntent, title, description, badges, meta, coverLabel, action, }) {
|
|
12
|
-
|
|
14
|
+
// The link's name is the title alone; the summary is its description, not
|
|
15
|
+
// part of the name (same rule as `CatalogCard`).
|
|
16
|
+
const id = useId();
|
|
17
|
+
const titleId = `${id}-title`;
|
|
18
|
+
const descriptionId = `${id}-description`;
|
|
19
|
+
const summary = description ? plainTextFromMarkdown(description) : '';
|
|
20
|
+
return (_jsxs("div", { className: "group/card relative flex", children: [_jsxs(Link, { href: href, prefetch: true, onPointerEnter: onIntent, onFocus: onIntent, "aria-labelledby": titleId, "aria-describedby": summary ? descriptionId : undefined, style: agentMarkVars(slug), className: cn('group bg-card flex-1 border-border/60 flex flex-col overflow-hidden rounded-md border text-left', 'hover:border-border transition-[border-color] duration-(--duration-normal) ease-out', 'focus-visible:ring-ring/50 focus-visible:ring-2 focus-visible:outline-none'), children: [_jsxs("span", { className: "relative flex h-31 items-center justify-center bg-(--mark-tile)", children: [_jsx(AgentMarkGlyph, { slug: slug, size: 56 }), coverLabel ? (_jsx("span", { className: "bg-background/20 absolute top-2.5 left-2.5 rounded-sm px-2 py-0.5 text-xs font-medium text-(--mark-ink) backdrop-blur-sm", children: coverLabel })) : null] }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-1 px-3.5 pt-3 pb-3.5", children: [_jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx("span", { id: titleId, className: "text-foreground truncate text-sm font-medium", children: title }), badges] }), summary ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground line-clamp-2 text-xs text-pretty", children: summary }), _jsx("span", { id: descriptionId, className: "sr-only", "aria-hidden": true, children: shortSummary(description ?? '') })] })) : null, meta ? (_jsx("span", { className: "text-muted-foreground mt-auto flex flex-wrap items-center gap-x-2 gap-y-0.5 pt-1.5 text-xs", children: meta })) : null] })] }), action ? _jsx("span", { className: "absolute top-2 right-2", children: action }) : null] }));
|
|
13
21
|
}
|
|
@@ -27,6 +27,8 @@ export function filterAgents(agents, opts) {
|
|
|
27
27
|
return false;
|
|
28
28
|
if (!q)
|
|
29
29
|
return true;
|
|
30
|
-
return (agent.name.toLowerCase().includes(q) ||
|
|
30
|
+
return (agent.name.toLowerCase().includes(q) ||
|
|
31
|
+
(agent.title ?? '').toLowerCase().includes(q) ||
|
|
32
|
+
(agent.description ?? '').toLowerCase().includes(q));
|
|
31
33
|
});
|
|
32
34
|
}
|
|
@@ -34,6 +34,16 @@ export interface OverviewFacts {
|
|
|
34
34
|
peopleCount?: number;
|
|
35
35
|
triggerCount?: number;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* The description, edited in place: a filled box with a pencil. Click it and
|
|
39
|
+
* it becomes a field in the same box; Enter or leaving keeps the edit in the
|
|
40
|
+
* draft, Escape puts back what was there.
|
|
41
|
+
*/
|
|
42
|
+
export declare function AboutDescription({ value, onChange, subagent, }: {
|
|
43
|
+
value: string;
|
|
44
|
+
onChange?: (next: string) => void;
|
|
45
|
+
subagent: boolean;
|
|
46
|
+
}): import("react").JSX.Element;
|
|
37
47
|
/** A space slug from what a person typed: the API's `SPACE_SLUG_RE` shape. */
|
|
38
48
|
export declare function spaceSlug(input: string): string;
|
|
39
49
|
export declare function AgentOverview({ agent, config, block, prompt, editor, sourcePath, onAskMyKortix, focusInstructions, showSpace, part, }: {
|
|
@@ -5,6 +5,7 @@ import { useState } from 'react';
|
|
|
5
5
|
import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
|
|
6
6
|
import { agentDisplayName } from '../../internal/components/agent-mark.js';
|
|
7
7
|
import { cn } from '../../internal/lib/utils.js';
|
|
8
|
+
import { InlineCodeText } from '../../markdown/inline-code-text.js';
|
|
8
9
|
import { Input } from '../../primitives/input.js';
|
|
9
10
|
import { Select, SelectContent, SelectItem, SelectSeparator, SelectTrigger, SelectValue, } from '../../primitives/select.js';
|
|
10
11
|
import { StatusDot } from '../../primitives/status.js';
|
|
@@ -86,13 +87,13 @@ function fitHeight(el) {
|
|
|
86
87
|
* it becomes a field in the same box; Enter or leaving keeps the edit in the
|
|
87
88
|
* draft, Escape puts back what was there.
|
|
88
89
|
*/
|
|
89
|
-
function AboutDescription({ value, onChange, subagent, }) {
|
|
90
|
+
export function AboutDescription({ value, onChange, subagent, }) {
|
|
90
91
|
const t = useI18nTranslations('agentEditor.page');
|
|
91
92
|
const tTabs = useI18nTranslations('agentEditor.tabs');
|
|
92
93
|
const [editing, setEditing] = useState(null);
|
|
93
94
|
const box = 'bg-popover block w-full rounded-md border px-3 py-2.5 text-left text-sm text-pretty';
|
|
94
95
|
if (!onChange) {
|
|
95
|
-
return value ? (_jsx("p", { className: cn(box, 'text-foreground'), children: value })) : (_jsx("p", { className: "text-muted-foreground text-sm", children: tTabs('noDescription') }));
|
|
96
|
+
return value ? (_jsx("p", { className: cn(box, 'text-foreground'), children: _jsx(InlineCodeText, { text: value }) })) : (_jsx("p", { className: "text-muted-foreground text-sm", children: tTabs('noDescription') }));
|
|
96
97
|
}
|
|
97
98
|
if (editing !== null) {
|
|
98
99
|
const finish = (keep) => {
|
|
@@ -116,7 +117,7 @@ function AboutDescription({ value, onChange, subagent, }) {
|
|
|
116
117
|
}
|
|
117
118
|
} }), _jsx("p", { className: "text-muted-foreground px-3 text-xs text-pretty", children: subagent ? t('descriptionHelpSubagent') : t('descriptionHelp') })] }));
|
|
118
119
|
}
|
|
119
|
-
return (_jsxs("button", { type: "button", onClick: () => setEditing(value), "aria-label": t('description'), className: cn(box, 'group/about hover:border-foreground/20 focus-visible:ring-ring/50 flex items-start gap-3 transition-colors duration-fast focus-visible:ring-2 focus-visible:outline-none', value ? 'text-foreground' : 'text-muted-foreground'), children: [_jsx("span", { className: "min-w-0 flex-1", children: value
|
|
120
|
+
return (_jsxs("button", { type: "button", onClick: () => setEditing(value), "aria-label": t('description'), className: cn(box, 'group/about hover:border-foreground/20 focus-visible:ring-ring/50 flex items-start gap-3 transition-colors duration-fast focus-visible:ring-2 focus-visible:outline-none', value ? 'text-foreground' : 'text-muted-foreground'), children: [_jsx("span", { className: "min-w-0 flex-1", children: value ? _jsx(InlineCodeText, { text: value }) : t('descriptionPlaceholder') }), _jsx(PencilSimpleIcon, { className: "text-muted-foreground group-hover/about:text-foreground mt-1.5 size-3.5 shrink-0 transition-colors duration-fast" })] }));
|
|
120
121
|
}
|
|
121
122
|
// ─── Aside ───────────────────────────────────────────────────────────────────
|
|
122
123
|
const PROJECT_WIDE = '__project_wide__';
|
|
@@ -221,7 +222,7 @@ function OverviewSettings({ agent, config, block, editor, showSpace, sourcePath,
|
|
|
221
222
|
const modeLabel = behavior.mode ? AGENT_MODE_LABEL[behavior.mode] : t('modeDefault');
|
|
222
223
|
const face = colorFace(behavior.color, t);
|
|
223
224
|
const value = (text) => _jsx("p", { className: "text-foreground text-sm sm:text-right", children: text });
|
|
224
|
-
return (_jsxs(_Fragment, { children: [_jsxs(EditorSection, { title: t('properties'), children: [_jsx(SettingRow, { label: t('enabled'), help: t('enabledHelp', { name: agentDisplayName(agent.name) }), children: _jsx("div", { className: "flex sm:justify-end", children: editor ? (_jsx(Switch, { "aria-label": t('enabled'), checked: enabled, onCheckedChange: (v) => editor.set('enabled', v ? undefined : false) })) : (_jsxs("span", { className: "text-foreground flex items-center gap-1.5 text-sm", children: [_jsx(StatusDot, { tone: enabled ? 'success' : 'neutral' }), enabled ? t('statusEnabled') : t('statusDisabled')] })) }) }), _jsx(SettingRow, { label: t('whoStarts'), children: editor ? (_jsxs(Select, { value: behavior.mode ?? INHERIT, onValueChange: (v) => editor.setOc('mode', v === INHERIT ? undefined : v), children: [_jsx(SelectTrigger, { "aria-label": t('whoStarts'), size: "sm", className: "w-full", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: INHERIT, children: t('modeDefault') }), AGENT_MODES.map((mode) => (_jsx(SelectItem, { value: mode, children: AGENT_MODE_LABEL[mode] }, mode)))] })] })) : (value(modeLabel)) }), _jsx(SettingRow, { label: t('showInPickers'), help: t('showInPickersHelp'), children: _jsx("div", { className: "flex sm:justify-end", children: editor ? (_jsx(Switch, { "aria-label": t('showInPickers'), checked: shown, onCheckedChange: (v) => editor.setOc('hidden', v ? undefined : true) })) : (value(shown ? t('pickerShown') : t('pickerHidden'))) }) }), showSpace ? (_jsx(SettingRow, { label: t('space'), children: editor ? (addingSpace ? (_jsx(NewSpaceInput, { onDone: (slug) => {
|
|
225
|
+
return (_jsxs(_Fragment, { children: [_jsxs(EditorSection, { title: t('properties'), children: [_jsx(SettingRow, { label: t('enabled'), help: t('enabledHelp', { name: agentDisplayName(agent.name, agent.title) }), children: _jsx("div", { className: "flex sm:justify-end", children: editor ? (_jsx(Switch, { "aria-label": t('enabled'), checked: enabled, onCheckedChange: (v) => editor.set('enabled', v ? undefined : false) })) : (_jsxs("span", { className: "text-foreground flex items-center gap-1.5 text-sm", children: [_jsx(StatusDot, { tone: enabled ? 'success' : 'neutral' }), enabled ? t('statusEnabled') : t('statusDisabled')] })) }) }), _jsx(SettingRow, { label: t('whoStarts'), children: editor ? (_jsxs(Select, { value: behavior.mode ?? INHERIT, onValueChange: (v) => editor.setOc('mode', v === INHERIT ? undefined : v), children: [_jsx(SelectTrigger, { "aria-label": t('whoStarts'), size: "sm", className: "w-full", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: INHERIT, children: t('modeDefault') }), AGENT_MODES.map((mode) => (_jsx(SelectItem, { value: mode, children: AGENT_MODE_LABEL[mode] }, mode)))] })] })) : (value(modeLabel)) }), _jsx(SettingRow, { label: t('showInPickers'), help: t('showInPickersHelp'), children: _jsx("div", { className: "flex sm:justify-end", children: editor ? (_jsx(Switch, { "aria-label": t('showInPickers'), checked: shown, onCheckedChange: (v) => editor.setOc('hidden', v ? undefined : true) })) : (value(shown ? t('pickerShown') : t('pickerHidden'))) }) }), showSpace ? (_jsx(SettingRow, { label: t('space'), children: editor ? (addingSpace ? (_jsx(NewSpaceInput, { onDone: (slug) => {
|
|
225
226
|
setAddingSpace(false);
|
|
226
227
|
if (slug)
|
|
227
228
|
editor.set('space', slug);
|
|
@@ -116,11 +116,10 @@ export declare function AgentStatePage({ title, children }: {
|
|
|
116
116
|
children: ReactNode;
|
|
117
117
|
}): import("react").JSX.Element;
|
|
118
118
|
/**
|
|
119
|
-
* The unsaved-edits bar
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* once. While the save runs, the session dot matrix leads and both disable.
|
|
119
|
+
* The agent page's unsaved-edits bar: an `ActionBar` docked at the bottom of
|
|
120
|
+
* the page, titled "Unsaved changes." with the changed tabs muted after it, then
|
|
121
|
+
* Discard and Save ⌘S (the page binds the key). While the save runs, the
|
|
122
|
+
* session dot matrix leads and both disable.
|
|
124
123
|
*/
|
|
125
124
|
export declare function SaveBar({ dirty, pending, changed, onDiscard, onSave, }: {
|
|
126
125
|
dirty: boolean;
|
|
@@ -143,4 +142,4 @@ export declare function LeaveDialog({ open, changed, pending, onStay, onLeave, o
|
|
|
143
142
|
onSaveAndLeave: () => void;
|
|
144
143
|
}): import("react").JSX.Element;
|
|
145
144
|
/** The agent's display name, for header titles. */
|
|
146
|
-
export declare function agentTitle(slug: string): string;
|
|
145
|
+
export declare function agentTitle(slug: string, title?: string | null): string;
|
|
@@ -27,16 +27,13 @@ import { SETTINGS_SIDEBAR_WIDTH_PX } from '../../internal/components/nav-rail.js
|
|
|
27
27
|
import { CaretRightIcon } from '@phosphor-icons/react';
|
|
28
28
|
import { useInCustomizeFrame } from '../shared/customize-tab-bar.js';
|
|
29
29
|
import { cn } from '../../internal/lib/utils.js';
|
|
30
|
+
import { ActionBar, ActionBarDock } from '../../primitives/action-bar.js';
|
|
30
31
|
import { Button } from '../../primitives/button.js';
|
|
31
|
-
import { ButtonGroup } from '../../primitives/button-group.js';
|
|
32
|
-
import { SessionDotMatrix } from '../../primitives/dot-matrix/session-dot-matrix.js';
|
|
33
32
|
import { AlertDialog, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '../../primitives/alert-dialog.js';
|
|
34
|
-
import { Kbd } from '../../primitives/kbd.js';
|
|
35
33
|
import { useOptionalSidebar } from '../../primitives/sidebar.js';
|
|
36
34
|
import { Skeleton } from '../../primitives/skeleton.js';
|
|
37
35
|
import { StatusDot } from '../../primitives/status.js';
|
|
38
36
|
import { UiLink as Link, useUiShallowNavigate } from '../../providers/ui-provider.js';
|
|
39
|
-
import { m, useReducedMotion } from 'motion/react';
|
|
40
37
|
import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
|
|
41
38
|
import { SECTION_ICON } from './agent-overview.js';
|
|
42
39
|
/**
|
|
@@ -141,18 +138,24 @@ export function AgentStatePage({ title, children }) {
|
|
|
141
138
|
return (_jsxs("div", { className: "flex h-full min-h-0 flex-1 flex-col", children: [_jsx(CustomizeHeader, { title: title, rule: true }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: _jsx("div", { className: "mx-auto w-full max-w-xl px-4 py-16", children: children }) })] }));
|
|
142
139
|
}
|
|
143
140
|
/**
|
|
144
|
-
* The unsaved-edits bar
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* once. While the save runs, the session dot matrix leads and both disable.
|
|
141
|
+
* The agent page's unsaved-edits bar: an `ActionBar` docked at the bottom of
|
|
142
|
+
* the page, titled "Unsaved changes." with the changed tabs muted after it, then
|
|
143
|
+
* Discard and Save ⌘S (the page binds the key). While the save runs, the
|
|
144
|
+
* session dot matrix leads and both disable.
|
|
149
145
|
*/
|
|
150
146
|
export function SaveBar({ dirty, pending, changed, onDiscard, onSave, }) {
|
|
151
147
|
const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
|
|
152
|
-
const reduceMotion = useReducedMotion();
|
|
153
148
|
if (!dirty)
|
|
154
149
|
return null;
|
|
155
|
-
return (_jsx(
|
|
150
|
+
return (_jsx(ActionBarDock, { children: _jsx(ActionBar, { title: tI18nComplete.raw('textefa5855ff509'), description: changed, busy: pending, actions: [
|
|
151
|
+
{ id: 'discard', label: tI18nComplete.raw('texteb1a70e39274'), onSelect: onDiscard },
|
|
152
|
+
{
|
|
153
|
+
id: 'save',
|
|
154
|
+
label: tI18nComplete.raw('text1509f561f241'),
|
|
155
|
+
kbd: ['mod', 'S'],
|
|
156
|
+
onSelect: onSave,
|
|
157
|
+
},
|
|
158
|
+
] }) }));
|
|
156
159
|
}
|
|
157
160
|
/**
|
|
158
161
|
* Asked when a link would leave the page with unsaved edits. Three answers:
|
|
@@ -163,6 +166,6 @@ export function LeaveDialog({ open, changed, pending, onStay, onLeave, onSaveAnd
|
|
|
163
166
|
return (_jsx(AlertDialog, { open: open, onOpenChange: (next) => (next ? undefined : onStay()), children: _jsxs(AlertDialogContent, { className: "sm:max-w-md", children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: t('leaveTitle') }), _jsx(AlertDialogDescription, { children: t('leaveBody', { tabs: changed }) })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: pending, children: t('stay') }), _jsx(Button, { variant: "secondary", size: "sm", onClick: onLeave, disabled: pending, children: t('leave') }), _jsx(Button, { size: "sm", onClick: onSaveAndLeave, disabled: pending, "aria-busy": pending || undefined, children: t('saveAndLeave') })] })] }) }));
|
|
164
167
|
}
|
|
165
168
|
/** The agent's display name, for header titles. */
|
|
166
|
-
export function agentTitle(slug) {
|
|
167
|
-
return agentDisplayName(slug);
|
|
169
|
+
export function agentTitle(slug, title) {
|
|
170
|
+
return agentDisplayName(slug, title);
|
|
168
171
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useSaveShortcut } from '../../internal/hooks/use-save-shortcut.js';
|
|
3
4
|
import { MY_KORTIX_AGENT_NAME } from '../../_vendor/kortix-shared.js';
|
|
4
5
|
import { adminPath } from '../../lib/routes.js';
|
|
5
6
|
/**
|
|
@@ -49,7 +50,7 @@ import { contract, qk, useFeatureFlag, useProjectAccountId, useUnifiedTriggers }
|
|
|
49
50
|
import { DotsThreeIcon, LockSimpleIcon, PlayIcon, StarIcon, TrashIcon } from '@phosphor-icons/react';
|
|
50
51
|
import { Badge } from '../../primitives/badge.js';
|
|
51
52
|
import { useQueries, useQuery } from '@tanstack/react-query';
|
|
52
|
-
import { useCallback,
|
|
53
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
53
54
|
import { useLocale, useTranslations as useI18nTranslations } from '../../i18n/index.js';
|
|
54
55
|
import { AgentMark, agentDisplayName } from '../../internal/components/agent-mark.js';
|
|
55
56
|
import { useAgentConfig, useUpdateAgentConfig } from '../../internal/hooks/projects/use-agent-config.js';
|
|
@@ -133,7 +134,7 @@ export function AgentPage({ projectId, agentName, renderApps, }) {
|
|
|
133
134
|
// A writer whose agent-config read failed would otherwise land on the
|
|
134
135
|
// read-only page with no word on why: say what failed, offer the retry.
|
|
135
136
|
if (canWrite && configQuery.isError) {
|
|
136
|
-
return (_jsx(AgentStatePage, { title: agentDisplayName(agent.name), children: _jsx(ErrorState, { size: "sm", title: t('configLoadError', { name: agentDisplayName(agent.name) }), description: _jsx(ErrorDetails, { error: configQuery.error }), action: _jsx(Button, { variant: "outline", size: "sm", onClick: () => void configQuery.refetch(), children: tI18nComplete.raw('text942087cc2d41') }) }) }));
|
|
137
|
+
return (_jsx(AgentStatePage, { title: agentDisplayName(agent.name, agent.title), children: _jsx(ErrorState, { size: "sm", title: t('configLoadError', { name: agentDisplayName(agent.name, agent.title) }), description: _jsx(ErrorDetails, { error: configQuery.error }), action: _jsx(Button, { variant: "outline", size: "sm", onClick: () => void configQuery.refetch(), children: tI18nComplete.raw('text942087cc2d41') }) }) }));
|
|
137
138
|
}
|
|
138
139
|
const editable = canWrite && configQuery.data?.editable === true;
|
|
139
140
|
return editable ? (_jsx(EditableAgentPage, { projectId: projectId, agent: agent, config: config, initial: configQuery.data?.block ?? {}, renderApps: renderApps })) : (_jsx(ReadOnlyAgentPage, { projectId: projectId, agent: agent, config: config, block: configQuery.data?.block ?? blockFromScope(agent), canWrite: canWrite }));
|
|
@@ -248,29 +249,6 @@ function useShareDialog(openedByLink) {
|
|
|
248
249
|
}, [openedByLink, router, pathname]);
|
|
249
250
|
return { open, setOpen };
|
|
250
251
|
}
|
|
251
|
-
/**
|
|
252
|
-
* Mod+S saves the agent, only while the draft holds an edit. With nothing to
|
|
253
|
-
* save the key keeps the browser's own behavior. A key pressed inside an open
|
|
254
|
-
* dialog (an embedded screen's own editor, the secret form) belongs to that
|
|
255
|
-
* dialog, never to the agent's draft.
|
|
256
|
-
*/
|
|
257
|
-
function useSaveShortcut(dirty, onSave) {
|
|
258
|
-
useEffect(() => {
|
|
259
|
-
if (!dirty)
|
|
260
|
-
return;
|
|
261
|
-
const handler = (event) => {
|
|
262
|
-
if (!(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey || event.key !== 's')
|
|
263
|
-
return;
|
|
264
|
-
const target = event.target instanceof Element ? event.target : null;
|
|
265
|
-
if (target?.closest('[role="dialog"], [role="alertdialog"]'))
|
|
266
|
-
return;
|
|
267
|
-
event.preventDefault();
|
|
268
|
-
onSave();
|
|
269
|
-
};
|
|
270
|
-
window.addEventListener('keydown', handler);
|
|
271
|
-
return () => window.removeEventListener('keydown', handler);
|
|
272
|
-
}, [dirty, onSave]);
|
|
273
|
-
}
|
|
274
252
|
/**
|
|
275
253
|
* The rail's rows. Overview, Basics, People and Triggers are General; every
|
|
276
254
|
* grant is Access; Model, Tools and Workspace are Runtime. Each row carries
|
|
@@ -357,7 +335,7 @@ function AgentActions({ projectId, agent, config, canWrite, share, }) {
|
|
|
357
335
|
: null;
|
|
358
336
|
const startLabel = tI18nComplete.raw('textb1c52ee3677d');
|
|
359
337
|
const start = (_jsxs(_Fragment, { children: [_jsxs(Button, { size: "sm", disabled: startBlocked !== null, onClick: () => startSession({ create: { agent_name: agent.name } }), className: "hidden sm:inline-flex", children: [_jsx(PlayIcon, { weight: "fill", className: "size-3.5 shrink-0" }), startLabel] }), _jsx(Button, { size: "icon-base", "aria-label": startLabel, disabled: startBlocked !== null, onClick: () => startSession({ create: { agent_name: agent.name } }), className: "sm:hidden", children: _jsx(PlayIcon, { weight: "fill", className: "size-3.5" }) })] }));
|
|
360
|
-
return (_jsxs(_Fragment, { children: [_jsx(AgentShareControl, { projectId: projectId, agentName: agent.name, open: share.open, onOpenChange: share.setOpen }), startBlocked ? null : _jsx(AgentCallButton, { projectId: projectId, agentName: agent.name }), startBlocked ? (_jsx(Hint, { label: startBlocked, children: _jsx("span", { className: "inline-flex", children: start }) })) : (start), canWrite ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-base", "aria-label": tI18nComplete.raw('textf8d46c2570e7'), children: _jsx(DotsThreeIcon, { className: "size-4" }) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsxs(DropdownMenuItem, { disabled: isDefault || agent.enabled === false || makeDefault.isPending, onSelect: () => makeDefault.mutate(agent.name), children: [_jsx(StarIcon, { className: "size-4" }), isDefault ? tI18nComplete.raw('texte8cb80e5c5cb') : tI18nComplete.raw('texte8f43f910a4e')] }), _jsxs(DropdownMenuItem, { disabled: configure.pending, onSelect: () => setConfirm('edit'), children: [_jsx(AgentMark, { slug: MY_KORTIX_AGENT_NAME }), t('askToEditAgent')] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { variant: "destructive", disabled: configure.pending, onSelect: () => setConfirm('delete'), children: [_jsx(TrashIcon, { className: "size-4" }), t('deleteAgent', { name: agentDisplayName(agent.name) })] })] })] })) : null, _jsx(ConfirmDialog, { open: confirm !== null, onOpenChange: (open) => (open ? undefined : setConfirm(null)), title: confirm === 'delete' ? t('deleteTitle', { name: agentDisplayName(agent.name) }) : tI18nComplete.raw('text24ba36a8ec86'), description: confirm === 'delete'
|
|
338
|
+
return (_jsxs(_Fragment, { children: [_jsx(AgentShareControl, { projectId: projectId, agentName: agent.name, open: share.open, onOpenChange: share.setOpen }), startBlocked ? null : _jsx(AgentCallButton, { projectId: projectId, agentName: agent.name }), startBlocked ? (_jsx(Hint, { label: startBlocked, children: _jsx("span", { className: "inline-flex", children: start }) })) : (start), canWrite ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-base", "aria-label": tI18nComplete.raw('textf8d46c2570e7'), children: _jsx(DotsThreeIcon, { className: "size-4" }) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsxs(DropdownMenuItem, { disabled: isDefault || agent.enabled === false || makeDefault.isPending, onSelect: () => makeDefault.mutate(agent.name), children: [_jsx(StarIcon, { className: "size-4" }), isDefault ? tI18nComplete.raw('texte8cb80e5c5cb') : tI18nComplete.raw('texte8f43f910a4e')] }), _jsxs(DropdownMenuItem, { disabled: configure.pending, onSelect: () => setConfirm('edit'), children: [_jsx(AgentMark, { slug: MY_KORTIX_AGENT_NAME }), t('askToEditAgent')] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { variant: "destructive", disabled: configure.pending, onSelect: () => setConfirm('delete'), children: [_jsx(TrashIcon, { className: "size-4" }), t('deleteAgent', { name: agentDisplayName(agent.name, agent.title) })] })] })] })) : null, _jsx(ConfirmDialog, { open: confirm !== null, onOpenChange: (open) => (open ? undefined : setConfirm(null)), title: confirm === 'delete' ? t('deleteTitle', { name: agentDisplayName(agent.name, agent.title) }) : tI18nComplete.raw('text24ba36a8ec86'), description: confirm === 'delete'
|
|
361
339
|
? t('deleteBody')
|
|
362
340
|
: tI18nComplete('text13324ae62b23', { value0: agent.name }), confirmLabel: tI18nComplete.raw('text0bce1a892dec'), cancelLabel: tI18nComplete.raw('text19766ed6ccb2'), confirmVariant: confirm === 'delete' ? 'destructive' : 'default', onConfirm: () => {
|
|
363
341
|
const kind = confirm;
|
|
@@ -416,7 +394,7 @@ function EditableAgentPage({ projectId, agent, config, initial, renderApps, }) {
|
|
|
416
394
|
const policySetControl = useAgentPolicySetControls(projectId, editor, policySetOptions);
|
|
417
395
|
const surface = { kind: 'agent', agentName: agent.name };
|
|
418
396
|
const defaultAgent = config.default_agent;
|
|
419
|
-
const name = agentDisplayName(agent.name);
|
|
397
|
+
const name = agentDisplayName(agent.name, agent.title);
|
|
420
398
|
const sourcePath = editor.draft.file ?? configEntitySourcePath(agent.path);
|
|
421
399
|
const { draft, set } = editor;
|
|
422
400
|
const connectorsGrant = useAgentGrant(draft.connectors, (v) => {
|
|
@@ -536,7 +514,7 @@ function ReadOnlyAgentPage({ projectId, agent, config, block, canWrite, }) {
|
|
|
536
514
|
const spacesOn = useSpacesEnabled(projectId);
|
|
537
515
|
const canManageMembers = useCanManageMembers(projectId);
|
|
538
516
|
const railGroups = useRailGroups(pathname, READ_ONLY_VIEWS, facts, canManageMembers ? () => share.setOpen(true) : undefined);
|
|
539
|
-
const name = agentDisplayName(agent.name);
|
|
517
|
+
const name = agentDisplayName(agent.name, agent.title);
|
|
540
518
|
// A reader has a page for Kortix permissions and Model only. Every other
|
|
541
519
|
// Access row shows its grant by name on the Overview and links nowhere.
|
|
542
520
|
const banner = (_jsxs(BannerAlert, { variant: "default", children: [_jsx(BannerAlertMedia, { children: _jsx(LockSimpleIcon, {}) }), _jsx(BannerAlertTitle, { children: t('readOnlyTitle') }), _jsx(BannerAlertDescription, { children: t.rich('readOnlyBody', { code: (chunks) => _jsx("span", { className: "font-mono", children: chunks }) }) })] }));
|
|
@@ -51,6 +51,7 @@ export declare function agentLocationHref(pathname: string, tab: AgentTab, view?
|
|
|
51
51
|
/** The href of a legacy section key: where an old Overview row or link lands now. */
|
|
52
52
|
export declare function sectionLocationHref(pathname: string, section: AgentConfigSectionKey): string;
|
|
53
53
|
export declare const YAML_KEY_ROW: {
|
|
54
|
+
readonly title: "overview";
|
|
54
55
|
readonly description: "overview";
|
|
55
56
|
readonly prompt: "overview";
|
|
56
57
|
readonly prompt_file: "overview";
|
|
@@ -124,7 +124,7 @@ export function AgentsPage({ projectId }) {
|
|
|
124
124
|
.filter((agent) => !agent.platform)
|
|
125
125
|
.sort((a, b) => Number(agentInMode(b, 'primary')) - Number(agentInMode(a, 'primary')) ||
|
|
126
126
|
Number(b.name === defaultAgent) - Number(a.name === defaultAgent) ||
|
|
127
|
-
agentDisplayName(a.name).localeCompare(agentDisplayName(b.name))), [filtered, defaultAgent]);
|
|
127
|
+
agentDisplayName(a.name, a.title).localeCompare(agentDisplayName(b.name, b.title))), [filtered, defaultAgent]);
|
|
128
128
|
// Spaces are Work in progress: with `chat` off, no space filter and no Space column.
|
|
129
129
|
const spacesOn = useSpacesEnabled(projectId);
|
|
130
130
|
const groups = useMemo(() => (spacesOn ? groupBySpace(work, config?.spaces) : []), [spacesOn, work, config?.spaces]);
|
|
@@ -136,7 +136,7 @@ export function AgentsPage({ projectId }) {
|
|
|
136
136
|
// sit in their own section. `all` is usable both ways and stays with the first.
|
|
137
137
|
const primaryAgents = shown.filter((agent) => agentInMode(agent, 'primary'));
|
|
138
138
|
const subagents = shown.filter((agent) => !agentInMode(agent, 'primary'));
|
|
139
|
-
const card = (agent, cover) => (_jsx(AgentCoverCard, { slug: agent.name, href: agentHref(projectId, agent.name), onIntent: () => prefetchAgentConfig(queryClient, projectId, agent.name), title: agentDisplayName(agent.name), description: agent.description, badges: _jsx(AgentCardBadges, { agent: agent }), coverLabel: cover, meta: _jsx(AgentCardFacts, { agent: agent, triggerCount: triggerCounts.get(agent.name) ?? 0, grantCount: grantCounts.get(agent.name) ?? 0 }) }, agent.name));
|
|
139
|
+
const card = (agent, cover) => (_jsx(AgentCoverCard, { slug: agent.name, href: agentHref(projectId, agent.name), onIntent: () => prefetchAgentConfig(queryClient, projectId, agent.name), title: agentDisplayName(agent.name, agent.title), description: agent.description, badges: _jsx(AgentCardBadges, { agent: agent }), coverLabel: cover, meta: _jsx(AgentCardFacts, { agent: agent, triggerCount: triggerCounts.get(agent.name) ?? 0, grantCount: grantCounts.get(agent.name) ?? 0 }) }, agent.name));
|
|
140
140
|
const newButton = canWrite ? (_jsxs(Button, { size: "sm", onClick: () => setCreating(true), className: "gap-1.5", children: [_jsx(PlusIcon, { className: "size-4" }), t('newAgent')] })) : null;
|
|
141
141
|
const body = (() => {
|
|
142
142
|
if (detailQuery.isLoading)
|
|
@@ -208,5 +208,5 @@ function DefaultAgentSelector({ projectId, config, canWrite, }) {
|
|
|
208
208
|
});
|
|
209
209
|
if (availableAgents.length === 0 || !current)
|
|
210
210
|
return null;
|
|
211
|
-
return (_jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [mutation.isPending ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, _jsxs(Select, { value: current, onValueChange: (agentName) => mutation.mutate(agentName), disabled: !canWrite || mutation.isPending, children: [_jsx(SelectTrigger, { "aria-label": tI18nComplete.raw('text94da52ecd6c5'), className: "h-9 w-44 shrink-0", size: "sm", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { align: "end", children: availableAgents.map((agent) => (_jsx(SelectItem, { value: agent.name, children: _jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(AgentMark, { slug: agent.name }), _jsx("span", { className: "truncate", children: agentDisplayName(agent.name) })] }) }, agent.name))) })] })] }));
|
|
211
|
+
return (_jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [mutation.isPending ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, _jsxs(Select, { value: current, onValueChange: (agentName) => mutation.mutate(agentName), disabled: !canWrite || mutation.isPending, children: [_jsx(SelectTrigger, { "aria-label": tI18nComplete.raw('text94da52ecd6c5'), className: "h-9 w-44 shrink-0", size: "sm", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { align: "end", children: availableAgents.map((agent) => (_jsx(SelectItem, { value: agent.name, children: _jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(AgentMark, { slug: agent.name }), _jsx("span", { className: "truncate", children: agentDisplayName(agent.name, agent.title) })] }) }, agent.name))) })] })] }));
|
|
212
212
|
}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import type { ProjectConfigSummary } from '@kortix/sdk';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
export type CreateAgentStart = 'describe' | 'blank' | 'duplicate';
|
|
4
|
+
/**
|
|
5
|
+
* The `title:` a new agent is written with: the name as typed, trimmed, when
|
|
6
|
+
* the key's derived name would read differently ("GitHub PR Reviewer" →
|
|
7
|
+
* `github-pr-reviewer` → "Github pr reviewer"). null when the key already
|
|
8
|
+
* reads as typed, so a plain name adds no key to kortix.yaml.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createAgentTitle(typed: string, slug: string): string | null;
|
|
4
11
|
/** The request My Kortix receives. English, like every configure prompt. */
|
|
5
12
|
export declare function createAgentPrompt(input: {
|
|
6
13
|
start: CreateAgentStart;
|
|
7
14
|
name: string;
|
|
15
|
+
/** `agents.<name>.title`, from {@link createAgentTitle}. */
|
|
16
|
+
title?: string | null;
|
|
8
17
|
description: string;
|
|
9
18
|
from?: {
|
|
10
19
|
name: string;
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
* window, form only. Its body scrolls and its footer stays pinned, so Create
|
|
14
14
|
* agent is reachable at 720×480.
|
|
15
15
|
*/
|
|
16
|
-
import { slugifySlug } from '../../_vendor/kortix-shared.js';
|
|
16
|
+
import { AGENT_TITLE_MAX_LENGTH, slugifySlug } from '../../_vendor/kortix-shared.js';
|
|
17
17
|
import { isMyKortixAgentName } from '../../_vendor/kortix-shared.js';
|
|
18
18
|
import { useState } from 'react';
|
|
19
19
|
import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
|
|
@@ -30,9 +30,22 @@ import { Textarea } from '../../primitives/textarea.js';
|
|
|
30
30
|
import { useConfigureThread } from '../use-configure-thread.js';
|
|
31
31
|
/** A phone's footer clears the home indicator: the device inset, at least the footer's own py-3. */
|
|
32
32
|
const FOOTER_SAFE_AREA = 'max-lg:pb-[max(0.75rem,env(safe-area-inset-bottom))]'; // audit:allow device safe-area inset, not a spacing step
|
|
33
|
+
/**
|
|
34
|
+
* The `title:` a new agent is written with: the name as typed, trimmed, when
|
|
35
|
+
* the key's derived name would read differently ("GitHub PR Reviewer" →
|
|
36
|
+
* `github-pr-reviewer` → "Github pr reviewer"). null when the key already
|
|
37
|
+
* reads as typed, so a plain name adds no key to kortix.yaml.
|
|
38
|
+
*/
|
|
39
|
+
export function createAgentTitle(typed, slug) {
|
|
40
|
+
const title = typed.trim().slice(0, AGENT_TITLE_MAX_LENGTH).trim();
|
|
41
|
+
if (!title || !slug)
|
|
42
|
+
return null;
|
|
43
|
+
return title === agentDisplayName(slug) ? null : title;
|
|
44
|
+
}
|
|
33
45
|
/** The request My Kortix receives. English, like every configure prompt. */
|
|
34
46
|
export function createAgentPrompt(input) {
|
|
35
|
-
const review =
|
|
47
|
+
const review = (input.title ? `Write \`title: ${JSON.stringify(input.title)}\` in its block: the name people see. The key stays "${input.name}". ` : '') +
|
|
48
|
+
'Then open a change request so I can review and merge it.';
|
|
36
49
|
const desc = input.description.trim();
|
|
37
50
|
if (input.start === 'duplicate' && input.from) {
|
|
38
51
|
return (`Create a new agent named "${input.name}" in kortix.yaml as a copy of the "${input.from.name}" agent ` +
|
|
@@ -61,6 +74,10 @@ export function CreateAgentModal({ open, onOpenChange, projectId, config, }) {
|
|
|
61
74
|
const [description, setDescription] = useState('');
|
|
62
75
|
const [from, setFrom] = useState('');
|
|
63
76
|
const slug = name.trim() ? slugifySlug(name, '') : '';
|
|
77
|
+
const title = createAgentTitle(name, slug);
|
|
78
|
+
// The preview's placeholder: a display name, and the key it would get.
|
|
79
|
+
const placeholderSlug = slugifySlug(t('namePlaceholder'), 'new-agent');
|
|
80
|
+
const placeholderTitle = t('namePlaceholder') === placeholderSlug ? agentDisplayName(placeholderSlug) : t('namePlaceholder');
|
|
64
81
|
// Every declared agent and the built-in ones: a new agent can never take a
|
|
65
82
|
// platform agent's key. `agents` (the Duplicate sources) leaves them out.
|
|
66
83
|
const taken = (config?.agents ?? []).some((a) => a.name === slug) || isMyKortixAgentName(slug);
|
|
@@ -72,6 +89,7 @@ export function CreateAgentModal({ open, onOpenChange, projectId, config, }) {
|
|
|
72
89
|
configure.start(createAgentPrompt({
|
|
73
90
|
start,
|
|
74
91
|
name: slug,
|
|
92
|
+
title,
|
|
75
93
|
description,
|
|
76
94
|
from: source ? { name: source.name, path: source.path } : undefined,
|
|
77
95
|
}));
|
|
@@ -90,5 +108,5 @@ export function CreateAgentModal({ open, onOpenChange, projectId, config, }) {
|
|
|
90
108
|
return (_jsx(Modal, { open: open, onOpenChange: onOpenChange, children: _jsx(ModalContent, { className: "flex flex-col space-y-0 overflow-hidden lg:max-w-4xl", children: _jsxs("form", { className: "flex min-h-0 flex-1 flex-col", onSubmit: (event) => {
|
|
91
109
|
event.preventDefault();
|
|
92
110
|
submit();
|
|
93
|
-
}, children: [_jsxs("div", { className: "flex min-h-0 flex-1", children: [_jsxs("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [_jsx(ModalHeader, { className: "shrink-0 pb-4", children: _jsx(ModalTitle, { children: t('newAgent') }) }), _jsxs(ModalBody, { className: "min-h-0 overflow-y-auto", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "new-agent-name", children: t('name') }), _jsx(Input, { id: "new-agent-name", value: name, placeholder: t('namePlaceholder'), onChange: (e) => setName(e.target.value), autoFocus: true }), taken ? (_jsxs("p", { className: "text-foreground flex items-center gap-1.5 text-xs", children: [_jsx(StatusDot, { tone: "destructive" }), t('nameTaken')] })) : null] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: t('howToStart') }), _jsx(RadioGroup, { "aria-label": t('howToStart'), value: start, onValueChange: (next) => setStart(next), className: "gap-1", children: choices.map((choice) => (_jsx(RadioGroupItem, { value: choice.key, label: choice.title, description: choice.help, size: "lg" }, choice.key))) })] }), start === 'duplicate' ? (_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { children: t('copyOf') }), _jsxs(Select, { value: from, onValueChange: setFrom, children: [_jsx(SelectTrigger, { "aria-label": t('copyOf'), className: "w-full", children: _jsx(SelectValue, { placeholder: t('pickAgent') }) }), _jsx(SelectContent, { children: agents.map((agent) => (_jsx(SelectItem, { value: agent.name, children: _jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(AgentMark, { slug: agent.name }), _jsx("span", { className: "truncate", children: agentDisplayName(agent.name) })] }) }, agent.name))) })] })] })) : null, _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "new-agent-description", children: start === 'describe' ? t('whatItDoes') : tI18nComplete.raw('text526e0087cc3f') }), _jsx(Textarea, { id: "new-agent-description", value: description, placeholder: start === 'describe' ? t('whatItDoesPlaceholder') : t('descriptionPlaceholderShort'), onChange: (e) => setDescription(e.target.value), minHeight: start === 'describe' ? 90 : 52 })] })] })] }), _jsxs("aside", { "aria-label": t('preview'), className: "bg-background hidden w-96 shrink-0 flex-col gap-4 overflow-y-auto border-l p-5 lg:flex", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t('preview') }), _jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: "pb-3", children: _jsx(AgentMark, { slug: slug || 'new-agent', size: 42 }) }), _jsx("p", { className: cn('truncate text-lg font-medium', slug ? 'text-foreground' : 'text-muted-foreground'), children: agentDisplayName(slug
|
|
111
|
+
}, children: [_jsxs("div", { className: "flex min-h-0 flex-1", children: [_jsxs("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [_jsx(ModalHeader, { className: "shrink-0 pb-4", children: _jsx(ModalTitle, { children: t('newAgent') }) }), _jsxs(ModalBody, { className: "min-h-0 overflow-y-auto", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "new-agent-name", children: t('name') }), _jsx(Input, { id: "new-agent-name", value: name, placeholder: t('namePlaceholder'), onChange: (e) => setName(e.target.value), maxLength: AGENT_TITLE_MAX_LENGTH, autoFocus: true }), taken ? (_jsxs("p", { className: "text-foreground flex items-center gap-1.5 text-xs", children: [_jsx(StatusDot, { tone: "destructive" }), t('nameTaken')] })) : null] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx("p", { className: "text-foreground text-sm font-medium", children: t('howToStart') }), _jsx(RadioGroup, { "aria-label": t('howToStart'), value: start, onValueChange: (next) => setStart(next), className: "gap-1", children: choices.map((choice) => (_jsx(RadioGroupItem, { value: choice.key, label: choice.title, description: choice.help, size: "lg" }, choice.key))) })] }), start === 'duplicate' ? (_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { children: t('copyOf') }), _jsxs(Select, { value: from, onValueChange: setFrom, children: [_jsx(SelectTrigger, { "aria-label": t('copyOf'), className: "w-full", children: _jsx(SelectValue, { placeholder: t('pickAgent') }) }), _jsx(SelectContent, { children: agents.map((agent) => (_jsx(SelectItem, { value: agent.name, children: _jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx(AgentMark, { slug: agent.name }), _jsx("span", { className: "truncate", children: agentDisplayName(agent.name, agent.title) })] }) }, agent.name))) })] })] })) : null, _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "new-agent-description", children: start === 'describe' ? t('whatItDoes') : tI18nComplete.raw('text526e0087cc3f') }), _jsx(Textarea, { id: "new-agent-description", value: description, placeholder: start === 'describe' ? t('whatItDoesPlaceholder') : t('descriptionPlaceholderShort'), onChange: (e) => setDescription(e.target.value), minHeight: start === 'describe' ? 90 : 52 })] })] })] }), _jsxs("aside", { "aria-label": t('preview'), className: "bg-background hidden w-96 shrink-0 flex-col gap-4 overflow-y-auto border-l p-5 lg:flex", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t('preview') }), _jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: "pb-3", children: _jsx(AgentMark, { slug: slug || 'new-agent', size: 42 }) }), _jsx("p", { className: cn('truncate text-lg font-medium', slug ? 'text-foreground' : 'text-muted-foreground'), children: slug ? agentDisplayName(slug, title) : placeholderTitle }), _jsx("p", { className: "text-muted-foreground truncate font-mono text-xs", children: `agents.${slug || placeholderSlug}` }), description.trim() ? (_jsx("p", { className: "text-foreground line-clamp-3 pt-1 text-sm text-pretty", children: description.trim() })) : null] }), _jsxs("div", { className: "space-y-2.5 border-t pt-4", children: [start === 'duplicate' && source ? (_jsxs(PreviewFact, { label: t('copyOf'), children: [_jsx(AgentMark, { slug: source.name }), _jsx("span", { className: "truncate", children: agentDisplayName(source.name, source.title) })] })) : null, _jsx(PreviewFact, { label: tPage('instructions'), children: startsWith.instructions }), _jsx(PreviewFact, { label: t('tabAccess'), children: startsWith.access })] })] })] }), _jsxs(ModalFooter, { className: cn('shrink-0 border-t py-3', FOOTER_SAFE_AREA), children: [_jsx("p", { className: "text-muted-foreground mr-auto hidden text-xs sm:block", children: t('composerNote') }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "w-full sm:w-auto", onClick: () => onOpenChange(false), children: tI18nComplete.raw('text19766ed6ccb2') }), _jsx(Button, { type: "submit", size: "sm", className: "w-full sm:w-auto", disabled: !ready || configure.pending, "aria-busy": configure.pending || undefined, children: t('createAgent') })] })] }) }) }));
|
|
94
112
|
}
|
|
@@ -3,7 +3,7 @@ import { errorToast, successToast } from '../../primitives/toast.js';
|
|
|
3
3
|
import { useTranslations } from '../../i18n/index.js';
|
|
4
4
|
import { updateProjectDefaultAgent } from '@kortix/sdk';
|
|
5
5
|
import { qk } from '@kortix/sdk/react';
|
|
6
|
-
import {
|
|
6
|
+
import { agentDisplayName } from '../../_vendor/kortix-shared.js';
|
|
7
7
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
8
8
|
export function useDefaultAgent(projectId) {
|
|
9
9
|
const t = useTranslations('hardcodedUi.i18nComplete');
|
|
@@ -11,7 +11,7 @@ export function useDefaultAgent(projectId) {
|
|
|
11
11
|
return useMutation({
|
|
12
12
|
mutationFn: (name) => updateProjectDefaultAgent(projectId, name),
|
|
13
13
|
onSuccess: async (result) => {
|
|
14
|
-
successToast(t('text0bb557895b32', { value0:
|
|
14
|
+
successToast(t('text0bb557895b32', { value0: agentDisplayName(result.default_agent) }));
|
|
15
15
|
await client.invalidateQueries({ queryKey: qk.project.detail(projectId) });
|
|
16
16
|
},
|
|
17
17
|
onError: (error) => errorToast(error.message || t.raw('text7f724c2ad694')),
|