@kortix/ui 0.14.5 → 0.14.7
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 +489 -381
- package/dist/access/access/access-dialog.js +8 -5
- package/dist/access/access/copy-row.js +2 -2
- package/dist/access/sharing-picker.js +2 -1
- package/dist/browser/app-in-browser.js +5 -3
- package/dist/browser/browser-panel.js +6 -6
- package/dist/browser/sandbox-browser-chrome.d.ts +4 -1
- package/dist/browser/sandbox-browser-chrome.js +4 -3
- package/dist/customize/agents/agent-access.d.ts +20 -0
- package/dist/customize/agents/agent-access.js +17 -0
- package/dist/customize/agents/agent-authority-card.js +1 -2
- package/dist/customize/agents/agent-detail-aside.js +15 -14
- package/dist/customize/agents/agent-drives-section.js +5 -6
- package/dist/customize/agents/agent-grant-pages.js +73 -76
- package/dist/customize/agents/agent-nav.prototype.d.ts +35 -0
- package/dist/customize/agents/agent-nav.prototype.js +95 -0
- package/dist/customize/agents/agent-page.js +59 -23
- package/dist/customize/agents/agent-people-section.js +18 -17
- package/dist/customize/agents/agent-triggers-section.js +6 -5
- package/dist/customize/agents/agents-page.js +18 -1
- package/dist/customize/connectors/add-mcp/add-mcp-server.js +4 -2
- package/dist/customize/connectors/catalog/catalog-entry.d.ts +14 -0
- package/dist/customize/connectors/catalog/catalog-entry.js +18 -1
- package/dist/customize/connectors/catalog/connector-browse.d.ts +28 -0
- package/dist/customize/connectors/catalog/connector-browse.js +18 -5
- package/dist/customize/connectors/connector-routes.d.ts +3 -1
- package/dist/customize/connectors/connector-routes.js +18 -0
- package/dist/customize/connectors/connectors-page.js +23 -4
- package/dist/customize/connectors/detail/app-page.js +19 -5
- package/dist/customize/connectors/detail/connector-advanced-tools.js +4 -6
- package/dist/customize/connectors/detail/connector-modal.d.ts +10 -13
- package/dist/customize/connectors/detail/connector-modal.js +18 -101
- package/dist/customize/connectors/detail/connector-notice.js +6 -2
- package/dist/customize/connectors/detail/connector-page.d.ts +30 -0
- package/dist/customize/connectors/detail/connector-page.js +26 -13
- package/dist/customize/providers/provider-accordion.js +2 -1
- package/dist/customize/providers/provider-connect.js +2 -1
- package/dist/customize/sections/component/telegram-channel-row.js +1 -1
- package/dist/customize/sections/connector-connection-modal.js +11 -9
- package/dist/customize/sections/connectors-view.js +11 -13
- package/dist/customize/sections/llm-provider/custom-provider-form.js +24 -7
- package/dist/customize/sections/llm-provider/custom-provider-panel.js +44 -8
- package/dist/customize/sections/llm-provider/types.d.ts +3 -0
- package/dist/customize/sections/llm-provider/utils.js +2 -2
- package/dist/customize/sections/view/agent-editor-access-fields.d.ts +9 -16
- package/dist/customize/sections/view/agent-editor-access-fields.js +30 -30
- package/dist/customize/sections/view/agent-editor-basics-fields.js +3 -10
- package/dist/customize/sections/view/agent-editor-primitives.d.ts +28 -10
- package/dist/customize/sections/view/agent-editor-primitives.js +32 -19
- package/dist/customize/sections/view/agent-editor.js +3 -3
- package/dist/customize/sections/view/gateway/gateway-routing.js +18 -21
- package/dist/customize/sections/view/grant-mode-field.d.ts +2 -5
- package/dist/customize/sections/view/grant-mode-field.js +10 -18
- package/dist/customize/sections/view/permission-editor.js +11 -8
- package/dist/customize/sections/view/secrets-view.js +2 -1
- package/dist/customize/settings/rail-copy-context.js +5 -3
- package/dist/customize/settings/tabs/general-tab.d.ts +9 -2
- package/dist/customize/settings/tabs/general-tab.js +33 -11
- package/dist/customize/settings/tabs/sandbox-template-form.js +9 -12
- package/dist/customize/settings/tabs/transfer-workspace-dialog.d.ts +4 -0
- package/dist/customize/settings/tabs/transfer-workspace-dialog.js +82 -0
- package/dist/customize/shared/capability-tabs.js +2 -1
- package/dist/customize/skills/skills-page.js +3 -5
- package/dist/customize/triggers/schedule/event-trigger-copy.js +3 -2
- package/dist/customize/triggers/schedule/schedule-builder.js +7 -4
- package/dist/customize/triggers/schedule/trigger-composer.js +5 -2
- package/dist/customize/triggers/schedule/when-event.js +1 -1
- package/dist/diff/diff-view.js +9 -10
- package/dist/files/editor/code-editor.js +2 -3
- package/dist/files/project/api/runtime-files.js +3 -2
- package/dist/files/project/components/change-request-detail-dialog.d.ts +3 -1
- package/dist/files/project/components/change-request-detail-dialog.js +3 -5
- package/dist/files/project/components/change-request-status-badge.d.ts +12 -0
- package/dist/files/project/components/change-request-status-badge.js +27 -0
- package/dist/files/project/components/change-requests-panel.js +1 -1
- package/dist/files/project/components/drive-explorer.js +2 -1
- package/dist/files/project/components/drive-grid-view.js +11 -7
- package/dist/files/project/components/drive-list-view.js +4 -4
- package/dist/files/project/components/file-breadcrumbs.js +1 -1
- package/dist/files/project/components/file-explorer-page.js +1 -1
- package/dist/files/project/components/file-history-popover.js +1 -6
- package/dist/files/project/components/file-search.js +6 -1
- package/dist/files/project/components/open-change-request-dialog.js +2 -1
- package/dist/files/project/components/version-selector-logic.d.ts +11 -0
- package/dist/files/project/components/version-selector-logic.js +26 -0
- package/dist/files/project/components/version-selector.js +11 -20
- package/dist/files/project/file-source.js +18 -1
- package/dist/files/project/hooks/use-file-content.js +2 -0
- package/dist/files/project/hooks/use-server-health.js +17 -15
- package/dist/files/renderers/docx/docx-viewer.js +0 -5
- package/dist/files/renderers/image-renderer.js +6 -24
- package/dist/files/renderers/pdf/pdf-viewer.js +1 -1
- package/dist/files/renderers/presentation/FullScreenPresentationViewer.js +2 -11
- package/dist/files/renderers/show-content-renderer.js +1 -1
- package/dist/files/renderers/sqlite-renderer.js +8 -3
- package/dist/files/renderers/xlsx/xlsx-viewer.js +15 -16
- package/dist/files/tree/components/file-tree-item.js +1 -1
- package/dist/files/viewer/file-header.js +1 -1
- package/dist/files/viewer/file-preview-modal.d.ts +1 -1
- package/dist/files/viewer/file-preview-modal.js +13 -3
- package/dist/files/viewer/file-source.d.ts +3 -1
- package/dist/files/viewer/use-file-content-state.js +27 -8
- package/dist/files/viewer/viewer-actions.js +2 -2
- package/dist/i18n/en.d.ts +355 -12
- package/dist/i18n/en.js +360 -17
- package/dist/internal/desktop/desktop-back-button.js +5 -3
- package/dist/internal/files/types.d.ts +2 -0
- package/dist/internal/goals/goal-meta.d.ts +30 -0
- package/dist/internal/goals/goal-meta.js +55 -0
- package/dist/internal/hooks/use-auto-scroll.js +5 -3
- package/dist/internal/lib/query-client-singleton.d.ts +9 -3
- package/dist/internal/lib/query-client-singleton.js +18 -12
- package/dist/internal/notifications/notification-rows.js +2 -1
- package/dist/internal/outcomes/outcome-types.d.ts +5 -0
- package/dist/internal/share/session-shares-modal.js +3 -7
- package/dist/internal/stores/kortix-computer-store.js +14 -2
- package/dist/internal/stores/session-hover-store.d.ts +32 -0
- package/dist/internal/stores/session-hover-store.js +38 -0
- package/dist/internal/stores/sidebar-nav-store.d.ts +1 -1
- package/dist/internal/stores/sidebar-nav-store.js +3 -1
- package/dist/lib/routes.d.ts +2 -0
- package/dist/lib/routes.js +1 -0
- package/dist/markdown/code/inline-code.js +8 -0
- package/dist/markdown/code/output-paths-context.d.ts +18 -0
- package/dist/markdown/code/output-paths-context.js +35 -0
- package/dist/markdown/genui/components/charts.js +6 -5
- package/dist/primitives/map.js +2 -1
- package/dist/primitives/preview-image.js +4 -2
- package/dist/primitives/settings-section-header.d.ts +1 -1
- package/dist/primitives/textarea.js +1 -1
- package/dist/primitives/typed-title.js +12 -14
- package/dist/primitives/typing-animation.js +4 -2
- package/dist/session/composer/agent-selector.js +6 -1
- package/dist/session/composer/attachment-tile.d.ts +0 -2
- package/dist/session/composer/attachment-tile.js +0 -8
- package/dist/session/composer/clipboard-files.d.ts +2 -1
- package/dist/session/composer/composer-chat-input.js +5 -3
- package/dist/session/composer/composer-draft-recovery.d.ts +1 -2
- package/dist/session/composer/composer-draft-recovery.js +0 -13
- package/dist/session/composer/composer-logic.js +8 -7
- package/dist/session/composer/context-ring.d.ts +1 -1
- package/dist/session/composer/context-ring.js +2 -2
- package/dist/session/composer/context-usage.d.ts +3 -6
- package/dist/session/composer/context-usage.js +3 -6
- package/dist/session/composer/draft/composer-draft.js +4 -4
- package/dist/session/composer/inbox-row-claims.d.ts +2 -2
- package/dist/session/composer/inbox-row-claims.js +1 -1
- package/dist/session/composer/pasted-text.js +3 -2
- package/dist/session/composer/queue-projection.d.ts +3 -2
- package/dist/session/composer/queued-prompt-edit.d.ts +1 -1
- package/dist/session/composer/reasoning-effort-selector.d.ts +2 -1
- package/dist/session/composer/session-composer-readiness.d.ts +7 -22
- package/dist/session/composer/session-composer-readiness.js +12 -40
- package/dist/session/composer/stores/queued-draft-store.js +3 -2
- package/dist/session/composer/token-progress.d.ts +1 -1
- package/dist/session/composer/token-progress.js +2 -2
- package/dist/session/header/reminder-parts.d.ts +11 -2
- package/dist/session/header/reminder-parts.js +9 -4
- package/dist/session/header/session-goal-indicator.d.ts +1 -0
- package/dist/session/header/session-goal-indicator.js +41 -0
- package/dist/session/header/session-site-header.js +2 -1
- package/dist/session/media/sandbox-url-detector.js +0 -7
- package/dist/session/outcomes/change-request-outcomes.js +24 -3
- package/dist/session/overrides/provider-secret-pool-editor.js +2 -1
- package/dist/session/panel/advanced/advanced-panel.js +3 -7
- package/dist/session/panel/easy/app-preview.js +12 -2
- package/dist/session/panel/easy/easy-panel-logic.d.ts +1 -1
- package/dist/session/panel/easy/easy-panel-logic.js +1 -1
- package/dist/session/panel/easy/outputs-card.js +2 -1
- package/dist/session/panel/easy/panel-card.js +5 -3
- package/dist/session/panel/easy/preview-load.d.ts +14 -0
- package/dist/session/panel/easy/preview-load.js +15 -0
- package/dist/session/panel/easy/step-detail-body.js +2 -7
- package/dist/session/panel/session-action-panel-column.js +11 -1
- package/dist/session/panel/session-audit-shared.d.ts +0 -4
- package/dist/session/panel/session-audit-shared.js +1 -1
- package/dist/session/panel/session-changes-shared.d.ts +2 -1
- package/dist/session/panel/session-panel-provider.js +6 -2
- package/dist/session/panel/shared/use-panel-derivations.js +6 -4
- package/dist/session/panel/use-session-panel-layout.js +7 -5
- package/dist/session/print/session-print-header.js +9 -8
- package/dist/session/prompts/session-permission-prompt.js +6 -3
- package/dist/session/status/provisioning-failure.d.ts +2 -1
- package/dist/session/status/session-error-banner.js +8 -6
- package/dist/session/status/session-starting-loader.d.ts +24 -31
- package/dist/session/status/session-starting-loader.js +32 -81
- package/dist/session/thread/chat-minimap-items.d.ts +4 -4
- package/dist/session/thread/first-prompt-handover.d.ts +3 -2
- package/dist/session/thread/message-parsing.d.ts +3 -3
- package/dist/session/thread/session-chat.js +15 -19
- package/dist/session/thread/session-history-scroll.d.ts +2 -1
- package/dist/session/thread/session-history.js +3 -1
- package/dist/session/thread/session-thread.js +1 -1
- package/dist/session/thread/transcript.js +13 -7
- package/dist/session/tool/shared/file-list.js +19 -2
- package/dist/session/tool/shared/infrastructure-contexts.d.ts +7 -0
- package/dist/session/tool/shared/infrastructure-contexts.js +7 -0
- package/dist/session/tool/shared/infrastructure-output.js +9 -5
- package/dist/session/tool/shared/infrastructure-row-header.js +9 -1
- package/dist/session/tool/shared/infrastructure-rows.js +7 -5
- package/dist/session/tool/tools/bash-tool.js +10 -6
- package/dist/session/tool/tools/web-search-tool.js +25 -3
- package/dist/session/turn/recovered-failures.d.ts +8 -0
- package/dist/session/turn/recovered-failures.js +32 -0
- package/dist/session/turn/streaming-cadence.js +5 -8
- package/dist/styles.css +1 -1
- package/dist/terminal/pty-connection.d.ts +5 -4
- package/dist/terminal/session-terminal-panel.js +3 -5
- package/dist/theme/theme.js +2 -1
- package/dist/workspace/index.d.ts +1 -0
- package/dist/workspace/index.js +1 -0
- package/dist/workspace/projects/modal/github-import-pickers.js +7 -6
- package/dist/workspace/review/review-center.js +13 -10
- package/dist/workspace/saved-session-skeleton-shape.d.ts +4 -3
- package/dist/workspace/saved-session-skeleton.d.ts +5 -1
- package/dist/workspace/saved-session-skeleton.js +5 -4
- package/dist/workspace/session-workspace.js +9 -14
- package/dist/workspace/sessions/deleted-session-row.js +5 -2
- package/dist/workspace/sidebar/footer/project-computer-nav.js +6 -4
- package/dist/workspace/sidebar/footer/project-goals-nav.d.ts +6 -0
- package/dist/workspace/sidebar/footer/project-goals-nav.js +26 -0
- package/dist/workspace/sidebar/footer/project-mcp-nav.js +6 -2
- package/dist/workspace/sidebar/modal/rename-session-modal.js +8 -3
- package/dist/workspace/sidebar/modal/session-embed-section.d.ts +25 -0
- package/dist/workspace/sidebar/modal/session-embed-section.js +71 -0
- package/dist/workspace/sidebar/modal/share-session-modal.js +2 -2
- package/dist/workspace/sidebar/nav-row-meta.js +14 -2
- package/dist/workspace/sidebar/project-nav-items.js +3 -0
- package/dist/workspace/sidebar/project-session-list.js +12 -3
- package/dist/workspace/sidebar/session-brief-hover-card.js +5 -8
- package/package.json +4 -4
- package/skills/kortix-ui/references/modules.md +2 -0
- package/dist/session/status/use-readiness-settling.d.ts +0 -18
- package/dist/session/status/use-readiness-settling.js +0 -43
- package/dist/workspace/sidebar/modal/session-public-link-section.d.ts +0 -13
- package/dist/workspace/sidebar/modal/session-public-link-section.js +0 -66
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ProjectAppsNavItem } from './footer/project-apps-nav.js';
|
|
4
|
+
import { ProjectGoalsNavItem } from './footer/project-goals-nav.js';
|
|
4
5
|
import { ProjectRoomsNavItem } from './footer/project-rooms-nav.js';
|
|
5
6
|
import { ProjectFilesNavItem } from './footer/project-files-nav.js';
|
|
6
7
|
import { ProjectCustomizeNavItem } from '../../internal/layout/project-settings-nav.js';
|
|
@@ -95,5 +96,7 @@ function NavItem({ entry, projectId }) {
|
|
|
95
96
|
return _jsx(ProjectFilesNavItem, { projectId: projectId });
|
|
96
97
|
case 'rooms':
|
|
97
98
|
return _jsx(ProjectRoomsNavItem, { projectId: projectId });
|
|
99
|
+
case 'goals':
|
|
100
|
+
return _jsx(ProjectGoalsNavItem, { projectId: projectId });
|
|
98
101
|
}
|
|
99
102
|
}
|
|
@@ -39,8 +39,8 @@ import { selectExpandedIds, useSessionExpandedStore } from '../../internal/store
|
|
|
39
39
|
import { selectCollapsedSections, selectGroupMode, selectHiddenSections, selectLabelFilters, selectOrderMode, selectSourceFilters, selectStatusFilters, useSessionFilterStore, } from '../../internal/stores/session-filter-store.js';
|
|
40
40
|
import { shouldBeginSessionSwitch, useSessionSwitchStore } from '../../internal/stores/session-switch-store.js';
|
|
41
41
|
import { directSubsessions, createProjectSession, listChangeRequests, restartProjectSession, sessionParentId, stopProjectSession, } from '@kortix/sdk';
|
|
42
|
-
import { qk, useProjectSession, useProjectSessions, useRuntimeSupports, useSessionChildren, } from '@kortix/sdk/react';
|
|
43
|
-
import { ArchiveIcon, ArrowsSplitIcon, CaretRightIcon, DotsThreeIcon, PushPinIcon, PushPinSlashIcon, RobotIcon, GitForkIcon, PencilSimpleIcon, ArrowCounterClockwiseIcon as RotateCcw, ShareIcon as Share, SparkleIcon, SquareIcon as Square, TagIcon, TrashIcon, TreeViewIcon, } from '@phosphor-icons/react';
|
|
42
|
+
import { qk, useProjectSession, useProjectSessions, useRuntimeSupports, useSessionChildren, useFeatureFlag, useSessionGoal, } from '@kortix/sdk/react';
|
|
43
|
+
import { ArchiveIcon, ArrowsSplitIcon, CaretRightIcon, DotsThreeIcon, PushPinIcon, PushPinSlashIcon, RobotIcon, GitForkIcon, PencilSimpleIcon, ArrowCounterClockwiseIcon as RotateCcw, ShareIcon as Share, SparkleIcon, TargetIcon, SquareIcon as Square, TagIcon, TrashIcon, TreeViewIcon, } from '@phosphor-icons/react';
|
|
44
44
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
45
45
|
import { formatDistanceToNowStrict } from 'date-fns';
|
|
46
46
|
import { useUiPathname, useUiRouter, useUiSearchParams, useUiViewerId } from '../../providers/ui-provider.js';
|
|
@@ -549,7 +549,7 @@ function ProjectSessionRow({ session, href, isActive, isSwitching, onNavigate, d
|
|
|
549
549
|
// same `reviewCount` prop, so they agree by construction rather than by luck.
|
|
550
550
|
const displayStatus = sessionDisplayStatus(session, reviewCount);
|
|
551
551
|
const waitingOn = awaitingAnswer ? 'answer' : 'review';
|
|
552
|
-
const sessionLink = (_jsxs(HoverPrefetchLink, { href: href, prefetch: true, onClick: onNavigate, ...openIntent, "aria-busy": isSwitching || undefined, "aria-current": isActive ? 'page' : undefined, "aria-describedby": descriptionId, className: "focus-visible:ring-kortix-base flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-md py-1 focus-visible:ring-[0.6px] focus-visible:outline-none", children: [_jsx("div", { className: "size-4 shrink-0", children: spawned ? (_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "text-muted-foreground size-4" })) : (_jsx(SessionStatusDot, { session: session, reviewCount: reviewCount, waitingOn: waitingOn, changeRequests: changeRequests })) }), isMeta && (_jsx(Hint, { side: "top", label: t('metaCoordinator'), children: _jsx("span", { className: "text-muted-foreground flex size-4 shrink-0 items-center justify-center", children: _jsx(SparkleIcon, { className: "size-3.5", weight: "fill" }) }) })), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx(SessionTitle, { title: displayTitle, className: cn('min-w-0', isActive && 'font-medium') }), _jsx("span", { className: "hidden max-md:block pointer-coarse:block [@media(hover:none)]:block", "aria-hidden": true, "data-session-mobile-created-at": "true", children: _jsx(MobileSessionCreatedTime, { createdAt: session.created_at }) })] }), subagentCount + spawnedCount > 0 && onToggleChildRuns && (_jsx(ChildRunsToggle, { count: subagentCount + spawnedCount, open: childRunsOpen, onToggle: onToggleChildRuns, clearOfMenu: !hasIndicators })), hasIndicators && (_jsxs("div", { className: cn('flex shrink-0 items-center gap-0 transition-none', 'max-md:hidden pointer-coarse:hidden [@media(hover:none)]:hidden', 'group-hover/session-list:pointer-events-none group-hover/session-list:opacity-0', 'group-has-data-[state=open]/session-list:pointer-events-none group-has-data-[state=open]/session-list:opacity-0'), "data-session-indicators": "true", children: [showStarter && (_jsx("span", { className: "flex size-5 shrink-0 items-center justify-center", "data-session-source": "true", "data-session-starter": starter.type, children: _jsx(Hint, { side: "top", label: t('startedByLabel', { name: starter.label }), children: _jsx("span", { className: "text-muted-foreground flex size-5 items-center justify-center", children: _jsx(SessionStarterMark, { session: session, starter: starter, iconClassName: "size-3", avatarClassName: "size-5" }) }) }) })), !inSharedGroup && _jsx(SessionSharedIcon, { session: session })] }))] }));
|
|
552
|
+
const sessionLink = (_jsxs(HoverPrefetchLink, { href: href, prefetch: true, onClick: onNavigate, ...openIntent, "aria-busy": isSwitching || undefined, "aria-current": isActive ? 'page' : undefined, "aria-describedby": descriptionId, className: "focus-visible:ring-kortix-base flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-md py-1 focus-visible:ring-[0.6px] focus-visible:outline-none", children: [_jsx("div", { className: "size-4 shrink-0", children: spawned ? (_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "text-muted-foreground size-4" })) : (_jsx(SessionStatusDot, { session: session, reviewCount: reviewCount, waitingOn: waitingOn, changeRequests: changeRequests })) }), _jsx(SessionGoalMark, { projectId: session.project_id, sessionId: session.session_id }), isMeta && (_jsx(Hint, { side: "top", label: t('metaCoordinator'), children: _jsx("span", { className: "text-muted-foreground flex size-4 shrink-0 items-center justify-center", children: _jsx(SparkleIcon, { className: "size-3.5", weight: "fill" }) }) })), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx(SessionTitle, { title: displayTitle, className: cn('min-w-0', isActive && 'font-medium') }), _jsx("span", { className: "hidden max-md:block pointer-coarse:block [@media(hover:none)]:block", "aria-hidden": true, "data-session-mobile-created-at": "true", children: _jsx(MobileSessionCreatedTime, { createdAt: session.created_at }) })] }), subagentCount + spawnedCount > 0 && onToggleChildRuns && (_jsx(ChildRunsToggle, { count: subagentCount + spawnedCount, open: childRunsOpen, onToggle: onToggleChildRuns, clearOfMenu: !hasIndicators })), hasIndicators && (_jsxs("div", { className: cn('flex shrink-0 items-center gap-0 transition-none', 'max-md:hidden pointer-coarse:hidden [@media(hover:none)]:hidden', 'group-hover/session-list:pointer-events-none group-hover/session-list:opacity-0', 'group-has-data-[state=open]/session-list:pointer-events-none group-has-data-[state=open]/session-list:opacity-0'), "data-session-indicators": "true", children: [showStarter && (_jsx("span", { className: "flex size-5 shrink-0 items-center justify-center", "data-session-source": "true", "data-session-starter": starter.type, children: _jsx(Hint, { side: "top", label: t('startedByLabel', { name: starter.label }), children: _jsx("span", { className: "text-muted-foreground flex size-5 items-center justify-center", children: _jsx(SessionStarterMark, { session: session, starter: starter, iconClassName: "size-3", avatarClassName: "size-5" }) }) }) })), !inSharedGroup && _jsx(SessionSharedIcon, { session: session })] }))] }));
|
|
553
553
|
return (_jsx("div", { className: "group/session-list block", children: _jsxs("div", { className: cn(
|
|
554
554
|
// --session-row-surface paints the row AND the title fade in the same
|
|
555
555
|
// style pass. Do not transition background — transition-colors made the
|
|
@@ -602,6 +602,15 @@ function ProjectSubsessionRow({ id, title, href, isActive, createdAt, updatedAt,
|
|
|
602
602
|
: '';
|
|
603
603
|
return (_jsx(SubagentHoverCard, { id: id, title: title, createdAt: createdAt, updatedAt: updatedAt, children: _jsx(HoverPrefetchLink, { href: href, className: "block", children: _jsxs("div", { className: cn('flex h-8 cursor-pointer items-center gap-2 rounded-lg px-2 text-sm', isActive ? 'bg-sidebar-accent text-sidebar-foreground font-medium' : ''), children: [_jsx(RobotIcon, { "aria-hidden": true, className: "text-muted-foreground size-4 shrink-0" }), _jsx("span", { className: cn('flex-1 truncate', isActive && 'font-medium'), children: title }), relative && _jsx("span", { className: SESSION_RELATIVE_TIME_CLASS, children: relative })] }) }) }));
|
|
604
604
|
}
|
|
605
|
+
/** A target beside a session that runs a goal (flag `goals`); the hint names the goal. */
|
|
606
|
+
function SessionGoalMark({ projectId, sessionId }) {
|
|
607
|
+
const tGoals = useTranslations('goals');
|
|
608
|
+
const flag = useFeatureFlag(projectId, 'goals');
|
|
609
|
+
const { goal, role } = useSessionGoal(flag.enabled ? projectId : null, sessionId);
|
|
610
|
+
if (!goal || role !== 'coordinator')
|
|
611
|
+
return null;
|
|
612
|
+
return (_jsx(Hint, { side: "top", label: `${tGoals('sessionChip')}: ${goal.goal?.objective ?? goal.slug}`, children: _jsx("span", { className: "text-muted-foreground flex size-4 shrink-0 items-center justify-center", "data-testid": "session-goal-mark", children: _jsx(TargetIcon, { className: "size-3.5" }) }) }));
|
|
613
|
+
}
|
|
605
614
|
function SessionStatusDot({ session, reviewCount = 0, waitingOn, changeRequests, }) {
|
|
606
615
|
const display = sessionDisplayStatus(session, reviewCount);
|
|
607
616
|
return (_jsx("div", { className: "flex size-4 shrink-0 items-center justify-center", children: _jsx(SessionStatusMark, { status: display, waitingOn: waitingOn, overdue: isReviewOverdue(changeRequests) }) }));
|
|
@@ -11,7 +11,7 @@ import { menuRow } from '../../primitives/menu-recipe.js';
|
|
|
11
11
|
import { CR_ID_PREFIX } from '../review/review-actions.js';
|
|
12
12
|
import { reviewHref } from '../../internal/lib/capability-tab-routes.js';
|
|
13
13
|
import { useTranslations } from '../../i18n/index.js';
|
|
14
|
-
import { useSessionHoverStore } from '../../internal/stores/session-hover-store.js';
|
|
14
|
+
import { sessionRowHoverHandlers, useSessionHoverStore } from '../../internal/stores/session-hover-store.js';
|
|
15
15
|
import { ArrowsSplitIcon, GitDiffIcon, RobotIcon } from '@phosphor-icons/react';
|
|
16
16
|
import { formatDistanceToNowStrict } from 'date-fns';
|
|
17
17
|
import { Slot } from 'radix-ui';
|
|
@@ -180,20 +180,17 @@ export function SessionBriefCardHost() {
|
|
|
180
180
|
function SessionBriefCard({ id, children, content, }) {
|
|
181
181
|
const open = useSessionHoverStore((state) => state.activeSessionId === id);
|
|
182
182
|
const slot = useSessionHoverStore((state) => state.slot);
|
|
183
|
-
const openSession = useSessionHoverStore((state) => state.openSession);
|
|
184
|
-
const closeSession = useSessionHoverStore((state) => state.closeSession);
|
|
185
183
|
// A row can be filtered out, or the sidebar unmounted, while its card shows.
|
|
186
184
|
// Without this the store keeps naming a row that no longer exists and the
|
|
187
|
-
// group is still warm the next time the list mounts.
|
|
185
|
+
// group is still warm the next time the list mounts. A row unmounted under
|
|
186
|
+
// the pointer gets no pointerleave, so its click's suppression ends here too.
|
|
188
187
|
useEffect(() => () => {
|
|
189
188
|
const store = useSessionHoverStore.getState();
|
|
190
189
|
if (store.activeSessionId === id)
|
|
191
190
|
store.dismiss();
|
|
191
|
+
store.release(id);
|
|
192
192
|
}, [id]);
|
|
193
|
-
return (_jsxs(_Fragment, { children: [_jsx(Slot.Root, { "data-state": open ? 'open' : 'closed',
|
|
194
|
-
if (event.pointerType !== 'touch')
|
|
195
|
-
openSession(id, event.currentTarget, 'pointer');
|
|
196
|
-
}, onPointerLeave: () => closeSession(id), onFocus: (event) => openSession(id, event.currentTarget, 'focus'), onBlur: () => closeSession(id), children: children }), open && slot ? createPortal(content, slot) : null] }));
|
|
193
|
+
return (_jsxs(_Fragment, { children: [_jsx(Slot.Root, { "data-state": open ? 'open' : 'closed', ...sessionRowHoverHandlers(id), children: children }), open && slot ? createPortal(content, slot) : null] }));
|
|
197
194
|
}
|
|
198
195
|
export function SessionBriefHoverCard({ sessionId, children, ...brief }) {
|
|
199
196
|
const dismiss = useSessionHoverStore((state) => state.dismiss);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kortix/ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.7",
|
|
4
4
|
"description": "Kortix UI: the shared React component library for apps/web, Kortix Apps and SDK hosts. Tailwind v4 classes, themed by CSS variables.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Elastic-2.0",
|
|
@@ -2157,7 +2157,7 @@
|
|
|
2157
2157
|
"@extend-ai/react-docx": "^0.7.5",
|
|
2158
2158
|
"@extend-ai/react-xlsx": "0.13.4",
|
|
2159
2159
|
"@glideapps/glide-data-grid": "6.0.4-alpha24",
|
|
2160
|
-
"@kortix/llm-catalog": "0.14.
|
|
2160
|
+
"@kortix/llm-catalog": "0.14.7",
|
|
2161
2161
|
"@lezer/highlight": "1.2.3",
|
|
2162
2162
|
"@paper-design/shaders-react": "^0.0.76",
|
|
2163
2163
|
"@phosphor-icons/react": "2.1.10",
|
|
@@ -2214,7 +2214,7 @@
|
|
|
2214
2214
|
"heic2any": "0.0.4",
|
|
2215
2215
|
"i18next": "^26.3.6",
|
|
2216
2216
|
"jszip": "^3.10.1",
|
|
2217
|
-
"katex": "^0.
|
|
2217
|
+
"katex": "^0.18.7",
|
|
2218
2218
|
"maplibre-gl": "6.12.0",
|
|
2219
2219
|
"mermaid": "^11.12.0",
|
|
2220
2220
|
"motion": "^12.40.0",
|
|
@@ -2246,7 +2246,7 @@
|
|
|
2246
2246
|
"zustand": "^5.0.3"
|
|
2247
2247
|
},
|
|
2248
2248
|
"peerDependencies": {
|
|
2249
|
-
"@kortix/sdk": "^0.14.
|
|
2249
|
+
"@kortix/sdk": "^0.14.7",
|
|
2250
2250
|
"@tanstack/react-query": "^5.75.2",
|
|
2251
2251
|
"@types/react": ">=18",
|
|
2252
2252
|
"react": ">=19",
|
|
@@ -373,6 +373,8 @@ export function Sessions({ projectId }: { projectId: string }) {
|
|
|
373
373
|
}
|
|
374
374
|
```
|
|
375
375
|
|
|
376
|
+
Goals (behind the `goals` flag): `GoalStatusBadge` (a goal's status), `GoalHealthDot` (green running, orange needs attention, grey closed), `useGoalIssueText` (one sentence per health issue), `goalProgress` (met and total criteria), `goalOpenAsks` (asks waiting on a person), `goalNeedsYou` (an open ask or a health issue), `formatGoalTime` (the reminders time format), `goalHref` (the goal's page, or null), `useGoalClock` (the current time, re-read every 30 s).
|
|
377
|
+
|
|
376
378
|
Names: `ProjectPageHeader`, `useCapabilityAccess`, `useProjectNavRows`, `SidebarToggle`, `activeCapabilityTab`, `agentHref`, `capabilityTabHref`, `channelsHref`, `remindersHref`, `reviewHref`, `detectManifestVersion`, `manifestFilename`, `manifestNeedsUpgrade`, `useProjectManifestVersion`, `ManifestVersion`, `CUSTOMIZE_SECTION_ACCESS`, `CUSTOMIZE_SECTION_GATE_ACTIONS`, `PROJECT_ACTIONS`, `isCustomizeSectionVisible`, `CustomizeSection`, `ProjectAction`, `usePermission`, `usePermissions`, `usePermissionsFor`, `PROJECT_PAGE_ACTIONS`, `useProjectCan`, `useProjectCans`, `useProjectPageCans`, `CanResult`, `formatFireTime`, `nearestFire`, `reminderTitle`, `scheduleLabel`, `ProjectHomeWallpaper`, `ProjectHomeWelcomeBody`, `InstantSessionShell`, `ProjectFilesView`, `ProjectHome`, `ProjectHomeSendOptions`, `useProjectHomeSend`, `UseProjectHomeSendOptions`, `SavedSessionSkeleton`, `SessionLayout`, `SessionWorkspace`, `SessionLayoutProps`, `SessionWorkspaceProps`, `ProjectSessionsView`, `ProjectSessionList`, `ProjectSidebar`, `ShareSessionModal`
|
|
377
379
|
|
|
378
380
|
## `@kortix/ui/access`
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How long a freshly mounted session may say NOTHING about its runtime.
|
|
3
|
-
*
|
|
4
|
-
* Long enough to cover the first health probe + `GET .../turn` round trip on a
|
|
5
|
-
* healthy session (both answer well inside a second locally and on dev), short
|
|
6
|
-
* enough that a genuinely parked box still announces its wake promptly. The
|
|
7
|
-
* cost of being wrong in one direction is a false "your session dropped" flash
|
|
8
|
-
* on every page load; in the other, a real wake notice arrives ~1.5s later.
|
|
9
|
-
*/
|
|
10
|
-
export declare const READINESS_SETTLE_MS = 1500;
|
|
11
|
-
/**
|
|
12
|
-
* True while the runtime has not been contacted yet AND the mount is young.
|
|
13
|
-
*
|
|
14
|
-
* Feeds `sessionComposerReadiness({ settling })`, whose fallback would
|
|
15
|
-
* otherwise assert "Waking this session up…" the instant a page loads — the
|
|
16
|
-
* one claim nothing had checked. See that input's docstring.
|
|
17
|
-
*/
|
|
18
|
-
export declare function useReadinessSettling(uncontacted: boolean, windowMs?: number): boolean;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
/**
|
|
4
|
-
* How long a freshly mounted session may say NOTHING about its runtime.
|
|
5
|
-
*
|
|
6
|
-
* Long enough to cover the first health probe + `GET .../turn` round trip on a
|
|
7
|
-
* healthy session (both answer well inside a second locally and on dev), short
|
|
8
|
-
* enough that a genuinely parked box still announces its wake promptly. The
|
|
9
|
-
* cost of being wrong in one direction is a false "your session dropped" flash
|
|
10
|
-
* on every page load; in the other, a real wake notice arrives ~1.5s later.
|
|
11
|
-
*/
|
|
12
|
-
export const READINESS_SETTLE_MS = 1_500;
|
|
13
|
-
/**
|
|
14
|
-
* True while the runtime has not been contacted yet AND the mount is young.
|
|
15
|
-
*
|
|
16
|
-
* Feeds `sessionComposerReadiness({ settling })`, whose fallback would
|
|
17
|
-
* otherwise assert "Waking this session up…" the instant a page loads — the
|
|
18
|
-
* one claim nothing had checked. See that input's docstring.
|
|
19
|
-
*/
|
|
20
|
-
export function useReadinessSettling(uncontacted, windowMs = READINESS_SETTLE_MS) {
|
|
21
|
-
// The window is identified by WHEN it opened, and that instant is state, not a
|
|
22
|
-
// ref: an earlier cut bumped a ref inside the effect and compared it during
|
|
23
|
-
// render, so on the first render of each window the ref still held the
|
|
24
|
-
// previous value, the hook answered "not settling", and the notice this hook
|
|
25
|
-
// exists to suppress flashed anyway before the effect could run.
|
|
26
|
-
const [openedAt, setOpenedAt] = useState(null);
|
|
27
|
-
const [elapsedFor, setElapsedFor] = useState(null);
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (!uncontacted) {
|
|
30
|
-
setOpenedAt(null);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const startedAt = Date.now();
|
|
34
|
-
setOpenedAt(startedAt);
|
|
35
|
-
const timer = window.setTimeout(() => setElapsedFor(startedAt), windowMs);
|
|
36
|
-
return () => window.clearTimeout(timer);
|
|
37
|
-
}, [uncontacted, windowMs]);
|
|
38
|
-
// Settling from the first render onward: `openedAt === null` means the effect
|
|
39
|
-
// has not run yet, which is the very moment the flash used to happen.
|
|
40
|
-
if (!uncontacted)
|
|
41
|
-
return false;
|
|
42
|
-
return openedAt === null || elapsedFor !== openedAt;
|
|
43
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* "Public link" in the Share dialog: a read-only, sign-in-free link to this
|
|
3
|
-
* session's conversation. One live link per session (the API returns the
|
|
4
|
-
* existing one on a second create), so the section shows either that link with
|
|
5
|
-
* Copy and Revoke, or the one button that creates it.
|
|
6
|
-
*
|
|
7
|
-
* Mounted inside `ModalContent`, so the share list is read only while the
|
|
8
|
-
* dialog is open.
|
|
9
|
-
*/
|
|
10
|
-
export declare function SessionPublicLinkSection({ projectId, sessionId, }: {
|
|
11
|
-
projectId: string;
|
|
12
|
-
sessionId: string;
|
|
13
|
-
}): import("react").JSX.Element;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { PublicShareLinkConfirm } from '../../../internal/share/public-share-link-confirm.js';
|
|
4
|
-
import { Button } from '../../../primitives/button.js';
|
|
5
|
-
import { ConfirmDialog } from '../../../primitives/confirm-dialog.js';
|
|
6
|
-
import Hint from '../../../primitives/hint.js';
|
|
7
|
-
import { Label } from '../../../primitives/label.js';
|
|
8
|
-
import Loading from '../../../primitives/loading.js';
|
|
9
|
-
import { errorToast, successToast } from '../../../primitives/toast.js';
|
|
10
|
-
import { usePublicShareLink } from '../../../internal/share/use-public-share-link.js';
|
|
11
|
-
import { publicShareUrl, useRevokePublicShare, useSessionPublicShares, } from '../../../internal/share/use-session-public-shares.js';
|
|
12
|
-
import { useTranslations } from '../../../i18n/index.js';
|
|
13
|
-
import { findActiveTranscriptShare } from '@kortix/sdk';
|
|
14
|
-
import { CheckIcon, CopyIcon, LinkSimpleIcon } from '@phosphor-icons/react';
|
|
15
|
-
import { useEffect, useRef, useState } from 'react';
|
|
16
|
-
// Module-level so `usePublicShareLink` sees one stable input object.
|
|
17
|
-
const TRANSCRIPT_SHARE_INPUT = { transcript: true };
|
|
18
|
-
/**
|
|
19
|
-
* "Public link" in the Share dialog: a read-only, sign-in-free link to this
|
|
20
|
-
* session's conversation. One live link per session (the API returns the
|
|
21
|
-
* existing one on a second create), so the section shows either that link with
|
|
22
|
-
* Copy and Revoke, or the one button that creates it.
|
|
23
|
-
*
|
|
24
|
-
* Mounted inside `ModalContent`, so the share list is read only while the
|
|
25
|
-
* dialog is open.
|
|
26
|
-
*/
|
|
27
|
-
export function SessionPublicLinkSection({ projectId, sessionId, }) {
|
|
28
|
-
const t = useTranslations('hardcodedUi.publicTranscriptShare');
|
|
29
|
-
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
30
|
-
const { shares, isLoading, isError } = useSessionPublicShares(projectId, sessionId);
|
|
31
|
-
const link = usePublicShareLink({ projectId, sessionId, input: TRANSCRIPT_SHARE_INPUT });
|
|
32
|
-
const { revoke, revokingId } = useRevokePublicShare(projectId, sessionId);
|
|
33
|
-
const [confirmRevoke, setConfirmRevoke] = useState(false);
|
|
34
|
-
const [copied, setCopied] = useState(false);
|
|
35
|
-
const copiedTimer = useRef(null);
|
|
36
|
-
useEffect(() => () => {
|
|
37
|
-
if (copiedTimer.current)
|
|
38
|
-
clearTimeout(copiedTimer.current);
|
|
39
|
-
}, []);
|
|
40
|
-
const active = findActiveTranscriptShare(shares);
|
|
41
|
-
const url = active ? publicShareUrl(active.public_path) : null;
|
|
42
|
-
const isRevoking = !!active && revokingId === active.share_id;
|
|
43
|
-
const copy = async () => {
|
|
44
|
-
if (!url)
|
|
45
|
-
return;
|
|
46
|
-
try {
|
|
47
|
-
await navigator.clipboard.writeText(url);
|
|
48
|
-
setCopied(true);
|
|
49
|
-
successToast(tI18nComplete.raw('textd0f24de8dbc6'));
|
|
50
|
-
if (copiedTimer.current)
|
|
51
|
-
clearTimeout(copiedTimer.current);
|
|
52
|
-
copiedTimer.current = setTimeout(() => setCopied(false), 2000);
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
errorToast(tI18nComplete.raw('text167c96824acb'));
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
return (_jsxs("section", { className: "space-y-2", "data-testid": "session-public-link", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { children: t('sectionTitle') }), _jsx("p", { className: "text-muted-foreground text-xs", children: t('sectionDescription') })] }), isLoading ? (_jsx("div", { className: "flex justify-center py-2", children: _jsx(Loading, { className: "size-4 shrink-0" }) })) : isError ? (
|
|
59
|
-
// The list 403s for a member who is neither the session's creator nor
|
|
60
|
-
// a project manager. "Create" would show a link state we cannot read.
|
|
61
|
-
_jsx("p", { className: "text-muted-foreground text-xs", children: tI18nComplete.raw('text93bce1d8f18d') })) : active ? (_jsxs("div", { className: "bg-popover flex items-center gap-2 rounded-md border py-1 pr-1 pl-3", children: [_jsx("span", { className: "text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs", children: url }), _jsx(Hint, { label: copied ? tI18nComplete.raw('textd12860c21e78') : tI18nComplete.raw('textdbf362d4f210'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": tI18nComplete.raw('textdbf362d4f210'), disabled: !url, onClick: () => void copy(), children: copied ? (_jsx(CheckIcon, { className: "text-kortix-green size-4" })) : (_jsx(CopyIcon, { className: "size-4" })) }) }), _jsxs(Button, { variant: "ghost", size: "sm", disabled: isRevoking, onClick: () => setConfirmRevoke(true), children: [isRevoking ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, tI18nComplete.raw('text87e6d00bbf53')] })] })) : (_jsxs(Button, { variant: "outline", size: "sm", onClick: link.copyLink, disabled: !link.canShare || link.isPending, children: [link.isPending ? (_jsx(Loading, { className: "size-4 shrink-0" })) : (_jsx(LinkSimpleIcon, { className: "size-4 shrink-0" })), t('create')] })), _jsx(PublicShareLinkConfirm, { confirmation: link.confirmation }), _jsx(ConfirmDialog, { open: confirmRevoke, onOpenChange: setConfirmRevoke, title: tI18nComplete.raw('text3d3b295854fe'), description: t('revokeDescription'), confirmLabel: tI18nComplete.raw('text87e6d00bbf53'), confirmVariant: "destructive", onConfirm: () => {
|
|
62
|
-
if (active)
|
|
63
|
-
revoke(active.share_id);
|
|
64
|
-
setConfirmRevoke(false);
|
|
65
|
-
} })] }));
|
|
66
|
-
}
|