@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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A file card's mark for open issues in that file (`FileAnnotationsProvider`):
|
|
3
|
+
* the warning colour with an error, muted with warnings only, the same tones as
|
|
4
|
+
* the sidebar row. The tooltip says what the file has. Nothing without issues.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ManifestIssueMark({ path, name }: {
|
|
7
|
+
path: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { WarningIcon } from '@phosphor-icons/react';
|
|
4
|
+
import { useTranslations } from '../../../i18n/index.js';
|
|
5
|
+
import { cn } from '../../../lib/utils.js';
|
|
6
|
+
import Hint from '../../../primitives/hint.js';
|
|
7
|
+
import { useFileAnnotations } from '../../viewer/file-annotations.js';
|
|
8
|
+
/**
|
|
9
|
+
* A file card's mark for open issues in that file (`FileAnnotationsProvider`):
|
|
10
|
+
* the warning colour with an error, muted with warnings only, the same tones as
|
|
11
|
+
* the sidebar row. The tooltip says what the file has. Nothing without issues.
|
|
12
|
+
*/
|
|
13
|
+
export function ManifestIssueMark({ path, name }) {
|
|
14
|
+
const t = useTranslations('sidebar.manifestIssues');
|
|
15
|
+
const diagnostics = useFileAnnotations(path);
|
|
16
|
+
if (diagnostics.length === 0)
|
|
17
|
+
return null;
|
|
18
|
+
const errors = diagnostics.filter((d) => d.severity === 1).length;
|
|
19
|
+
const warnings = diagnostics.length - errors;
|
|
20
|
+
const label = t(warnings === 0 ? 'titleErrors' : errors === 0 ? 'titleWarnings' : 'title', {
|
|
21
|
+
file: name,
|
|
22
|
+
errors,
|
|
23
|
+
warnings,
|
|
24
|
+
});
|
|
25
|
+
return (_jsx(Hint, { label: label, side: "top", children: _jsx("span", { role: "img", "aria-label": label, "data-slot": "manifest-issue-mark", className: "inline-flex shrink-0", children: _jsx(WarningIcon, { className: cn('size-3.5', errors > 0 ? 'text-kortix-orange' : 'text-muted-foreground') }) }) }));
|
|
26
|
+
}
|
|
@@ -13,6 +13,8 @@ export declare const changeRequestKeys: {
|
|
|
13
13
|
/** One session's change requests, every status. Nested under `listScope`,
|
|
14
14
|
* so each project and list invalidation reaches it as well. */
|
|
15
15
|
sessionList: (projectId: string, sessionId: string) => readonly ["project-files", "change-requests", string, "list", "session", string];
|
|
16
|
+
/** The sidebar's newest change requests (every status), nested under `listScope`. */
|
|
17
|
+
sidebarRecent: (projectId: string) => readonly ["project-files", "change-requests", string, "list", "recent"];
|
|
16
18
|
detail: (projectId: string, crId: string) => readonly ["project-files", "change-requests", string, string];
|
|
17
19
|
diff: (projectId: string, crId: string) => readonly ["project-files", "change-requests", string, string, "diff"];
|
|
18
20
|
preview: (projectId: string, crId: string) => readonly ["project-files", "change-requests", string, string, "merge-preview"];
|
|
@@ -127,6 +129,14 @@ export declare function useChangeRequestMergePreview(crId: string | null, enable
|
|
|
127
129
|
* API and the browser is not told (KRTX-3009, KRTX-3010).
|
|
128
130
|
*/
|
|
129
131
|
export declare function invalidateChangeRequestReads(qc: QueryClient, projectId: string): void;
|
|
132
|
+
/**
|
|
133
|
+
* What one session's turn can change: that session's change requests (its
|
|
134
|
+
* outcome cards), the sidebar's recent list and the review summary. Not the
|
|
135
|
+
* project's other lists, details or diffs: a turn-end read of the whole
|
|
136
|
+
* project prefix, twice per busy -> idle edge, read the sidebar's 36 KB list
|
|
137
|
+
* 12-17 times a turn.
|
|
138
|
+
*/
|
|
139
|
+
export declare function invalidateTurnChangeRequestReads(qc: QueryClient, projectId: string, sessionId: string | undefined): void;
|
|
130
140
|
/**
|
|
131
141
|
* Invalidates every CR query for the active project — used after open / merge
|
|
132
142
|
* / close / reopen so all panels and detail views re-fetch.
|
|
@@ -19,6 +19,8 @@ export const changeRequestKeys = {
|
|
|
19
19
|
/** One session's change requests, every status. Nested under `listScope`,
|
|
20
20
|
* so each project and list invalidation reaches it as well. */
|
|
21
21
|
sessionList: (projectId, sessionId) => ['project-files', 'change-requests', projectId, 'list', 'session', sessionId],
|
|
22
|
+
/** The sidebar's newest change requests (every status), nested under `listScope`. */
|
|
23
|
+
sidebarRecent: (projectId) => ['project-files', 'change-requests', projectId, 'list', 'recent'],
|
|
22
24
|
detail: (projectId, crId) => ['project-files', 'change-requests', projectId, crId],
|
|
23
25
|
diff: (projectId, crId) => ['project-files', 'change-requests', projectId, crId, 'diff'],
|
|
24
26
|
preview: (projectId, crId) => ['project-files', 'change-requests', projectId, crId, 'merge-preview'],
|
|
@@ -239,6 +241,21 @@ export function invalidateChangeRequestReads(qc, projectId) {
|
|
|
239
241
|
qc.invalidateQueries({ queryKey: changeRequestKeys.project(projectId) });
|
|
240
242
|
qc.invalidateQueries({ queryKey: qk.project.reviewSummary(projectId) });
|
|
241
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* What one session's turn can change: that session's change requests (its
|
|
246
|
+
* outcome cards), the sidebar's recent list and the review summary. Not the
|
|
247
|
+
* project's other lists, details or diffs: a turn-end read of the whole
|
|
248
|
+
* project prefix, twice per busy -> idle edge, read the sidebar's 36 KB list
|
|
249
|
+
* 12-17 times a turn.
|
|
250
|
+
*/
|
|
251
|
+
export function invalidateTurnChangeRequestReads(qc, projectId, sessionId) {
|
|
252
|
+
if (!projectId)
|
|
253
|
+
return;
|
|
254
|
+
if (sessionId)
|
|
255
|
+
qc.invalidateQueries({ queryKey: changeRequestKeys.sessionList(projectId, sessionId), exact: true });
|
|
256
|
+
qc.invalidateQueries({ queryKey: changeRequestKeys.sidebarRecent(projectId), exact: true });
|
|
257
|
+
qc.invalidateQueries({ queryKey: qk.project.reviewSummary(projectId) });
|
|
258
|
+
}
|
|
242
259
|
/**
|
|
243
260
|
* Invalidates every CR query for the active project — used after open / merge
|
|
244
261
|
* / close / reopen so all panels and detail views re-fetch.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The repository view's `kortix.yaml` issues, as file annotations: the open
|
|
3
|
+
* manifest gets a gutter marker and a hover message on each flagged line, and
|
|
4
|
+
* its card a warning mark. The same `attentionHealth` filter as the sidebar
|
|
5
|
+
* row, so an issue shows or hides the same everywhere.
|
|
6
|
+
*
|
|
7
|
+
* The server validates the default branch's manifest, so another version of
|
|
8
|
+
* the repository (a change request, a checkpoint) shows none.
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactNode } from 'react';
|
|
11
|
+
export declare function ManifestAnnotationsProvider({ projectId, onDefaultBranch, children, }: {
|
|
12
|
+
projectId: string;
|
|
13
|
+
/** False while the view shows another ref than the default branch. */
|
|
14
|
+
onDefaultBranch: boolean;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* The repository view's `kortix.yaml` issues, as file annotations: the open
|
|
5
|
+
* manifest gets a gutter marker and a hover message on each flagged line, and
|
|
6
|
+
* its card a warning mark. The same `attentionHealth` filter as the sidebar
|
|
7
|
+
* row, so an issue shows or hides the same everywhere.
|
|
8
|
+
*
|
|
9
|
+
* The server validates the default branch's manifest, so another version of
|
|
10
|
+
* the repository (a change request, a checkpoint) shows none.
|
|
11
|
+
*/
|
|
12
|
+
import { useCallback } from 'react';
|
|
13
|
+
import { manifestLspDiagnostics, useProjectManifestHealth } from '../../internal/lib/manifest-health.js';
|
|
14
|
+
import { FileAnnotationsProvider } from '../viewer/file-annotations.js';
|
|
15
|
+
export function ManifestAnnotationsProvider({ projectId, onDefaultBranch, children, }) {
|
|
16
|
+
const health = useProjectManifestHealth(projectId);
|
|
17
|
+
const diagnosticsFor = useCallback((filePath) => (onDefaultBranch ? manifestLspDiagnostics(health, filePath) : []), [health, onDefaultBranch]);
|
|
18
|
+
return _jsx(FileAnnotationsProvider, { diagnosticsFor: diagnosticsFor, children: children });
|
|
19
|
+
}
|
|
@@ -2,7 +2,7 @@ interface VersionStore {
|
|
|
2
2
|
selectedByProject: Record<string, string | undefined>;
|
|
3
3
|
setVersion: (projectId: string, ref: string | null) => void;
|
|
4
4
|
}
|
|
5
|
-
export declare const useVersionStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<VersionStore>, "
|
|
5
|
+
export declare const useVersionStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<VersionStore>, "setState" | "persist"> & {
|
|
6
6
|
setState(partial: VersionStore | Partial<VersionStore> | ((state: VersionStore) => VersionStore | Partial<VersionStore>), replace?: false | undefined): unknown;
|
|
7
7
|
setState(state: VersionStore | ((state: VersionStore) => VersionStore), replace: true): unknown;
|
|
8
8
|
persist: {
|
|
@@ -106,4 +106,24 @@ export declare function rowDragIntent(types: readonly string[], options: {
|
|
|
106
106
|
/** The explorer's internal drag MIME (`DRAG_MIME`). */
|
|
107
107
|
moveMime: string;
|
|
108
108
|
}): RowDragIntent;
|
|
109
|
+
/**
|
|
110
|
+
* Paths of listing rows the server does not have yet: uploads queued or
|
|
111
|
+
* running, and files still being created (a pending row the server has not
|
|
112
|
+
* confirmed, i.e. without `seen`). The grid shows a spinner on these and
|
|
113
|
+
* defers their live preview: a preview read before the write lands is a 404,
|
|
114
|
+
* and that 404 is what kept a new file on "File not found" (D-08).
|
|
115
|
+
*/
|
|
116
|
+
export declare function inFlightPaths(uploads: readonly {
|
|
117
|
+
status: string;
|
|
118
|
+
targetPath?: string;
|
|
119
|
+
file: {
|
|
120
|
+
name: string;
|
|
121
|
+
};
|
|
122
|
+
}[], pending: readonly {
|
|
123
|
+
node: {
|
|
124
|
+
path: string;
|
|
125
|
+
type: 'file' | 'directory';
|
|
126
|
+
};
|
|
127
|
+
seen?: unknown;
|
|
128
|
+
}[]): Set<string>;
|
|
109
129
|
export {};
|
|
@@ -119,3 +119,23 @@ export function rowDragIntent(types, options) {
|
|
|
119
119
|
return options.canUpload ? 'upload' : null;
|
|
120
120
|
return null;
|
|
121
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Paths of listing rows the server does not have yet: uploads queued or
|
|
124
|
+
* running, and files still being created (a pending row the server has not
|
|
125
|
+
* confirmed, i.e. without `seen`). The grid shows a spinner on these and
|
|
126
|
+
* defers their live preview: a preview read before the write lands is a 404,
|
|
127
|
+
* and that 404 is what kept a new file on "File not found" (D-08).
|
|
128
|
+
*/
|
|
129
|
+
export function inFlightPaths(uploads, pending) {
|
|
130
|
+
const paths = new Set();
|
|
131
|
+
for (const u of uploads) {
|
|
132
|
+
if (u.status !== 'queued' && u.status !== 'uploading')
|
|
133
|
+
continue;
|
|
134
|
+
paths.add(u.targetPath ? `${u.targetPath.replace(/\/+$/, '')}/${u.file.name}` : u.file.name);
|
|
135
|
+
}
|
|
136
|
+
for (const p of pending) {
|
|
137
|
+
if (p.node.type === 'file' && !('seen' in p))
|
|
138
|
+
paths.add(p.node.path);
|
|
139
|
+
}
|
|
140
|
+
return paths;
|
|
141
|
+
}
|
|
@@ -6,7 +6,7 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
6
6
|
import { readRuntimeFileWithRetry } from '../../../internal/files/runtime-file-read.js';
|
|
7
7
|
import { readFileAsBlob } from '../../../internal/files/runtime-files.js';
|
|
8
8
|
import { keepBlobIfUnchanged } from './blob-identity.js';
|
|
9
|
-
import { clearMissingFileRead, imageWaitedOut, imageWakingRefetchInterval, missingFileReadError, missingFileSuppressed, noteMissingFileRead, sandboxWakingRefetchInterval, } from '../../../internal/files/file-read-retry.js';
|
|
9
|
+
import { clearMissingFileRead, imageWaitedOut, imageWakingRefetchInterval, missingFileReadError, missingFileSuppressed, missingFileReadEpoch, noteMissingFileRead, sandboxWakingRefetchInterval, } from '../../../internal/files/file-read-retry.js';
|
|
10
10
|
import { useServerHealth } from './use-server-health.js';
|
|
11
11
|
// ── Query keys ─────────────────────────────────────────────────────────────
|
|
12
12
|
// Keyed by the SDK factory: the live event stream invalidates it on
|
|
@@ -60,6 +60,7 @@ export function useBinaryBlob(filePath, options) {
|
|
|
60
60
|
// gate in internal/files/file-read-retry.
|
|
61
61
|
if (missingFileSuppressed(serverUrl, filePath))
|
|
62
62
|
throw missingFileReadError();
|
|
63
|
+
const startedAt = missingFileReadEpoch();
|
|
63
64
|
const blob = await readRuntimeFileWithRetry(filePath, async () => {
|
|
64
65
|
const blob = await readFileAsBlob(filePath);
|
|
65
66
|
if (blob.size === 0) {
|
|
@@ -67,7 +68,7 @@ export function useBinaryBlob(filePath, options) {
|
|
|
67
68
|
}
|
|
68
69
|
return blob;
|
|
69
70
|
}, undefined, signal).catch((error) => {
|
|
70
|
-
noteMissingFileRead(serverUrl, filePath, error);
|
|
71
|
+
noteMissingFileRead(serverUrl, filePath, error, startedAt);
|
|
71
72
|
throw error;
|
|
72
73
|
});
|
|
73
74
|
clearMissingFileRead(serverUrl, filePath);
|
|
@@ -3,7 +3,7 @@ import { fileContentKeys, useRuntimeStore } from '@kortix/sdk/react';
|
|
|
3
3
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
4
4
|
import { readRuntimeFileWithRetry } from '../../../internal/files/runtime-file-read.js';
|
|
5
5
|
import { readFile } from '../../../internal/files/runtime-files.js';
|
|
6
|
-
import { clearMissingFileRead, missingFileReadError, missingFileSuppressed, noteMissingFileRead, sandboxWakingRefetchInterval, } from '../../../internal/files/file-read-retry.js';
|
|
6
|
+
import { clearMissingFileRead, missingFileReadError, missingFileSuppressed, missingFileReadEpoch, noteMissingFileRead, sandboxWakingRefetchInterval, } from '../../../internal/files/file-read-retry.js';
|
|
7
7
|
import { useServerHealth } from './use-server-health.js';
|
|
8
8
|
import { isSystemDirectoryPath } from './system-dir.js';
|
|
9
9
|
// Keyed by the SDK factory: the live event stream invalidates it on
|
|
@@ -28,13 +28,14 @@ export function useFileContent(filePath, options) {
|
|
|
28
28
|
queryFn: ({ signal }) => {
|
|
29
29
|
if (missingFileSuppressed(serverUrl, filePath))
|
|
30
30
|
throw missingFileReadError();
|
|
31
|
+
const startedAt = missingFileReadEpoch();
|
|
31
32
|
return readRuntimeFileWithRetry(filePath, () => readFile(filePath), undefined, signal)
|
|
32
33
|
.then((content) => {
|
|
33
34
|
clearMissingFileRead(serverUrl, filePath);
|
|
34
35
|
return content;
|
|
35
36
|
})
|
|
36
37
|
.catch((error) => {
|
|
37
|
-
noteMissingFileRead(serverUrl, filePath, error);
|
|
38
|
+
noteMissingFileRead(serverUrl, filePath, error, startedAt);
|
|
38
39
|
throw error;
|
|
39
40
|
});
|
|
40
41
|
},
|
|
@@ -36,13 +36,12 @@ export function useFileList(dirPath, options) {
|
|
|
36
36
|
retryDelay: (attempt) => Math.min(1000 * Math.pow(2, attempt), 5000),
|
|
37
37
|
});
|
|
38
38
|
// Filter hidden files client-side so the cache stays complete.
|
|
39
|
-
// .kortix is always shown — it is the elevated system dir.
|
|
40
39
|
const data = useMemo(() => {
|
|
41
40
|
if (!query.data)
|
|
42
41
|
return query.data;
|
|
43
42
|
if (showHidden)
|
|
44
43
|
return query.data;
|
|
45
|
-
return query.data.filter((node) => !node.name.startsWith('.')
|
|
44
|
+
return query.data.filter((node) => !node.name.startsWith('.'));
|
|
46
45
|
}, [query.data, showHidden]);
|
|
47
46
|
return { ...query, data };
|
|
48
47
|
}
|
|
@@ -1,18 +1,69 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useRuntimeStore } from '@kortix/sdk/react';
|
|
2
|
+
import { binaryBlobKeys, useRuntimeStore } from '@kortix/sdk/react';
|
|
3
3
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
4
|
-
import {
|
|
4
|
+
import { clearMissingFileReadsUnder } from '../../../internal/files/file-read-retry.js';
|
|
5
|
+
import { copyFile, createFile, deleteFile, mkdirFile, renameFile, toDaemonPath, uploadFile, } from '../../../internal/files/runtime-files.js';
|
|
5
6
|
import { fileContentKeys } from './use-file-content.js';
|
|
6
7
|
import { fileListKeys } from './use-file-list.js';
|
|
7
8
|
import { gitStatusKeys } from './use-git-status.js';
|
|
8
9
|
// ---------------------------------------------------------------------------
|
|
10
|
+
// Written paths
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
/**
|
|
13
|
+
* A write brought `paths` into existence: forget the missing-file marks at and
|
|
14
|
+
* under them, then re-read the open viewers and previews of those paths.
|
|
15
|
+
*
|
|
16
|
+
* Without this, a path read before its write (the New file row's card reads
|
|
17
|
+
* the path before the create chain runs) kept its 404: the missing-file gate
|
|
18
|
+
* answered every refetch with "File not found" for 5 minutes (D-08). The
|
|
19
|
+
* marks clear first, so the invalidation below reaches the daemon. Only the
|
|
20
|
+
* written paths re-read: a 500-file upload must not re-read every open file
|
|
21
|
+
* 500 times.
|
|
22
|
+
*/
|
|
23
|
+
function settleWrittenPaths(queryClient, serverUrl, paths, options = {}) {
|
|
24
|
+
for (const path of paths)
|
|
25
|
+
clearMissingFileReadsUnder(serverUrl, path);
|
|
26
|
+
if (options.refetchContent === false || paths.length === 0)
|
|
27
|
+
return;
|
|
28
|
+
const written = paths.map(toDaemonPath);
|
|
29
|
+
const touches = (queryKey) => {
|
|
30
|
+
const keyPath = queryKey[3];
|
|
31
|
+
if (typeof keyPath !== 'string')
|
|
32
|
+
return false;
|
|
33
|
+
// Same runtime server only: the path on another box is another file.
|
|
34
|
+
if (typeof serverUrl === 'string' && typeof queryKey[2] === 'string' && queryKey[2] !== serverUrl)
|
|
35
|
+
return false;
|
|
36
|
+
const path = toDaemonPath(keyPath);
|
|
37
|
+
return written.some((w) => w === '' || path === w || path.startsWith(`${w}/`));
|
|
38
|
+
};
|
|
39
|
+
for (const root of [fileContentKeys.all, binaryBlobKeys.all]) {
|
|
40
|
+
const filters = { queryKey: root, predicate: (query) => touches(query.queryKey) };
|
|
41
|
+
// A read in flight began before the write: its 404 is stale. Cancel it
|
|
42
|
+
// first, or invalidation would reuse that request and still show "File
|
|
43
|
+
// not found" (a query with no data dedups onto its pending fetch).
|
|
44
|
+
void queryClient
|
|
45
|
+
.cancelQueries(filters)
|
|
46
|
+
.catch(() => undefined)
|
|
47
|
+
.then(() => queryClient.invalidateQueries(filters));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const joinUploadPath = (targetPath, name) => targetPath ? `${targetPath.replace(/\/+$/, '')}/${name}` : name;
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
9
52
|
// Upload
|
|
10
53
|
// ---------------------------------------------------------------------------
|
|
11
54
|
export function useFileUpload() {
|
|
12
55
|
const queryClient = useQueryClient();
|
|
56
|
+
const serverUrl = useRuntimeStore((s) => s.getActiveServerUrl());
|
|
13
57
|
return useMutation({
|
|
14
58
|
mutationFn: ({ file, targetPath }) => uploadFile(file, targetPath),
|
|
15
|
-
onSuccess: () => {
|
|
59
|
+
onSuccess: (results, { file, targetPath }) => {
|
|
60
|
+
// The requested path, plus the one the daemon reports (it suffixes a
|
|
61
|
+
// name that is taken).
|
|
62
|
+
const name = file.name;
|
|
63
|
+
const written = (results ?? []).map((r) => r.path).filter(Boolean);
|
|
64
|
+
if (name)
|
|
65
|
+
written.push(joinUploadPath(targetPath, name));
|
|
66
|
+
settleWrittenPaths(queryClient, serverUrl, written);
|
|
16
67
|
queryClient.invalidateQueries({ queryKey: fileListKeys.all });
|
|
17
68
|
queryClient.invalidateQueries({ queryKey: gitStatusKeys.all });
|
|
18
69
|
},
|
|
@@ -37,9 +88,12 @@ export function useFileDelete() {
|
|
|
37
88
|
// ---------------------------------------------------------------------------
|
|
38
89
|
export function useFileMkdir() {
|
|
39
90
|
const queryClient = useQueryClient();
|
|
91
|
+
const serverUrl = useRuntimeStore((s) => s.getActiveServerUrl());
|
|
40
92
|
return useMutation({
|
|
41
93
|
mutationFn: ({ dirPath }) => mkdirFile(dirPath),
|
|
42
|
-
onSuccess: () => {
|
|
94
|
+
onSuccess: (_ok, { dirPath }) => {
|
|
95
|
+
// A new folder holds no file yet: clear the marks, read nothing now.
|
|
96
|
+
settleWrittenPaths(queryClient, serverUrl, [dirPath], { refetchContent: false });
|
|
43
97
|
queryClient.invalidateQueries({ queryKey: fileListKeys.all });
|
|
44
98
|
queryClient.invalidateQueries({ queryKey: gitStatusKeys.all });
|
|
45
99
|
},
|
|
@@ -86,6 +140,11 @@ export function useFileRename() {
|
|
|
86
140
|
queryClient.setQueryData(ctx.queryKey, ctx.previousData);
|
|
87
141
|
}
|
|
88
142
|
},
|
|
143
|
+
onSuccess: (_ok, { to }) => {
|
|
144
|
+
// The target, and everything a moved folder carried, now exists. Its
|
|
145
|
+
// previews (images, PDFs) re-read; other open previews do not.
|
|
146
|
+
settleWrittenPaths(queryClient, serverUrl, [to]);
|
|
147
|
+
},
|
|
89
148
|
onSettled: () => {
|
|
90
149
|
// Always refetch to ensure consistency with server
|
|
91
150
|
queryClient.invalidateQueries({ queryKey: fileListKeys.all });
|
|
@@ -99,9 +158,11 @@ export function useFileRename() {
|
|
|
99
158
|
// ---------------------------------------------------------------------------
|
|
100
159
|
export function useFileCreate() {
|
|
101
160
|
const queryClient = useQueryClient();
|
|
161
|
+
const serverUrl = useRuntimeStore((s) => s.getActiveServerUrl());
|
|
102
162
|
return useMutation({
|
|
103
163
|
mutationFn: ({ filePath }) => createFile(filePath),
|
|
104
|
-
onSuccess: () => {
|
|
164
|
+
onSuccess: (results, { filePath }) => {
|
|
165
|
+
settleWrittenPaths(queryClient, serverUrl, [filePath, ...(results ?? []).map((r) => r.path).filter(Boolean)]);
|
|
105
166
|
queryClient.invalidateQueries({ queryKey: fileListKeys.all });
|
|
106
167
|
queryClient.invalidateQueries({ queryKey: gitStatusKeys.all });
|
|
107
168
|
},
|
|
@@ -112,9 +173,11 @@ export function useFileCreate() {
|
|
|
112
173
|
// ---------------------------------------------------------------------------
|
|
113
174
|
export function useFileCopy() {
|
|
114
175
|
const queryClient = useQueryClient();
|
|
176
|
+
const serverUrl = useRuntimeStore((s) => s.getActiveServerUrl());
|
|
115
177
|
return useMutation({
|
|
116
178
|
mutationFn: ({ sourcePath, destPath }) => copyFile(sourcePath, destPath),
|
|
117
|
-
onSuccess: () => {
|
|
179
|
+
onSuccess: (results, { destPath }) => {
|
|
180
|
+
settleWrittenPaths(queryClient, serverUrl, [destPath, ...(results ?? []).map((r) => r.path).filter(Boolean)]);
|
|
118
181
|
queryClient.invalidateQueries({ queryKey: fileListKeys.all });
|
|
119
182
|
queryClient.invalidateQueries({ queryKey: gitStatusKeys.all });
|
|
120
183
|
},
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
* so renderers that read their own bytes (xlsx, sqlite, the HTML frame)
|
|
9
9
|
* remount — a user who pressed Refresh asked for a reload, even of bytes that
|
|
10
10
|
* look the same.
|
|
11
|
+
*
|
|
12
|
+
* Refresh always reads. The missing-file gate answers a refetch of a fresh
|
|
13
|
+
* 404 without a request, so the mark clears first: a file created from a
|
|
14
|
+
* terminal after a 404 shows on the next Refresh (P-F08).
|
|
11
15
|
*/
|
|
12
16
|
export declare function useFileRefresh(filePath: string | null | undefined): {
|
|
13
17
|
refresh: () => void;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { binaryBlobKeys, fileContentKeys, useRuntimeStore } from '@kortix/sdk/react';
|
|
3
3
|
import { useQueryClient } from '@tanstack/react-query';
|
|
4
4
|
import { useCallback, useState } from 'react';
|
|
5
|
+
import { clearMissingFileReadsUnder } from '../../../internal/files/file-read-retry.js';
|
|
5
6
|
/**
|
|
6
7
|
* The viewer's manual Refresh — the safety net under the automatic one.
|
|
7
8
|
*
|
|
@@ -12,6 +13,10 @@ import { useCallback, useState } from 'react';
|
|
|
12
13
|
* so renderers that read their own bytes (xlsx, sqlite, the HTML frame)
|
|
13
14
|
* remount — a user who pressed Refresh asked for a reload, even of bytes that
|
|
14
15
|
* look the same.
|
|
16
|
+
*
|
|
17
|
+
* Refresh always reads. The missing-file gate answers a refetch of a fresh
|
|
18
|
+
* 404 without a request, so the mark clears first: a file created from a
|
|
19
|
+
* terminal after a 404 shows on the next Refresh (P-F08).
|
|
15
20
|
*/
|
|
16
21
|
export function useFileRefresh(filePath) {
|
|
17
22
|
const queryClient = useQueryClient();
|
|
@@ -23,6 +28,7 @@ export function useFileRefresh(filePath) {
|
|
|
23
28
|
return;
|
|
24
29
|
setRefreshing(true);
|
|
25
30
|
setReloadKey((n) => n + 1);
|
|
31
|
+
clearMissingFileReadsUnder(serverUrl, filePath);
|
|
26
32
|
void Promise.all([
|
|
27
33
|
queryClient.invalidateQueries({ queryKey: fileContentKeys.file(serverUrl, filePath) }),
|
|
28
34
|
queryClient.invalidateQueries({ queryKey: binaryBlobKeys.file(serverUrl, filePath) }),
|
|
@@ -153,10 +153,7 @@ export function FileTreeItem({ node, onClick, onDownload, onRename, onDelete, on
|
|
|
153
153
|
confirmRename();
|
|
154
154
|
else
|
|
155
155
|
cancelRename();
|
|
156
|
-
}, className: cn('bg-card focus:ring-primary/50 selection:bg-primary/15 selection:text-foreground h-7 w-full rounded-2xl border px-3 text-sm outline-none focus:ring-2', nameConflict && 'border-destructive focus:ring-destructive/30') }), nameConflict && (_jsx("p", { className: "text-destructive text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsFileTreeItem.line229JsxTextAFileOrFolderWithThatNameAlready') }))] })] })) : (_jsxs("button", { draggable: !isRenaming, onDragStart: handleDragStart, onDragEnd: handleDragEnd, onDragOver: handleDragOver, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: onClick, className: cn('flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm transition-colors', 'hover:bg-muted/80', node.ignored && 'opacity-50', isCut && 'opacity-40', isDragging && 'opacity-30', isDragOver && 'bg-primary/15 ring-primary/40 ring-1'), children: [getNodeIcon(node), _jsx("span", { className: cn('flex-1 truncate', gitStatus && gitStatusTextColor[gitStatus], !gitStatus &&
|
|
157
|
-
node.name.startsWith('.') &&
|
|
158
|
-
node.name !== '.kortix' &&
|
|
159
|
-
'opacity-50'), children: node.name }), (gitStatus ||
|
|
156
|
+
}, className: cn('bg-card focus:ring-primary/50 selection:bg-primary/15 selection:text-foreground h-7 w-full rounded-2xl border px-3 text-sm outline-none focus:ring-2', nameConflict && 'border-destructive focus:ring-destructive/30') }), nameConflict && (_jsx("p", { className: "text-destructive text-xs", children: tHardcodedUi.raw('featuresProjectFilesComponentsFileTreeItem.line229JsxTextAFileOrFolderWithThatNameAlready') }))] })] })) : (_jsxs("button", { draggable: !isRenaming, onDragStart: handleDragStart, onDragEnd: handleDragEnd, onDragOver: handleDragOver, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: onClick, className: cn('flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm transition-colors', 'hover:bg-muted/80', node.ignored && 'opacity-50', isCut && 'opacity-40', isDragging && 'opacity-30', isDragOver && 'bg-primary/15 ring-primary/40 ring-1'), children: [getNodeIcon(node), _jsx("span", { className: cn('flex-1 truncate', gitStatus && gitStatusTextColor[gitStatus], !gitStatus && node.name.startsWith('.') && 'opacity-50'), children: node.name }), (gitStatus ||
|
|
160
157
|
(diagnosticCounts && (diagnosticCounts.errors > 0 || diagnosticCounts.warnings > 0))) && (_jsxs("span", { className: "inline-flex shrink-0 items-center gap-1.5", children: [diagnosticCounts && diagnosticCounts.errors > 0 && (_jsxs("span", { className: "text-destructive inline-flex items-center gap-0.5", children: [_jsx(CircleAlert, { className: "h-3 w-3" }), _jsx("span", { className: "text-xs leading-none font-semibold", children: diagnosticCounts.errors })] })), diagnosticCounts && diagnosticCounts.warnings > 0 && (_jsxs("span", { className: "inline-flex items-center gap-0.5 text-yellow-500", children: [_jsx(AlertTriangle, { className: "h-3 w-3" }), _jsx("span", { className: "text-xs leading-none font-semibold", children: diagnosticCounts.warnings })] })), gitStatus && (_jsx("span", { className: cn('text-xs leading-none font-semibold', gitStatusBadgeColor[gitStatus]), children: gitStatusLabel[gitStatus] }))] })), node.type === 'directory' && (_jsx(ChevronRight, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }))] }));
|
|
161
158
|
if (!hasContextMenu) {
|
|
162
159
|
return content;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostics a surface knows about a file that the LSP store does not: the
|
|
3
|
+
* repository view passes the server's `kortix.yaml` issues here, so the open
|
|
4
|
+
* manifest marks the flagged line and its card carries a warning mark.
|
|
5
|
+
*
|
|
6
|
+
* Outside a provider every file has none, so the viewer, its thumbnails and
|
|
7
|
+
* every other surface render exactly as before.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactNode } from 'react';
|
|
10
|
+
import type { LspDiagnostic } from '../../internal/stores/diagnostics-store.js';
|
|
11
|
+
type DiagnosticsFor = (filePath: string) => LspDiagnostic[];
|
|
12
|
+
export declare function FileAnnotationsProvider({ diagnosticsFor, children, }: {
|
|
13
|
+
diagnosticsFor: DiagnosticsFor;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** The surface's diagnostics for one file. Stable while the provider and path are. */
|
|
17
|
+
export declare function useFileAnnotations(filePath: string | null | undefined): LspDiagnostic[];
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Diagnostics a surface knows about a file that the LSP store does not: the
|
|
5
|
+
* repository view passes the server's `kortix.yaml` issues here, so the open
|
|
6
|
+
* manifest marks the flagged line and its card carries a warning mark.
|
|
7
|
+
*
|
|
8
|
+
* Outside a provider every file has none, so the viewer, its thumbnails and
|
|
9
|
+
* every other surface render exactly as before.
|
|
10
|
+
*/
|
|
11
|
+
import { createContext, useContext, useMemo } from 'react';
|
|
12
|
+
const NONE = [];
|
|
13
|
+
const FileAnnotationsContext = createContext(() => NONE);
|
|
14
|
+
export function FileAnnotationsProvider({ diagnosticsFor, children, }) {
|
|
15
|
+
return _jsx(FileAnnotationsContext.Provider, { value: diagnosticsFor, children: children });
|
|
16
|
+
}
|
|
17
|
+
/** The surface's diagnostics for one file. Stable while the provider and path are. */
|
|
18
|
+
export function useFileAnnotations(filePath) {
|
|
19
|
+
const diagnosticsFor = useContext(FileAnnotationsContext);
|
|
20
|
+
return useMemo(() => (filePath ? diagnosticsFor(filePath) : NONE), [diagnosticsFor, filePath]);
|
|
21
|
+
}
|
|
@@ -13,7 +13,7 @@ import { cn } from '../../lib/utils.js';
|
|
|
13
13
|
import { toSandboxAbsolutePath } from '@kortix/sdk';
|
|
14
14
|
import { GitDiffIcon as FileDiff, FileXIcon as FileWarning, FileXIcon as FileX, } from '@phosphor-icons/react';
|
|
15
15
|
import { lazy, Suspense, useCallback, useMemo, useState } from 'react';
|
|
16
|
-
import { useReducedMotion } from 'motion
|
|
16
|
+
import { useReducedMotion } from '../../internal/hooks/use-reduced-motion.js';
|
|
17
17
|
import { Disclosure, DisclosureContent } from '../../primitives/disclosure.js';
|
|
18
18
|
// Direct module import, not the feature barrel: the barrel re-exports THIS file.
|
|
19
19
|
import { HtmlPreview } from './html-preview.js';
|
|
@@ -37,6 +37,7 @@ import { CodeSimpleIcon as Code2, EyeIcon as Eye } from '@phosphor-icons/react';
|
|
|
37
37
|
import { useEffect, useState } from 'react';
|
|
38
38
|
import { CloseButton, DetailSidebarToggle } from './viewer-chrome.js';
|
|
39
39
|
import { PanelWidthButton, RefreshButton, ViewerActions, ViewerDownloadAction, ViewerPathPill, fileShareInput, } from './viewer-actions.js';
|
|
40
|
+
import { SESSION_BAR_CLASS } from '../../internal/layout/panel-chrome.js';
|
|
40
41
|
function extensionOf(fileName) {
|
|
41
42
|
const dot = fileName.lastIndexOf('.');
|
|
42
43
|
return dot >= 0 ? fileName.slice(dot + 1).toLowerCase() : '';
|
|
@@ -86,7 +87,7 @@ export function FileViewer({ content, fileName, path, shareContext, onClose, ref
|
|
|
86
87
|
const renders = html || svg || mermaid;
|
|
87
88
|
const [view, setView] = useState('preview');
|
|
88
89
|
const isMobile = useIsMobile();
|
|
89
|
-
return (_jsxs("div", { className: cn('flex h-full min-h-0 min-w-0 flex-col', className), children: [_jsxs("div", { className:
|
|
90
|
+
return (_jsxs("div", { className: cn('flex h-full min-h-0 min-w-0 flex-col', className), children: [_jsxs("div", { className: cn(SESSION_BAR_CLASS, 'gap-1 px-2.5'), children: [_jsx(DetailSidebarToggle, { className: "size-7" }), _jsxs(ViewerPathPill, { icon: renders ? (_jsxs("span", { role: "radiogroup", className: "flex items-center gap-px", children: [_jsx(ViewSwitchButton, { active: view === 'preview', label: tI18nComplete.raw('text324b134f57c7'), onSelect: () => setView('preview'), children: _jsx(Eye, { className: "size-3.5" }) }), _jsx(ViewSwitchButton, { active: view === 'source', label: tI18nComplete.raw('text0e570ca6fabe'), onSelect: () => setView('source'), children: _jsx(Code2, { className: "size-3.5" }) })] })) : (getFileIcon(fileName, { className: 'size-4', variant: 'monochrome' })), path: path, fileName: fileName, children: [refresh && (_jsx(RefreshButton, { onRefresh: refresh.onRefresh, refreshing: refresh.refreshing })), _jsx(ViewerActions, { copy: {
|
|
90
91
|
run: () => navigator.clipboard.writeText(content),
|
|
91
92
|
ariaLabel: tI18nComplete.raw('textb3278e5f53cc'),
|
|
92
93
|
}, shareContext: shareContext, shareInput: fileShareInput(path, fileName) })] }), _jsxs(ButtonGroup, { className: "shrink-0 *:size-8", children: [markdown && (_jsx(SaveAsPdfButton, { variant: "secondary", fileName: fileName, content: content, iconClassName: "size-3.5" })), _jsx(ViewerDownloadAction, { download: path ? { path, fileName } : undefined }), _jsx(PanelWidthButton, { isMobile: isMobile }), onClose && _jsx(CloseButton, { onClose: onClose })] })] }), _jsx("div", { className: cn('min-h-0 min-w-0 flex-1', renders && view === 'preview' ? 'overflow-hidden' : 'overflow-auto'), children: _jsx(FileBody, { content: content, fileName: fileName, path: path, html: html, svg: svg, mermaid: mermaid, markdown: markdown, view: view, reloadKey: reloadKey, onShowSource: () => setView('source') }) })] }));
|
|
@@ -10,6 +10,7 @@ export type { FileContentRendererProps } from './file-content-renderer.js';
|
|
|
10
10
|
export { FilePreviewModal } from './file-preview-modal.js';
|
|
11
11
|
export type { FilePreviewModalProps, FilePreviewState } from './file-preview-modal.js';
|
|
12
12
|
export { FileSourceProvider, useFileSource } from './file-source.js';
|
|
13
|
+
export { FileAnnotationsProvider, useFileAnnotations } from './file-annotations.js';
|
|
13
14
|
export type { BinaryBlobResult, FileContent, FileContentResult, FilePatch, FilePatchHunk, FileSource, } from './file-source.js';
|
|
14
15
|
export { HTML_PREVIEW_IFRAME_CLASS, HtmlPreview } from './html-preview.js';
|
|
15
16
|
export { PreviewFitProvider, isUsableIntrinsicSize } from './preview-fit.js';
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export { FileContentRenderer } from './file-content-renderer.js';
|
|
9
9
|
export { FilePreviewModal } from './file-preview-modal.js';
|
|
10
10
|
export { FileSourceProvider, useFileSource } from './file-source.js';
|
|
11
|
+
export { FileAnnotationsProvider, useFileAnnotations } from './file-annotations.js';
|
|
11
12
|
export { HTML_PREVIEW_IFRAME_CLASS, HtmlPreview } from './html-preview.js';
|
|
12
13
|
export { PreviewFitProvider, isUsableIntrinsicSize } from './preview-fit.js';
|
|
13
14
|
export { SaveAsPdfButton } from './save-as-pdf-button.js';
|
|
@@ -8,6 +8,7 @@ import { isRuntimeStartingError } from '@kortix/sdk';
|
|
|
8
8
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
import { useFileSource } from './file-source.js';
|
|
10
10
|
import { useFileCaption } from '../../internal/stores/file-preview-store.js';
|
|
11
|
+
import { useFileAnnotations } from './file-annotations.js';
|
|
11
12
|
import { getFileCategory, getLanguageFromExt } from './preview-policy.js';
|
|
12
13
|
import { usePreviewFit } from './preview-fit.js';
|
|
13
14
|
import { useContentRevision } from './use-content-revision.js';
|
|
@@ -127,7 +128,13 @@ export function useFileContentState({ filePath, onUnsavedChange, onSaved, readOn
|
|
|
127
128
|
// LSP diagnostics for this file from the global diagnostics store
|
|
128
129
|
// Uses suffix-matching because LSP stores absolute paths but we use relative paths
|
|
129
130
|
const diagByFile = useDiagnosticsStore((s) => s.byFile);
|
|
130
|
-
|
|
131
|
+
// Plus what the surface knows about this file (`FileAnnotationsProvider`):
|
|
132
|
+
// the repository view's kortix.yaml issues.
|
|
133
|
+
const annotations = useFileAnnotations(filePath);
|
|
134
|
+
const fileDiagnostics = useMemo(() => {
|
|
135
|
+
const lsp = findDiagnosticsForFile(diagByFile, filePath);
|
|
136
|
+
return annotations.length > 0 ? [...(lsp ?? []), ...annotations] : lsp;
|
|
137
|
+
}, [diagByFile, filePath, annotations]);
|
|
131
138
|
const fileDiagErrorCount = useMemo(() => fileDiagnostics?.filter((d) => d.severity === 1).length ?? 0, [fileDiagnostics]);
|
|
132
139
|
const fileDiagWarningCount = useMemo(() => fileDiagnostics?.filter((d) => d.severity === 2).length ?? 0, [fileDiagnostics]);
|
|
133
140
|
// Binary blob for DOCX, video, audio, PPTX, XLSX — AND HEIC images.
|