@kortix/ui 0.14.17 → 0.15.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/README.md +3 -3
- package/dist/_vendor/kortix-shared.js +993 -74
- package/dist/_vendor/shared/artifact-annotations.d.ts +85 -607
- package/dist/_vendor/shared/artifact-comments.d.ts +53 -489
- package/dist/_vendor/shared/channel-descriptors.d.ts +20 -1
- package/dist/_vendor/shared/channel-message.d.ts +1 -1
- package/dist/_vendor/shared/index.d.ts +0 -1
- package/dist/_vendor/shared/my-kortix-agent.d.ts +1 -1
- package/dist/_vendor/shared/peer-message-prompt.d.ts +7 -1
- package/dist/_vendor/shared/project-glyphs.d.ts +103 -20
- package/dist/_vendor/shared/space-slug.d.ts +3 -4
- package/dist/_vendor/shared/utils/ambiguous-write.d.ts +3 -3
- package/dist/_vendor/shared/webhook-signing.d.ts +3 -1
- package/dist/access/access/access-dialog-share.d.ts +3 -28
- package/dist/access/access/access-dialog-share.js +3 -75
- package/dist/artifacts/artifact-frame.js +26 -2
- package/dist/artifacts/artifact-session.js +6 -2
- package/dist/artifacts/frame-policy.d.ts +2 -9
- package/dist/artifacts/frame-policy.js +2 -25
- package/dist/customize/agents/agent-instructions.d.ts +8 -0
- package/dist/customize/agents/agent-instructions.js +38 -12
- package/dist/customize/agents/agent-overview.d.ts +6 -3
- package/dist/customize/agents/agent-overview.js +8 -2
- package/dist/customize/agents/agent-page-chrome.d.ts +45 -27
- package/dist/customize/agents/agent-page-chrome.js +60 -37
- package/dist/customize/agents/agent-page.js +88 -99
- package/dist/customize/agents/agent-tabs.d.ts +15 -14
- package/dist/customize/agents/agent-tabs.js +19 -16
- package/dist/customize/agents/agents-page.js +9 -7
- package/dist/customize/agents/create-agent-modal.js +1 -1
- package/dist/customize/connectors/connector-filter.d.ts +2 -1
- package/dist/customize/connectors/connector-filter.js +2 -3
- package/dist/customize/connectors/connectors-page.js +15 -24
- package/dist/customize/connectors/detail/account-info.js +1 -1
- package/dist/customize/connectors/detail/connector-status.d.ts +3 -24
- package/dist/customize/connectors/detail/connector-status.js +2 -42
- package/dist/customize/connectors/detail/use-connector-detail.d.ts +2 -6
- package/dist/customize/connectors/detail/use-connector-detail.js +3 -13
- package/dist/customize/connectors/install/install.d.ts +2 -6
- package/dist/customize/connectors/install/install.js +2 -16
- package/dist/customize/connectors/provider-label.d.ts +4 -17
- package/dist/customize/connectors/provider-label.js +4 -37
- package/dist/customize/project-settings/project-admin-sections.d.ts +6 -2
- package/dist/customize/project-settings/project-admin-sections.js +5 -3
- package/dist/customize/project-settings/project-settings-sections.js +1 -1
- package/dist/customize/providers/provider-connect.d.ts +6 -15
- package/dist/customize/providers/provider-connect.js +5 -36
- package/dist/customize/sections/component/channel-access-panel.js +16 -0
- package/dist/customize/sections/component/channel-mocks.d.ts +5 -0
- package/dist/customize/sections/component/channel-mocks.js +14 -2
- package/dist/customize/sections/component/discord-channel-row.d.ts +6 -0
- package/dist/customize/sections/component/discord-channel-row.js +48 -0
- package/dist/customize/sections/connector-connection-form.d.ts +3 -7
- package/dist/customize/sections/connector-connection-form.js +2 -33
- package/dist/customize/sections/connector-oauth2-auto.d.ts +3 -33
- package/dist/customize/sections/connector-oauth2-auto.js +2 -64
- package/dist/customize/sections/gateway-access-tab.js +1 -1
- package/dist/customize/sections/gateway-view.d.ts +6 -5
- package/dist/customize/sections/gateway-view.js +31 -13
- package/dist/customize/sections/llm-provider/constants.d.ts +1 -2
- package/dist/customize/sections/llm-provider/constants.js +1 -2
- package/dist/customize/sections/llm-provider/utils.d.ts +1 -41
- package/dist/customize/sections/llm-provider/utils.js +1 -52
- package/dist/customize/sections/view/account-secret-resources-panel.js +4 -1
- package/dist/customize/sections/view/agent-editor-catalog.js +0 -5
- package/dist/customize/sections/view/channel-settings-patch.js +1 -1
- package/dist/customize/sections/view/channels-view.js +26 -9
- package/dist/customize/sections/view/connector-connections.d.ts +5 -85
- package/dist/customize/sections/view/connector-connections.js +5 -99
- package/dist/customize/sections/view/gateway/gateway-logs.d.ts +42 -3
- package/dist/customize/sections/view/gateway/gateway-logs.js +212 -15
- package/dist/customize/sections/view/gateway/gateway-overview.js +1 -1
- package/dist/customize/sections/view/gateway/gateway-routing.d.ts +3 -3
- package/dist/customize/sections/view/gateway/gateway-routing.js +81 -200
- package/dist/customize/sections/view/gateway/routing-parts.d.ts +101 -0
- package/dist/customize/sections/view/gateway/routing-parts.js +154 -0
- package/dist/customize/sections/view/gateway/routing-sentence-layout.d.ts +2 -0
- package/dist/customize/sections/view/gateway/routing-sentence-layout.js +82 -0
- package/dist/customize/sections/view/git-view.js +2 -2
- package/dist/customize/sections/view/review-center-connected.js +17 -15
- package/dist/customize/sections/view/review-view.d.ts +7 -0
- package/dist/customize/sections/view/review-view.js +11 -0
- package/dist/customize/sections/view/secret-delivery.js +2 -2
- package/dist/customize/sections/view/secrets-view.js +1 -1
- package/dist/customize/sections/view/subscription-usage-tab.d.ts +14 -0
- package/dist/customize/sections/view/subscription-usage-tab.js +122 -0
- package/dist/customize/sections/view/subscription-usage.d.ts +34 -0
- package/dist/customize/sections/view/subscription-usage.js +98 -0
- package/dist/customize/settings/rail.js +2 -2
- package/dist/customize/settings/tabs/experimental-tab.d.ts +2 -2
- package/dist/customize/settings/tabs/experimental-tab.js +5 -5
- package/dist/customize/settings/tabs/general-tab.js +70 -14
- package/dist/customize/shared/capability-library.js +19 -22
- package/dist/customize/shared/catalog/catalog-card.d.ts +9 -4
- package/dist/customize/shared/catalog/catalog-card.js +3 -3
- package/dist/customize/shared/channels-switch-dialog.d.ts +1 -1
- package/dist/customize/shared/channels-switch-dialog.js +1 -1
- package/dist/customize/shared/customize-tab-bar.d.ts +1 -2
- package/dist/customize/shared/customize-tab-bar.js +10 -11
- package/dist/customize/shared/feature-gate-screen.js +1 -1
- package/dist/customize/triggers/schedule/post-to-field.d.ts +1 -1
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +1 -1
- package/dist/files/drives/conflict-marks.d.ts +28 -0
- package/dist/files/drives/conflict-marks.js +39 -0
- package/dist/files/drives/session-drives-chip.js +15 -10
- package/dist/files/project/components/drive-create-dialog.js +3 -3
- package/dist/files/viewer/index.d.ts +1 -1
- package/dist/files/viewer/index.js +1 -1
- package/dist/i18n/en.d.ts +502 -207
- package/dist/i18n/en.js +608 -313
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/account-hub/sections.d.ts +1 -1
- package/dist/internal/branding/branding-provider.d.ts +15 -4
- package/dist/internal/branding/branding-provider.js +12 -7
- package/dist/internal/capture/use-capture-area.d.ts +5 -1
- package/dist/internal/capture/use-capture-area.js +16 -9
- package/dist/internal/connector-logo/connector-logo.js +2 -0
- package/dist/internal/connector-logo/connector-mark-files.js +1 -0
- package/dist/internal/goals/goal-meta.d.ts +50 -3
- package/dist/internal/goals/goal-meta.js +144 -9
- package/dist/internal/hooks/channels/use-channels-installations.d.ts +7 -2
- package/dist/internal/hooks/channels/use-channels-installations.js +31 -1
- package/dist/internal/hooks/connectors/use-add-account.d.ts +3 -9
- package/dist/internal/hooks/connectors/use-add-account.js +3 -18
- package/dist/internal/hooks/connectors/use-connect-link.d.ts +3 -2
- package/dist/internal/hooks/connectors/use-connect-link.js +15 -24
- package/dist/internal/hooks/connectors/use-pipedream-connect-project.d.ts +3 -56
- package/dist/internal/hooks/connectors/use-pipedream-connect-project.js +3 -87
- package/dist/internal/hooks/projects/use-new-project-session.d.ts +9 -16
- package/dist/internal/hooks/projects/use-new-project-session.js +16 -100
- package/dist/internal/hooks/projects/use-project-can-run.d.ts +7 -0
- package/dist/internal/hooks/projects/use-project-can-run.js +12 -5
- package/dist/internal/hooks/projects/use-restart-project-session.d.ts +0 -1
- package/dist/internal/hooks/projects/use-restart-project-session.js +0 -1
- package/dist/internal/hooks/use-notification-center.d.ts +11 -8
- package/dist/internal/hooks/use-notification-center.js +22 -10
- package/dist/internal/icons/discord.d.ts +9 -0
- package/dist/internal/icons/discord.js +9 -0
- package/dist/internal/layout/connect-mcp-modal.js +1 -1
- package/dist/internal/layout/project-capability-nav.js +6 -2
- package/dist/internal/layout/project-page-header.d.ts +3 -1
- package/dist/internal/layout/project-page-header.js +2 -2
- package/dist/internal/lib/account-secret-access.d.ts +1 -41
- package/dist/internal/lib/account-secret-access.js +3 -46
- package/dist/internal/lib/browser-error-noise.d.ts +1 -1
- package/dist/internal/lib/browser-error-noise.js +1 -1
- package/dist/internal/lib/browser-noise/rules/expected-states.d.ts +2 -15
- package/dist/internal/lib/browser-noise/rules/expected-states.js +6 -56
- package/dist/internal/lib/capability-tab-routes.d.ts +3 -3
- package/dist/internal/lib/capability-tab-routes.js +11 -3
- package/dist/internal/lib/error-handler.js +1 -1
- package/dist/internal/lib/llm-providers.d.ts +4 -110
- package/dist/internal/lib/llm-providers.js +5 -102
- package/dist/internal/lib/navigation/message-link.d.ts +32 -0
- package/dist/internal/lib/navigation/message-link.js +51 -0
- package/dist/internal/lib/navigation/session-href.d.ts +11 -0
- package/dist/internal/lib/navigation/session-href.js +20 -0
- package/dist/internal/lib/navigation/session-spawn-urls.d.ts +17 -0
- package/dist/internal/lib/navigation/session-spawn-urls.js +26 -0
- package/dist/internal/lib/space-scope.d.ts +3 -3
- package/dist/internal/lib/space-scope.js +3 -3
- package/dist/internal/lib/use-project-feature-flags.js +11 -9
- package/dist/internal/lib/web-notifications.d.ts +1 -1
- package/dist/internal/lib/web-notifications.js +0 -3
- package/dist/internal/notifications/notification-bell.js +1 -3
- package/dist/internal/notifications/notification-rows.d.ts +2 -2
- package/dist/internal/notifications/notification-rows.js +2 -3
- package/dist/internal/session-types/index.d.ts +5 -7
- package/dist/internal/session-types/index.js +5 -7
- package/dist/internal/stores/active-space-store.d.ts +1 -1
- package/dist/internal/stores/active-space-store.js +1 -1
- package/dist/internal/stores/kortix-computer-store.d.ts +15 -0
- package/dist/internal/stores/kortix-computer-store.js +12 -0
- package/dist/lib/routes.d.ts +17 -7
- package/dist/lib/routes.js +18 -2
- package/dist/markdown/app-link-icons.d.ts +7 -0
- package/dist/markdown/app-link-icons.js +20 -0
- package/dist/markdown/app-links.d.ts +9 -0
- package/dist/markdown/app-links.js +112 -0
- package/dist/markdown/doc-editor/doc-attrs.d.ts +28 -0
- package/dist/markdown/doc-editor/doc-attrs.js +156 -0
- package/dist/markdown/doc-editor/doc-embed.d.ts +6 -0
- package/dist/markdown/doc-editor/doc-embed.js +26 -8
- package/dist/markdown/doc-editor/doc-extensions.d.ts +10 -0
- package/dist/markdown/doc-editor/doc-extensions.js +55 -8
- package/dist/markdown/doc-editor/doc-fidelity.d.ts +72 -0
- package/dist/markdown/doc-editor/doc-fidelity.js +135 -0
- package/dist/markdown/doc-editor/doc-node-view.d.ts +9 -0
- package/dist/markdown/doc-editor/doc-node-view.js +29 -0
- package/dist/markdown/doc-editor/markdown.d.ts +20 -0
- package/dist/markdown/doc-editor/markdown.js +455 -18
- package/dist/markdown/markdown-frontmatter.d.ts +0 -3
- package/dist/markdown/markdown-frontmatter.js +45 -5
- package/dist/markdown/unified-markdown.d.ts +1 -1
- package/dist/markdown/unified-markdown.js +129 -10
- package/dist/primitives/emoji-picker.js +16 -100
- package/dist/primitives/emoji-tint.js +12 -12
- package/dist/primitives/entity-avatar.js +14 -9
- package/dist/primitives/glyph-face.d.ts +19 -12
- package/dist/primitives/glyph-face.js +59 -20
- package/dist/primitives/glyph-paths-source.d.ts +7 -0
- package/dist/primitives/glyph-paths-source.js +14 -6
- package/dist/primitives/glyph-paths.generated.d.ts +1 -1
- package/dist/primitives/glyph-paths.generated.js +947 -204
- package/dist/primitives/glyph-picker.d.ts +6 -10
- package/dist/primitives/glyph-picker.js +147 -98
- package/dist/primitives/glyph-registry.js +1604 -1
- package/dist/primitives/glyph-tint.d.ts +28 -3
- package/dist/primitives/glyph-tint.js +41 -83
- package/dist/primitives/kortix-glyphs.d.ts +32 -0
- package/dist/primitives/kortix-glyphs.js +157 -0
- package/dist/primitives/project-icon-picker.d.ts +8 -1
- package/dist/primitives/project-icon-picker.js +13 -5
- package/dist/primitives/user-avatar.d.ts +8 -1
- package/dist/primitives/user-avatar.js +2 -2
- package/dist/providers/ui-provider.d.ts +1 -8
- package/dist/session/actions/project-session-list-helpers.d.ts +4 -14
- package/dist/session/actions/project-session-list-helpers.js +6 -17
- package/dist/session/actions/session-label.d.ts +5 -9
- package/dist/session/actions/session-label.js +6 -10
- package/dist/session/agents/agent-model.js +4 -0
- package/dist/session/agents/agent-state-mark.d.ts +12 -7
- package/dist/session/agents/agent-state-mark.js +37 -15
- package/dist/session/agents/agent-strip.js +8 -2
- package/dist/session/agents/agent-surface.d.ts +81 -0
- package/dist/session/agents/agent-surface.js +97 -0
- package/dist/session/agents/held-messages.js +7 -4
- package/dist/session/agents/legacy-subagent-chat.js +1 -1
- package/dist/session/agents/session-peek.js +24 -12
- package/dist/session/agents/steer-session.d.ts +2 -0
- package/dist/session/agents/steer-session.js +3 -2
- package/dist/session/agents/subagent-dialog-content.d.ts +30 -1
- package/dist/session/agents/subagent-dialog-content.js +147 -33
- package/dist/session/agents/subagent-view.d.ts +15 -5
- package/dist/session/agents/subagent-view.js +28 -6
- package/dist/session/agents/tasks-panel.js +2 -12
- package/dist/session/agents/workflow-run-controls.d.ts +3 -1
- package/dist/session/agents/workflow-run-controls.js +12 -7
- package/dist/session/composer/ComposerCard.d.ts +7 -1
- package/dist/session/composer/ComposerCard.js +74 -9
- package/dist/session/composer/agent-selector.d.ts +16 -0
- package/dist/session/composer/agent-selector.js +19 -11
- package/dist/session/composer/chat-input/chat-input-control.d.ts +64 -0
- package/dist/session/composer/chat-input/chat-input-control.js +578 -0
- package/dist/session/composer/chat-input/chat-input-overrides.d.ts +76 -0
- package/dist/session/composer/chat-input/chat-input-overrides.js +40 -0
- package/dist/session/composer/chat-input/chat-input-panes.d.ts +56 -0
- package/dist/session/composer/chat-input/chat-input-panes.js +148 -0
- package/dist/session/composer/chat-input/chat-input-summary.d.ts +67 -0
- package/dist/session/composer/chat-input/chat-input-summary.js +67 -0
- package/dist/session/composer/chat-queue-lines.d.ts +20 -0
- package/dist/session/composer/chat-queue-lines.js +20 -0
- package/dist/session/composer/composer-chat-input.d.ts +8 -1
- package/dist/session/composer/composer-chat-input.js +12 -4
- package/dist/session/composer/composer-focus-context.d.ts +7 -0
- package/dist/session/composer/composer-focus-context.js +9 -0
- package/dist/session/composer/composer-toolbar.d.ts +3 -1
- package/dist/session/composer/composer-toolbar.js +3 -3
- package/dist/session/composer/composer-underbar.d.ts +10 -1
- package/dist/session/composer/composer-underbar.js +10 -2
- package/dist/session/composer/composer.d.ts +12 -0
- package/dist/session/composer/composer.js +55 -1
- package/dist/session/composer/editor/composer-editor.d.ts +10 -2
- package/dist/session/composer/editor/composer-editor.js +22 -6
- package/dist/session/composer/editor/first-visual-line.d.ts +2 -0
- package/dist/session/composer/editor/first-visual-line.js +9 -0
- package/dist/session/composer/editor/mention-node.js +2 -0
- package/dist/session/composer/editor/serialize.js +9 -1
- package/dist/session/composer/hooks/use-file-search.d.ts +1 -1
- package/dist/session/composer/hooks/use-file-search.js +1 -1
- package/dist/session/composer/menus/mention-controller.d.ts +3 -11
- package/dist/session/composer/menus/mention-controller.js +56 -16
- package/dist/session/composer/menus/mention-menu.d.ts +7 -2
- package/dist/session/composer/menus/mention-menu.js +17 -9
- package/dist/session/composer/menus/menu-items.d.ts +9 -0
- package/dist/session/composer/menus/space-mentions.d.ts +48 -0
- package/dist/session/composer/menus/space-mentions.js +83 -0
- package/dist/session/composer/prompt-history.d.ts +9 -0
- package/dist/session/composer/prompt-history.js +45 -0
- package/dist/session/composer/queue-projection.d.ts +2 -0
- package/dist/session/composer/queue-projection.js +1 -0
- package/dist/session/composer/queued-prompt-list.js +53 -4
- package/dist/session/composer/reasoning-effort-selector.d.ts +20 -0
- package/dist/session/composer/reasoning-effort-selector.js +3 -3
- package/dist/session/composer/types.d.ts +2 -1
- package/dist/session/header/session-site-header.js +7 -3
- package/dist/session/header/subagent-hover-card.d.ts +7 -4
- package/dist/session/header/subagent-hover-card.js +62 -11
- package/dist/session/list/session-status-mark.d.ts +42 -0
- package/dist/{workspace/sidebar → session/list}/session-status-mark.js +37 -2
- package/dist/session/models/model-selector.d.ts +7 -2
- package/dist/session/models/model-selector.js +39 -31
- package/dist/session/overrides/provider-secret-pool-editor.d.ts +11 -0
- package/dist/session/overrides/provider-secret-pool-editor.js +17 -0
- package/dist/session/overrides/session-overrides-control.d.ts +5 -0
- package/dist/session/overrides/session-overrides-toolbar.js +147 -7
- package/dist/session/panel/model-switch-event.d.ts +8 -0
- package/dist/session/panel/model-switch-event.js +19 -0
- package/dist/session/panel/session-audit-panel.js +3 -2
- package/dist/session/panel/session-desktop.js +5 -1
- package/dist/session/panel/session-panel-provider.js +1 -1
- package/dist/session/panel/shared/use-panel-handoffs.d.ts +2 -2
- package/dist/session/panel/shared/use-panel-handoffs.js +21 -2
- package/dist/session/participants/session-participants.d.ts +7 -5
- package/dist/session/participants/session-participants.js +11 -7
- package/dist/session/prompts/ask-deck.d.ts +21 -0
- package/dist/session/prompts/ask-deck.js +253 -0
- package/dist/session/prompts/session-permission-prompt.d.ts +7 -1
- package/dist/session/prompts/session-permission-prompt.js +3 -3
- package/dist/session/status/provisioning-failure.d.ts +4 -5
- package/dist/session/status/provisioning-failure.js +4 -5
- package/dist/session/status/session-load-state.d.ts +0 -1
- package/dist/session/status/session-load-state.js +2 -4
- package/dist/session/thread/message-parsing.d.ts +0 -1
- package/dist/session/thread/message-parsing.js +0 -1
- package/dist/session/thread/optimistic-turn.js +11 -2
- package/dist/session/thread/session-chat.d.ts +3 -1
- package/dist/session/thread/session-chat.js +498 -301
- package/dist/session/thread/session-context-metrics.d.ts +0 -1
- package/dist/session/thread/session-context-metrics.js +1 -1
- package/dist/session/thread/session-context-sub-sessions.js +3 -1
- package/dist/session/thread/show-work.d.ts +38 -0
- package/dist/session/thread/show-work.js +115 -0
- package/dist/session/thread/thread-boot-rows.d.ts +2 -1
- package/dist/session/thread/thread-boot-rows.js +7 -3
- package/dist/session/thread/transcript-rows.d.ts +36 -0
- package/dist/session/thread/transcript.d.ts +55 -2
- package/dist/session/thread/transcript.js +264 -33
- package/dist/session/thread/typing-indicator.d.ts +21 -0
- package/dist/session/thread/typing-indicator.js +46 -0
- package/dist/session/tool/shared/infrastructure-contexts.d.ts +12 -0
- package/dist/session/tool/shared/infrastructure-contexts.js +6 -0
- package/dist/session/tool/tool-part-renderer.d.ts +2 -0
- package/dist/session/tool/tool-part-renderer.js +16 -2
- package/dist/session/tool/tools/channel-send-card.js +1 -0
- package/dist/session/tool/tools/kortix-action-tool.js +8 -1
- package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +19 -0
- package/dist/session/tool/tools/multi-agent-tool-bodies.js +34 -13
- package/dist/session/tool/tools/session-spawn-urls.d.ts +1 -16
- package/dist/session/tool/tools/session-spawn-urls.js +4 -26
- package/dist/session/tool/tools/task-tool.d.ts +5 -18
- package/dist/session/tool/tools/task-tool.js +47 -86
- package/dist/session/tool/tools/workflow-progress.d.ts +14 -18
- package/dist/session/tool/tools/workflow-progress.js +24 -179
- package/dist/session/tool/tools/workflow-result-text.d.ts +15 -0
- package/dist/session/tool/tools/workflow-result-text.js +34 -0
- package/dist/session/tool/tools/workflow-run-card.d.ts +35 -0
- package/dist/session/tool/tools/workflow-run-card.js +157 -0
- package/dist/session/tool/tools/workflow-tool.js +45 -58
- package/dist/session/turn/activity-burst.d.ts +2 -2
- package/dist/session/turn/activity-burst.js +11 -5
- package/dist/session/turn/answered-question-step.d.ts +29 -0
- package/dist/session/turn/answered-question-step.js +48 -3
- package/dist/session/turn/channel-brand.js +4 -0
- package/dist/session/turn/message-author.d.ts +13 -8
- package/dist/session/turn/message-author.js +34 -16
- package/dist/session/turn/notice-batch-group.d.ts +4 -4
- package/dist/session/turn/notice-batch-group.js +5 -8
- package/dist/session/turn/peer-message-row.d.ts +15 -0
- package/dist/session/turn/peer-message-row.js +39 -30
- package/dist/session/turn/subagent-notice-row.d.ts +16 -1
- package/dist/session/turn/subagent-notice-row.js +47 -35
- package/dist/session/turn/throttled-markdown.js +4 -1
- package/dist/session/turn/turn-work-accordion.d.ts +10 -3
- package/dist/session/turn/turn-work-accordion.js +18 -11
- package/dist/session/turn/user-message.js +17 -43
- package/dist/session/turn/voice-turn.d.ts +22 -0
- package/dist/session/turn/voice-turn.js +32 -0
- package/dist/session/voice/call-audio.d.ts +32 -0
- package/dist/session/voice/call-audio.js +146 -0
- package/dist/session/voice/call-ring.d.ts +10 -0
- package/dist/session/voice/call-ring.js +52 -0
- package/dist/session/voice/screen-share.d.ts +24 -0
- package/dist/session/voice/screen-share.js +75 -0
- package/dist/session/voice/use-voice-call.d.ts +15 -0
- package/dist/session/voice/use-voice-call.js +217 -0
- package/dist/session/voice/voice-call-card.d.ts +6 -0
- package/dist/session/voice/voice-call-card.js +113 -0
- package/dist/session/voice/voice-call-state.d.ts +99 -0
- package/dist/session/voice/voice-call-state.js +104 -0
- package/dist/session/voice/voice-call-store.d.ts +22 -0
- package/dist/session/voice/voice-call-store.js +10 -0
- package/dist/session/voice/voice-call-url.d.ts +24 -0
- package/dist/session/voice/voice-call-url.js +33 -0
- package/dist/session/voice/voice-call.d.ts +11 -0
- package/dist/session/voice/voice-call.js +51 -0
- package/dist/styles/components.css +33 -0
- package/dist/styles/theme.css +26 -0
- package/dist/styles.css +1 -1
- package/dist/workspace/admin/project-admin-dashboard.d.ts +1 -1
- package/dist/workspace/admin/project-admin-dashboard.js +21 -13
- package/dist/workspace/index.d.ts +3 -2
- package/dist/workspace/index.js +2 -1
- package/dist/workspace/layout/project-home.js +13 -14
- package/dist/workspace/layout/use-project-home-send.d.ts +2 -0
- package/dist/workspace/layout/use-project-home-send.js +5 -3
- package/dist/workspace/memory/company-memory-page.d.ts +1 -1
- package/dist/workspace/memory/company-memory-page.js +1 -1
- package/dist/workspace/new/use-creatable-accounts.js +13 -4
- package/dist/workspace/projects/modal/project-icon-field.js +49 -34
- package/dist/workspace/review/review-center.d.ts +4 -1
- package/dist/workspace/review/review-center.js +6 -3
- package/dist/workspace/sessions/project-sessions-helpers.js +1 -1
- package/dist/workspace/sessions/project-sessions-view.js +1 -1
- package/dist/workspace/sessions/session-row.js +6 -4
- package/dist/workspace/sessions/sessions-toolbar.d.ts +1 -1
- package/dist/workspace/sessions/sessions-toolbar.js +4 -4
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +1 -1
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +4 -3
- package/dist/workspace/sidebar/footer/project-memory-nav.d.ts +1 -1
- package/dist/workspace/sidebar/footer/project-memory-nav.js +1 -1
- package/dist/workspace/sidebar/project-nav-items.js +2 -5
- package/dist/workspace/sidebar/project-session-list.d.ts +7 -1
- package/dist/workspace/sidebar/project-session-list.js +64 -24
- package/dist/workspace/sidebar/project-sidebar.js +10 -7
- package/dist/workspace/sidebar/project-spaces-nav.d.ts +7 -3
- package/dist/workspace/sidebar/project-spaces-nav.js +77 -46
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +4 -2
- package/dist/workspace/sidebar/session-brief-hover-card.js +47 -28
- package/dist/workspace/sidebar/session-filter-menu.js +1 -0
- package/dist/workspace/sidebar/session-group-sections.js +12 -4
- package/dist/workspace/sidebar/session-grouping.d.ts +4 -0
- package/dist/workspace/sidebar/session-grouping.js +2 -0
- package/dist/workspace/sidebar/session-source-icons.js +2 -0
- package/dist/workspace/sidebar/sidebar-more-group.d.ts +13 -0
- package/dist/workspace/sidebar/sidebar-more-group.js +27 -0
- package/dist/workspace/space/space-blocks.d.ts +3 -1
- package/dist/workspace/space/space-blocks.js +4 -7
- package/dist/workspace/space/space-page.d.ts +4 -6
- package/dist/workspace/space/space-page.js +12 -26
- package/dist/workspace/space/space-tab-panels.d.ts +14 -1
- package/dist/workspace/space/space-tab-panels.js +12 -21
- package/dist/workspace/space/space-templates.d.ts +4 -5
- package/dist/workspace/space/space-templates.js +2 -7
- package/dist/workspace/space/use-space-filter.d.ts +1 -1
- package/dist/workspace/space/use-space-filter.js +1 -1
- package/dist/workspace/spaces/channels-onboarding.d.ts +2 -2
- package/dist/workspace/spaces/channels-onboarding.js +4 -3
- package/dist/workspace/spaces/create-channel-dialog.js +4 -2
- package/dist/workspace/spaces/principal-card.d.ts +71 -0
- package/dist/workspace/spaces/principal-card.js +246 -0
- package/dist/workspace/spaces/space-auto-open.d.ts +8 -0
- package/dist/workspace/spaces/space-auto-open.js +18 -0
- package/dist/workspace/spaces/space-avatar.d.ts +44 -0
- package/dist/workspace/spaces/space-avatar.js +41 -0
- package/dist/workspace/spaces/space-details-panel.d.ts +26 -0
- package/dist/workspace/spaces/space-details-panel.js +119 -0
- package/dist/workspace/spaces/space-identity.d.ts +49 -0
- package/dist/workspace/spaces/space-identity.js +104 -0
- package/dist/workspace/spaces/space-members.js +1 -1
- package/dist/workspace/spaces/space-mention-source.d.ts +12 -0
- package/dist/workspace/spaces/space-mention-source.js +78 -0
- package/dist/workspace/spaces/space-people.d.ts +29 -0
- package/dist/workspace/spaces/space-people.js +87 -0
- package/dist/workspace/spaces/space-roster.d.ts +3 -2
- package/dist/workspace/spaces/space-roster.js +7 -4
- package/dist/workspace/spaces/space-tab-list.d.ts +37 -0
- package/dist/workspace/spaces/space-tab-list.js +82 -0
- package/dist/workspace/spaces/space-tabs.d.ts +74 -0
- package/dist/workspace/spaces/space-tabs.js +199 -0
- package/dist/workspace/spaces/space-threads-tab.js +1 -1
- package/dist/workspace/spaces/space-timeline-view.js +126 -17
- package/dist/workspace/spaces/space-timeline.d.ts +44 -9
- package/dist/workspace/spaces/space-timeline.js +120 -12
- package/dist/workspace/spaces/space-view.d.ts +19 -12
- package/dist/workspace/spaces/space-view.js +201 -67
- package/dist/workspace/spaces/use-personal-space-name.d.ts +2 -0
- package/dist/workspace/spaces/use-personal-space-name.js +10 -0
- package/package.json +17 -13
- package/skills/kortix-ui/SKILL.md +3 -3
- package/skills/kortix-ui/references/custom-dashboard.md +3 -4
- package/skills/kortix-ui/references/modules.md +4 -4
- package/dist/_vendor/shared/room-prompt.d.ts +0 -66
- package/dist/customize/agents/agent-section-rail.d.ts +0 -21
- package/dist/customize/agents/agent-section-rail.js +0 -23
- package/dist/internal/hooks/projects/use-warm-project-session.d.ts +0 -270
- package/dist/internal/hooks/projects/use-warm-project-session.js +0 -362
- package/dist/internal/hooks/projects/warm-session-seed.d.ts +0 -66
- package/dist/internal/hooks/projects/warm-session-seed.js +0 -80
- package/dist/internal/hooks/projects/warm-session-taken-registry.d.ts +0 -61
- package/dist/internal/hooks/projects/warm-session-taken-registry.js +0 -141
- package/dist/workspace/sidebar/footer/project-rooms-nav.d.ts +0 -9
- package/dist/workspace/sidebar/footer/project-rooms-nav.js +0 -32
- package/dist/workspace/sidebar/session-status-mark.d.ts +0 -19
- package/dist/workspace/space/space-room.d.ts +0 -20
- package/dist/workspace/space/space-room.js +0 -27
- /package/dist/{workspace/sidebar → session/list}/session-list-chrome.d.ts +0 -0
- /package/dist/{workspace/sidebar → session/list}/session-list-chrome.js +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type SessionDisplayStatus, type SessionSource } from '../../session/actions/session-label.js';
|
|
2
1
|
import type { ChangeRequest } from '@kortix/sdk';
|
|
3
2
|
import { type ReactElement } from 'react';
|
|
3
|
+
import { type SessionDisplayStatus, type SessionSource } from '../../session/actions/session-label.js';
|
|
4
4
|
interface SessionBrief {
|
|
5
|
+
sessionId?: string;
|
|
5
6
|
title: string;
|
|
6
7
|
status: SessionDisplayStatus;
|
|
7
8
|
createdAt: string;
|
|
@@ -47,8 +48,9 @@ export declare function SessionBriefHoverCard({ sessionId, children, ...brief }:
|
|
|
47
48
|
* The same brief remains available to keyboard and screen-reader users when
|
|
48
49
|
* the visual HoverCard is absent or intentionally ignored by assistive tech.
|
|
49
50
|
*/
|
|
50
|
-
export declare function SessionBriefDescription({ id, status, createdAt, source, changeRequests, waitingOn, }: Omit<SessionBrief, 'title'> & {
|
|
51
|
+
export declare function SessionBriefDescription({ projectId, sessionId, id, status, createdAt, source, changeRequests, waitingOn, }: Omit<SessionBrief, 'title'> & {
|
|
51
52
|
id: string;
|
|
53
|
+
projectId: string;
|
|
52
54
|
}): import("react").JSX.Element;
|
|
53
55
|
/**
|
|
54
56
|
* The hover card of a sub-agent row: what it is and when it ran. Same store,
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useFeatureFlag, useSessionGoal } from '@kortix/sdk/react';
|
|
4
|
+
import { ArrowsSplitIcon, GitDiffIcon, RobotIcon, TargetIcon } from '@phosphor-icons/react';
|
|
5
|
+
import { formatDistanceToNowStrict } from 'date-fns';
|
|
6
|
+
import { Slot } from 'radix-ui';
|
|
7
|
+
import { useEffect, useLayoutEffect, useRef } from 'react';
|
|
8
|
+
import { createPortal } from 'react-dom';
|
|
9
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
3
10
|
import { HoverPrefetchLink } from '../../internal/components/hover-prefetch-link.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
11
|
+
import { goalHref, goalPaused, GoalStatusBadge } from '../../internal/goals/goal-meta.js';
|
|
12
|
+
import { reviewHref } from '../../internal/lib/capability-tab-routes.js';
|
|
13
|
+
import { sessionRowHoverHandlers, useSessionHoverStore, } from '../../internal/stores/session-hover-store.js';
|
|
6
14
|
import { usePortalContainer } from '../../lib/portal-container.js';
|
|
7
15
|
import { cn } from '../../lib/utils.js';
|
|
8
16
|
import { floatingZ, useDialogDepth } from '../../lib/z-stack.js';
|
|
9
17
|
import { LocalTime } from '../../primitives/local-time.js';
|
|
10
|
-
import { menuRow } from '../../primitives/menu-recipe.js';
|
|
11
|
-
import { CR_ID_PREFIX } from '../review/review-actions.js';
|
|
12
|
-
import { reviewHref } from '../../internal/lib/capability-tab-routes.js';
|
|
13
|
-
import { useTranslations } from '../../i18n/index.js';
|
|
14
|
-
import { sessionRowHoverHandlers, useSessionHoverStore } from '../../internal/stores/session-hover-store.js';
|
|
15
|
-
import { ArrowsSplitIcon, GitDiffIcon, RobotIcon } from '@phosphor-icons/react';
|
|
16
|
-
import { formatDistanceToNowStrict } from 'date-fns';
|
|
17
|
-
import { Slot } from 'radix-ui';
|
|
18
|
-
import { useEffect, useLayoutEffect, useRef } from 'react';
|
|
19
|
-
import { createPortal } from 'react-dom';
|
|
18
|
+
import { FLOATING_PANEL_SURFACE, menuRow } from '../../primitives/menu-recipe.js';
|
|
20
19
|
import { shortRelative } from '../../session/actions/project-session-list-helpers.js';
|
|
20
|
+
import { SESSION_STATUS_TRANSLATION_KEY, } from '../../session/actions/session-label.js';
|
|
21
|
+
import { CR_ID_PREFIX } from '../review/review-actions.js';
|
|
21
22
|
import { SessionLabelBadges } from '../sessions/session-label-badges.js';
|
|
22
23
|
import { SOURCE_ICONS } from './session-source-icons.js';
|
|
23
|
-
import { isReviewOverdue, SessionStatusMark } from '
|
|
24
|
+
import { isReviewOverdue, SessionStatusMark } from '../../session/list/session-status-mark.js';
|
|
24
25
|
const DATE_TIME_OPTIONS = {
|
|
25
26
|
year: 'numeric',
|
|
26
27
|
month: 'short',
|
|
@@ -94,11 +95,18 @@ function ChangeRequestRow({ changeRequest, projectId, onDismiss, }) {
|
|
|
94
95
|
* `px-2.5`, so 3.5 spacing steps is exactly where the row labels start. The
|
|
95
96
|
* title and the change titles share one left edge.
|
|
96
97
|
*/
|
|
97
|
-
function SessionBriefContent({ title, status, createdAt, source, changeRequests, labels, waitingOn, spawned = false, subagentCount = 0, spawnedCount = 0, projectId, onDismiss, }) {
|
|
98
|
+
function SessionBriefContent({ sessionId, title, status, createdAt, source, changeRequests, labels, waitingOn, spawned = false, subagentCount = 0, spawnedCount = 0, projectId, onDismiss, }) {
|
|
99
|
+
const gate = useFeatureFlag(projectId, 'goals');
|
|
100
|
+
const { goal } = useSessionGoal(gate.enabled ? projectId : null, sessionId);
|
|
101
|
+
const goalLink = goal ? goalHref(projectId, goal) : null;
|
|
102
|
+
const tGoals = useTranslations('goals');
|
|
98
103
|
const SourceIcon = source.kind === 'chat' ? null : SOURCE_ICONS[source.kind];
|
|
99
104
|
const statusLabel = useStatusLabel(status, waitingOn);
|
|
100
105
|
const t = useTranslations('sidebar.sessionList.brief');
|
|
101
|
-
|
|
106
|
+
const goalClassName = 'text-muted-foreground flex min-w-0 items-center gap-2 text-xs';
|
|
107
|
+
const goalContent = goal ? (_jsxs(_Fragment, { children: [_jsx(TargetIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsxs("span", { className: "min-w-0 flex-1 truncate", children: [tGoals('sessionChip'), ": ", goal.goal?.objective ?? goal.slug] }), _jsx(GoalStatusBadge, { status: goal.goal?.status, paused: goalPaused(goal) })] })) : null;
|
|
108
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-1.5 px-3.5 py-2.5", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("p", { className: "text-foreground min-w-0 flex-1 truncate text-sm font-medium", children: title }), _jsx(RelativeCreatedTime, { createdAt: createdAt })] }), _jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(SessionStatusMark, { status: status, waitingOn: waitingOn, overdue: isReviewOverdue(changeRequests) }), _jsx("span", { children: statusLabel })] }), goalContent &&
|
|
109
|
+
(goalLink ? (_jsx(HoverPrefetchLink, { href: goalLink, onClick: onDismiss, className: goalClassName, children: goalContent })) : (_jsx("div", { className: goalClassName, children: goalContent }))), spawned && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('spawned') })] })), subagentCount > 0 && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(RobotIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('subAgentCount', { count: subagentCount }) })] })), spawnedCount > 0 && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('spawnedCount', { count: spawnedCount }) })] })), SourceIcon ? (_jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-2 text-xs", children: [_jsx(SourceIcon, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "text-foreground min-w-0 truncate", children: [source.label, source.triggerSlug ? (_jsxs("span", { className: "text-muted-foreground", children: [" \u00B7 ", source.triggerSlug] })) : null] })] })) : null, labels?.length ? (_jsx(SessionLabelBadges, { session: { labels: [...labels] }, max: 6, className: "flex-wrap" })) : null] }), changeRequests.length > 0 ? (_jsx("ul", { className: "border-border max-h-64 overflow-y-auto overscroll-contain border-t p-1", children: changeRequests.map((changeRequest) => (_jsx("li", { children: _jsx(ChangeRequestRow, { changeRequest: changeRequest, projectId: projectId, onDismiss: onDismiss }) }, changeRequest.cr_id))) })) : null] }));
|
|
102
110
|
}
|
|
103
111
|
const CARD_EDGE_PX = 8;
|
|
104
112
|
/**
|
|
@@ -139,16 +147,22 @@ export function SessionBriefCardHost() {
|
|
|
139
147
|
shown.current = false;
|
|
140
148
|
return;
|
|
141
149
|
}
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
const position = () => {
|
|
151
|
+
const rect = anchor.getBoundingClientRect();
|
|
152
|
+
const top = Math.max(CARD_EDGE_PX, Math.min(rect.top, window.innerHeight - CARD_EDGE_PX - el.offsetHeight));
|
|
153
|
+
const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
154
|
+
// A move between rows glides; the first open fades in, as the reminders card does.
|
|
155
|
+
el.style.transition =
|
|
156
|
+
shown.current && via === 'pointer' && !reduce
|
|
157
|
+
? 'transform var(--duration-normal) var(--ease-in-out)'
|
|
158
|
+
: 'opacity var(--duration-fast) var(--ease-out)';
|
|
159
|
+
el.style.transform = `translate(${rect.right}px, ${top}px)`;
|
|
160
|
+
shown.current = true;
|
|
161
|
+
};
|
|
162
|
+
position();
|
|
163
|
+
const observer = new ResizeObserver(position);
|
|
164
|
+
observer.observe(el);
|
|
165
|
+
return () => observer.disconnect();
|
|
152
166
|
}, [visible, activeSessionId, anchor, via]);
|
|
153
167
|
// Native listeners, not React's `onPointerEnter/Leave`. The card's content is
|
|
154
168
|
// portaled in from the row, so in React's tree it is the row's child, not
|
|
@@ -221,16 +235,21 @@ function SessionBriefCard({ id, children, content, }) {
|
|
|
221
235
|
}
|
|
222
236
|
export function SessionBriefHoverCard({ sessionId, children, ...brief }) {
|
|
223
237
|
const dismiss = useSessionHoverStore((state) => state.dismiss);
|
|
224
|
-
return (_jsx(SessionBriefCard, { id: sessionId, content: _jsx(SessionBriefContent, { ...brief, onDismiss: dismiss }), children: children }));
|
|
238
|
+
return (_jsx(SessionBriefCard, { id: sessionId, content: _jsx(SessionBriefContent, { ...brief, sessionId: sessionId, onDismiss: dismiss }), children: children }));
|
|
225
239
|
}
|
|
226
240
|
/**
|
|
227
241
|
* The same brief remains available to keyboard and screen-reader users when
|
|
228
242
|
* the visual HoverCard is absent or intentionally ignored by assistive tech.
|
|
229
243
|
*/
|
|
230
|
-
export function SessionBriefDescription({ id, status, createdAt, source, changeRequests, waitingOn, }) {
|
|
244
|
+
export function SessionBriefDescription({ projectId, sessionId, id, status, createdAt, source, changeRequests, waitingOn, }) {
|
|
231
245
|
const t = useTranslations('sidebar.sessionList.brief');
|
|
246
|
+
const tGoals = useTranslations('goals');
|
|
247
|
+
const gate = useFeatureFlag(projectId, 'goals');
|
|
248
|
+
const { goal } = useSessionGoal(gate.enabled ? projectId : null, sessionId);
|
|
232
249
|
const statusLabel = useStatusLabel(status, waitingOn);
|
|
233
|
-
return (_jsxs("span", { id: id, className: "sr-only", children: [
|
|
250
|
+
return (_jsxs("span", { id: id, className: "sr-only", children: [goal
|
|
251
|
+
? `${tGoals('sessionChip')}: ${goal.goal?.objective ?? goal.slug}. ${goalPaused(goal) ? tGoals('paused') : tGoals(`status.${goal.goal?.status ?? 'draft'}`)}. `
|
|
252
|
+
: null, t('status'), ": ", statusLabel, ". ", t('created'), ": ", _jsx(SessionCreatedTime, { createdAt: createdAt }), ".", source.kind !== 'chat'
|
|
234
253
|
? ` ${t('source')}: ${source.label}${source.triggerSlug ? `, ${source.triggerSlug}` : ''}.`
|
|
235
254
|
: null, ' ', changeRequests.length > 0
|
|
236
255
|
? `${t('changeRequests')}: ${changeRequests
|
|
@@ -165,6 +165,7 @@ export function SessionFilterMenu({ projectId, sessions, align = 'start', side =
|
|
|
165
165
|
shared: t('sourceValue.shared'),
|
|
166
166
|
slack: sectionLabels.slack,
|
|
167
167
|
telegram: sectionLabels.telegram,
|
|
168
|
+
discord: sectionLabels.discord,
|
|
168
169
|
teams: sectionLabels.teams,
|
|
169
170
|
email: sectionLabels.email,
|
|
170
171
|
schedule: sectionLabels.schedule,
|
|
@@ -14,7 +14,7 @@ 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, CaretRightIcon, DotsThreeIcon,
|
|
17
|
+
import { ArrowDownIcon, ArrowUpIcon, CaretRightIcon, DotsThreeIcon, FolderIcon, FolderOpenIcon, PencilSimpleIcon, TrashIcon, } from '@phosphor-icons/react';
|
|
18
18
|
import { useMemo, useState } from 'react';
|
|
19
19
|
import { useTranslations } from '../../i18n/index.js';
|
|
20
20
|
import { cn } from '../../internal/lib/utils.js';
|
|
@@ -27,7 +27,7 @@ import Loading from '../../primitives/loading.js';
|
|
|
27
27
|
import { Modal, ModalBody, ModalContent, ModalDescription, 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
|
-
import { SESSION_MENU_TRIGGER_CLASS, SESSION_ROW_HEIGHT_CLASS, SIDEBAR_PAGE_SIZE, ShowMoreButton, } from '
|
|
30
|
+
import { SESSION_MENU_TRIGGER_CLASS, SESSION_ROW_HEIGHT_CLASS, SIDEBAR_PAGE_SIZE, ShowMoreButton, } from '../../session/list/session-list-chrome.js';
|
|
31
31
|
/** A dragged session row carries its id under this type. */
|
|
32
32
|
const SESSION_DRAG_TYPE = 'application/x-kortix-session';
|
|
33
33
|
/** A dragged group header carries its id under this type. */
|
|
@@ -226,12 +226,20 @@ function SessionGroupSection({ projectId, group, groupIds, labels, collapsedSect
|
|
|
226
226
|
draggingGroupId = group.group_id;
|
|
227
227
|
}, onDragEnd: () => {
|
|
228
228
|
draggingGroupId = null;
|
|
229
|
-
}, className: cn(
|
|
229
|
+
}, className: cn(
|
|
230
|
+
// A group is a folder, not a section label: it takes a session
|
|
231
|
+
// row's geometry (px-2, gap-2, 16px icon, regular weight) so its
|
|
232
|
+
// icon and name sit on the same axes as the rows it holds, while
|
|
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',
|
|
230
235
|
// A group dropped here takes this place: a line marks the side it
|
|
231
236
|
// lands on (below this group when it comes from above).
|
|
232
237
|
drop.over === 'group' &&
|
|
233
238
|
'before:bg-foreground/40 before:absolute before:inset-x-2 before:h-0.5 before:rounded-full', drop.over === 'group' &&
|
|
234
|
-
(groupIds.indexOf(draggingGroupId ?? '') < index ? 'before:bottom-0' : 'before:top-0')), children: [_jsx(
|
|
239
|
+
(groupIds.indexOf(draggingGroupId ?? '') < index ? 'before:bottom-0' : 'before:top-0')), children: [open ? (_jsx(FolderOpenIcon, { "aria-hidden": true, className: "size-4 shrink-0" })) : (_jsx(FolderIcon, { "aria-hidden": true, className: "size-4 shrink-0" })), _jsx("span", { className: "min-w-0 truncate", children: group.name }), _jsx(CaretRightIcon, { "aria-hidden": true, className: "duration-normal size-3 shrink-0 opacity-0 transition-transform ease-out group-hover/section-header:opacity-100 group-data-[state=open]/section:rotate-90" }), _jsx(SessionGroupMenu, { group: group, onRename: () => onRename(group), 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 ? (
|
|
240
|
+
// Indented to the name's x (px-2 + 16px icon + gap-2), one row tall,
|
|
241
|
+
// so the empty group reads as a folder with nothing in it yet.
|
|
242
|
+
_jsx("p", { className: "text-muted-foreground flex h-8 items-center pr-2 pl-8 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() }))] })] }) }));
|
|
235
243
|
}
|
|
236
244
|
/**
|
|
237
245
|
* The group header's `⋯`: Rename, Move up, Move down, Delete. Hover-revealed
|
|
@@ -39,6 +39,10 @@ export declare const SESSION_SECTIONS: {
|
|
|
39
39
|
readonly key: "section.telegram";
|
|
40
40
|
readonly label: "Telegram";
|
|
41
41
|
};
|
|
42
|
+
readonly discord: {
|
|
43
|
+
readonly key: "section.discord";
|
|
44
|
+
readonly label: "Discord";
|
|
45
|
+
};
|
|
42
46
|
readonly teams: {
|
|
43
47
|
readonly key: "section.teams";
|
|
44
48
|
readonly label: "Teams";
|
|
@@ -9,6 +9,7 @@ export const SESSION_SECTIONS = {
|
|
|
9
9
|
chat: { key: 'section.chat', label: 'Chat' },
|
|
10
10
|
slack: { key: 'section.slack', label: 'Slack' },
|
|
11
11
|
telegram: { key: 'section.telegram', label: 'Telegram' },
|
|
12
|
+
discord: { key: 'section.discord', label: 'Discord' },
|
|
12
13
|
teams: { key: 'section.teams', label: 'Teams' },
|
|
13
14
|
email: { key: 'section.email', label: 'Email' },
|
|
14
15
|
schedule: { key: 'section.scheduled', label: 'Scheduled' },
|
|
@@ -76,6 +77,7 @@ const SOURCE_SECTION_ORDER = [
|
|
|
76
77
|
'chat',
|
|
77
78
|
'slack',
|
|
78
79
|
'telegram',
|
|
80
|
+
'discord',
|
|
79
81
|
'teams',
|
|
80
82
|
'email',
|
|
81
83
|
'schedule',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Discord } from '../../internal/icons/discord.js';
|
|
1
2
|
import { Email } from '../../internal/icons/email.js';
|
|
2
3
|
import { MicrosoftTeams } from '../../internal/icons/microsoft-teams.js';
|
|
3
4
|
import { Schedule } from '../../internal/icons/schedule.js';
|
|
@@ -21,6 +22,7 @@ import { CursorClickIcon, LightningIcon, WebhooksLogoIcon } from '@phosphor-icon
|
|
|
21
22
|
export const SOURCE_ICONS = {
|
|
22
23
|
slack: Slack,
|
|
23
24
|
telegram: Telegram,
|
|
25
|
+
discord: Discord,
|
|
24
26
|
teams: MicrosoftTeams,
|
|
25
27
|
email: Email,
|
|
26
28
|
schedule: Schedule,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Spaces on (`chat`): one group pinned at the bottom of the sidebar that
|
|
4
|
+
* holds everything that is not a space: Customize, Drive, Apps, Artifacts
|
|
5
|
+
* the session list (with its own "+", New session as before), and the
|
|
6
|
+
* connect and upgrade rows (`footer`). Closed by
|
|
7
|
+
* default; the choice persists per project. The header is a real button
|
|
8
|
+
* (`aria-expanded`), so the keyboard opens it.
|
|
9
|
+
*/
|
|
10
|
+
export declare function SidebarMoreGroup({ projectId, footer }: {
|
|
11
|
+
projectId: string; /** Connect rows and the upgrade row, at the end of the group. */
|
|
12
|
+
footer?: ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CaretRightIcon, DotsThreeIcon } from '@phosphor-icons/react';
|
|
4
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
5
|
+
import { selectExpandedIds, useSessionExpandedStore } from '../../internal/stores/session-expanded-store.js';
|
|
6
|
+
import { cn } from '../../lib/utils.js';
|
|
7
|
+
import { Disclosure, DisclosureContent, DisclosureTrigger } from '../../primitives/disclosure.js';
|
|
8
|
+
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '../../primitives/sidebar.js';
|
|
9
|
+
import { ProjectNavItems } from './project-nav-items.js';
|
|
10
|
+
import { ProjectSessionList } from './project-session-list.js';
|
|
11
|
+
/** Open state lives in the persisted expanded store (closed by default), beside Sessions. */
|
|
12
|
+
const MORE_SECTION_ID = 'section:sidebar-more';
|
|
13
|
+
/**
|
|
14
|
+
* Spaces on (`chat`): one group pinned at the bottom of the sidebar that
|
|
15
|
+
* holds everything that is not a space: Customize, Drive, Apps, Artifacts
|
|
16
|
+
* the session list (with its own "+", New session as before), and the
|
|
17
|
+
* connect and upgrade rows (`footer`). Closed by
|
|
18
|
+
* default; the choice persists per project. The header is a real button
|
|
19
|
+
* (`aria-expanded`), so the keyboard opens it.
|
|
20
|
+
*/
|
|
21
|
+
export function SidebarMoreGroup({ projectId, footer }) {
|
|
22
|
+
const t = useTranslations('sidebar.spaces');
|
|
23
|
+
const expanded = useSessionExpandedStore(selectExpandedIds(projectId));
|
|
24
|
+
const toggleExpanded = useSessionExpandedStore((state) => state.toggleExpanded);
|
|
25
|
+
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(CaretRightIcon, { "aria-hidden": true, className: cn('size-3! 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 }) }), _jsx(ProjectSessionList, { projectId: projectId, secondary: true }), footer] })] }));
|
|
27
|
+
}
|
|
@@ -17,7 +17,9 @@ import type { SpaceBlock } from '@kortix/sdk';
|
|
|
17
17
|
*
|
|
18
18
|
* Block renderers: `text` is markdown, `iframe` a sandboxed frame, `artifact`
|
|
19
19
|
* opens the Files viewer, `app` the live pooled `AppPreview` for the resolved
|
|
20
|
-
* slug
|
|
20
|
+
* slug. A `chat` block (a project room) renders nothing: Rooms were removed
|
|
21
|
+
* (2026-11), and the manifest still accepts the block so an old kortix.yaml
|
|
22
|
+
* stays valid.
|
|
21
23
|
*/
|
|
22
24
|
export declare function SpaceBlocks({ projectId, blocks, }: {
|
|
23
25
|
projectId: string;
|
|
@@ -10,7 +10,6 @@ import Loading from '../../primitives/loading.js';
|
|
|
10
10
|
import { useFilePreviewStore } from '../../internal/stores/file-preview-store.js';
|
|
11
11
|
import { framePolicy } from '../../files/viewer/preview-policy.js';
|
|
12
12
|
import { cn } from '../../lib/utils.js';
|
|
13
|
-
import { SpaceRoom } from './space-room.js';
|
|
14
13
|
/**
|
|
15
14
|
* A space's board tab, rendered as a simple responsive grid of blocks.
|
|
16
15
|
*
|
|
@@ -29,12 +28,14 @@ import { SpaceRoom } from './space-room.js';
|
|
|
29
28
|
*
|
|
30
29
|
* Block renderers: `text` is markdown, `iframe` a sandboxed frame, `artifact`
|
|
31
30
|
* opens the Files viewer, `app` the live pooled `AppPreview` for the resolved
|
|
32
|
-
* slug
|
|
31
|
+
* slug. A `chat` block (a project room) renders nothing: Rooms were removed
|
|
32
|
+
* (2026-11), and the manifest still accepts the block so an old kortix.yaml
|
|
33
|
+
* stays valid.
|
|
33
34
|
*/
|
|
34
35
|
export function SpaceBlocks({ projectId, blocks, }) {
|
|
35
36
|
if (!blocks.length)
|
|
36
37
|
return null;
|
|
37
|
-
return (_jsx("div", { className: "grid w-full gap-4 sm:grid-cols-2", children: blocks.map((block, index) =>
|
|
38
|
+
return (_jsx("div", { className: "grid w-full gap-4 sm:grid-cols-2", children: blocks.map((block, index) => block.type === 'chat' ? null : _jsx(SpaceBlockCard, { projectId: projectId, block: block }, index)) }));
|
|
38
39
|
}
|
|
39
40
|
const TYPE_ICON = {
|
|
40
41
|
chat: ChatCircleIcon,
|
|
@@ -57,10 +58,6 @@ function SpaceBlockCard({ projectId, block }) {
|
|
|
57
58
|
const Icon = TYPE_ICON[block.type];
|
|
58
59
|
const label = block.label?.trim() || TYPE_FALLBACK_LABEL[block.type];
|
|
59
60
|
const t = useTranslations('spaces');
|
|
60
|
-
// A chat block is a room: the host's room panel draws its own frame.
|
|
61
|
-
if (block.type === 'chat') {
|
|
62
|
-
return block.room?.trim() ? (_jsx(SpaceRoom, { projectId: projectId, roomName: block.room.trim(), className: "min-w-0" })) : (_jsxs("div", { className: PANEL, children: [_jsx("div", { className: "flex items-center gap-2 px-4 py-2.5", children: _jsx(BlockTitle, { icon: Icon, label: label }) }), _jsx(EmptyLine, { children: t('noRoom') })] }));
|
|
63
|
-
}
|
|
64
61
|
// A clickable artifact is its own `<button>` (whole card opens the file), so
|
|
65
62
|
// the header is shared by the rest and skipped there.
|
|
66
63
|
if (block.type === 'artifact') {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { type ManifestSpace, type SpaceTab } from '@kortix/sdk';
|
|
2
|
-
/** The key of the room tab, always first. */
|
|
3
|
-
export declare const ROOM_TAB = "room";
|
|
4
2
|
/** The tabs a viewer sees, in order: a tab of a feature the project has off is hidden. */
|
|
5
3
|
export declare function visibleSpaceTabs(space: ManifestSpace, flags: {
|
|
6
4
|
goals: boolean;
|
|
@@ -13,10 +11,10 @@ export declare function visibleSpaceTabs(space: ManifestSpace, flags: {
|
|
|
13
11
|
/**
|
|
14
12
|
* /projects/[id]/spaces/[slug]: a space is a channel. One header block: the
|
|
15
13
|
* title bar names it and shows what `spaces.<slug>.header` picks (its agents,
|
|
16
|
-
* the
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
14
|
+
* the sessions that wait on you, and the actions), and the tabs from
|
|
15
|
+
* `spaces.<slug>.tabs` sit directly under it. The first tab is the default;
|
|
16
|
+
* `?tab=` deep links another. A space with no tab shows its intro. The "+"
|
|
17
|
+
* menu and Edit tabs write the same manifest list.
|
|
20
18
|
*/
|
|
21
19
|
export declare function SpacePage({ projectId, slug }: {
|
|
22
20
|
projectId: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { MY_KORTIX_AGENT_NAME } from '../../_vendor/kortix-shared.js';
|
|
4
4
|
import { agentsInSpace, listSpaces, spaceHeader, spaceTabKey, spaceTabs, } from '@kortix/sdk';
|
|
5
|
-
import { sessionNeedsInputCount, useFeatureFlag, useProjectConfig, useProjectSessions,
|
|
5
|
+
import { sessionNeedsInputCount, useFeatureFlag, useProjectConfig, useProjectSessions, useSessionsNeedingInput, } from '@kortix/sdk/react';
|
|
6
6
|
import { HashIcon, PlusIcon } from '@phosphor-icons/react';
|
|
7
7
|
import { useConfigureThread } from '../../customize/use-configure-thread.js';
|
|
8
8
|
import { useTranslations } from '../../i18n/index.js';
|
|
@@ -20,11 +20,8 @@ import { CountBadge } from '../../primitives/count-badge.js';
|
|
|
20
20
|
import { EmptyState } from '../../primitives/empty-state.js';
|
|
21
21
|
import { useOptionalSidebar } from '../../primitives/sidebar.js';
|
|
22
22
|
import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
|
|
23
|
-
import { UserAvatar } from '../../primitives/user-avatar.js';
|
|
24
23
|
import { SpaceTabMenu } from './space-tab-menu.js';
|
|
25
24
|
import { SpaceTabPanel, useTabLabel } from './space-tab-panels.js';
|
|
26
|
-
/** The key of the room tab, always first. */
|
|
27
|
-
export const ROOM_TAB = 'room';
|
|
28
25
|
/** How many faces a pile shows before "+N". */
|
|
29
26
|
const PILE = 4;
|
|
30
27
|
/** The tabs a viewer sees, in order: a tab of a feature the project has off is hidden. */
|
|
@@ -42,10 +39,10 @@ export function visibleSpaceTabs(space, flags) {
|
|
|
42
39
|
/**
|
|
43
40
|
* /projects/[id]/spaces/[slug]: a space is a channel. One header block: the
|
|
44
41
|
* title bar names it and shows what `spaces.<slug>.header` picks (its agents,
|
|
45
|
-
* the
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
42
|
+
* the sessions that wait on you, and the actions), and the tabs from
|
|
43
|
+
* `spaces.<slug>.tabs` sit directly under it. The first tab is the default;
|
|
44
|
+
* `?tab=` deep links another. A space with no tab shows its intro. The "+"
|
|
45
|
+
* menu and Edit tabs write the same manifest list.
|
|
49
46
|
*/
|
|
50
47
|
export function SpacePage({ projectId, slug }) {
|
|
51
48
|
const t = useTranslations('spaces');
|
|
@@ -64,11 +61,12 @@ export function SpacePage({ projectId, slug }) {
|
|
|
64
61
|
}
|
|
65
62
|
const tabs = visibleSpaceTabs(space, { goals: goalsOn, artifacts: artifactsOn });
|
|
66
63
|
const requested = params.get('tab');
|
|
67
|
-
const
|
|
64
|
+
const first = tabs[0]?.key ?? null;
|
|
65
|
+
const active = tabs.some((entry) => entry.key === requested) ? requested : first;
|
|
68
66
|
const selectTab = (key) => {
|
|
69
|
-
router.replace(key ===
|
|
67
|
+
router.replace(key === first ? pathname : `${pathname}?tab=${encodeURIComponent(key)}`);
|
|
70
68
|
};
|
|
71
|
-
return (_jsxs("div", { className: "flex h-svh flex-col overflow-hidden", children: [_jsx(SpaceHeader, { projectId: projectId, space: space }), _jsxs(Tabs, { value: active, onValueChange: selectTab, className: "flex min-h-0 flex-1 flex-col gap-0", children: [_jsxs(TabsList, { type: "underline", className: "w-full shrink-0 justify-start overflow-x-auto px-5", children: [
|
|
69
|
+
return (_jsxs("div", { className: "flex h-svh flex-col overflow-hidden", children: [_jsx(SpaceHeader, { projectId: projectId, space: space }), _jsxs(Tabs, { value: active ?? '', onValueChange: selectTab, className: "flex min-h-0 flex-1 flex-col gap-0", children: [_jsxs(TabsList, { type: "underline", className: "w-full shrink-0 justify-start overflow-x-auto px-5", children: [tabs.map((entry) => (_jsx(SpaceTabTrigger, { value: entry.key, tab: entry.tab }, entry.key))), canWrite ? (_jsx(SpaceTabMenu, { projectId: projectId, space: space, onAdded: selectTab, children: _jsx(Button, { size: "icon-xs", variant: "ghost", "aria-label": t('addTab'), className: "ml-1 shrink-0", children: _jsx(PlusIcon, {}) }) })) : null] }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: _jsx(SpaceTabPanel, { projectId: projectId, space: space, tab: tabs.find((entry) => entry.key === active)?.tab ?? null }) })] })] }));
|
|
72
70
|
}
|
|
73
71
|
function SpaceTabTrigger({ value, tab }) {
|
|
74
72
|
const label = useTabLabel(tab);
|
|
@@ -84,16 +82,14 @@ function SpaceTabTrigger({ value, tab }) {
|
|
|
84
82
|
function SpaceHeader({ projectId, space }) {
|
|
85
83
|
const config = useProjectConfig(projectId);
|
|
86
84
|
const sidebar = useOptionalSidebar();
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const items = spaceHeader(space).filter((item) => item !== 'ask_my_kortix' || config?.builtin_agents?.my_kortix !== false);
|
|
85
|
+
// My Kortix runs only with `builtin_agents.my_kortix: true`: no Ask button otherwise.
|
|
86
|
+
const items = spaceHeader(space).filter((item) => item !== 'ask_my_kortix' || config?.builtin_agents?.my_kortix === true);
|
|
90
87
|
const agents = agentsInSpace(space.name, config?.agents ?? []);
|
|
91
88
|
const strip = [];
|
|
92
89
|
for (const item of items) {
|
|
93
90
|
if (item === 'agents' && agents.length)
|
|
94
91
|
strip.push(_jsx(SpaceAgents, { projectId: projectId, agents: agents }, item));
|
|
95
|
-
|
|
96
|
-
strip.push(_jsx(SpaceMembers, { projectId: projectId, slug: space.name }, item));
|
|
92
|
+
// `members` showed the people of the space's Room; Rooms were removed (2026-11), so it draws nothing.
|
|
97
93
|
if (item === 'needs_you')
|
|
98
94
|
strip.push(_jsx(SpaceNeedsYou, { projectId: projectId, agents: agents }, item));
|
|
99
95
|
}
|
|
@@ -111,16 +107,6 @@ function SpaceAgents({ projectId, agents }) {
|
|
|
111
107
|
function PileMore({ count }) {
|
|
112
108
|
return (_jsxs("span", { className: "bg-muted text-muted-foreground ring-background relative flex h-6 min-w-6 items-center justify-center rounded-sm px-1 text-xs tabular-nums ring-2", children: ["+", count] }));
|
|
113
109
|
}
|
|
114
|
-
/** The people in the space's room, as a face pile. Nothing before the room exists. */
|
|
115
|
-
function SpaceMembers({ projectId, slug }) {
|
|
116
|
-
const t = useTranslations('spaces');
|
|
117
|
-
const room = useSpaceRoom(projectId, slug);
|
|
118
|
-
const detail = useRoom(projectId, room.data?.room_id ?? null);
|
|
119
|
-
const people = (detail.data?.members ?? []).filter((member) => member.kind === 'person');
|
|
120
|
-
if (!people.length)
|
|
121
|
-
return null;
|
|
122
|
-
return (_jsxs("span", { role: "group", "aria-label": t('members', { count: people.length }), className: "flex items-center -space-x-1", children: [people.slice(0, PILE).map((person) => (_jsx(UserAvatar, { name: person.label, email: person.user_id ?? person.label, size: "sm", ring: true, hint: person.label }, person.member_id))), people.length > PILE ? _jsx(PileMore, { count: people.length - PILE }) : null] }));
|
|
123
|
-
}
|
|
124
110
|
/** The sessions of the space's agents that wait on the viewer. Hidden at 0. */
|
|
125
111
|
function SpaceNeedsYou({ projectId, agents }) {
|
|
126
112
|
const t = useTranslations('spaces');
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import { type ManifestSpace, type SpaceTab } from '@kortix/sdk';
|
|
2
3
|
/** A tab's name: its `label`, else its target, else its type. */
|
|
3
4
|
export declare function useTabLabel(tab: SpaceTab): string;
|
|
4
|
-
/** The content of one tab; `tab` null is the
|
|
5
|
+
/** The content of one tab; `tab` null (a space with no tab) is the space's intro. */
|
|
5
6
|
export declare function SpaceTabPanel({ projectId, space, tab, }: {
|
|
6
7
|
projectId: string;
|
|
7
8
|
space: ManifestSpace;
|
|
8
9
|
tab: SpaceTab | null;
|
|
9
10
|
}): import("react").JSX.Element;
|
|
11
|
+
/** A pinned App, live and interactive, filling the tab. `missingAction`: shown under "not in this project" (a Space's "Remove tab"). */
|
|
12
|
+
export declare function AppTab({ projectId, slug, missingAction }: {
|
|
13
|
+
projectId: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
missingAction?: ReactNode;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
/** A pinned Artifact, its current state in a sandboxed frame. `missingAction`: shown under "gone" (a Space's "Remove tab"). */
|
|
18
|
+
export declare function ArtifactTab({ projectId, artifactId, missingAction }: {
|
|
19
|
+
projectId: string;
|
|
20
|
+
artifactId: string;
|
|
21
|
+
missingAction?: ReactNode;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { agentsInSpace, bindingSpace, listProjectDirectory, } from '@kortix/sdk';
|
|
6
|
-
import { qk, useAppAccess, useArtifact, useArtifacts,
|
|
6
|
+
import { qk, useAppAccess, useArtifact, useArtifacts, useProjectApps, useProjectConfig, useProjectGoals, } from '@kortix/sdk/react';
|
|
7
7
|
import { ArrowSquareOutIcon, FileTextIcon, FolderSimpleIcon } from '@phosphor-icons/react';
|
|
8
8
|
import { AppPreview } from '../../apps/app-preview.js';
|
|
9
9
|
import { appCan, appStatus } from '../../apps/app-shared.js';
|
|
@@ -20,7 +20,6 @@ import { ErrorState } from '../../primitives/error-state.js';
|
|
|
20
20
|
import { Skeleton } from '../../primitives/skeleton.js';
|
|
21
21
|
import { framePolicy } from '../../files/viewer/preview-policy.js';
|
|
22
22
|
import { SpaceBlocks } from './space-blocks.js';
|
|
23
|
-
import { SpaceRoom } from './space-room.js';
|
|
24
23
|
/** Same sandbox as the Artifacts viewer: the content server's CSP decides the rest. */
|
|
25
24
|
const ARTIFACT_SANDBOX = 'allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-modals allow-downloads';
|
|
26
25
|
/** A tab's name: its `label`, else its target, else its type. */
|
|
@@ -44,10 +43,10 @@ function hostOf(url) {
|
|
|
44
43
|
return url;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
/** The content of one tab; `tab` null is the
|
|
46
|
+
/** The content of one tab; `tab` null (a space with no tab) is the space's intro. */
|
|
48
47
|
export function SpaceTabPanel({ projectId, space, tab, }) {
|
|
49
48
|
if (!tab)
|
|
50
|
-
return _jsx(
|
|
49
|
+
return _jsx(SpaceIntro, { projectId: projectId, space: space });
|
|
51
50
|
switch (tab.type) {
|
|
52
51
|
case 'goals':
|
|
53
52
|
return _jsx(GoalsTab, { projectId: projectId, slug: space.name });
|
|
@@ -67,21 +66,13 @@ export function SpaceTabPanel({ projectId, space, tab, }) {
|
|
|
67
66
|
return _jsx(LinkTab, { tab: tab });
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const rooms = useFeatureFlag(projectId, 'agent_rooms');
|
|
73
|
-
if (!rooms.isLoading && !rooms.enabled) {
|
|
74
|
-
return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('roomsOff'), description: t('roomsOffHint') }) }));
|
|
75
|
-
}
|
|
76
|
-
return (_jsx(SpaceRoom, { projectId: projectId, roomName: space.name, topic: space.description, fill: true, intro: _jsx(RoomIntro, { projectId: projectId, space: space }), className: "h-full" }));
|
|
77
|
-
}
|
|
78
|
-
/** The top of the room: what the space is for, who posts in it, and how to bring someone in. */
|
|
79
|
-
function RoomIntro({ projectId, space }) {
|
|
69
|
+
/** A space with no tab: what it is for, its agents, and how to add a tab. */
|
|
70
|
+
function SpaceIntro({ projectId, space }) {
|
|
80
71
|
const t = useTranslations('spaces');
|
|
81
72
|
const locale = useLocale();
|
|
82
73
|
const agents = agentsInSpace(space.name, useProjectConfig(projectId)?.agents ?? []);
|
|
83
74
|
const names = new Intl.ListFormat(locale, { type: 'conjunction' }).format(agents.map(agentDisplayName));
|
|
84
|
-
return (_jsxs("div", { className: "flex max-w-2xl flex-col gap-3 px-5
|
|
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')] })] }));
|
|
85
76
|
}
|
|
86
77
|
/** A list tab's frame: one column on the header's gutter, so rows line up with the tabs. */
|
|
87
78
|
function ListFrame({ children }) {
|
|
@@ -163,8 +154,8 @@ function BoardTab({ projectId, tab }) {
|
|
|
163
154
|
}
|
|
164
155
|
return (_jsx("div", { className: "w-full max-w-6xl px-5 py-5 pb-20", children: _jsx(SpaceBlocks, { projectId: projectId, blocks: blocks }) }));
|
|
165
156
|
}
|
|
166
|
-
/** A pinned App, live and interactive, filling the tab. */
|
|
167
|
-
function AppTab({ projectId, slug }) {
|
|
157
|
+
/** A pinned App, live and interactive, filling the tab. `missingAction`: shown under "not in this project" (a Space's "Remove tab"). */
|
|
158
|
+
export function AppTab({ projectId, slug, missingAction }) {
|
|
168
159
|
const t = useTranslations('spaces');
|
|
169
160
|
const apps = useProjectApps(projectId);
|
|
170
161
|
const app = apps.data?.find((candidate) => candidate.slug === slug);
|
|
@@ -173,19 +164,19 @@ function AppTab({ projectId, slug }) {
|
|
|
173
164
|
if (apps.isLoading)
|
|
174
165
|
return _jsx(Centered, { children: _jsx(Skeleton, { className: "h-64 w-full max-w-4xl rounded-md" }) });
|
|
175
166
|
if (!app) {
|
|
176
|
-
return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('missing.app', { slug }) }) }));
|
|
167
|
+
return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('missing.app', { slug }), action: missingAction }) }));
|
|
177
168
|
}
|
|
178
169
|
return (_jsx(AppPreview, { app: app, url: access.session.data?.url ?? null, accessError: access.session.isError, interactive: true, className: "h-full" }));
|
|
179
170
|
}
|
|
180
|
-
/** A pinned Artifact, its current state in a sandboxed frame. */
|
|
181
|
-
function ArtifactTab({ projectId, artifactId }) {
|
|
171
|
+
/** A pinned Artifact, its current state in a sandboxed frame. `missingAction`: shown under "gone" (a Space's "Remove tab"). */
|
|
172
|
+
export function ArtifactTab({ projectId, artifactId, missingAction }) {
|
|
182
173
|
const t = useTranslations('spaces');
|
|
183
174
|
const artifact = useArtifact(projectId, artifactId);
|
|
184
175
|
const href = uiRoutes().artifacts(projectId);
|
|
185
176
|
if (artifact.isLoading)
|
|
186
177
|
return _jsx(Centered, { children: _jsx(Skeleton, { className: "h-64 w-full max-w-4xl rounded-md" }) });
|
|
187
178
|
if (!artifact.data) {
|
|
188
|
-
return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('missing.artifact') }) }));
|
|
179
|
+
return (_jsx(Centered, { children: _jsx(EmptyState, { size: "sm", title: t('missing.artifact'), action: missingAction }) }));
|
|
189
180
|
}
|
|
190
181
|
return (_jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className: "border-border flex shrink-0 items-center gap-2 border-b px-5 py-1.5", children: [_jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm font-medium", children: artifact.data.title }), href ? (_jsx(Button, { asChild: true, size: "sm", variant: "ghost", children: _jsxs(Link, { href: `${href}/${artifact.data.artifact_id}`, children: [_jsx(ArrowSquareOutIcon, {}), t('openArtifact')] }) })) : null] }), _jsx("iframe", { src: artifact.data.view_url, title: artifact.data.title, sandbox: ARTIFACT_SANDBOX, className: "bg-background min-h-0 w-full flex-1" })] }));
|
|
191
182
|
}
|
|
@@ -8,16 +8,15 @@
|
|
|
8
8
|
import { type SpaceTab } from '@kortix/sdk';
|
|
9
9
|
export interface SpaceTemplate {
|
|
10
10
|
/** Also the catalog key of its name and hint: `spaces.templates.<id>`. */
|
|
11
|
-
id: 'standard' | '
|
|
12
|
-
/** The tabs
|
|
11
|
+
id: 'standard' | 'board';
|
|
12
|
+
/** The starting tabs. */
|
|
13
13
|
tabs: SpaceTab[];
|
|
14
14
|
}
|
|
15
15
|
/** The presets the New space dialog offers, in order. The first is the default. */
|
|
16
16
|
export declare function spaceTemplates(t: (key: 'tabs.board' | 'templates.board.brief' | 'templates.board.text') => string): SpaceTemplate[];
|
|
17
17
|
export declare const SPACE_TEMPLATES: SpaceTemplate[];
|
|
18
|
-
/** Turn a space name into a `spaces:` key
|
|
19
|
-
*
|
|
20
|
-
* starting with a letter or a digit. */
|
|
18
|
+
/** Turn a space name into a `spaces:` key: at most 63 characters, starting
|
|
19
|
+
* with a letter or a digit. */
|
|
21
20
|
export declare function slugifySpace(name: string): string;
|
|
22
21
|
/** Add `spaces.<slug>` to a `kortix.yaml` text. Returns the new text. */
|
|
23
22
|
export declare function addSpaceToManifest(yamlText: string, input: {
|