@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
|
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
* Session groups in the sidebar (`session_groups` flag): the project's shared,
|
|
5
5
|
* named folders of sessions, between Pinned and the rest of the list.
|
|
6
6
|
*
|
|
7
|
-
* Each group is a section. Its rows load when it is open (one paged list per
|
|
7
|
+
* Each group is a section header like Pinned's (no icon). Its rows load when it is open (one paged list per
|
|
8
8
|
* group, any starter, any depth), and its open state is the viewer's own,
|
|
9
9
|
* beside the other sections in the session-filter store. A session moves into
|
|
10
10
|
* a group from its `⋯` menu or by dragging its row onto the group; a group
|
|
@@ -14,8 +14,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
14
14
|
import { ApiError } from '@kortix/sdk';
|
|
15
15
|
import { findCachedProjectSession, useCreateProjectSessionGroup, useDeleteProjectSessionGroup, useProjectSessions, useRenameProjectSessionGroup, useReorderProjectSessionGroups, useSetProjectSessionGroup, } from '@kortix/sdk/react';
|
|
16
16
|
import { useQueryClient } from '@tanstack/react-query';
|
|
17
|
-
import { ArrowDownIcon, ArrowUpIcon,
|
|
18
|
-
import { useMemo, useState } from 'react';
|
|
17
|
+
import { ArrowDownIcon, ArrowUpIcon, ArrowsInLineVerticalIcon, DotsThreeIcon, PencilSimpleIcon, PlusIcon, TrashIcon, } from '@phosphor-icons/react';
|
|
18
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
19
19
|
import { useTranslations } from '../../i18n/index.js';
|
|
20
20
|
import { cn } from '../../internal/lib/utils.js';
|
|
21
21
|
import { Button } from '../../primitives/button.js';
|
|
@@ -24,10 +24,11 @@ import { Disclosure, DisclosureContent, DisclosureTrigger } from '../../primitiv
|
|
|
24
24
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from '../../primitives/dropdown-menu.js';
|
|
25
25
|
import { Input } from '../../primitives/input.js';
|
|
26
26
|
import Loading from '../../primitives/loading.js';
|
|
27
|
-
import { Modal, ModalBody, ModalContent,
|
|
27
|
+
import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalTitle, } from '../../primitives/modal.js';
|
|
28
28
|
import { errorToast, successToast } from '../../primitives/toast.js';
|
|
29
29
|
import { moveGroupBy, moveGroupTo } from './session-group-order.js';
|
|
30
30
|
import { SESSION_MENU_TRIGGER_CLASS, SESSION_ROW_HEIGHT_CLASS, SIDEBAR_PAGE_SIZE, ShowMoreButton, } from '../../session/list/session-list-chrome.js';
|
|
31
|
+
import { CaretRightSolidIcon } from '../../icons/caret-right-solid.js';
|
|
31
32
|
/** A dragged session row carries its id under this type. */
|
|
32
33
|
const SESSION_DRAG_TYPE = 'application/x-kortix-session';
|
|
33
34
|
/** A dragged group header carries its id under this type. */
|
|
@@ -40,6 +41,24 @@ const GROUP_NAME_MAX = 80;
|
|
|
40
41
|
* dragged group lands above or below the one under the pointer.
|
|
41
42
|
*/
|
|
42
43
|
let draggingGroupId = null;
|
|
44
|
+
/**
|
|
45
|
+
* Set by a menu's "New group" just before the menu closes: that close must not
|
|
46
|
+
* hand focus back to the menu trigger, or it would pull focus out of the new
|
|
47
|
+
* group's name field the moment it appears. Read and cleared by
|
|
48
|
+
* `keepFocusForNewGroup` in the menu's `onCloseAutoFocus`.
|
|
49
|
+
*/
|
|
50
|
+
let newGroupTakesFocus = false;
|
|
51
|
+
/** Call before opening the new-group row from a menu item. */
|
|
52
|
+
export function markNewGroupFocus() {
|
|
53
|
+
newGroupTakesFocus = true;
|
|
54
|
+
}
|
|
55
|
+
/** `onCloseAutoFocus` of a menu with a "New group" item. */
|
|
56
|
+
export function keepFocusForNewGroup(event) {
|
|
57
|
+
if (!newGroupTakesFocus)
|
|
58
|
+
return;
|
|
59
|
+
newGroupTakesFocus = false;
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
}
|
|
43
62
|
/** Keeps a click or key inside a group's menu or dialog (portals bubble through React) off the header's toggle. */
|
|
44
63
|
const stopAtMenu = (event) => event.stopPropagation();
|
|
45
64
|
/** The collapsed-sections id of one group. */
|
|
@@ -132,14 +151,12 @@ export function useSessionGroupActions(projectId, groups) {
|
|
|
132
151
|
}, [file, reorder, groups, t, queryClient, projectId]);
|
|
133
152
|
}
|
|
134
153
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* the change.
|
|
138
|
-
* its session into it).
|
|
154
|
+
* Rename a group (a new group is named in place, `NewSessionGroupRow`). A
|
|
155
|
+
* taken name shows in the dialog; the dialog closes with a toast once the
|
|
156
|
+
* list holds the change.
|
|
139
157
|
*/
|
|
140
|
-
export function SessionGroupNameModal({ projectId, group, open, onOpenChange,
|
|
158
|
+
export function SessionGroupNameModal({ projectId, group, open, onOpenChange, }) {
|
|
141
159
|
const t = useTranslations('sidebar.sessionGroups');
|
|
142
|
-
const create = useCreateProjectSessionGroup(projectId);
|
|
143
160
|
const rename = useRenameProjectSessionGroup(projectId);
|
|
144
161
|
const [value, setValue] = useState('');
|
|
145
162
|
const [problem, setProblem] = useState(null);
|
|
@@ -151,35 +168,24 @@ export function SessionGroupNameModal({ projectId, group, open, onOpenChange, on
|
|
|
151
168
|
setProblem(null);
|
|
152
169
|
}
|
|
153
170
|
}
|
|
154
|
-
const pending =
|
|
171
|
+
const pending = rename.isPending;
|
|
155
172
|
const name = value.trim();
|
|
156
173
|
const unchanged = group !== null && name === group.name;
|
|
157
174
|
const submit = async () => {
|
|
158
|
-
if (!name || unchanged || pending)
|
|
175
|
+
if (!group || !name || unchanged || pending)
|
|
159
176
|
return;
|
|
160
177
|
setProblem(null);
|
|
161
178
|
try {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
successToast(t('renamed'));
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
const created = await create.mutateAsync({ name });
|
|
168
|
-
successToast(t('created'));
|
|
169
|
-
onCreated?.(created);
|
|
170
|
-
}
|
|
179
|
+
await rename.mutateAsync({ groupId: group.group_id, name });
|
|
180
|
+
successToast(t('renamed'));
|
|
171
181
|
onOpenChange(false);
|
|
172
182
|
}
|
|
173
183
|
catch (error) {
|
|
174
184
|
const code = error instanceof ApiError ? error.code : undefined;
|
|
175
|
-
setProblem(code === 'group_name_taken'
|
|
176
|
-
? t('nameTaken')
|
|
177
|
-
: code === 'group_limit'
|
|
178
|
-
? t('limit')
|
|
179
|
-
: t(group ? 'renameFailed' : 'createFailed'));
|
|
185
|
+
setProblem(code === 'group_name_taken' ? t('nameTaken') : t('renameFailed'));
|
|
180
186
|
}
|
|
181
187
|
};
|
|
182
|
-
return (_jsx(Modal, { open: open, onOpenChange: (next) => !pending && onOpenChange(next), children: _jsxs(ModalContent, { className: "lg:max-w-md", children: [
|
|
188
|
+
return (_jsx(Modal, { open: open, onOpenChange: (next) => !pending && onOpenChange(next), children: _jsxs(ModalContent, { className: "lg:max-w-md", children: [_jsx(ModalHeader, { children: _jsx(ModalTitle, { children: t('rename') }) }), _jsxs(ModalBody, { className: "space-y-2", children: [_jsx(Input, { autoFocus: true, value: value, maxLength: GROUP_NAME_MAX, placeholder: t('namePlaceholder'), "aria-label": t('namePlaceholder'), "aria-invalid": problem ? true : undefined, onChange: (event) => {
|
|
183
189
|
setValue(event.target.value);
|
|
184
190
|
setProblem(null);
|
|
185
191
|
}, onKeyDown: (event) => {
|
|
@@ -189,14 +195,85 @@ export function SessionGroupNameModal({ projectId, group, open, onOpenChange, on
|
|
|
189
195
|
event.preventDefault();
|
|
190
196
|
void submit();
|
|
191
197
|
}
|
|
192
|
-
} }), problem ? (_jsx("p", { className: "text-destructive text-xs", role: "alert", children: problem })) : null] }), _jsxs(ModalFooter, { className: "sm:justify-between", children: [_jsx(Button, { variant: "outline-ghost", size: "sm", className: "w-full sm:w-auto", onClick: () => onOpenChange(false), disabled: pending, children: t('cancel') }), _jsxs(Button, { size: "sm", className: "w-full sm:w-auto", onClick: () => void submit(), disabled: !name || unchanged || pending, children: [pending ? _jsx(Loading, { className: "size-4 shrink-0" }) : null,
|
|
198
|
+
} }), problem ? (_jsx("p", { className: "text-destructive text-xs", role: "alert", children: problem })) : null] }), _jsxs(ModalFooter, { className: "sm:justify-between", children: [_jsx(Button, { variant: "outline-ghost", size: "sm", className: "w-full sm:w-auto", onClick: () => onOpenChange(false), disabled: pending, children: t('cancel') }), _jsxs(Button, { size: "sm", className: "w-full sm:w-auto", onClick: () => void submit(), disabled: !name || unchanged || pending, children: [pending ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, t('save')] })] })] }) }));
|
|
199
|
+
}
|
|
200
|
+
/** `base`, or `base 2`, `base 3`…: the first name no group of the project has (names are unique per project). */
|
|
201
|
+
export function nextSessionGroupName(groups, base) {
|
|
202
|
+
const taken = new Set(groups.map((group) => group.name.toLowerCase()));
|
|
203
|
+
if (!taken.has(base.toLowerCase()))
|
|
204
|
+
return base;
|
|
205
|
+
let n = 2;
|
|
206
|
+
while (taken.has(`${base} ${n}`.toLowerCase()))
|
|
207
|
+
n += 1;
|
|
208
|
+
return `${base} ${n}`;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* A new group, named in place: the row a group header takes, holding an input
|
|
212
|
+
* with `defaultName` selected. Enter or a click elsewhere creates it; Escape,
|
|
213
|
+
* or an empty name, drops the row. A taken name or the group limit shows as a
|
|
214
|
+
* toast and keeps the row open. `onDone` gets the new group, or null.
|
|
215
|
+
*/
|
|
216
|
+
export function NewSessionGroupRow({ projectId, defaultName, onDone, }) {
|
|
217
|
+
const t = useTranslations('sidebar.sessionGroups');
|
|
218
|
+
const create = useCreateProjectSessionGroup(projectId);
|
|
219
|
+
const [value, setValue] = useState(defaultName);
|
|
220
|
+
// A ref, not `isPending`: Enter and the blur that follows land in one render.
|
|
221
|
+
const busy = useRef(false);
|
|
222
|
+
const done = useRef(false);
|
|
223
|
+
const rowRef = useRef(null);
|
|
224
|
+
const finish = (group) => {
|
|
225
|
+
done.current = true;
|
|
226
|
+
onDone(group);
|
|
227
|
+
};
|
|
228
|
+
const commit = async () => {
|
|
229
|
+
if (busy.current || done.current)
|
|
230
|
+
return;
|
|
231
|
+
const name = value.trim();
|
|
232
|
+
if (!name)
|
|
233
|
+
return finish(null);
|
|
234
|
+
busy.current = true;
|
|
235
|
+
try {
|
|
236
|
+
finish(await create.mutateAsync({ name }));
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
const code = error instanceof ApiError ? error.code : undefined;
|
|
240
|
+
errorToast(code === 'group_name_taken' ? t('nameTaken') : code === 'group_limit' ? t('limit') : t('createFailed'));
|
|
241
|
+
}
|
|
242
|
+
finally {
|
|
243
|
+
busy.current = false;
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
// A click anywhere else creates the group (a blur would also fire when a
|
|
247
|
+
// closing menu or a toast moves focus, which is not the viewer leaving).
|
|
248
|
+
const commitRef = useRef(commit);
|
|
249
|
+
commitRef.current = commit;
|
|
250
|
+
useEffect(() => {
|
|
251
|
+
const onPointerDown = (event) => {
|
|
252
|
+
if (!rowRef.current?.contains(event.target))
|
|
253
|
+
void commitRef.current();
|
|
254
|
+
};
|
|
255
|
+
document.addEventListener('pointerdown', onPointerDown, true);
|
|
256
|
+
return () => document.removeEventListener('pointerdown', onPointerDown, true);
|
|
257
|
+
}, []);
|
|
258
|
+
return (_jsxs("div", { ref: rowRef, className: "space-y-1", "data-session-group-draft": true, children: [_jsx("div", { className: cn('flex items-center px-1', SESSION_ROW_HEIGHT_CLASS), children: _jsx("input", { autoFocus: true, value: value, maxLength: GROUP_NAME_MAX, "aria-label": t('namePlaceholder'), placeholder: t('namePlaceholder'), onFocus: (event) => event.currentTarget.select(), onChange: (event) => setValue(event.target.value), onKeyDown: (event) => {
|
|
259
|
+
if (event.nativeEvent.isComposing)
|
|
260
|
+
return;
|
|
261
|
+
if (event.key === 'Enter') {
|
|
262
|
+
event.preventDefault();
|
|
263
|
+
void commit();
|
|
264
|
+
}
|
|
265
|
+
else if (event.key === 'Escape') {
|
|
266
|
+
event.preventDefault();
|
|
267
|
+
finish(null);
|
|
268
|
+
}
|
|
269
|
+
}, className: "border-input bg-background text-sidebar-foreground placeholder:text-muted-foreground focus-visible:border-ring h-7 w-full min-w-0 rounded-md border px-1.5 text-sm font-medium outline-none" }) }), _jsx("p", { className: "text-muted-foreground flex h-8 items-center px-2 text-xs", children: _jsx("span", { className: "truncate", children: t('empty') }) })] }));
|
|
193
270
|
}
|
|
194
271
|
/** Every group of the project, in order. */
|
|
195
272
|
export function SessionGroupSections({ groups, ...rest }) {
|
|
196
273
|
const groupIds = groups.map((group) => group.group_id);
|
|
197
274
|
return (_jsx(_Fragment, { children: groups.map((group) => (_jsx(SessionGroupSection, { group: group, groupIds: groupIds, ...rest }, group.group_id))) }));
|
|
198
275
|
}
|
|
199
|
-
function SessionGroupSection({ projectId, group, groupIds, labels, collapsedSectionIds, onToggleSection, passesFacets, renderNode, actions, onRename, }) {
|
|
276
|
+
function SessionGroupSection({ projectId, group, groupIds, labels, collapsedSectionIds, onToggleSection, passesFacets, renderNode, actions, onRename, onNewGroup, onCollapseOthers, }) {
|
|
200
277
|
const t = useTranslations('sidebar');
|
|
201
278
|
const tGroups = useTranslations('sidebar.sessionGroups');
|
|
202
279
|
const sectionId = sessionGroupSectionId(group.group_id);
|
|
@@ -227,26 +304,26 @@ function SessionGroupSection({ projectId, group, groupIds, labels, collapsedSect
|
|
|
227
304
|
}, onDragEnd: () => {
|
|
228
305
|
draggingGroupId = null;
|
|
229
306
|
}, className: cn(
|
|
230
|
-
// A group
|
|
231
|
-
//
|
|
232
|
-
|
|
233
|
-
// Pinned and the date headers stay the only labels.
|
|
234
|
-
'group/section-header text-muted-foreground hover:bg-sidebar-row hover:text-sidebar-foreground relative flex cursor-pointer items-center gap-2 rounded-md px-2 text-sm', SESSION_ROW_HEIGHT_CLASS, drop.over === 'session' && 'bg-sidebar-row text-sidebar-foreground',
|
|
307
|
+
// A group header reads like Pinned and the date headers (name,
|
|
308
|
+
// then a caret on hover), with the row hover fill and a `⋯` menu.
|
|
309
|
+
'group/section-header text-muted-foreground hover:bg-sidebar-row hover:text-sidebar-foreground relative flex cursor-pointer items-center gap-1 rounded-md px-2 text-sm font-medium', SESSION_ROW_HEIGHT_CLASS, drop.over === 'session' && 'bg-sidebar-row text-sidebar-foreground',
|
|
235
310
|
// A group dropped here takes this place: a line marks the side it
|
|
236
311
|
// lands on (below this group when it comes from above).
|
|
237
312
|
drop.over === 'group' &&
|
|
238
313
|
'before:bg-foreground/40 before:absolute before:inset-x-2 before:h-0.5 before:rounded-full', drop.over === 'group' &&
|
|
239
|
-
(groupIds.indexOf(draggingGroupId ?? '') < index ? 'before:bottom-0' : 'before:top-0')), children: [
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
314
|
+
(groupIds.indexOf(draggingGroupId ?? '') < index ? 'before:bottom-0' : 'before:top-0')), children: [_jsx("span", { className: "min-w-0 truncate", children: group.name }), _jsx(CaretRightSolidIcon, { "aria-hidden": true,
|
|
315
|
+
// Always shown: the caret is what tells a group from a date header.
|
|
316
|
+
className: "duration-normal size-4 shrink-0 transition-transform ease-out group-data-[state=open]/section:rotate-90" }), _jsx(SessionGroupMenu, { group: group, onRename: () => onRename(group), onNewGroup: onNewGroup, onCollapseOthers: groupIds.length > 1 ? () => onCollapseOthers(group.group_id) : null, onMoveUp: moveGroupBy(groupIds, group.group_id, -1), onMoveDown: moveGroupBy(groupIds, group.group_id, 1), onReorder: (ids) => void actions.reorder(ids), projectId: projectId })] }) }), _jsxs(DisclosureContent, { contentClassName: "space-y-px", children: [rows.map(renderNode), query.data !== undefined && rows.length === 0 && !query.hasNextPage ? (
|
|
317
|
+
// Aligned to the name's x (px-2), one row tall.
|
|
318
|
+
_jsx("p", { className: "text-muted-foreground flex h-8 items-center px-2 text-xs", children: _jsx("span", { className: "truncate", children: tGroups('empty') }) })) : null, query.hasNextPage && (_jsx(ShowMoreButton, { loading: query.isFetchingNextPage, failed: query.isFetchNextPageError, label: t('loadMore'), onClick: () => query.fetchNextPage() }))] })] }) }));
|
|
243
319
|
}
|
|
244
320
|
/**
|
|
245
|
-
* The group header's `⋯`: Rename, Move up, Move down,
|
|
321
|
+
* The group header's `⋯`: New group, then Rename, Move up, Move down, then
|
|
322
|
+
* Collapse others, then Delete. Hover-revealed
|
|
246
323
|
* like a section header's; click and Enter/Space stop propagation so opening
|
|
247
324
|
* it never toggles the group.
|
|
248
325
|
*/
|
|
249
|
-
function SessionGroupMenu({ projectId, group, onRename, onMoveUp, onMoveDown, onReorder, }) {
|
|
326
|
+
function SessionGroupMenu({ projectId, group, onRename, onNewGroup, onCollapseOthers, onMoveUp, onMoveDown, onReorder, }) {
|
|
250
327
|
const tGroups = useTranslations('sidebar.sessionGroups');
|
|
251
328
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
252
329
|
const [confirmOpen, setConfirmOpen] = useState(false);
|
|
@@ -257,7 +334,10 @@ function SessionGroupMenu({ projectId, group, onRename, onMoveUp, onMoveDown, on
|
|
|
257
334
|
};
|
|
258
335
|
return (
|
|
259
336
|
// `contents`: the trigger stays a flex item of the header (`ml-auto`).
|
|
260
|
-
_jsxs("span", { className: "contents", onClick: stopAtMenu, onKeyDown: stopAtMenu, children: [_jsxs(DropdownMenu, { open: menuOpen, onOpenChange: setMenuOpen, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-xs", type: "button", "aria-label": `${tGroups('groupOptions')}: ${group.name}`, className: cn(SESSION_MENU_TRIGGER_CLASS, 'relative ml-auto opacity-0', 'before:absolute before:-inset-1', 'group-hover/section-header:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100'), children: _jsx(DotsThreeIcon, { className: "size-4" }) }) }), _jsxs(DropdownMenuContent, { align: "start", side: "right", className: "w-44",
|
|
337
|
+
_jsxs("span", { className: "contents", onClick: stopAtMenu, onKeyDown: stopAtMenu, children: [_jsxs(DropdownMenu, { open: menuOpen, onOpenChange: setMenuOpen, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-xs", type: "button", "aria-label": `${tGroups('groupOptions')}: ${group.name}`, className: cn(SESSION_MENU_TRIGGER_CLASS, 'relative ml-auto opacity-0', 'before:absolute before:-inset-1', 'group-hover/section-header:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100'), children: _jsx(DotsThreeIcon, { className: "size-4" }) }) }), _jsxs(DropdownMenuContent, { align: "start", side: "right", className: "w-44", onCloseAutoFocus: keepFocusForNewGroup, children: [_jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => {
|
|
338
|
+
markNewGroupFocus();
|
|
339
|
+
afterClose(onNewGroup);
|
|
340
|
+
}, children: [_jsx(PlusIcon, {}), tGroups('newGroup')] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => afterClose(onRename), children: [_jsx(PencilSimpleIcon, {}), tGroups('rename')] }), _jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: !onMoveUp, onSelect: () => onMoveUp && onReorder(onMoveUp), children: [_jsx(ArrowUpIcon, {}), tGroups('moveUp')] }), _jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: !onMoveDown, onSelect: () => onMoveDown && onReorder(onMoveDown), children: [_jsx(ArrowDownIcon, {}), tGroups('moveDown')] }), onCollapseOthers ? (_jsxs(_Fragment, { children: [_jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: onCollapseOthers, children: [_jsx(ArrowsInLineVerticalIcon, {}), tGroups('collapseOthers')] })] })) : null, _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { className: "cursor-pointer", variant: "destructive", onSelect: () => afterClose(() => setConfirmOpen(true)), children: [_jsx(TrashIcon, {}), tGroups('delete')] })] })] }), _jsx(ConfirmDialog, { open: confirmOpen, onOpenChange: setConfirmOpen, title: tGroups('deleteTitle'), description: tGroups('deleteDescription', { name: group.name }), confirmLabel: tGroups('delete'), cancelLabel: tGroups('cancel'), confirmVariant: "destructive", isPending: remove.isPending, onConfirm: () => remove.mutate(group.group_id, {
|
|
261
341
|
onSuccess: () => {
|
|
262
342
|
setConfirmOpen(false);
|
|
263
343
|
successToast(tGroups('deleted'));
|
|
@@ -14,7 +14,7 @@ export const SESSION_SECTIONS = {
|
|
|
14
14
|
email: { key: 'section.email', label: 'Email' },
|
|
15
15
|
schedule: { key: 'section.scheduled', label: 'Scheduled' },
|
|
16
16
|
webhook: { key: 'section.webhook', label: 'Webhook' },
|
|
17
|
-
event: { key: 'section.event', label: '
|
|
17
|
+
event: { key: 'section.event', label: 'Connector event' },
|
|
18
18
|
manual: { key: 'section.manual', label: 'Manual' },
|
|
19
19
|
all: { key: 'section.all', label: 'All' },
|
|
20
20
|
};
|
|
@@ -54,6 +54,12 @@ export function SidebarDrill({ projectId, onNavigate, children, }) {
|
|
|
54
54
|
// path changes; a click that opens a new tab (modifier keys, middle
|
|
55
55
|
// button) is not a drill.
|
|
56
56
|
const [intent, setIntent] = useState(null);
|
|
57
|
+
// The path changed: the click is answered, so drop it. A kept intent matched
|
|
58
|
+
// again when the window came back to the page it was made on without a click
|
|
59
|
+
// in this sidebar (a desktop tab switch, a closed tab, browser Back), and
|
|
60
|
+
// the settings nav stayed over a page outside settings.
|
|
61
|
+
if (intent && intent.at !== pathname)
|
|
62
|
+
setIntent(null);
|
|
57
63
|
const drilled = intent && intent.at === pathname ? intent.drilled : isProjectAdminPath(pathname);
|
|
58
64
|
const drillOnClick = (to) => (event) => {
|
|
59
65
|
if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { DotsThreeIcon } from '@phosphor-icons/react';
|
|
4
4
|
import { useTranslations } from '../../i18n/index.js';
|
|
5
5
|
import { selectExpandedIds, useSessionExpandedStore } from '../../internal/stores/session-expanded-store.js';
|
|
6
6
|
import { cn } from '../../lib/utils.js';
|
|
@@ -8,6 +8,7 @@ import { Disclosure, DisclosureContent, DisclosureTrigger } from '../../primitiv
|
|
|
8
8
|
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '../../primitives/sidebar.js';
|
|
9
9
|
import { ProjectNavItems } from './project-nav-items.js';
|
|
10
10
|
import { ProjectSessionList } from './project-session-list.js';
|
|
11
|
+
import { CaretRightSolidIcon } from '../../icons/caret-right-solid.js';
|
|
11
12
|
/** Open state lives in the persisted expanded store (closed by default), beside Sessions. */
|
|
12
13
|
const MORE_SECTION_ID = 'section:sidebar-more';
|
|
13
14
|
/**
|
|
@@ -23,5 +24,5 @@ export function SidebarMoreGroup({ projectId, footer }) {
|
|
|
23
24
|
const expanded = useSessionExpandedStore(selectExpandedIds(projectId));
|
|
24
25
|
const toggleExpanded = useSessionExpandedStore((state) => state.toggleExpanded);
|
|
25
26
|
const open = expanded.includes(MORE_SECTION_ID);
|
|
26
|
-
return (_jsxs(Disclosure, { open: open, onOpenChange: () => toggleExpanded(projectId, MORE_SECTION_ID), className: cn('group/more flex min-h-0 flex-col', open ? 'max-h-1/2' : 'shrink-0'), transition: { duration: 0.15, ease: 'easeOut' }, children: [_jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: _jsx(DisclosureTrigger, { children: _jsxs(SidebarMenuButton, { className: "text-muted-foreground hover:text-sidebar-foreground", children: [_jsx(DotsThreeIcon, { weight: "bold" }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: t('more') }), _jsx(
|
|
27
|
+
return (_jsxs(Disclosure, { open: open, onOpenChange: () => toggleExpanded(projectId, MORE_SECTION_ID), className: cn('group/more flex min-h-0 flex-col', open ? 'max-h-1/2' : 'shrink-0'), transition: { duration: 0.15, ease: 'easeOut' }, children: [_jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { children: _jsx(DisclosureTrigger, { children: _jsxs(SidebarMenuButton, { className: "text-muted-foreground hover:text-sidebar-foreground", children: [_jsx(DotsThreeIcon, { weight: "bold" }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: t('more') }), _jsx(CaretRightSolidIcon, { "aria-hidden": true, className: cn('size-4! shrink-0 transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none', open && 'rotate-90') })] }) }) }) }), _jsxs(DisclosureContent, { className: "flex min-h-0 flex-1 flex-col", contentClassName: "flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto pt-1", children: [_jsx(SidebarMenu, { children: _jsx(ProjectNavItems, { projectId: projectId, inbox: false }) }), _jsx(ProjectSessionList, { projectId: projectId, secondary: true }), footer] })] }));
|
|
27
28
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type WorkspaceSummary } from '@kortix/sdk';
|
|
1
2
|
import { useAccountsList } from '../../internal/hooks/account/use-accounts-list.js';
|
|
2
3
|
import { githubSourceAccount, reusableEmptyAccountFromRows, type WorkspaceRow } from '../project-selector/project-selector-model.js';
|
|
3
4
|
/**
|
|
@@ -12,6 +13,12 @@ import { githubSourceAccount, reusableEmptyAccountFromRows, type WorkspaceRow }
|
|
|
12
13
|
* rows. Every create, delete and join invalidates the scope.
|
|
13
14
|
*/
|
|
14
15
|
export declare function workspaceListQueryKey(userId: string | null | undefined): readonly ["kx", "projects", "workspaces", string, "every-state"];
|
|
16
|
+
/**
|
|
17
|
+
* The workspace list as the app already cached it (the switcher's and the
|
|
18
|
+
* settings rail's query), with no request of its own: undefined until one of
|
|
19
|
+
* them loaded it. For a reader that must add no load.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useCachedWorkspaceSummaries(): WorkspaceSummary[] | undefined;
|
|
15
22
|
export interface WorkspaceList {
|
|
16
23
|
/** Every workspace, most recently opened first. */
|
|
17
24
|
rows: WorkspaceRow[];
|
|
@@ -20,12 +20,22 @@ import { githubSourceAccount, reusableEmptyAccountFromRows, workspaceRowsFromSum
|
|
|
20
20
|
export function workspaceListQueryKey(userId) {
|
|
21
21
|
return [...qk.projects.workspaces(userId), 'every-state'];
|
|
22
22
|
}
|
|
23
|
+
const listEveryWorkspace = () => listWorkspaces({ includeInactive: true });
|
|
24
|
+
/**
|
|
25
|
+
* The workspace list as the app already cached it (the switcher's and the
|
|
26
|
+
* settings rail's query), with no request of its own: undefined until one of
|
|
27
|
+
* them loaded it. For a reader that must add no load.
|
|
28
|
+
*/
|
|
29
|
+
export function useCachedWorkspaceSummaries() {
|
|
30
|
+
const viewerId = useUiViewerId();
|
|
31
|
+
return useQuery({ queryKey: workspaceListQueryKey(viewerId), queryFn: listEveryWorkspace, enabled: false }).data;
|
|
32
|
+
}
|
|
23
33
|
export function useWorkspaceList(options = {}) {
|
|
24
34
|
const viewerId = useUiViewerId();
|
|
25
35
|
const accountsQuery = useAccountsList(options.retry === undefined ? undefined : { retry: options.retry });
|
|
26
36
|
const listQuery = useQuery({
|
|
27
37
|
queryKey: workspaceListQueryKey(viewerId),
|
|
28
|
-
queryFn:
|
|
38
|
+
queryFn: listEveryWorkspace,
|
|
29
39
|
retry: options.retry,
|
|
30
40
|
...contract('inventory'),
|
|
31
41
|
});
|
|
@@ -16,6 +16,20 @@ export declare function WorkspaceSettingsSidebarNav({ projectId, shown, onNaviga
|
|
|
16
16
|
/** Called after any row click (mobile closes the sheet). */
|
|
17
17
|
onNavigate: () => void;
|
|
18
18
|
}): import("react").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* The `scrollTop` that brings a row fully into its list, moving the list as
|
|
21
|
+
* little as possible (`block: 'nearest'`), or `null` when the row is already
|
|
22
|
+
* in view. Rects are viewport boxes. Only the list moves: `scrollIntoView`
|
|
23
|
+
* would also scroll every ancestor, and the page must stay where it is.
|
|
24
|
+
* `margin` keeps the row clear of the list's edge fades.
|
|
25
|
+
*/
|
|
26
|
+
export declare function scrollTopToReveal(outer: {
|
|
27
|
+
top: number;
|
|
28
|
+
bottom: number;
|
|
29
|
+
}, row: {
|
|
30
|
+
top: number;
|
|
31
|
+
bottom: number;
|
|
32
|
+
}, scrollTop: number, margin?: number): number | null;
|
|
19
33
|
/** `href` with the settings query set, or removed when `query` is empty. */
|
|
20
34
|
export declare function withSettingsQuery(href: string, query: string): string;
|
|
21
35
|
/**
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowLeftIcon, MagnifyingGlassIcon } from '@phosphor-icons/react';
|
|
4
|
-
import { useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import { useTranslations } from '../../i18n/index.js';
|
|
6
6
|
import { useIsMobile } from '../../internal/hooks/index.js';
|
|
7
7
|
import { uiRoutes } from '../../lib/routes.js';
|
|
8
8
|
import { cn } from '../../lib/utils.js';
|
|
9
|
+
import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
|
|
9
10
|
import { InputGroupSearch, InputGroupSearchClear, InputGroupSearchIcon, InputGroupSearchInput, } from '../../primitives/input-group.js';
|
|
10
11
|
import { Skeleton } from '../../primitives/skeleton.js';
|
|
11
12
|
import { SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, } from '../../primitives/sidebar.js';
|
|
@@ -42,6 +43,24 @@ export function WorkspaceSettingsSidebarNav({ projectId, shown, onNavigate, }) {
|
|
|
42
43
|
_jsx("div", { className: "border-sidebar-border shrink-0 border-t", children: _jsx(RailGroup, { group: rail.footer, active: active, prefetch: shown, onNavigate: onNavigate }) })) : null] }));
|
|
43
44
|
}
|
|
44
45
|
const LIST_SCROLL_CLASS = 'min-h-0 flex-1 [scrollbar-width:none] overflow-y-auto [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden';
|
|
46
|
+
/**
|
|
47
|
+
* The `scrollTop` that brings a row fully into its list, moving the list as
|
|
48
|
+
* little as possible (`block: 'nearest'`), or `null` when the row is already
|
|
49
|
+
* in view. Rects are viewport boxes. Only the list moves: `scrollIntoView`
|
|
50
|
+
* would also scroll every ancestor, and the page must stay where it is.
|
|
51
|
+
* `margin` keeps the row clear of the list's edge fades.
|
|
52
|
+
*/
|
|
53
|
+
export function scrollTopToReveal(outer, row, scrollTop, margin = 0) {
|
|
54
|
+
const list = { top: outer.top + margin, bottom: outer.bottom - margin };
|
|
55
|
+
if (row.top < list.top)
|
|
56
|
+
return scrollTop - (list.top - row.top);
|
|
57
|
+
if (row.bottom > list.bottom) {
|
|
58
|
+
// A row taller than the list shows its top, as `nearest` does.
|
|
59
|
+
const shift = Math.min(row.bottom - list.bottom, row.top - list.top);
|
|
60
|
+
return scrollTop + shift;
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
45
64
|
/**
|
|
46
65
|
* The search field and what sits under it: the groups while the field is
|
|
47
66
|
* empty, the ranked results while it holds a query. The field keeps focus;
|
|
@@ -253,7 +272,32 @@ function SettingsSearch({ projectId, rail, active, shown, onNavigate, }) {
|
|
|
253
272
|
const Glyph = glyph(group.section.key);
|
|
254
273
|
const section = items[indexOf.get(`section:${group.section.key}`) ?? 0];
|
|
255
274
|
return (_jsx(SidebarGroup, { className: "py-1", children: _jsxs(SidebarMenu, { className: "gap-0", children: [_jsxs(ResultRow, { ...rowProps(section), children: [_jsx("span", { className: "shrink-0", children: _jsx(Glyph, {}) }), _jsx("span", { className: "truncate", children: group.section.label })] }), group.children.length > 0 ? (_jsx("li", { role: "none", style: { marginLeft: TRUNK_X }, children: _jsx("ul", { role: "group", className: "flex flex-col", children: group.children.map((result, i) => (_jsx(ResultRow, { ...rowProps(items[indexOf.get(result.id) ?? 0]), branch: i < group.children.length - 1 ? 'continue' : 'end', children: _jsx("span", { className: "truncate", children: result.label }) }, result.id))) }) })) : null] }) }, group.section.key));
|
|
256
|
-
})) })) : (_jsx(
|
|
275
|
+
})) })) : (_jsx(RailGroupsList, { rail: rail, active: active, shown: shown, onNavigate: onNavigate }))] }));
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* The settings groups. The list scrolls without a scrollbar, so a fade marks
|
|
279
|
+
* the edge that hides rows, and the open section's row is scrolled into view
|
|
280
|
+
* on load and on every section change: at 900 px tall the last rows (Feature
|
|
281
|
+
* flags, Danger zone) sit below the fold.
|
|
282
|
+
*/
|
|
283
|
+
function RailGroupsList({ rail, active, shown, onNavigate, }) {
|
|
284
|
+
const listRef = useRef(null);
|
|
285
|
+
useLayoutEffect(() => {
|
|
286
|
+
const list = listRef.current;
|
|
287
|
+
if (!shown || !list || !active)
|
|
288
|
+
return;
|
|
289
|
+
const row = list.querySelector('[aria-current="page"]');
|
|
290
|
+
if (!row)
|
|
291
|
+
return;
|
|
292
|
+
// The fades are `fadeSize="8"` (~29 px): reveal the row clear of them. The
|
|
293
|
+
// browser clamps at the end, where the bottom fade is gone.
|
|
294
|
+
const next = scrollTopToReveal(list.getBoundingClientRect(), row.getBoundingClientRect(), list.scrollTop, 32);
|
|
295
|
+
if (next !== null)
|
|
296
|
+
list.scrollTop = next;
|
|
297
|
+
// Not on `rail`: a background refetch publishes a new rail object, and the
|
|
298
|
+
// list must not jump back after the person scrolled it.
|
|
299
|
+
}, [active, shown]);
|
|
300
|
+
return (_jsx(FadedScrollArea, { ref: listRef, rootClassName: "min-h-0 flex-1", fadeSize: "8", children: rail.groups.map((group) => (_jsx(RailGroup, { group: group, active: active, prefetch: shown, onNavigate: onNavigate }, group.id))) }));
|
|
257
301
|
}
|
|
258
302
|
// The trunk sits under the section glyph's centre: the row's `pl-2` plus half
|
|
259
303
|
// the `size-4` glyph, less half the 2px line.
|
|
@@ -71,7 +71,7 @@ function SpaceIntro({ projectId, space }) {
|
|
|
71
71
|
const t = useTranslations('spaces');
|
|
72
72
|
const locale = useLocale();
|
|
73
73
|
const agents = agentsInSpace(space.name, useProjectConfig(projectId)?.agents ?? []);
|
|
74
|
-
const names = new Intl.ListFormat(locale, { type: 'conjunction' }).format(agents.map(agentDisplayName));
|
|
74
|
+
const names = new Intl.ListFormat(locale, { type: 'conjunction' }).format(agents.map((slug) => agentDisplayName(slug)));
|
|
75
75
|
return (_jsxs("div", { className: "flex max-w-2xl flex-col gap-3 px-5 py-5", children: [agents.length ? (_jsx("span", { className: "flex -space-x-1", children: agents.map((name) => (_jsx(AgentMark, { slug: name, size: 21, className: "ring-background ring-2" }, name))) })) : null, _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx("h2", { className: "text-foreground text-xl font-medium text-balance", children: t('intro.title', { name: space.label || space.name }) }), _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: space.description?.trim() || t('intro.body') })] }), _jsxs("p", { className: "text-muted-foreground text-xs text-pretty", children: [agents.length ? t('intro.agents', { count: agents.length, names }) : t('intro.noAgents'), ' ', t('intro.addTab')] })] }));
|
|
76
76
|
}
|
|
77
77
|
/** A list tab's frame: one column on the header's gutter, so rows line up with the tabs. */
|
|
@@ -10,7 +10,7 @@ import { useTriggerControls } from '../../customize/triggers/schedule/trigger-co
|
|
|
10
10
|
import { useTranslations } from '../../i18n/index.js';
|
|
11
11
|
import { Close } from '../../icons/close.js';
|
|
12
12
|
import { AgentMark } from '../../internal/components/agent-mark.js';
|
|
13
|
-
import {
|
|
13
|
+
import { triggerHref } from '../../internal/lib/capability-tab-routes.js';
|
|
14
14
|
import { Button } from '../../primitives/button.js';
|
|
15
15
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger, } from '../../primitives/dropdown-menu.js';
|
|
16
16
|
import Hint from '../../primitives/hint.js';
|
|
@@ -139,7 +139,7 @@ function RoutinesSection({ projectId, space }) {
|
|
|
139
139
|
setCreating(false);
|
|
140
140
|
void queryClient.invalidateQueries({ queryKey: qk.project.triggers(projectId) });
|
|
141
141
|
} })] })) : null;
|
|
142
|
-
return (_jsxs(Section, { title: t('routines'), add: add, children: [routines.map((trigger) => (_jsx(Row, { avatar: _jsx(LightningIcon, { className: "text-muted-foreground size-4" }), name: triggerName(trigger), tag: describeWhen(trigger), href:
|
|
142
|
+
return (_jsxs(Section, { title: t('routines'), add: add, children: [routines.map((trigger) => (_jsx(Row, { avatar: _jsx(LightningIcon, { className: "text-muted-foreground size-4" }), name: triggerName(trigger), tag: describeWhen(trigger), href: triggerHref(projectId, trigger.slug) }, trigger.slug))), privateChannel && routines.length === 0 ? (_jsx("li", { className: "text-muted-foreground px-2 py-1 text-xs text-pretty", children: t('routinesPrivate') })) : null] }));
|
|
143
143
|
}
|
|
144
144
|
/** The browser's IANA zone, for the daily brief; UTC when it has none. */
|
|
145
145
|
function browserTimeZone() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseNoticeBatch } from '@kortix/sdk';
|
|
2
|
-
import {
|
|
2
|
+
import { agentDisplayName } from '../../_vendor/kortix-shared.js';
|
|
3
3
|
import { relativeTime } from '../../internal/lib/relative-time.js';
|
|
4
4
|
import { sessionDisplayLabel, sessionDisplayStatus } from '../../session/actions/session-label.js';
|
|
5
5
|
import { parseAgentMentionReferences, parseFileMentionReferences, parseFileReferences, parseSessionReferences, stripReplyContexts, } from '../../session/thread/message-parsing.js';
|
|
@@ -224,7 +224,7 @@ export function firstPromptTruncated(session) {
|
|
|
224
224
|
export const DEFAULT_AGENT_SLUG = 'kortix';
|
|
225
225
|
/** An agent's display name: the sidebar's DM row and the space view say it the same way. */
|
|
226
226
|
export function agentLabel(name) {
|
|
227
|
-
return
|
|
227
|
+
return agentDisplayName(name);
|
|
228
228
|
}
|
|
229
229
|
/**
|
|
230
230
|
* Who is in a space, as far as its loaded threads tell: the people who
|
|
@@ -10,7 +10,7 @@ import { TriggerComposer } from '../../customize/triggers/schedule/trigger-compo
|
|
|
10
10
|
import { lastRunLabel } from '../../internal/lib/trigger-clock.js';
|
|
11
11
|
import { TriggerTile } from '../../customize/triggers/schedule/trigger-tile.js';
|
|
12
12
|
import { useLocale, useTranslations } from '../../i18n/index.js';
|
|
13
|
-
import {
|
|
13
|
+
import { triggerHref } from '../../internal/lib/capability-tab-routes.js';
|
|
14
14
|
import { Button } from '../../primitives/button.js';
|
|
15
15
|
import { EmptyArt } from '../../primitives/empty-art.js';
|
|
16
16
|
import { EmptyState } from '../../primitives/empty-state.js';
|
|
@@ -64,7 +64,7 @@ function TriggerRow({ projectId, trigger, projectPaused, canUpdate, onToggle, })
|
|
|
64
64
|
const subtitle = triggerSubtitle(name, describeWhen(trigger), trigger.prompt_template);
|
|
65
65
|
// An auto-paused trigger is off until resumed: turning it on sends `enabled: true`, which resumes it.
|
|
66
66
|
const active = trigger.enabled && !trigger.auto_paused_at;
|
|
67
|
-
const href =
|
|
67
|
+
const href = triggerHref(projectId, trigger.slug);
|
|
68
68
|
const toggle = (enabled) => {
|
|
69
69
|
setPending(true);
|
|
70
70
|
onToggle(enabled)
|
|
@@ -390,13 +390,19 @@ function SpaceComposer({ projectId, space, onOpenThread, onAutoOpenThread, befor
|
|
|
390
390
|
useEffect(() => {
|
|
391
391
|
if (!pendingPrefill)
|
|
392
392
|
return;
|
|
393
|
-
|
|
393
|
+
// Apply what `consume` returns, never the render-time snapshot: the
|
|
394
|
+
// typing buffer may have dropped the entry since this render (another
|
|
395
|
+
// account signed in on the tab), and a dropped entry must not land.
|
|
396
|
+
const taken = consumePrefill(projectId);
|
|
397
|
+
if (!taken)
|
|
398
|
+
return;
|
|
394
399
|
setPrefill({
|
|
395
|
-
text:
|
|
400
|
+
text: taken.text,
|
|
396
401
|
id: Date.now(),
|
|
397
|
-
submit:
|
|
398
|
-
files:
|
|
399
|
-
options:
|
|
402
|
+
submit: taken.submit,
|
|
403
|
+
files: taken.files,
|
|
404
|
+
options: taken.options,
|
|
405
|
+
restoreDraft: taken.restoreDraft,
|
|
400
406
|
});
|
|
401
407
|
}, [pendingPrefill, projectId, consumePrefill]);
|
|
402
408
|
const onCommand = useCallback((command, args, options) => {
|