@elevasis/ui 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.js +2 -2
- package/dist/auth/guards/AdminGuard.d.ts +32 -0
- package/dist/auth/guards/AdminGuard.d.ts.map +1 -0
- package/dist/auth/guards/ProtectedRoute.d.ts +60 -0
- package/dist/auth/guards/ProtectedRoute.d.ts.map +1 -0
- package/dist/auth/guards/__tests__/AdminGuard.test.d.ts +12 -0
- package/dist/auth/guards/__tests__/AdminGuard.test.d.ts.map +1 -0
- package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts +14 -0
- package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts.map +1 -0
- package/dist/auth/index.d.ts +14 -174
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +3 -3
- package/dist/charts/index.css +14 -0
- package/dist/charts/index.js +8 -6
- package/dist/chunk-4SY4EQSK.js +68 -0
- package/dist/{chunk-7ATCF6UL.js → chunk-ACD2QA6E.js} +11 -4
- package/dist/{chunk-2Z7LYTIX.js → chunk-AQ5MQDSS.js} +30 -17
- package/dist/chunk-AWMZCYKH.js +639 -0
- package/dist/chunk-BX565EOK.js +2921 -0
- package/dist/{chunk-WAPZN2U3.js → chunk-EMN755L5.js} +7 -41
- package/dist/{chunk-LBY7FVFD.js → chunk-ERVB3QJQ.js} +31 -715
- package/dist/chunk-GBMNCNHX.js +105 -0
- package/dist/{chunk-BVNAC4SQ.js → chunk-GH7ZO4VD.js} +38 -48
- package/dist/{chunk-KNJKCD73.js → chunk-I6EVLOP3.js} +4 -4
- package/dist/{chunk-MBZDE6UT.js → chunk-IOKL7BKE.js} +9 -1
- package/dist/{chunk-35UWYH2A.js → chunk-JFRG2JJE.js} +8 -2
- package/dist/{chunk-NUULWBAD.js → chunk-JHMJKDVU.js} +1 -1
- package/dist/chunk-JZEXFQ6N.js +671 -0
- package/dist/chunk-LGKLC5MG.js +44 -0
- package/dist/chunk-MG3NF7QL.js +63 -0
- package/dist/{chunk-KBLGVZBD.js → chunk-NNKKBSJN.js} +2 -22
- package/dist/{chunk-JNBHUCKW.js → chunk-NVOCKXUQ.js} +1 -1
- package/dist/chunk-PDHTXPSF.js +12 -0
- package/dist/chunk-QJ2S46NI.js +23 -0
- package/dist/{chunk-UANJP5P7.js → chunk-R7WLWGPO.js} +5 -5
- package/dist/{chunk-CC3SDRIF.js → chunk-RWQIFKMJ.js} +1 -1
- package/dist/chunk-U4CHEPIL.js +2622 -0
- package/dist/chunk-UMFPUM7Q.js +1281 -0
- package/dist/chunk-WWEMNIHW.js +37 -0
- package/dist/{chunk-UTWJZEOJ.js → chunk-XOTN3X3Z.js} +3 -3
- package/dist/{chunk-ZFCG5SHW.js → chunk-Z2BXCFAG.js} +1 -1
- package/dist/components/charts/ActivityTrendChart.d.ts +13 -0
- package/dist/components/charts/ActivityTrendChart.d.ts.map +1 -0
- package/dist/components/charts/CombinedTrendChart.d.ts +22 -0
- package/dist/components/charts/CombinedTrendChart.d.ts.map +1 -0
- package/dist/components/charts/CostTrendChart.d.ts +13 -0
- package/dist/components/charts/CostTrendChart.d.ts.map +1 -0
- package/dist/components/charts/HeroStatsRow.d.ts +15 -0
- package/dist/components/charts/HeroStatsRow.d.ts.map +1 -0
- package/dist/components/charts/index.d.ts +9 -0
- package/dist/components/charts/index.d.ts.map +1 -0
- package/dist/components/command-queue/TaskCard.d.ts +18 -0
- package/dist/components/command-queue/TaskCard.d.ts.map +1 -0
- package/dist/components/command-queue/index.d.ts +5 -0
- package/dist/components/command-queue/index.d.ts.map +1 -0
- package/dist/components/display/PageNotFound.d.ts +2 -0
- package/dist/components/display/PageNotFound.d.ts.map +1 -0
- package/dist/components/display/index.d.ts +26 -0
- package/dist/components/display/index.d.ts.map +1 -0
- package/dist/components/execution/ExecutionStats.d.ts +16 -0
- package/dist/components/execution/ExecutionStats.d.ts.map +1 -0
- package/dist/components/execution/index.d.ts +18 -0
- package/dist/components/execution/index.d.ts.map +1 -0
- package/dist/components/index.css +14 -0
- package/dist/components/index.d.ts +22 -5674
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +564 -5023
- package/dist/components/layout/backgrounds/AuroraBackground.d.ts +16 -0
- package/dist/components/layout/backgrounds/AuroraBackground.d.ts.map +1 -0
- package/dist/components/layout/backgrounds/AuroraBackground.js +169 -0
- package/dist/components/layout/backgrounds/EmberBackground.d.ts +16 -0
- package/dist/components/layout/backgrounds/EmberBackground.d.ts.map +1 -0
- package/dist/components/layout/backgrounds/EmberBackground.js +169 -0
- package/dist/components/layout/backgrounds/RoseGoldBackground.d.ts +16 -0
- package/dist/components/layout/backgrounds/RoseGoldBackground.d.ts.map +1 -0
- package/dist/components/layout/backgrounds/RoseGoldBackground.js +169 -0
- package/dist/components/monitoring/ErrorBreakdownTable.d.ts +12 -0
- package/dist/components/monitoring/ErrorBreakdownTable.d.ts.map +1 -0
- package/dist/components/monitoring/ResourceHealthPanel.d.ts +8 -0
- package/dist/components/monitoring/ResourceHealthPanel.d.ts.map +1 -0
- package/dist/components/monitoring/index.d.ts +16 -0
- package/dist/components/monitoring/index.d.ts.map +1 -0
- package/dist/components/navigation/index.js +2 -63
- package/dist/components/notifications/NotificationBell.d.ts +9 -0
- package/dist/components/notifications/NotificationBell.d.ts.map +1 -0
- package/dist/components/notifications/NotificationItem.d.ts +9 -0
- package/dist/components/notifications/NotificationItem.d.ts.map +1 -0
- package/dist/components/notifications/NotificationList.d.ts +10 -0
- package/dist/components/notifications/NotificationList.d.ts.map +1 -0
- package/dist/components/notifications/NotificationPanel.d.ts +10 -0
- package/dist/components/notifications/NotificationPanel.d.ts.map +1 -0
- package/dist/components/notifications/index.d.ts +5 -0
- package/dist/components/notifications/index.d.ts.map +1 -0
- package/dist/components/operations/calibration/CreateProjectModal.d.ts +9 -0
- package/dist/components/operations/calibration/CreateProjectModal.d.ts.map +1 -0
- package/dist/components/operations/calibration/ProjectCard.d.ts +9 -0
- package/dist/components/operations/calibration/ProjectCard.d.ts.map +1 -0
- package/dist/components/operations/command-queue/index.d.ts +3 -0
- package/dist/components/operations/command-queue/index.d.ts.map +1 -0
- package/dist/components/operations/command-queue/sidebar/CommandQueueSidebar.d.ts +17 -0
- package/dist/components/operations/command-queue/sidebar/CommandQueueSidebar.d.ts.map +1 -0
- package/dist/components/operations/command-queue/sidebar/CommandQueueSidebarMiddle.d.ts +17 -0
- package/dist/components/operations/command-queue/sidebar/CommandQueueSidebarMiddle.d.ts.map +1 -0
- package/dist/components/operations/command-queue/sidebar/index.d.ts +5 -0
- package/dist/components/operations/command-queue/sidebar/index.d.ts.map +1 -0
- package/dist/components/operations/command-view/CommandViewGraph.d.ts +22 -0
- package/dist/components/operations/command-view/CommandViewGraph.d.ts.map +1 -0
- package/dist/components/operations/command-view/index.d.ts +4 -0
- package/dist/components/operations/command-view/index.d.ts.map +1 -0
- package/dist/components/operations/executions/AgentExecutionLogs.d.ts +13 -0
- package/dist/components/operations/executions/AgentExecutionLogs.d.ts.map +1 -0
- package/dist/components/operations/executions/WorkflowExecutionLogs.d.ts +13 -0
- package/dist/components/operations/executions/WorkflowExecutionLogs.d.ts.map +1 -0
- package/dist/components/operations/executions/index.d.ts +4 -0
- package/dist/components/operations/executions/index.d.ts.map +1 -0
- package/dist/components/operations/index.d.ts +8 -0
- package/dist/components/operations/index.d.ts.map +1 -0
- package/dist/components/operations/knowledge-base/DocTreeNav.d.ts +14 -0
- package/dist/components/operations/knowledge-base/DocTreeNav.d.ts.map +1 -0
- package/dist/components/operations/knowledge-base/KnowledgeBasePage.d.ts +16 -0
- package/dist/components/operations/knowledge-base/KnowledgeBasePage.d.ts.map +1 -0
- package/dist/components/operations/knowledge-base/index.d.ts +3 -0
- package/dist/components/operations/knowledge-base/index.d.ts.map +1 -0
- package/dist/components/operations/shared/BaseExecutionLogs/BaseExecutionLogs.d.ts +16 -0
- package/dist/components/operations/shared/BaseExecutionLogs/BaseExecutionLogs.d.ts.map +1 -0
- package/dist/components/operations/shared/BaseExecutionLogs/BaseExecutionLogsHeader.d.ts +12 -0
- package/dist/components/operations/shared/BaseExecutionLogs/BaseExecutionLogsHeader.d.ts.map +1 -0
- package/dist/components/operations/shared/BaseExecutionLogs/ExecutionErrorSection.d.ts +12 -0
- package/dist/components/operations/shared/BaseExecutionLogs/ExecutionErrorSection.d.ts.map +1 -0
- package/dist/components/operations/shared/BaseExecutionLogs/index.d.ts +7 -0
- package/dist/components/operations/shared/BaseExecutionLogs/index.d.ts.map +1 -0
- package/dist/components/operations/shared/index.d.ts +5 -0
- package/dist/components/operations/shared/index.d.ts.map +1 -0
- package/dist/components/operations/shared/layouts/ResourceHeader.d.ts +11 -0
- package/dist/components/operations/shared/layouts/ResourceHeader.d.ts.map +1 -0
- package/dist/components/operations/shared/layouts/ResourceNotFoundState.d.ts +8 -0
- package/dist/components/operations/shared/layouts/ResourceNotFoundState.d.ts.map +1 -0
- package/dist/components/operations/shared/layouts/index.d.ts +4 -0
- package/dist/components/operations/shared/layouts/index.d.ts.map +1 -0
- package/dist/components/operations/task-scheduler/CreateScheduleModal.d.ts +7 -0
- package/dist/components/operations/task-scheduler/CreateScheduleModal.d.ts.map +1 -0
- package/dist/components/operations/task-scheduler/TaskScheduler.d.ts +2 -0
- package/dist/components/operations/task-scheduler/TaskScheduler.d.ts.map +1 -0
- package/dist/components/operations/task-scheduler/index.d.ts +11 -0
- package/dist/components/operations/task-scheduler/index.d.ts.map +1 -0
- package/dist/components/sdk-barrel.d.ts +26 -0
- package/dist/components/sdk-barrel.d.ts.map +1 -0
- package/dist/components/settings/api-keys/ApiKeyDisplayModal.d.ts +9 -0
- package/dist/components/settings/api-keys/ApiKeyDisplayModal.d.ts.map +1 -0
- package/dist/components/settings/api-keys/ApiKeyList.d.ts +8 -0
- package/dist/components/settings/api-keys/ApiKeyList.d.ts.map +1 -0
- package/dist/components/settings/api-keys/ApiKeySettings.d.ts +2 -0
- package/dist/components/settings/api-keys/ApiKeySettings.d.ts.map +1 -0
- package/dist/components/settings/api-keys/CreateApiKeyModal.d.ts +9 -0
- package/dist/components/settings/api-keys/CreateApiKeyModal.d.ts.map +1 -0
- package/dist/components/settings/api-keys/EditApiKeyModal.d.ts +8 -0
- package/dist/components/settings/api-keys/EditApiKeyModal.d.ts.map +1 -0
- package/dist/components/settings/api-keys/index.d.ts +6 -0
- package/dist/components/settings/api-keys/index.d.ts.map +1 -0
- package/dist/components/settings/credentials/CreateCredentialModal.d.ts +9 -0
- package/dist/components/settings/credentials/CreateCredentialModal.d.ts.map +1 -0
- package/dist/components/settings/credentials/CredentialList.d.ts +10 -0
- package/dist/components/settings/credentials/CredentialList.d.ts.map +1 -0
- package/dist/components/settings/credentials/CredentialSettings.d.ts +7 -0
- package/dist/components/settings/credentials/CredentialSettings.d.ts.map +1 -0
- package/dist/components/settings/credentials/index.d.ts +5 -0
- package/dist/components/settings/credentials/index.d.ts.map +1 -0
- package/dist/components/settings/deployments/DeploymentList.d.ts +8 -0
- package/dist/components/settings/deployments/DeploymentList.d.ts.map +1 -0
- package/dist/components/settings/deployments/DeploymentSettings.d.ts +2 -0
- package/dist/components/settings/deployments/DeploymentSettings.d.ts.map +1 -0
- package/dist/components/settings/deployments/index.d.ts +5 -0
- package/dist/components/settings/deployments/index.d.ts.map +1 -0
- package/dist/components/settings/index.d.ts +6 -0
- package/dist/components/settings/index.d.ts.map +1 -0
- package/dist/components/table/SortableHeader.d.ts +12 -0
- package/dist/components/table/SortableHeader.d.ts.map +1 -0
- package/dist/components/table/index.d.ts +4 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/features/auth/AdminGuard.d.ts +38 -0
- package/dist/features/auth/AdminGuard.d.ts.map +1 -0
- package/dist/features/auth/FeatureGuard.d.ts +45 -0
- package/dist/features/auth/FeatureGuard.d.ts.map +1 -0
- package/dist/features/auth/ProtectedRoute.d.ts +43 -0
- package/dist/features/auth/ProtectedRoute.d.ts.map +1 -0
- package/dist/features/auth/index.css +579 -0
- package/dist/features/auth/index.d.ts +9 -0
- package/dist/features/auth/index.d.ts.map +1 -0
- package/dist/features/auth/index.js +125 -0
- package/dist/features/auth/useUserProfile.d.ts +10 -0
- package/dist/features/auth/useUserProfile.d.ts.map +1 -0
- package/dist/features/dashboard/Dashboard.d.ts +57 -0
- package/dist/features/dashboard/Dashboard.d.ts.map +1 -0
- package/dist/features/dashboard/RecentExecutionsByResource.d.ts +11 -0
- package/dist/features/dashboard/RecentExecutionsByResource.d.ts.map +1 -0
- package/dist/features/dashboard/ResourceOverview.d.ts +21 -0
- package/dist/features/dashboard/ResourceOverview.d.ts.map +1 -0
- package/dist/features/dashboard/UnresolvedErrorsTeaser.d.ts +7 -0
- package/dist/features/dashboard/UnresolvedErrorsTeaser.d.ts.map +1 -0
- package/dist/features/dashboard/index.css +579 -0
- package/dist/features/dashboard/index.d.ts +9 -0
- package/dist/features/dashboard/index.d.ts.map +1 -0
- package/dist/features/dashboard/index.js +650 -0
- package/dist/features/monitoring/ActivityFeed.d.ts +37 -0
- package/dist/features/monitoring/ActivityFeed.d.ts.map +1 -0
- package/dist/features/monitoring/ActivityLog.d.ts +8 -0
- package/dist/features/monitoring/ActivityLog.d.ts.map +1 -0
- package/dist/features/monitoring/CostAnalytics.d.ts +13 -0
- package/dist/features/monitoring/CostAnalytics.d.ts.map +1 -0
- package/dist/features/monitoring/ErrorDetailsModal.d.ts +13 -0
- package/dist/features/monitoring/ErrorDetailsModal.d.ts.map +1 -0
- package/dist/features/monitoring/ExecutionHealth.d.ts +9 -0
- package/dist/features/monitoring/ExecutionHealth.d.ts.map +1 -0
- package/dist/features/monitoring/ExecutionLogsPage.d.ts +20 -0
- package/dist/features/monitoring/ExecutionLogsPage.d.ts.map +1 -0
- package/dist/features/monitoring/NotificationCenter.d.ts +5 -0
- package/dist/features/monitoring/NotificationCenter.d.ts.map +1 -0
- package/dist/features/monitoring/index.css +579 -0
- package/dist/features/monitoring/index.d.ts +15 -0
- package/dist/features/monitoring/index.d.ts.map +1 -0
- package/dist/features/monitoring/index.js +538 -0
- package/dist/features/operations/CalibrationPage.d.ts +9 -0
- package/dist/features/operations/CalibrationPage.d.ts.map +1 -0
- package/dist/features/operations/CalibrationProjectDetailPage.d.ts +43 -0
- package/dist/features/operations/CalibrationProjectDetailPage.d.ts.map +1 -0
- package/dist/features/operations/CalibrationProjectsPage.d.ts +10 -0
- package/dist/features/operations/CalibrationProjectsPage.d.ts.map +1 -0
- package/dist/features/operations/CalibrationRunDetailPage.d.ts +35 -0
- package/dist/features/operations/CalibrationRunDetailPage.d.ts.map +1 -0
- package/dist/features/operations/CommandQueueDetailPage.d.ts +16 -0
- package/dist/features/operations/CommandQueueDetailPage.d.ts.map +1 -0
- package/dist/features/operations/CommandQueuePage.d.ts +13 -0
- package/dist/features/operations/CommandQueuePage.d.ts.map +1 -0
- package/dist/features/operations/CommandViewPage.d.ts +6 -0
- package/dist/features/operations/CommandViewPage.d.ts.map +1 -0
- package/dist/features/operations/CommandViewSidebarContent.d.ts +19 -0
- package/dist/features/operations/CommandViewSidebarContent.d.ts.map +1 -0
- package/dist/features/operations/ResourceDetailPage.d.ts +25 -0
- package/dist/features/operations/ResourceDetailPage.d.ts.map +1 -0
- package/dist/features/operations/ResourcesPage.d.ts +15 -0
- package/dist/features/operations/ResourcesPage.d.ts.map +1 -0
- package/dist/features/operations/ResourcesSidebar.d.ts +9 -0
- package/dist/features/operations/ResourcesSidebar.d.ts.map +1 -0
- package/dist/features/operations/calibration-components/ComparisonTable.d.ts +9 -0
- package/dist/features/operations/calibration-components/ComparisonTable.d.ts.map +1 -0
- package/dist/features/operations/executions/AgentExecutionPanel.d.ts +12 -0
- package/dist/features/operations/executions/AgentExecutionPanel.d.ts.map +1 -0
- package/dist/features/operations/executions/ExecutionPanel.d.ts +13 -0
- package/dist/features/operations/executions/ExecutionPanel.d.ts.map +1 -0
- package/dist/features/operations/executions/WorkflowExecutionPanel.d.ts +12 -0
- package/dist/features/operations/executions/WorkflowExecutionPanel.d.ts.map +1 -0
- package/dist/features/operations/executions/index.d.ts +7 -0
- package/dist/features/operations/executions/index.d.ts.map +1 -0
- package/dist/features/operations/index.css +14 -0
- package/dist/features/operations/index.d.ts +29 -98
- package/dist/features/operations/index.d.ts.map +1 -0
- package/dist/features/operations/index.js +2148 -28
- package/dist/features/operations/layouts/components/ResourceHeader.d.ts +11 -0
- package/dist/features/operations/layouts/components/ResourceHeader.d.ts.map +1 -0
- package/dist/features/operations/layouts/components/ResourceNotFoundState.d.ts +8 -0
- package/dist/features/operations/layouts/components/ResourceNotFoundState.d.ts.map +1 -0
- package/dist/features/operations/layouts/components/index.d.ts +4 -0
- package/dist/features/operations/layouts/components/index.d.ts.map +1 -0
- package/dist/features/settings/AccountSettings.d.ts +20 -0
- package/dist/features/settings/AccountSettings.d.ts.map +1 -0
- package/dist/features/settings/AppearanceSettings.d.ts +23 -0
- package/dist/features/settings/AppearanceSettings.d.ts.map +1 -0
- package/dist/features/settings/CreateWebhookEndpointModal.d.ts +8 -0
- package/dist/features/settings/CreateWebhookEndpointModal.d.ts.map +1 -0
- package/dist/features/settings/EditCredentialModal.d.ts +9 -0
- package/dist/features/settings/EditCredentialModal.d.ts.map +1 -0
- package/dist/features/settings/EditWebhookEndpointModal.d.ts +8 -0
- package/dist/features/settings/EditWebhookEndpointModal.d.ts.map +1 -0
- package/dist/features/settings/MemberConfigModal.d.ts +14 -0
- package/dist/features/settings/MemberConfigModal.d.ts.map +1 -0
- package/dist/features/settings/OAuthIntegrationsCard.d.ts +6 -0
- package/dist/features/settings/OAuthIntegrationsCard.d.ts.map +1 -0
- package/dist/features/settings/OrgMembersList.d.ts +5 -0
- package/dist/features/settings/OrgMembersList.d.ts.map +1 -0
- package/dist/features/settings/OrganizationSettings.d.ts +30 -0
- package/dist/features/settings/OrganizationSettings.d.ts.map +1 -0
- package/dist/features/settings/WebhookEndpointList.d.ts +9 -0
- package/dist/features/settings/WebhookEndpointList.d.ts.map +1 -0
- package/dist/features/settings/WebhookEndpointSettings.d.ts +6 -0
- package/dist/features/settings/WebhookEndpointSettings.d.ts.map +1 -0
- package/dist/features/settings/index.css +579 -0
- package/dist/features/settings/index.d.ts +23 -0
- package/dist/features/settings/index.d.ts.map +1 -0
- package/dist/features/settings/index.js +1437 -0
- package/dist/hooks/command-queue/index.d.ts +7 -0
- package/dist/hooks/command-queue/index.d.ts.map +1 -0
- package/dist/hooks/command-queue/useCommandQueue.d.ts +33 -0
- package/dist/hooks/command-queue/useCommandQueue.d.ts.map +1 -0
- package/dist/hooks/command-queue/useCommandQueueTotals.d.ts +17 -0
- package/dist/hooks/command-queue/useCommandQueueTotals.d.ts.map +1 -0
- package/dist/hooks/command-queue/useDeleteTask.d.ts +5 -0
- package/dist/hooks/command-queue/useDeleteTask.d.ts.map +1 -0
- package/dist/hooks/command-queue/usePatchTask.d.ts +6 -0
- package/dist/hooks/command-queue/usePatchTask.d.ts.map +1 -0
- package/dist/hooks/command-queue/useSubmitAction.d.ts +29 -0
- package/dist/hooks/command-queue/useSubmitAction.d.ts.map +1 -0
- package/dist/hooks/executions/index.d.ts +17 -0
- package/dist/hooks/executions/index.d.ts.map +1 -0
- package/dist/hooks/executions/useArchivedLogs.d.ts +14 -0
- package/dist/hooks/executions/useArchivedLogs.d.ts.map +1 -0
- package/dist/hooks/executions/useBulkDeleteExecutions.d.ts +15 -0
- package/dist/hooks/executions/useBulkDeleteExecutions.d.ts.map +1 -0
- package/dist/hooks/executions/useCancelExecution.d.ts +20 -0
- package/dist/hooks/executions/useCancelExecution.d.ts.map +1 -0
- package/dist/hooks/executions/useDeleteExecution.d.ts +13 -0
- package/dist/hooks/executions/useDeleteExecution.d.ts.map +1 -0
- package/dist/hooks/executions/useExecuteAsync.d.ts +21 -0
- package/dist/hooks/executions/useExecuteAsync.d.ts.map +1 -0
- package/dist/hooks/executions/useExecution.d.ts +10 -0
- package/dist/hooks/executions/useExecution.d.ts.map +1 -0
- package/dist/hooks/executions/useExecutions.d.ts +16 -0
- package/dist/hooks/executions/useExecutions.d.ts.map +1 -0
- package/dist/hooks/executions/useResourceDefinition.d.ts +9 -0
- package/dist/hooks/executions/useResourceDefinition.d.ts.map +1 -0
- package/dist/hooks/executions/useResources.d.ts +15 -0
- package/dist/hooks/executions/useResources.d.ts.map +1 -0
- package/dist/hooks/executions/useRetryExecution.d.ts +16 -0
- package/dist/hooks/executions/useRetryExecution.d.ts.map +1 -0
- package/dist/hooks/feature-access/createUseFeatureAccess.d.ts +41 -0
- package/dist/hooks/feature-access/createUseFeatureAccess.d.ts.map +1 -0
- package/dist/hooks/feature-access/index.d.ts +2 -0
- package/dist/hooks/feature-access/index.d.ts.map +1 -0
- package/dist/hooks/index.css +14 -0
- package/dist/hooks/index.d.ts +22 -6593
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +13 -13
- package/dist/hooks/monitoring/index.d.ts +11 -0
- package/dist/hooks/monitoring/index.d.ts.map +1 -0
- package/dist/hooks/monitoring/useActivities.d.ts +52 -0
- package/dist/hooks/monitoring/useActivities.d.ts.map +1 -0
- package/dist/hooks/monitoring/useCostSummary.d.ts +7 -0
- package/dist/hooks/monitoring/useCostSummary.d.ts.map +1 -0
- package/dist/hooks/monitoring/useExecutionHealth.d.ts +10 -0
- package/dist/hooks/monitoring/useExecutionHealth.d.ts.map +1 -0
- package/dist/hooks/monitoring/useExecutionLogs.d.ts +56 -0
- package/dist/hooks/monitoring/useExecutionLogs.d.ts.map +1 -0
- package/dist/hooks/monitoring/useNotificationCount.d.ts +26 -0
- package/dist/hooks/monitoring/useNotificationCount.d.ts.map +1 -0
- package/dist/hooks/monitoring/useNotifications.d.ts +11 -0
- package/dist/hooks/monitoring/useNotifications.d.ts.map +1 -0
- package/dist/hooks/notifications/index.d.ts +8 -0
- package/dist/hooks/notifications/index.d.ts.map +1 -0
- package/dist/hooks/notifications/useMarkAllAsRead.d.ts +2 -0
- package/dist/hooks/notifications/useMarkAllAsRead.d.ts.map +1 -0
- package/dist/hooks/notifications/useMarkAsRead.d.ts +2 -0
- package/dist/hooks/notifications/useMarkAsRead.d.ts.map +1 -0
- package/dist/hooks/notifications/useTestNotification.d.ts +16 -0
- package/dist/hooks/notifications/useTestNotification.d.ts.map +1 -0
- package/dist/hooks/observability/index.d.ts +25 -0
- package/dist/hooks/observability/index.d.ts.map +1 -0
- package/dist/hooks/observability/useBatchedResourcesHealth.d.ts +15 -0
- package/dist/hooks/observability/useBatchedResourcesHealth.d.ts.map +1 -0
- package/dist/hooks/observability/useBusinessImpact.d.ts +9 -0
- package/dist/hooks/observability/useBusinessImpact.d.ts.map +1 -0
- package/dist/hooks/observability/useCostBreakdown.d.ts +10 -0
- package/dist/hooks/observability/useCostBreakdown.d.ts.map +1 -0
- package/dist/hooks/observability/useCostByModel.d.ts +3 -0
- package/dist/hooks/observability/useCostByModel.d.ts.map +1 -0
- package/dist/hooks/observability/useCostTrends.d.ts +3 -0
- package/dist/hooks/observability/useCostTrends.d.ts.map +1 -0
- package/dist/hooks/observability/useDashboardMetrics.d.ts +3 -0
- package/dist/hooks/observability/useDashboardMetrics.d.ts.map +1 -0
- package/dist/hooks/observability/useErrorAnalysis.d.ts +7 -0
- package/dist/hooks/observability/useErrorAnalysis.d.ts.map +1 -0
- package/dist/hooks/observability/useErrorDetails.d.ts +20 -0
- package/dist/hooks/observability/useErrorDetails.d.ts.map +1 -0
- package/dist/hooks/observability/useErrorDistribution.d.ts +12 -0
- package/dist/hooks/observability/useErrorDistribution.d.ts.map +1 -0
- package/dist/hooks/observability/useErrorTrends.d.ts +12 -0
- package/dist/hooks/observability/useErrorTrends.d.ts.map +1 -0
- package/dist/hooks/observability/useRecentExecutionsByResource.d.ts +18 -0
- package/dist/hooks/observability/useRecentExecutionsByResource.d.ts.map +1 -0
- package/dist/hooks/observability/useResolveError.d.ts +17 -0
- package/dist/hooks/observability/useResolveError.d.ts.map +1 -0
- package/dist/hooks/observability/useResourcesHealth.d.ts +13 -0
- package/dist/hooks/observability/useResourcesHealth.d.ts.map +1 -0
- package/dist/hooks/observability/useTopFailingResources.d.ts +13 -0
- package/dist/hooks/observability/useTopFailingResources.d.ts.map +1 -0
- package/dist/hooks/observability/useUnresolvedErrors.d.ts +15 -0
- package/dist/hooks/observability/useUnresolvedErrors.d.ts.map +1 -0
- package/dist/hooks/operations/calibration/useCalibrationProjects.d.ts +24 -0
- package/dist/hooks/operations/calibration/useCalibrationProjects.d.ts.map +1 -0
- package/dist/hooks/operations/calibration/useCalibrationRunFull.d.ts +3 -0
- package/dist/hooks/operations/calibration/useCalibrationRunFull.d.ts.map +1 -0
- package/dist/hooks/operations/calibration/useCalibrationRuns.d.ts +35 -0
- package/dist/hooks/operations/calibration/useCalibrationRuns.d.ts.map +1 -0
- package/dist/hooks/operations/command-view/index.d.ts +8 -0
- package/dist/hooks/operations/command-view/index.d.ts.map +1 -0
- package/dist/hooks/operations/command-view/useCheckpointTasks.d.ts +24 -0
- package/dist/hooks/operations/command-view/useCheckpointTasks.d.ts.map +1 -0
- package/dist/hooks/operations/command-view/useCommandViewData.d.ts +11 -0
- package/dist/hooks/operations/command-view/useCommandViewData.d.ts.map +1 -0
- package/dist/hooks/operations/command-view/useCommandViewStats.d.ts +12 -0
- package/dist/hooks/operations/command-view/useCommandViewStats.d.ts.map +1 -0
- package/dist/hooks/operations/command-view/useResourceErrors.d.ts +22 -0
- package/dist/hooks/operations/command-view/useResourceErrors.d.ts.map +1 -0
- package/dist/hooks/operations/command-view/useResourceExecutions.d.ts +22 -0
- package/dist/hooks/operations/command-view/useResourceExecutions.d.ts.map +1 -0
- package/dist/hooks/operations/index.d.ts +4 -0
- package/dist/hooks/operations/index.d.ts.map +1 -0
- package/dist/hooks/operations/knowledge-base/index.d.ts +3 -0
- package/dist/hooks/operations/knowledge-base/index.d.ts.map +1 -0
- package/dist/hooks/operations/knowledge-base/useDeploymentDocs.d.ts +27 -0
- package/dist/hooks/operations/knowledge-base/useDeploymentDocs.d.ts.map +1 -0
- package/dist/hooks/operations/settings/index.d.ts +4 -0
- package/dist/hooks/operations/settings/index.d.ts.map +1 -0
- package/dist/hooks/operations/settings/useOAuthFlow.d.ts +17 -0
- package/dist/hooks/operations/settings/useOAuthFlow.d.ts.map +1 -0
- package/dist/hooks/operations/settings/useUpdateThemePreference.d.ts +17 -0
- package/dist/hooks/operations/settings/useUpdateThemePreference.d.ts.map +1 -0
- package/dist/hooks/operations/shared/index.d.ts +6 -0
- package/dist/hooks/operations/shared/index.d.ts.map +1 -0
- package/dist/hooks/operations/shared/queryKeys.d.ts +23 -0
- package/dist/hooks/operations/shared/queryKeys.d.ts.map +1 -0
- package/dist/hooks/operations/shared/useExecutionLogSSE.d.ts +11 -0
- package/dist/hooks/operations/shared/useExecutionLogSSE.d.ts.map +1 -0
- package/dist/hooks/operations/shared/useExecutionPanelState.d.ts +46 -0
- package/dist/hooks/operations/shared/useExecutionPanelState.d.ts.map +1 -0
- package/dist/hooks/published.css +14 -0
- package/dist/hooks/published.d.ts +21 -6037
- package/dist/hooks/published.d.ts.map +1 -0
- package/dist/hooks/published.js +12 -12
- package/dist/hooks/scheduling/index.d.ts +7 -0
- package/dist/hooks/scheduling/index.d.ts.map +1 -0
- package/dist/hooks/scheduling/useScheduledTasks.d.ts +19 -0
- package/dist/hooks/scheduling/useScheduledTasks.d.ts.map +1 -0
- package/dist/hooks/scheduling/useSchedules.d.ts +185 -0
- package/dist/hooks/scheduling/useSchedules.d.ts.map +1 -0
- package/dist/hooks/sessions/index.d.ts +8 -0
- package/dist/hooks/sessions/index.d.ts.map +1 -0
- package/dist/hooks/sessions/useSessionExecutions.d.ts +13 -0
- package/dist/hooks/sessions/useSessionExecutions.d.ts.map +1 -0
- package/dist/hooks/sessions/useSessionMessages.d.ts +7 -0
- package/dist/hooks/sessions/useSessionMessages.d.ts.map +1 -0
- package/dist/hooks/sessions/useSessions.d.ts +26 -0
- package/dist/hooks/sessions/useSessions.d.ts.map +1 -0
- package/dist/hooks/settings/api-keys/index.d.ts +7 -0
- package/dist/hooks/settings/api-keys/index.d.ts.map +1 -0
- package/dist/hooks/settings/api-keys/useCreateApiKey.d.ts +3 -0
- package/dist/hooks/settings/api-keys/useCreateApiKey.d.ts.map +1 -0
- package/dist/hooks/settings/api-keys/useDeleteApiKey.d.ts +2 -0
- package/dist/hooks/settings/api-keys/useDeleteApiKey.d.ts.map +1 -0
- package/dist/hooks/settings/api-keys/useListApiKeys.d.ts +2 -0
- package/dist/hooks/settings/api-keys/useListApiKeys.d.ts.map +1 -0
- package/dist/hooks/settings/api-keys/useUpdateApiKey.d.ts +5 -0
- package/dist/hooks/settings/api-keys/useUpdateApiKey.d.ts.map +1 -0
- package/dist/hooks/settings/credentials/index.d.ts +7 -0
- package/dist/hooks/settings/credentials/index.d.ts.map +1 -0
- package/dist/hooks/settings/credentials/useCreateCredential.d.ts +3 -0
- package/dist/hooks/settings/credentials/useCreateCredential.d.ts.map +1 -0
- package/dist/hooks/settings/credentials/useCredentials.d.ts +8 -0
- package/dist/hooks/settings/credentials/useCredentials.d.ts.map +1 -0
- package/dist/hooks/settings/credentials/useDeleteCredential.d.ts +2 -0
- package/dist/hooks/settings/credentials/useDeleteCredential.d.ts.map +1 -0
- package/dist/hooks/settings/credentials/useUpdateCredential.d.ts +10 -0
- package/dist/hooks/settings/credentials/useUpdateCredential.d.ts.map +1 -0
- package/dist/hooks/settings/deployments/index.d.ts +5 -0
- package/dist/hooks/settings/deployments/index.d.ts.map +1 -0
- package/dist/hooks/settings/deployments/useDeploymentActions.d.ts +4 -0
- package/dist/hooks/settings/deployments/useDeploymentActions.d.ts.map +1 -0
- package/dist/hooks/settings/deployments/useListDeployments.d.ts +2 -0
- package/dist/hooks/settings/deployments/useListDeployments.d.ts.map +1 -0
- package/dist/hooks/settings/index.d.ts +6 -0
- package/dist/hooks/settings/index.d.ts.map +1 -0
- package/dist/hooks/settings/organization/index.d.ts +6 -0
- package/dist/hooks/settings/organization/index.d.ts.map +1 -0
- package/dist/hooks/settings/organization/useDeactivateMembership.d.ts +11 -0
- package/dist/hooks/settings/organization/useDeactivateMembership.d.ts.map +1 -0
- package/dist/hooks/settings/organization/useReactivateMembership.d.ts +11 -0
- package/dist/hooks/settings/organization/useReactivateMembership.d.ts.map +1 -0
- package/dist/hooks/settings/organization/useUpdateMemberConfig.d.ts +8 -0
- package/dist/hooks/settings/organization/useUpdateMemberConfig.d.ts.map +1 -0
- package/dist/hooks/settings/organization/useUserMemberships.d.ts +3 -0
- package/dist/hooks/settings/organization/useUserMemberships.d.ts.map +1 -0
- package/dist/hooks/settings/webhooks/index.d.ts +7 -0
- package/dist/hooks/settings/webhooks/index.d.ts.map +1 -0
- package/dist/hooks/settings/webhooks/useCreateWebhookEndpoint.d.ts +18 -0
- package/dist/hooks/settings/webhooks/useCreateWebhookEndpoint.d.ts.map +1 -0
- package/dist/hooks/settings/webhooks/useDeleteWebhookEndpoint.d.ts +2 -0
- package/dist/hooks/settings/webhooks/useDeleteWebhookEndpoint.d.ts.map +1 -0
- package/dist/hooks/settings/webhooks/useListWebhookEndpoints.d.ts +14 -0
- package/dist/hooks/settings/webhooks/useListWebhookEndpoints.d.ts.map +1 -0
- package/dist/hooks/settings/webhooks/useUpdateWebhookEndpoint.d.ts +18 -0
- package/dist/hooks/settings/webhooks/useUpdateWebhookEndpoint.d.ts.map +1 -0
- package/dist/hooks/settings/webhooks/webhookEndpointService.d.ts +27 -0
- package/dist/hooks/settings/webhooks/webhookEndpointService.d.ts.map +1 -0
- package/dist/hooks/useOrganizationMembers.d.ts +18 -0
- package/dist/hooks/useOrganizationMembers.d.ts.map +1 -0
- package/dist/index.css +14 -0
- package/dist/index.d.ts +15 -8494
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -15
- package/dist/initialization/InitializationProvider.d.ts +48 -0
- package/dist/initialization/InitializationProvider.d.ts.map +1 -0
- package/dist/initialization/hooks/useAppInitialization.d.ts +32 -0
- package/dist/initialization/hooks/useAppInitialization.d.ts.map +1 -0
- package/dist/initialization/index.d.ts +23 -2526
- package/dist/initialization/index.d.ts.map +1 -0
- package/dist/initialization/index.js +2 -2
- package/dist/layout/index.d.ts +7 -1
- package/dist/layout/index.js +7 -5
- package/dist/organization/context/OrganizationProvider.d.ts +24 -0
- package/dist/organization/context/OrganizationProvider.d.ts.map +1 -0
- package/dist/organization/hooks/useOrgInitialization.d.ts +56 -0
- package/dist/organization/hooks/useOrgInitialization.d.ts.map +1 -0
- package/dist/organization/index.d.ts +23 -274
- package/dist/organization/index.d.ts.map +1 -0
- package/dist/organization/index.js +2 -2
- package/dist/profile/context/ProfileProvider.d.ts +31 -0
- package/dist/profile/context/ProfileProvider.d.ts.map +1 -0
- package/dist/profile/hooks/useUserProfile.d.ts +38 -0
- package/dist/profile/hooks/useUserProfile.d.ts.map +1 -0
- package/dist/profile/index.d.ts +15 -2477
- package/dist/profile/index.d.ts.map +1 -0
- package/dist/provider/CoreAuthKitInner.d.ts +12 -0
- package/dist/provider/CoreAuthKitInner.d.ts.map +1 -0
- package/dist/provider/ElevasisCoreProvider.d.ts +25 -0
- package/dist/provider/ElevasisCoreProvider.d.ts.map +1 -0
- package/dist/provider/ElevasisServiceContext.d.ts +31 -0
- package/dist/provider/ElevasisServiceContext.d.ts.map +1 -0
- package/dist/provider/ElevasisUIProvider.d.ts +28 -0
- package/dist/provider/ElevasisUIProvider.d.ts.map +1 -0
- package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts +2 -0
- package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts.map +1 -0
- package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts +2 -0
- package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts.map +1 -0
- package/dist/provider/index.css +14 -0
- package/dist/provider/index.d.ts +11 -334
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.js +10 -10
- package/dist/provider/published.d.ts +11 -309
- package/dist/provider/published.d.ts.map +1 -0
- package/dist/provider/published.js +6 -6
- package/dist/provider/types.d.ts +151 -0
- package/dist/provider/types.d.ts.map +1 -0
- package/dist/sdk-barrel.d.ts +20 -0
- package/dist/sdk-barrel.d.ts.map +1 -0
- package/dist/theme/PresetsContext.d.ts +4 -0
- package/dist/theme/PresetsContext.d.ts.map +1 -0
- package/dist/theme/cssVariables.d.ts +12 -0
- package/dist/theme/cssVariables.d.ts.map +1 -0
- package/dist/theme/index.d.ts +10 -148
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +3 -3
- package/dist/theme/presets/__tests__/getPreset.test.d.ts +2 -0
- package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +1 -0
- package/dist/theme/presets/abyss.d.ts +3 -0
- package/dist/theme/presets/abyss.d.ts.map +1 -0
- package/dist/theme/presets/aurora.d.ts +12 -0
- package/dist/theme/presets/aurora.d.ts.map +1 -0
- package/dist/theme/presets/canopy.d.ts +12 -0
- package/dist/theme/presets/canopy.d.ts.map +1 -0
- package/dist/theme/presets/canyon.d.ts +11 -0
- package/dist/theme/presets/canyon.d.ts.map +1 -0
- package/dist/theme/presets/cortex.d.ts +3 -0
- package/dist/theme/presets/cortex.d.ts.map +1 -0
- package/dist/theme/presets/cyber-punk.d.ts +11 -0
- package/dist/theme/presets/cyber-punk.d.ts.map +1 -0
- package/dist/theme/presets/cyber-strike.d.ts +13 -0
- package/dist/theme/presets/cyber-strike.d.ts.map +1 -0
- package/dist/theme/presets/cyber-volt.d.ts +12 -0
- package/dist/theme/presets/cyber-volt.d.ts.map +1 -0
- package/dist/theme/presets/default.d.ts +4 -0
- package/dist/theme/presets/default.d.ts.map +1 -0
- package/dist/theme/presets/ember.d.ts +12 -0
- package/dist/theme/presets/ember.d.ts.map +1 -0
- package/dist/theme/presets/helios.d.ts +3 -0
- package/dist/theme/presets/helios.d.ts.map +1 -0
- package/dist/theme/presets/honey.d.ts +12 -0
- package/dist/theme/presets/honey.d.ts.map +1 -0
- package/dist/theme/presets/index.d.ts +8 -0
- package/dist/theme/presets/index.d.ts.map +1 -0
- package/dist/theme/presets/midnight.d.ts +12 -0
- package/dist/theme/presets/midnight.d.ts.map +1 -0
- package/dist/theme/presets/nirvana.d.ts +16 -0
- package/dist/theme/presets/nirvana.d.ts.map +1 -0
- package/dist/theme/presets/obsidian.d.ts +3 -0
- package/dist/theme/presets/obsidian.d.ts.map +1 -0
- package/dist/theme/presets/regal.d.ts +8 -0
- package/dist/theme/presets/regal.d.ts.map +1 -0
- package/dist/theme/presets/rose-gold.d.ts +12 -0
- package/dist/theme/presets/rose-gold.d.ts.map +1 -0
- package/dist/theme/presets/slate.d.ts +3 -0
- package/dist/theme/presets/slate.d.ts.map +1 -0
- package/dist/theme/presets/synapse.d.ts +10 -0
- package/dist/theme/presets/synapse.d.ts.map +1 -0
- package/dist/theme/presets/tactical.d.ts +8 -0
- package/dist/theme/presets/tactical.d.ts.map +1 -0
- package/dist/theme/presets/types.d.ts +43 -0
- package/dist/theme/presets/types.d.ts.map +1 -0
- package/dist/theme/presets/verdant.d.ts +3 -0
- package/dist/theme/presets/verdant.d.ts.map +1 -0
- package/dist/theme/presets/wave.d.ts +14 -0
- package/dist/theme/presets/wave.d.ts.map +1 -0
- package/dist/theme/useAvailablePresets.d.ts +16 -0
- package/dist/theme/useAvailablePresets.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.d.ts +12 -1
- package/dist/utils/index.js +1 -1
- package/dist/zustand/index.d.ts +80 -0
- package/dist/zustand/index.js +105 -0
- package/package.json +53 -2
- package/dist/chunk-2YW3LDFT.js +0 -1542
- package/dist/theme/presets/cyber-void.js +0 -75
- package/dist/{chunk-DVKEEY5J.js → chunk-TUXTSEAF.js} +1 -1
- package/dist/{chunk-U2522LSW.js → chunk-V7XHGJQZ.js} +1 -1
|
@@ -0,0 +1,2622 @@
|
|
|
1
|
+
import { SubshellSidebarSection } from './chunk-JFRG2JJE.js';
|
|
2
|
+
import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
|
|
3
|
+
import { BaseNode, useGraphTheme, BaseEdge, GraphBackground, GraphLegend, GraphFitViewButton, GraphFitViewHandler } from './chunk-GH7ZO4VD.js';
|
|
4
|
+
import { useCyberColors, CyberDonut } from './chunk-ERVB3QJQ.js';
|
|
5
|
+
import { ContextViewer, JsonViewer, StyledMarkdown, CardHeader } from './chunk-AWMZCYKH.js';
|
|
6
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-XOTN3X3Z.js';
|
|
7
|
+
import { useCommandViewLayout, useSubmitAction, useDeleteTask, useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals } from './chunk-AQ5MQDSS.js';
|
|
8
|
+
import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, GRAPH_CONSTANTS, useGraphHighlighting, calculateGraphHeight } from './chunk-F6RBK7NJ.js';
|
|
9
|
+
import { getResourceStatusColor } from './chunk-XA34RETF.js';
|
|
10
|
+
import { toWorkflowLogMessages } from './chunk-ELJIFLCB.js';
|
|
11
|
+
import { useAppearance } from './chunk-QJ2KCHKX.js';
|
|
12
|
+
import { getResourceIcon, getResourceColor, getErrorInfo, formatErrorMessage } from './chunk-IOKL7BKE.js';
|
|
13
|
+
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
14
|
+
import { Stack, Group, Text, Badge, ThemeIcon, Box, TextInput, Textarea, Radio, Checkbox, Select, NumberInput, Title, Alert, Button, Card, Loader, Menu, ActionIcon, Accordion, Collapse, SimpleGrid, Divider, Paper, Space, CopyButton, Center, Tooltip, Code, useMantineTheme, UnstyledButton, RangeSlider, ScrollArea } from '@mantine/core';
|
|
15
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
|
+
import { IconBrain, IconFileText, IconDatabase, IconMessage, IconAlertCircle, IconCircleX, IconCircleCheck, IconBolt, IconHandClick, IconClock, IconWebhook, IconExternalLink, IconMail, IconSend, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconRobot, IconGitBranch, IconDotsVertical, IconTrash, IconPlayerPlay, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconNetwork, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTerminal2, IconBug, IconChevronDown, IconFilter, IconCategory, IconArchive, IconDownload } from '@tabler/icons-react';
|
|
17
|
+
import { useForm } from '@mantine/form';
|
|
18
|
+
import { memo, forwardRef, useMemo, useImperativeHandle, useState, useRef, useCallback, useEffect } from 'react';
|
|
19
|
+
import dagre from '@dagrejs/dagre';
|
|
20
|
+
import { useReactFlow, ReactFlow, ReactFlowProvider } from '@xyflow/react';
|
|
21
|
+
import '@xyflow/react/dist/style.css';
|
|
22
|
+
|
|
23
|
+
function FormFieldRenderer({ field, form, richTextRenderer }) {
|
|
24
|
+
const commonProps = {
|
|
25
|
+
label: field.label,
|
|
26
|
+
description: field.description,
|
|
27
|
+
placeholder: field.placeholder,
|
|
28
|
+
required: field.required,
|
|
29
|
+
...form.getInputProps(field.name)
|
|
30
|
+
};
|
|
31
|
+
switch (field.type) {
|
|
32
|
+
case "text":
|
|
33
|
+
return /* @__PURE__ */ jsx(TextInput, { ...commonProps });
|
|
34
|
+
case "textarea":
|
|
35
|
+
return /* @__PURE__ */ jsx(Textarea, { ...commonProps, minRows: 3, autosize: true });
|
|
36
|
+
case "number":
|
|
37
|
+
return /* @__PURE__ */ jsx(NumberInput, { ...commonProps, min: field.min, max: field.max });
|
|
38
|
+
case "select":
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
Select,
|
|
41
|
+
{
|
|
42
|
+
...commonProps,
|
|
43
|
+
data: field.options?.map((opt) => ({
|
|
44
|
+
label: opt.label,
|
|
45
|
+
value: String(opt.value)
|
|
46
|
+
})) || []
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
case "checkbox":
|
|
50
|
+
return /* @__PURE__ */ jsx(Checkbox, { ...commonProps, ...form.getInputProps(field.name, { type: "checkbox" }) });
|
|
51
|
+
case "radio":
|
|
52
|
+
return /* @__PURE__ */ jsx(Radio.Group, { ...commonProps, children: /* @__PURE__ */ jsx(Stack, { gap: "xs", children: field.options?.map((opt) => /* @__PURE__ */ jsx(Radio, { value: String(opt.value), label: opt.label }, opt.value)) }) });
|
|
53
|
+
case "richtext": {
|
|
54
|
+
const inputProps = form.getInputProps(field.name);
|
|
55
|
+
if (richTextRenderer) {
|
|
56
|
+
return richTextRenderer({
|
|
57
|
+
content: inputProps.value || "",
|
|
58
|
+
onChange: (content) => form.setFieldValue(field.name, content),
|
|
59
|
+
placeholder: field.placeholder
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return /* @__PURE__ */ jsx(Textarea, { ...commonProps, minRows: 5, autosize: true });
|
|
63
|
+
}
|
|
64
|
+
default:
|
|
65
|
+
return /* @__PURE__ */ jsx(TextInput, { ...commonProps });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
var iconMap = {
|
|
69
|
+
IconCheck,
|
|
70
|
+
IconX,
|
|
71
|
+
IconRefresh,
|
|
72
|
+
IconAlertTriangle,
|
|
73
|
+
IconEdit,
|
|
74
|
+
IconEye,
|
|
75
|
+
IconRocket,
|
|
76
|
+
IconMessageCircle,
|
|
77
|
+
IconArrowUp,
|
|
78
|
+
IconClock,
|
|
79
|
+
IconFileText,
|
|
80
|
+
IconSend,
|
|
81
|
+
IconMail
|
|
82
|
+
};
|
|
83
|
+
function getIcon(iconName) {
|
|
84
|
+
if (!iconName) return null;
|
|
85
|
+
const icon = iconMap[iconName];
|
|
86
|
+
if (!icon && process.env.NODE_ENV !== "production") {
|
|
87
|
+
console.warn(`[iconMap] Unknown icon "${iconName}". Allowed: ${Object.keys(iconMap).join(", ")}`);
|
|
88
|
+
}
|
|
89
|
+
return icon || null;
|
|
90
|
+
}
|
|
91
|
+
function resolveDefaultValue(context, path) {
|
|
92
|
+
if (!context || typeof context !== "object") return void 0;
|
|
93
|
+
return path.split(".").reduce((obj, key) => {
|
|
94
|
+
if (obj && typeof obj === "object" && key in obj) {
|
|
95
|
+
return obj[key];
|
|
96
|
+
}
|
|
97
|
+
return void 0;
|
|
98
|
+
}, context);
|
|
99
|
+
}
|
|
100
|
+
function ActionModal({
|
|
101
|
+
action,
|
|
102
|
+
task,
|
|
103
|
+
opened,
|
|
104
|
+
onClose,
|
|
105
|
+
onSubmit,
|
|
106
|
+
richTextRenderer,
|
|
107
|
+
error,
|
|
108
|
+
isPending
|
|
109
|
+
}) {
|
|
110
|
+
const getInitialValuesFromContext = () => {
|
|
111
|
+
if (!action.form?.fields) return {};
|
|
112
|
+
return action.form.fields.reduce(
|
|
113
|
+
(acc, field) => {
|
|
114
|
+
if (field.defaultValueFromContext && task?.context) {
|
|
115
|
+
const value = resolveDefaultValue(task.context, field.defaultValueFromContext);
|
|
116
|
+
if (value !== void 0) {
|
|
117
|
+
acc[field.name] = value;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return acc;
|
|
121
|
+
},
|
|
122
|
+
{}
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
const form = useForm({
|
|
126
|
+
initialValues: {
|
|
127
|
+
...getInitialValuesFromContext(),
|
|
128
|
+
...action.payloadTemplate || {},
|
|
129
|
+
notes: ""
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
const handleSubmit = form.onSubmit((values) => {
|
|
133
|
+
const { notes, ...payload } = values;
|
|
134
|
+
onSubmit(payload, notes || void 0);
|
|
135
|
+
});
|
|
136
|
+
const Icon = getIcon(action.icon);
|
|
137
|
+
const errorMessage = error ? (() => {
|
|
138
|
+
const { message, fields, requestId } = getErrorInfo(error);
|
|
139
|
+
return formatErrorMessage(message, requestId, fields);
|
|
140
|
+
})() : null;
|
|
141
|
+
if (!action.form) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
return /* @__PURE__ */ jsx(CustomModal, { opened, onClose, size: "xl", children: /* @__PURE__ */ jsx("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
145
|
+
/* @__PURE__ */ jsx(Title, { order: 3, children: action.form.title || action.label }),
|
|
146
|
+
action.form.description && /* @__PURE__ */ jsx(Text, { c: "dimmed", children: action.form.description }),
|
|
147
|
+
action.form.fields.map((field) => /* @__PURE__ */ jsx(FormFieldRenderer, { field, form, richTextRenderer }, field.name)),
|
|
148
|
+
/* @__PURE__ */ jsx(
|
|
149
|
+
Textarea,
|
|
150
|
+
{
|
|
151
|
+
label: "Notes (optional)",
|
|
152
|
+
placeholder: "Add any notes or reasoning...",
|
|
153
|
+
...form.getInputProps("notes")
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
errorMessage && /* @__PURE__ */ jsx(Alert, { color: "red", variant: "light", icon: /* @__PURE__ */ jsx(IconAlertCircle, { size: 16 }), title: "Submission failed", children: /* @__PURE__ */ jsx(Text, { size: "sm", style: { whiteSpace: "pre-line" }, children: errorMessage }) }),
|
|
157
|
+
/* @__PURE__ */ jsxs(Group, { mt: "md", justify: "space-between", children: [
|
|
158
|
+
/* @__PURE__ */ jsx(Button, { variant: "light", onClick: onClose, children: "Cancel" }),
|
|
159
|
+
/* @__PURE__ */ jsx(
|
|
160
|
+
Button,
|
|
161
|
+
{
|
|
162
|
+
type: "submit",
|
|
163
|
+
color: action.color || "blue",
|
|
164
|
+
leftSection: Icon ? /* @__PURE__ */ jsx(Icon, { size: 16 }) : null,
|
|
165
|
+
loading: isPending,
|
|
166
|
+
children: action.label
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
] })
|
|
170
|
+
] }) }) });
|
|
171
|
+
}
|
|
172
|
+
function TaskCard({ task, onViewExecution, richTextRenderer }) {
|
|
173
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
174
|
+
const { mutate: submitAction, isPending } = useSubmitAction();
|
|
175
|
+
const { mutate: deleteTask, isPending: isDeleting } = useDeleteTask();
|
|
176
|
+
const [actionModalOpened, setActionModalOpened] = useState(false);
|
|
177
|
+
const [selectedAction, setSelectedAction] = useState(null);
|
|
178
|
+
const [confirmAction, setConfirmAction] = useState(null);
|
|
179
|
+
const [deleteConfirmOpened, setDeleteConfirmOpened] = useState(false);
|
|
180
|
+
const handleActionClick = (action) => {
|
|
181
|
+
if (action.requiresConfirmation) {
|
|
182
|
+
setConfirmAction(action);
|
|
183
|
+
} else if (action.form) {
|
|
184
|
+
setSelectedAction(action);
|
|
185
|
+
setActionModalOpened(true);
|
|
186
|
+
} else {
|
|
187
|
+
submitAction({
|
|
188
|
+
taskId: task.id,
|
|
189
|
+
actionId: action.id
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
const handleConfirm = () => {
|
|
194
|
+
if (!confirmAction) return;
|
|
195
|
+
if (confirmAction.form) {
|
|
196
|
+
setSelectedAction(confirmAction);
|
|
197
|
+
setActionModalOpened(true);
|
|
198
|
+
} else {
|
|
199
|
+
submitAction({
|
|
200
|
+
taskId: task.id,
|
|
201
|
+
actionId: confirmAction.id
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
setConfirmAction(null);
|
|
205
|
+
};
|
|
206
|
+
const getPriorityColor2 = (priority) => {
|
|
207
|
+
if (priority >= 8) return "red";
|
|
208
|
+
if (priority >= 5) return "yellow";
|
|
209
|
+
return "gray";
|
|
210
|
+
};
|
|
211
|
+
const getStatusColor2 = (status) => {
|
|
212
|
+
switch (status) {
|
|
213
|
+
case "pending":
|
|
214
|
+
return "blue";
|
|
215
|
+
case "processing":
|
|
216
|
+
return "blue";
|
|
217
|
+
case "completed":
|
|
218
|
+
return "green";
|
|
219
|
+
case "failed":
|
|
220
|
+
return "red";
|
|
221
|
+
case "expired":
|
|
222
|
+
return "orange";
|
|
223
|
+
default:
|
|
224
|
+
return "gray";
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
const handleRetry = () => {
|
|
228
|
+
if (task.selectedAction) {
|
|
229
|
+
submitAction({
|
|
230
|
+
taskId: task.id,
|
|
231
|
+
actionId: task.selectedAction,
|
|
232
|
+
payload: task.actionPayload
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
const formatDate = (date) => {
|
|
237
|
+
const now = /* @__PURE__ */ new Date();
|
|
238
|
+
const diffMs = now.getTime() - date.getTime();
|
|
239
|
+
const diffMins = Math.floor(diffMs / 6e4);
|
|
240
|
+
const diffHours = Math.floor(diffMins / 60);
|
|
241
|
+
const diffDays = Math.floor(diffHours / 24);
|
|
242
|
+
if (diffMins < 60) return `${diffMins}m ago`;
|
|
243
|
+
if (diffHours < 24) return `${diffHours}h ago`;
|
|
244
|
+
return `${diffDays}d ago`;
|
|
245
|
+
};
|
|
246
|
+
return /* @__PURE__ */ jsx(
|
|
247
|
+
Card,
|
|
248
|
+
{
|
|
249
|
+
withBorder: true,
|
|
250
|
+
style: { transition: "box-shadow var(--duration-fast) var(--easing)" },
|
|
251
|
+
onMouseEnter: (e) => {
|
|
252
|
+
e.currentTarget.style.boxShadow = "var(--standard-box-shadow)";
|
|
253
|
+
},
|
|
254
|
+
onMouseLeave: (e) => {
|
|
255
|
+
e.currentTarget.style.boxShadow = "";
|
|
256
|
+
},
|
|
257
|
+
children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
258
|
+
/* @__PURE__ */ jsxs(Group, { justify: "space-between", wrap: "nowrap", children: [
|
|
259
|
+
/* @__PURE__ */ jsxs(Group, { gap: "sm", style: { flex: 1 }, children: [
|
|
260
|
+
/* @__PURE__ */ jsx(ThemeIcon, { size: "lg", variant: "light", color: task.originResourceType === "agent" ? "blue" : "grape", children: task.originResourceType === "agent" ? /* @__PURE__ */ jsx(IconRobot, { size: 20 }) : /* @__PURE__ */ jsx(IconGitBranch, { size: 20 }) }),
|
|
261
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
262
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", mb: 4, children: [
|
|
263
|
+
/* @__PURE__ */ jsx(Text, { fw: 600, size: "sm", style: { fontFamily: "var(--mantine-font-family-headings)" }, children: task.description || "Task approval required" }),
|
|
264
|
+
/* @__PURE__ */ jsxs(Badge, { size: "xs", variant: "light", color: getPriorityColor2(task.priority), radius: "sm", children: [
|
|
265
|
+
"P",
|
|
266
|
+
task.priority
|
|
267
|
+
] })
|
|
268
|
+
] }),
|
|
269
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
270
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
271
|
+
task.originResourceType === "agent" ? "Agent" : "Workflow",
|
|
272
|
+
": ",
|
|
273
|
+
task.originResourceId
|
|
274
|
+
] }),
|
|
275
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "\u2022" }),
|
|
276
|
+
/* @__PURE__ */ jsxs(Group, { gap: 4, children: [
|
|
277
|
+
/* @__PURE__ */ jsx(IconClock, { size: 12 }),
|
|
278
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: formatDate(task.createdAt) })
|
|
279
|
+
] })
|
|
280
|
+
] })
|
|
281
|
+
] })
|
|
282
|
+
] }),
|
|
283
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
284
|
+
/* @__PURE__ */ jsx(
|
|
285
|
+
Badge,
|
|
286
|
+
{
|
|
287
|
+
size: "sm",
|
|
288
|
+
variant: "light",
|
|
289
|
+
color: getStatusColor2(task.status),
|
|
290
|
+
radius: "sm",
|
|
291
|
+
leftSection: task.status === "processing" ? /* @__PURE__ */ jsx(Loader, { size: 6 }) : void 0,
|
|
292
|
+
children: task.status.charAt(0).toUpperCase() + task.status.slice(1)
|
|
293
|
+
}
|
|
294
|
+
),
|
|
295
|
+
task.status === "failed" && /* @__PURE__ */ jsx(Button, { variant: "light", color: "red", size: "xs", loading: isPending, onClick: handleRetry, children: "Retry" }),
|
|
296
|
+
/* @__PURE__ */ jsxs(Menu, { shadow: "md", position: "bottom-end", offset: 8, children: [
|
|
297
|
+
/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", color: "gray", size: "sm", children: /* @__PURE__ */ jsx(IconDotsVertical, { size: 16 }) }) }),
|
|
298
|
+
/* @__PURE__ */ jsx(Menu.Dropdown, { children: /* @__PURE__ */ jsx(
|
|
299
|
+
Menu.Item,
|
|
300
|
+
{
|
|
301
|
+
leftSection: /* @__PURE__ */ jsx(IconTrash, { size: 14 }),
|
|
302
|
+
disabled: task.status === "processing",
|
|
303
|
+
onClick: () => setDeleteConfirmOpened(true),
|
|
304
|
+
children: "Delete"
|
|
305
|
+
}
|
|
306
|
+
) })
|
|
307
|
+
] })
|
|
308
|
+
] })
|
|
309
|
+
] }),
|
|
310
|
+
/* @__PURE__ */ jsx(Accordion, { value: isExpanded ? "details" : null, onChange: (value) => setIsExpanded(!!value), children: /* @__PURE__ */ jsxs(Accordion.Item, { value: "details", children: [
|
|
311
|
+
/* @__PURE__ */ jsx(Accordion.Control, { children: /* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, children: "View Context" }) }),
|
|
312
|
+
/* @__PURE__ */ jsx(Accordion.Panel, { children: /* @__PURE__ */ jsx(ContextViewer, { data: task.context }) })
|
|
313
|
+
] }) }),
|
|
314
|
+
task.status === "pending" && /* @__PURE__ */ jsx(Group, { gap: "xs", children: task.actions.map((action) => {
|
|
315
|
+
const Icon = getIcon(action.icon);
|
|
316
|
+
const variant = "light";
|
|
317
|
+
return /* @__PURE__ */ jsx(
|
|
318
|
+
Button,
|
|
319
|
+
{
|
|
320
|
+
variant,
|
|
321
|
+
color: action.color || (action.type === "danger" ? "red" : "blue"),
|
|
322
|
+
leftSection: Icon ? /* @__PURE__ */ jsx(Icon, { size: 16 }) : null,
|
|
323
|
+
loading: isPending,
|
|
324
|
+
onClick: () => handleActionClick(action),
|
|
325
|
+
title: action.description,
|
|
326
|
+
size: "xs",
|
|
327
|
+
radius: "xs",
|
|
328
|
+
children: action.label
|
|
329
|
+
},
|
|
330
|
+
action.id
|
|
331
|
+
);
|
|
332
|
+
}) }),
|
|
333
|
+
task.selectedAction && /* @__PURE__ */ jsx(Accordion, { children: /* @__PURE__ */ jsxs(Accordion.Item, { value: "submitted", children: [
|
|
334
|
+
/* @__PURE__ */ jsx(Accordion.Control, { children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
335
|
+
/* @__PURE__ */ jsx(ThemeIcon, { size: "sm", variant: "light", color: "green", radius: "xl", children: /* @__PURE__ */ jsx(IconCheck, { size: 12 }) }),
|
|
336
|
+
/* @__PURE__ */ jsxs(Text, { size: "sm", fw: 500, children: [
|
|
337
|
+
"Submitted: ",
|
|
338
|
+
task.actions.find((a) => a.id === task.selectedAction)?.label || task.selectedAction
|
|
339
|
+
] }),
|
|
340
|
+
task.targetExecutionId && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "cyan", leftSection: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 10 }), children: "Executed" })
|
|
341
|
+
] }) }),
|
|
342
|
+
/* @__PURE__ */ jsx(Accordion.Panel, { children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
343
|
+
task.actionPayload !== void 0 && task.actionPayload !== null && /* @__PURE__ */ jsx(JsonViewer, { data: task.actionPayload, maxHeight: 200 }),
|
|
344
|
+
task.completedAt && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
345
|
+
"Completed ",
|
|
346
|
+
formatDate(task.completedAt),
|
|
347
|
+
task.completedBy ? ` by ${task.completedBy}` : ""
|
|
348
|
+
] }),
|
|
349
|
+
task.targetExecutionId && /* @__PURE__ */ jsx(
|
|
350
|
+
Button,
|
|
351
|
+
{
|
|
352
|
+
variant: "light",
|
|
353
|
+
size: "xs",
|
|
354
|
+
leftSection: /* @__PURE__ */ jsx(IconExternalLink, { size: 14 }),
|
|
355
|
+
onClick: () => {
|
|
356
|
+
onViewExecution?.({
|
|
357
|
+
resourceType: task.originResourceType,
|
|
358
|
+
resourceId: task.originResourceId,
|
|
359
|
+
executionId: task.targetExecutionId
|
|
360
|
+
});
|
|
361
|
+
},
|
|
362
|
+
children: "View Execution"
|
|
363
|
+
}
|
|
364
|
+
)
|
|
365
|
+
] }) })
|
|
366
|
+
] }) }),
|
|
367
|
+
/* @__PURE__ */ jsx(CustomModal, { opened: !!confirmAction, onClose: () => setConfirmAction(null), size: "sm", children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
368
|
+
/* @__PURE__ */ jsx(Text, { fw: 600, children: "Confirm Action" }),
|
|
369
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", children: confirmAction?.confirmationMessage || `Are you sure you want to ${confirmAction?.label.toLowerCase()}?` }),
|
|
370
|
+
/* @__PURE__ */ jsxs(Group, { justify: "flex-end", children: [
|
|
371
|
+
/* @__PURE__ */ jsx(Button, { variant: "default", onClick: () => setConfirmAction(null), children: "Cancel" }),
|
|
372
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleConfirm, children: confirmAction?.label })
|
|
373
|
+
] })
|
|
374
|
+
] }) }),
|
|
375
|
+
selectedAction && /* @__PURE__ */ jsx(
|
|
376
|
+
ActionModal,
|
|
377
|
+
{
|
|
378
|
+
action: selectedAction,
|
|
379
|
+
task,
|
|
380
|
+
opened: actionModalOpened,
|
|
381
|
+
onClose: () => setActionModalOpened(false),
|
|
382
|
+
onSubmit: (payload, notes) => {
|
|
383
|
+
submitAction({
|
|
384
|
+
taskId: task.id,
|
|
385
|
+
actionId: selectedAction.id,
|
|
386
|
+
payload,
|
|
387
|
+
notes
|
|
388
|
+
});
|
|
389
|
+
setActionModalOpened(false);
|
|
390
|
+
},
|
|
391
|
+
richTextRenderer
|
|
392
|
+
}
|
|
393
|
+
),
|
|
394
|
+
/* @__PURE__ */ jsx(CustomModal, { opened: deleteConfirmOpened, onClose: () => setDeleteConfirmOpened(false), size: "sm", children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
395
|
+
/* @__PURE__ */ jsx(Text, { fw: 600, children: "Delete Task" }),
|
|
396
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", children: "Are you sure you want to delete this task? This action cannot be undone." }),
|
|
397
|
+
/* @__PURE__ */ jsxs(Group, { justify: "flex-end", children: [
|
|
398
|
+
/* @__PURE__ */ jsx(Button, { variant: "default", onClick: () => setDeleteConfirmOpened(false), children: "Cancel" }),
|
|
399
|
+
/* @__PURE__ */ jsx(
|
|
400
|
+
Button,
|
|
401
|
+
{
|
|
402
|
+
color: "red",
|
|
403
|
+
loading: isDeleting,
|
|
404
|
+
onClick: () => {
|
|
405
|
+
deleteTask(task.id);
|
|
406
|
+
setDeleteConfirmOpened(false);
|
|
407
|
+
},
|
|
408
|
+
children: "Delete"
|
|
409
|
+
}
|
|
410
|
+
)
|
|
411
|
+
] })
|
|
412
|
+
] }) })
|
|
413
|
+
] })
|
|
414
|
+
}
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
function ContentSections({ context, sections, titles }) {
|
|
418
|
+
const sectionKeys = sections || Object.keys(context).filter((key) => key !== "contentDisplay" && typeof context[key] === "string");
|
|
419
|
+
const formatTitle = (key) => key.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
420
|
+
return /* @__PURE__ */ jsx(Stack, { gap: "lg", children: sectionKeys.map((key) => {
|
|
421
|
+
const content = context[key];
|
|
422
|
+
if (typeof content !== "string") return null;
|
|
423
|
+
const title = titles?.[key] || formatTitle(key);
|
|
424
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
425
|
+
/* @__PURE__ */ jsx(Title, { order: 4, children: title }),
|
|
426
|
+
/* @__PURE__ */ jsx(StyledMarkdown, { children: content })
|
|
427
|
+
] }, key);
|
|
428
|
+
}) });
|
|
429
|
+
}
|
|
430
|
+
function CollapsibleJsonSection({ title, data, defaultExpanded = false }) {
|
|
431
|
+
const [isExpanded, setIsExpanded] = useState(defaultExpanded);
|
|
432
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
433
|
+
return /* @__PURE__ */ jsxs(
|
|
434
|
+
"div",
|
|
435
|
+
{
|
|
436
|
+
style: {
|
|
437
|
+
borderRadius: "var(--mantine-radius-default)",
|
|
438
|
+
backgroundColor: isHovered ? "var(--color-surface-hover, rgba(0,0,0,0.02))" : "transparent",
|
|
439
|
+
transition: "background-color var(--duration-fast) var(--easing)"
|
|
440
|
+
},
|
|
441
|
+
children: [
|
|
442
|
+
/* @__PURE__ */ jsxs(
|
|
443
|
+
Group,
|
|
444
|
+
{
|
|
445
|
+
gap: 4,
|
|
446
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
447
|
+
onMouseEnter: () => setIsHovered(true),
|
|
448
|
+
onMouseLeave: () => setIsHovered(false),
|
|
449
|
+
style: {
|
|
450
|
+
cursor: "pointer",
|
|
451
|
+
padding: "0.375rem 0.5rem",
|
|
452
|
+
userSelect: "none"
|
|
453
|
+
},
|
|
454
|
+
wrap: "nowrap",
|
|
455
|
+
children: [
|
|
456
|
+
/* @__PURE__ */ jsx(
|
|
457
|
+
ActionIcon,
|
|
458
|
+
{
|
|
459
|
+
variant: "transparent",
|
|
460
|
+
size: "xs",
|
|
461
|
+
style: {
|
|
462
|
+
transition: "transform var(--duration-fast) var(--easing)",
|
|
463
|
+
transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
|
|
464
|
+
},
|
|
465
|
+
children: /* @__PURE__ */ jsx(IconChevronRight, { size: 14 })
|
|
466
|
+
}
|
|
467
|
+
),
|
|
468
|
+
title
|
|
469
|
+
]
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
/* @__PURE__ */ jsx(Collapse, { in: isExpanded, children: /* @__PURE__ */ jsx(JsonViewer, { data }) })
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
function ContractDisplay({ contract, defaultExpanded = false }) {
|
|
478
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
479
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Contract" }),
|
|
480
|
+
/* @__PURE__ */ jsx(
|
|
481
|
+
CollapsibleJsonSection,
|
|
482
|
+
{
|
|
483
|
+
title: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Input Schema" }),
|
|
484
|
+
data: contract.inputSchema,
|
|
485
|
+
defaultExpanded
|
|
486
|
+
}
|
|
487
|
+
),
|
|
488
|
+
contract.outputSchema != null && /* @__PURE__ */ jsx(
|
|
489
|
+
CollapsibleJsonSection,
|
|
490
|
+
{
|
|
491
|
+
title: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Output Schema" }),
|
|
492
|
+
data: contract.outputSchema,
|
|
493
|
+
defaultExpanded
|
|
494
|
+
}
|
|
495
|
+
)
|
|
496
|
+
] });
|
|
497
|
+
}
|
|
498
|
+
function ConfigCard({ icon, title, badge, items, color = "blue" }) {
|
|
499
|
+
const visibleItems = items.filter((item) => item.value !== void 0 && item.value !== null);
|
|
500
|
+
if (visibleItems.length === 0) return null;
|
|
501
|
+
return /* @__PURE__ */ jsx(Card, { padding: "sm", withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
502
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
|
|
503
|
+
/* @__PURE__ */ jsx(ThemeIcon, { size: "sm", variant: "light", color, radius: "sm", children: icon }),
|
|
504
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { flex: 1, fontFamily: "var(--elevasis-font-family-subtitle)" }, children: title }),
|
|
505
|
+
badge && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color, children: badge })
|
|
506
|
+
] }),
|
|
507
|
+
/* @__PURE__ */ jsx(Stack, { gap: 4, children: visibleItems.map((item, index) => /* @__PURE__ */ jsxs(Group, { gap: 6, wrap: "nowrap", children: [
|
|
508
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { minWidth: "fit-content" }, children: item.label }),
|
|
509
|
+
typeof item.value === "string" || typeof item.value === "number" ? /* @__PURE__ */ jsx(Text, { size: "xs", ff: item.mono ? "monospace" : void 0, truncate: true, style: { flex: 1 }, children: item.value }) : item.value
|
|
510
|
+
] }, index)) })
|
|
511
|
+
] }) });
|
|
512
|
+
}
|
|
513
|
+
function ToolsListDisplay({ tools, compact = false, maxVisible = 0 }) {
|
|
514
|
+
if (tools.length === 0) {
|
|
515
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
516
|
+
!compact && /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, mb: "xs", style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Tools" }),
|
|
517
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "No tools configured" })
|
|
518
|
+
] });
|
|
519
|
+
}
|
|
520
|
+
const normalizedTools = tools.map((tool) => typeof tool === "string" ? { name: tool } : tool);
|
|
521
|
+
const visibleTools = maxVisible > 0 ? normalizedTools.slice(0, maxVisible) : normalizedTools;
|
|
522
|
+
const hiddenCount = maxVisible > 0 ? Math.max(0, normalizedTools.length - maxVisible) : 0;
|
|
523
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
524
|
+
!compact && /* @__PURE__ */ jsxs(Group, { gap: "xs", mb: "xs", children: [
|
|
525
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Tools" }),
|
|
526
|
+
/* @__PURE__ */ jsx(Badge, { variant: "light", size: "xs", children: tools.length })
|
|
527
|
+
] }),
|
|
528
|
+
/* @__PURE__ */ jsx(SimpleGrid, { cols: 2, spacing: "xs", children: visibleTools.map((tool, index) => /* @__PURE__ */ jsxs(Card, { withBorder: true, p: "sm", children: [
|
|
529
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", mb: tool.description ? "xs" : 0, children: [
|
|
530
|
+
/* @__PURE__ */ jsx(IconTool, { size: 16, style: { color: "var(--color-text-subtle)", flexShrink: 0 } }),
|
|
531
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", fw: 500, children: tool.name })
|
|
532
|
+
] }),
|
|
533
|
+
tool.description && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", lineClamp: 2, children: tool.description })
|
|
534
|
+
] }, `${tool.name}-${index}`)) }),
|
|
535
|
+
hiddenCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", fs: "italic", mt: "xs", children: [
|
|
536
|
+
"+",
|
|
537
|
+
hiddenCount,
|
|
538
|
+
" more tools"
|
|
539
|
+
] })
|
|
540
|
+
] });
|
|
541
|
+
}
|
|
542
|
+
var NODE_WIDTH = 200;
|
|
543
|
+
var NODE_HEIGHT = 100;
|
|
544
|
+
var RANK_SEP = 80;
|
|
545
|
+
var NODE_SEP = 30;
|
|
546
|
+
function useNewKnowledgeMapLayout(knowledgeMap, agentName) {
|
|
547
|
+
return useMemo(() => {
|
|
548
|
+
if (!knowledgeMap || knowledgeMap.nodes.length === 0) {
|
|
549
|
+
return { nodes: [], edges: [] };
|
|
550
|
+
}
|
|
551
|
+
const agentNodeId = "__agent__";
|
|
552
|
+
const edges = knowledgeMap.nodes.map((node) => ({
|
|
553
|
+
id: `edge-${agentNodeId}-${node.id}`,
|
|
554
|
+
source: agentNodeId,
|
|
555
|
+
target: node.id,
|
|
556
|
+
type: "knowledgeMap",
|
|
557
|
+
data: {}
|
|
558
|
+
}));
|
|
559
|
+
const dagreGraph = new dagre.graphlib.Graph();
|
|
560
|
+
dagreGraph.setDefaultEdgeLabel(() => ({}));
|
|
561
|
+
dagreGraph.setGraph({
|
|
562
|
+
rankdir: "TB",
|
|
563
|
+
ranksep: RANK_SEP,
|
|
564
|
+
nodesep: NODE_SEP,
|
|
565
|
+
marginx: 40,
|
|
566
|
+
marginy: 40
|
|
567
|
+
});
|
|
568
|
+
dagreGraph.setNode(agentNodeId, { width: NODE_WIDTH, height: NODE_HEIGHT });
|
|
569
|
+
knowledgeMap.nodes.forEach((node) => {
|
|
570
|
+
dagreGraph.setNode(node.id, { width: NODE_WIDTH, height: NODE_HEIGHT });
|
|
571
|
+
});
|
|
572
|
+
edges.forEach((edge) => {
|
|
573
|
+
dagreGraph.setEdge(edge.source, edge.target);
|
|
574
|
+
});
|
|
575
|
+
dagre.layout(dagreGraph);
|
|
576
|
+
const agentDagreNode = dagreGraph.node(agentNodeId);
|
|
577
|
+
const agentNode = {
|
|
578
|
+
id: agentNodeId,
|
|
579
|
+
type: "knowledgeMap",
|
|
580
|
+
position: {
|
|
581
|
+
x: agentDagreNode.x - NODE_WIDTH / 2,
|
|
582
|
+
y: agentDagreNode.y - NODE_HEIGHT / 2
|
|
583
|
+
},
|
|
584
|
+
data: {
|
|
585
|
+
id: agentNodeId,
|
|
586
|
+
name: agentName,
|
|
587
|
+
description: "Agent with lazy-loading knowledge",
|
|
588
|
+
loaded: true,
|
|
589
|
+
hasPrompt: false,
|
|
590
|
+
isAgentNode: true
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
const knowledgeNodes = knowledgeMap.nodes.map((node) => {
|
|
594
|
+
const dagreNode = dagreGraph.node(node.id);
|
|
595
|
+
return {
|
|
596
|
+
id: node.id,
|
|
597
|
+
type: "knowledgeMap",
|
|
598
|
+
position: {
|
|
599
|
+
x: dagreNode.x - NODE_WIDTH / 2,
|
|
600
|
+
y: dagreNode.y - NODE_HEIGHT / 2
|
|
601
|
+
},
|
|
602
|
+
data: {
|
|
603
|
+
id: node.id,
|
|
604
|
+
name: node.id,
|
|
605
|
+
description: node.description,
|
|
606
|
+
loaded: node.loaded,
|
|
607
|
+
hasPrompt: node.hasPrompt,
|
|
608
|
+
isAgentNode: false
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
});
|
|
612
|
+
return { nodes: [agentNode, ...knowledgeNodes], edges };
|
|
613
|
+
}, [knowledgeMap, agentName]);
|
|
614
|
+
}
|
|
615
|
+
var NewKnowledgeMapNode = memo(function NewKnowledgeMapNode2({ data, selected }) {
|
|
616
|
+
const nodeColor = data.isAgentNode ? "violet" : data.loaded ? "teal" : "blue";
|
|
617
|
+
return /* @__PURE__ */ jsx(BaseNode, { color: nodeColor, selected, width: 200, handleDirection: "vertical", children: /* @__PURE__ */ jsxs(Stack, { gap: 6, children: [
|
|
618
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
|
|
619
|
+
data.isAgentNode ? /* @__PURE__ */ jsx(IconBrain, { size: 16, style: { flexShrink: 0 } }) : data.loaded ? /* @__PURE__ */ jsx(IconBrain, { size: 16, style: { flexShrink: 0 } }) : /* @__PURE__ */ jsx(IconBrain, { size: 16, style: { flexShrink: 0, opacity: 0.4 } }),
|
|
620
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, truncate: true, style: { flex: 1, fontFamily: "var(--mantine-font-family-headings)" }, children: data.name })
|
|
621
|
+
] }),
|
|
622
|
+
data.description && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", lineClamp: 2, children: data.description }),
|
|
623
|
+
/* @__PURE__ */ jsx(Group, { gap: 4, children: data.isAgentNode ? /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: "Root" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
624
|
+
/* @__PURE__ */ jsx(
|
|
625
|
+
Badge,
|
|
626
|
+
{
|
|
627
|
+
size: "xs",
|
|
628
|
+
variant: "light",
|
|
629
|
+
color: data.loaded ? "teal" : "gray",
|
|
630
|
+
leftSection: /* @__PURE__ */ jsx(IconBrain, { size: 10 }),
|
|
631
|
+
children: data.loaded ? "Loaded" : "Available"
|
|
632
|
+
}
|
|
633
|
+
),
|
|
634
|
+
data.hasPrompt && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ jsx(IconFileText, { size: 10 }), children: "Prompt" })
|
|
635
|
+
] }) })
|
|
636
|
+
] }) });
|
|
637
|
+
});
|
|
638
|
+
var NewKnowledgeMapEdge = memo(function NewKnowledgeMapEdge2({
|
|
639
|
+
id,
|
|
640
|
+
sourceX,
|
|
641
|
+
sourceY,
|
|
642
|
+
targetX,
|
|
643
|
+
targetY,
|
|
644
|
+
sourcePosition,
|
|
645
|
+
targetPosition,
|
|
646
|
+
selected,
|
|
647
|
+
data
|
|
648
|
+
}) {
|
|
649
|
+
const colors = useGraphTheme();
|
|
650
|
+
return /* @__PURE__ */ jsx(
|
|
651
|
+
BaseEdge,
|
|
652
|
+
{
|
|
653
|
+
id,
|
|
654
|
+
sourceX,
|
|
655
|
+
sourceY,
|
|
656
|
+
targetX,
|
|
657
|
+
targetY,
|
|
658
|
+
sourcePosition,
|
|
659
|
+
targetPosition,
|
|
660
|
+
color: colors.primary,
|
|
661
|
+
glowColor: colors.primaryGlow,
|
|
662
|
+
animated: false,
|
|
663
|
+
selected,
|
|
664
|
+
dimmed: data?.dimmed
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
});
|
|
668
|
+
var nodeTypes = {
|
|
669
|
+
knowledgeMap: NewKnowledgeMapNode
|
|
670
|
+
};
|
|
671
|
+
var edgeTypes = {
|
|
672
|
+
knowledgeMap: NewKnowledgeMapEdge
|
|
673
|
+
};
|
|
674
|
+
function NewKnowledgeMapGraphInner({ knowledgeMap, agentName, compact, fitViewTrigger }) {
|
|
675
|
+
const { nodes: layoutNodes, edges: layoutEdges } = useNewKnowledgeMapLayout(knowledgeMap, agentName);
|
|
676
|
+
const { nodes, edges, handleNodeMouseEnter, handleNodeMouseLeave } = useGraphHighlighting(layoutNodes, layoutEdges);
|
|
677
|
+
if (!knowledgeMap || knowledgeMap.nodes.length === 0) {
|
|
678
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
679
|
+
!compact && /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, mb: "xs", style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Knowledge Map" }),
|
|
680
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "No knowledge nodes configured" })
|
|
681
|
+
] });
|
|
682
|
+
}
|
|
683
|
+
const containerHeight = calculateGraphHeight({
|
|
684
|
+
itemCount: knowledgeMap.nodeCount,
|
|
685
|
+
minHeight: 250,
|
|
686
|
+
maxHeight: 450,
|
|
687
|
+
heightPerItem: 60
|
|
688
|
+
});
|
|
689
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
690
|
+
!compact && /* @__PURE__ */ jsxs(Group, { gap: "xs", mb: "xs", children: [
|
|
691
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Knowledge Map" }),
|
|
692
|
+
/* @__PURE__ */ jsxs(Badge, { variant: "light", size: "xs", children: [
|
|
693
|
+
knowledgeMap.nodeCount,
|
|
694
|
+
" ",
|
|
695
|
+
knowledgeMap.nodeCount === 1 ? "node" : "nodes"
|
|
696
|
+
] })
|
|
697
|
+
] }),
|
|
698
|
+
/* @__PURE__ */ jsx(
|
|
699
|
+
Box,
|
|
700
|
+
{
|
|
701
|
+
className: Graph_module_css_default.graphContainer,
|
|
702
|
+
style: {
|
|
703
|
+
width: "100%",
|
|
704
|
+
height: containerHeight,
|
|
705
|
+
border: "1px solid var(--color-border)",
|
|
706
|
+
borderRadius: "var(--mantine-radius-md)",
|
|
707
|
+
overflow: "hidden"
|
|
708
|
+
},
|
|
709
|
+
children: /* @__PURE__ */ jsxs(
|
|
710
|
+
ReactFlow,
|
|
711
|
+
{
|
|
712
|
+
nodes,
|
|
713
|
+
edges,
|
|
714
|
+
nodeTypes,
|
|
715
|
+
edgeTypes,
|
|
716
|
+
onNodeMouseEnter: handleNodeMouseEnter,
|
|
717
|
+
onNodeMouseLeave: handleNodeMouseLeave,
|
|
718
|
+
fitView: true,
|
|
719
|
+
fitViewOptions: { padding: 0.15 },
|
|
720
|
+
proOptions: { hideAttribution: true },
|
|
721
|
+
minZoom: GRAPH_CONSTANTS.MIN_ZOOM,
|
|
722
|
+
maxZoom: GRAPH_CONSTANTS.MAX_ZOOM,
|
|
723
|
+
nodesDraggable: false,
|
|
724
|
+
nodesConnectable: false,
|
|
725
|
+
elementsSelectable: true,
|
|
726
|
+
selectNodesOnDrag: false,
|
|
727
|
+
panOnDrag: true,
|
|
728
|
+
zoomOnScroll: true,
|
|
729
|
+
zoomOnPinch: true,
|
|
730
|
+
panOnScroll: false,
|
|
731
|
+
children: [
|
|
732
|
+
/* @__PURE__ */ jsx(GraphBackground, {}),
|
|
733
|
+
/* @__PURE__ */ jsx(GraphFitViewButton, { padding: 0.15, variant: "mantine", duration: 300 }),
|
|
734
|
+
/* @__PURE__ */ jsx(GraphFitViewHandler, { trigger: fitViewTrigger })
|
|
735
|
+
]
|
|
736
|
+
}
|
|
737
|
+
)
|
|
738
|
+
}
|
|
739
|
+
)
|
|
740
|
+
] });
|
|
741
|
+
}
|
|
742
|
+
function NewKnowledgeMapGraph(props) {
|
|
743
|
+
return /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(NewKnowledgeMapGraphInner, { ...props }) });
|
|
744
|
+
}
|
|
745
|
+
function DefinitionSectionHeader({ expanded, onToggle, icon, title, count }) {
|
|
746
|
+
return /* @__PURE__ */ jsxs(Group, { gap: 4, onClick: onToggle, style: { cursor: "pointer", userSelect: "none" }, wrap: "nowrap", children: [
|
|
747
|
+
/* @__PURE__ */ jsx(
|
|
748
|
+
ActionIcon,
|
|
749
|
+
{
|
|
750
|
+
variant: "transparent",
|
|
751
|
+
size: "xs",
|
|
752
|
+
style: {
|
|
753
|
+
transition: "transform var(--duration-fast) var(--easing)",
|
|
754
|
+
transform: expanded ? "rotate(90deg)" : "rotate(0deg)"
|
|
755
|
+
},
|
|
756
|
+
children: /* @__PURE__ */ jsx(IconChevronRight, { size: 14 })
|
|
757
|
+
}
|
|
758
|
+
),
|
|
759
|
+
icon,
|
|
760
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: title }),
|
|
761
|
+
count && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
762
|
+
"(",
|
|
763
|
+
count,
|
|
764
|
+
")"
|
|
765
|
+
] })
|
|
766
|
+
] });
|
|
767
|
+
}
|
|
768
|
+
function AgentDefinitionDisplay({ agent, defaultExpanded = false }) {
|
|
769
|
+
const [systemPromptExpanded, setSystemPromptExpanded] = useState(defaultExpanded);
|
|
770
|
+
const [configExpanded, setConfigExpanded] = useState(defaultExpanded);
|
|
771
|
+
const [knowledgeMapExpanded, setKnowledgeMapExpanded] = useState(defaultExpanded);
|
|
772
|
+
const [knowledgeMapFitTrigger, setKnowledgeMapFitTrigger] = useState(0);
|
|
773
|
+
const [toolsExpanded, setToolsExpanded] = useState(defaultExpanded);
|
|
774
|
+
const [memoryPrefsExpanded, setMemoryPrefsExpanded] = useState(defaultExpanded);
|
|
775
|
+
const hasConstraints = agent.config.constraints && Object.keys(agent.config.constraints).length > 0;
|
|
776
|
+
const hasMemoryPreferences = !!agent.config.memoryPreferences;
|
|
777
|
+
return /* @__PURE__ */ jsxs(Stack, { children: [
|
|
778
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
779
|
+
/* @__PURE__ */ jsx(
|
|
780
|
+
DefinitionSectionHeader,
|
|
781
|
+
{
|
|
782
|
+
expanded: configExpanded,
|
|
783
|
+
onToggle: () => setConfigExpanded(!configExpanded),
|
|
784
|
+
icon: /* @__PURE__ */ jsx(IconSettings, { size: 16, color: "var(--color-text-subtle)" }),
|
|
785
|
+
title: "Configuration"
|
|
786
|
+
}
|
|
787
|
+
),
|
|
788
|
+
/* @__PURE__ */ jsxs(Collapse, { in: configExpanded, children: [
|
|
789
|
+
/* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, spacing: "sm", mt: "xs", pl: "xl", children: [
|
|
790
|
+
/* @__PURE__ */ jsx(
|
|
791
|
+
ConfigCard,
|
|
792
|
+
{
|
|
793
|
+
icon: /* @__PURE__ */ jsx(IconCpu, { size: 14 }),
|
|
794
|
+
title: "Model",
|
|
795
|
+
badge: agent.modelConfig.provider,
|
|
796
|
+
items: [
|
|
797
|
+
{
|
|
798
|
+
label: "Model",
|
|
799
|
+
value: /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: agent.modelConfig.model })
|
|
800
|
+
},
|
|
801
|
+
{ label: "Temperature", value: agent.modelConfig.temperature, mono: true },
|
|
802
|
+
{ label: "Max Tokens", value: agent.modelConfig.maxOutputTokens?.toLocaleString(), mono: true },
|
|
803
|
+
{ label: "Top P", value: agent.modelConfig.topP, mono: true },
|
|
804
|
+
{
|
|
805
|
+
label: "Reasoning",
|
|
806
|
+
value: agent.modelConfig.modelOptions && "reasoning_effort" in agent.modelConfig.modelOptions ? String(agent.modelConfig.modelOptions.reasoning_effort) : void 0,
|
|
807
|
+
mono: true
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
label: "Verbosity",
|
|
811
|
+
value: agent.modelConfig.modelOptions && "verbosity" in agent.modelConfig.modelOptions ? String(agent.modelConfig.modelOptions.verbosity) : void 0,
|
|
812
|
+
mono: true
|
|
813
|
+
}
|
|
814
|
+
]
|
|
815
|
+
}
|
|
816
|
+
),
|
|
817
|
+
hasConstraints && /* @__PURE__ */ jsx(
|
|
818
|
+
ConfigCard,
|
|
819
|
+
{
|
|
820
|
+
icon: /* @__PURE__ */ jsx(IconClockHour4, { size: 14 }),
|
|
821
|
+
title: "Constraints",
|
|
822
|
+
color: "orange",
|
|
823
|
+
items: [
|
|
824
|
+
{ label: "Max Iterations", value: agent.config.constraints?.maxIterations, mono: true },
|
|
825
|
+
{
|
|
826
|
+
label: "Timeout",
|
|
827
|
+
value: agent.config.constraints?.timeout ? `${(agent.config.constraints.timeout / 1e3).toFixed(0)}s` : void 0,
|
|
828
|
+
mono: true
|
|
829
|
+
},
|
|
830
|
+
{ label: "Max Memory Keys", value: agent.config.constraints?.maxSessionMemoryKeys, mono: true },
|
|
831
|
+
{
|
|
832
|
+
label: "Max Memory Tokens",
|
|
833
|
+
value: agent.config.constraints?.maxMemoryTokens?.toLocaleString(),
|
|
834
|
+
mono: true
|
|
835
|
+
}
|
|
836
|
+
]
|
|
837
|
+
}
|
|
838
|
+
),
|
|
839
|
+
/* @__PURE__ */ jsx(
|
|
840
|
+
ConfigCard,
|
|
841
|
+
{
|
|
842
|
+
icon: /* @__PURE__ */ jsx(IconVersions, { size: 14 }),
|
|
843
|
+
title: "Version",
|
|
844
|
+
color: "grape",
|
|
845
|
+
items: [
|
|
846
|
+
{
|
|
847
|
+
label: "Version",
|
|
848
|
+
value: /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: agent.config.version })
|
|
849
|
+
}
|
|
850
|
+
]
|
|
851
|
+
}
|
|
852
|
+
),
|
|
853
|
+
/* @__PURE__ */ jsx(
|
|
854
|
+
ConfigCard,
|
|
855
|
+
{
|
|
856
|
+
icon: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 14 }),
|
|
857
|
+
title: "Execution Interface",
|
|
858
|
+
color: "teal",
|
|
859
|
+
items: [
|
|
860
|
+
{
|
|
861
|
+
label: "Has Interface",
|
|
862
|
+
value: agent.interface ? /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "green", children: "Yes" }) : /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "gray", children: "No" })
|
|
863
|
+
}
|
|
864
|
+
]
|
|
865
|
+
}
|
|
866
|
+
)
|
|
867
|
+
] }),
|
|
868
|
+
/* @__PURE__ */ jsx("div", { style: { paddingLeft: "var(--mantine-spacing-xl)", marginTop: "var(--mantine-spacing-sm)" }, children: /* @__PURE__ */ jsx(ContractDisplay, { contract: agent.contract, defaultExpanded }) })
|
|
869
|
+
] })
|
|
870
|
+
] }),
|
|
871
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
872
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
873
|
+
/* @__PURE__ */ jsx(
|
|
874
|
+
DefinitionSectionHeader,
|
|
875
|
+
{
|
|
876
|
+
expanded: systemPromptExpanded,
|
|
877
|
+
onToggle: () => setSystemPromptExpanded(!systemPromptExpanded),
|
|
878
|
+
icon: /* @__PURE__ */ jsx(IconBrain, { size: 16, color: "var(--color-text-subtle)" }),
|
|
879
|
+
title: "System Prompt"
|
|
880
|
+
}
|
|
881
|
+
),
|
|
882
|
+
/* @__PURE__ */ jsx(Collapse, { in: systemPromptExpanded, children: /* @__PURE__ */ jsx(Paper, { p: "sm", mt: "xs", children: /* @__PURE__ */ jsx(StyledMarkdown, { children: agent.config.systemPrompt }) }) })
|
|
883
|
+
] }),
|
|
884
|
+
agent.knowledgeMap && agent.knowledgeMap.nodeCount > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
885
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
886
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
887
|
+
/* @__PURE__ */ jsx(
|
|
888
|
+
DefinitionSectionHeader,
|
|
889
|
+
{
|
|
890
|
+
expanded: knowledgeMapExpanded,
|
|
891
|
+
onToggle: () => {
|
|
892
|
+
const willExpand = !knowledgeMapExpanded;
|
|
893
|
+
setKnowledgeMapExpanded(willExpand);
|
|
894
|
+
if (willExpand) {
|
|
895
|
+
setKnowledgeMapFitTrigger((prev) => prev + 1);
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
icon: /* @__PURE__ */ jsx(IconNetwork, { size: 16, color: "var(--color-text-subtle)" }),
|
|
899
|
+
title: "Knowledge Map",
|
|
900
|
+
count: `${agent.knowledgeMap.nodeCount} ${agent.knowledgeMap.nodeCount === 1 ? "node" : "nodes"}`
|
|
901
|
+
}
|
|
902
|
+
),
|
|
903
|
+
/* @__PURE__ */ jsx(Collapse, { in: knowledgeMapExpanded, children: /* @__PURE__ */ jsx("div", { style: { marginTop: "var(--mantine-spacing-xs)" }, children: /* @__PURE__ */ jsx(
|
|
904
|
+
NewKnowledgeMapGraph,
|
|
905
|
+
{
|
|
906
|
+
knowledgeMap: agent.knowledgeMap,
|
|
907
|
+
agentName: agent.config.name,
|
|
908
|
+
compact: true,
|
|
909
|
+
fitViewTrigger: knowledgeMapFitTrigger
|
|
910
|
+
}
|
|
911
|
+
) }) })
|
|
912
|
+
] })
|
|
913
|
+
] }),
|
|
914
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
915
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
916
|
+
/* @__PURE__ */ jsx(
|
|
917
|
+
DefinitionSectionHeader,
|
|
918
|
+
{
|
|
919
|
+
expanded: toolsExpanded,
|
|
920
|
+
onToggle: () => setToolsExpanded(!toolsExpanded),
|
|
921
|
+
icon: /* @__PURE__ */ jsx(IconTool, { size: 16, color: "var(--color-text-subtle)" }),
|
|
922
|
+
title: "Tools",
|
|
923
|
+
count: String(agent.tools.length)
|
|
924
|
+
}
|
|
925
|
+
),
|
|
926
|
+
/* @__PURE__ */ jsx(Collapse, { in: toolsExpanded, children: /* @__PURE__ */ jsx("div", { style: { marginTop: "var(--mantine-spacing-xs)" }, children: /* @__PURE__ */ jsx(ToolsListDisplay, { tools: agent.tools, compact: true }) }) })
|
|
927
|
+
] }),
|
|
928
|
+
hasMemoryPreferences && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
929
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
930
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
931
|
+
/* @__PURE__ */ jsx(
|
|
932
|
+
DefinitionSectionHeader,
|
|
933
|
+
{
|
|
934
|
+
expanded: memoryPrefsExpanded,
|
|
935
|
+
onToggle: () => setMemoryPrefsExpanded(!memoryPrefsExpanded),
|
|
936
|
+
title: "Memory Preferences"
|
|
937
|
+
}
|
|
938
|
+
),
|
|
939
|
+
/* @__PURE__ */ jsx(Collapse, { in: memoryPrefsExpanded, children: /* @__PURE__ */ jsx(
|
|
940
|
+
Paper,
|
|
941
|
+
{
|
|
942
|
+
p: "sm",
|
|
943
|
+
mt: "xs",
|
|
944
|
+
style: {
|
|
945
|
+
backgroundColor: "var(--color-background)",
|
|
946
|
+
border: "1px solid var(--color-border)"
|
|
947
|
+
},
|
|
948
|
+
children: /* @__PURE__ */ jsx(Text, { size: "sm", style: { whiteSpace: "pre-wrap" }, children: agent.config.memoryPreferences })
|
|
949
|
+
}
|
|
950
|
+
) })
|
|
951
|
+
] })
|
|
952
|
+
] })
|
|
953
|
+
] });
|
|
954
|
+
}
|
|
955
|
+
function WorkflowDefinitionDisplay({ workflow, defaultExpanded = false }) {
|
|
956
|
+
const [configExpanded, setConfigExpanded] = useState(defaultExpanded);
|
|
957
|
+
return /* @__PURE__ */ jsx(Stack, { children: /* @__PURE__ */ jsxs("div", { children: [
|
|
958
|
+
/* @__PURE__ */ jsxs(
|
|
959
|
+
Group,
|
|
960
|
+
{
|
|
961
|
+
gap: 4,
|
|
962
|
+
onClick: () => setConfigExpanded(!configExpanded),
|
|
963
|
+
style: { cursor: "pointer", userSelect: "none" },
|
|
964
|
+
wrap: "nowrap",
|
|
965
|
+
children: [
|
|
966
|
+
/* @__PURE__ */ jsx(
|
|
967
|
+
ActionIcon,
|
|
968
|
+
{
|
|
969
|
+
variant: "transparent",
|
|
970
|
+
size: "xs",
|
|
971
|
+
style: {
|
|
972
|
+
transition: "transform var(--duration-fast) var(--easing)",
|
|
973
|
+
transform: configExpanded ? "rotate(90deg)" : "rotate(0deg)"
|
|
974
|
+
},
|
|
975
|
+
children: /* @__PURE__ */ jsx(IconChevronRight, { size: 14 })
|
|
976
|
+
}
|
|
977
|
+
),
|
|
978
|
+
/* @__PURE__ */ jsx(IconSettings, { size: 16, color: "var(--color-text-subtle)" }),
|
|
979
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Configuration" })
|
|
980
|
+
]
|
|
981
|
+
}
|
|
982
|
+
),
|
|
983
|
+
/* @__PURE__ */ jsxs(Collapse, { in: configExpanded, children: [
|
|
984
|
+
/* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, spacing: "sm", mt: "xs", pl: "xl", children: [
|
|
985
|
+
/* @__PURE__ */ jsx(
|
|
986
|
+
ConfigCard,
|
|
987
|
+
{
|
|
988
|
+
icon: /* @__PURE__ */ jsx(IconVersions, { size: 14 }),
|
|
989
|
+
title: "Version",
|
|
990
|
+
color: "grape",
|
|
991
|
+
items: [
|
|
992
|
+
{
|
|
993
|
+
label: "Version",
|
|
994
|
+
value: /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: workflow.config.version })
|
|
995
|
+
}
|
|
996
|
+
]
|
|
997
|
+
}
|
|
998
|
+
),
|
|
999
|
+
/* @__PURE__ */ jsx(
|
|
1000
|
+
ConfigCard,
|
|
1001
|
+
{
|
|
1002
|
+
icon: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 14 }),
|
|
1003
|
+
title: "Execution Interface",
|
|
1004
|
+
color: "teal",
|
|
1005
|
+
items: [
|
|
1006
|
+
{
|
|
1007
|
+
label: "Has Interface",
|
|
1008
|
+
value: workflow.interface ? /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "green", children: "Yes" }) : /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "gray", children: "No" })
|
|
1009
|
+
}
|
|
1010
|
+
]
|
|
1011
|
+
}
|
|
1012
|
+
)
|
|
1013
|
+
] }),
|
|
1014
|
+
/* @__PURE__ */ jsx("div", { style: { paddingLeft: "var(--mantine-spacing-xl)", marginTop: "var(--mantine-spacing-sm)" }, children: /* @__PURE__ */ jsx(ContractDisplay, { contract: workflow.contract, defaultExpanded }) })
|
|
1015
|
+
] })
|
|
1016
|
+
] }) });
|
|
1017
|
+
}
|
|
1018
|
+
function isAgentDefinition(structure) {
|
|
1019
|
+
return structure.config.type === "agent" && "modelConfig" in structure;
|
|
1020
|
+
}
|
|
1021
|
+
function isWorkflowDefinition(structure) {
|
|
1022
|
+
return structure.config.type === "workflow" && "steps" in structure;
|
|
1023
|
+
}
|
|
1024
|
+
function ResourceDefinitionSection({
|
|
1025
|
+
resourceDefinition,
|
|
1026
|
+
defaultExpanded = false
|
|
1027
|
+
}) {
|
|
1028
|
+
const isAgent = isAgentDefinition(resourceDefinition);
|
|
1029
|
+
const isWorkflow = isWorkflowDefinition(resourceDefinition);
|
|
1030
|
+
if (isAgent) {
|
|
1031
|
+
return /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "sm", children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
1032
|
+
/* @__PURE__ */ jsx(CardHeader, { icon: /* @__PURE__ */ jsx(IconBrain, { size: 18 }), title: "Agent Definition" }),
|
|
1033
|
+
/* @__PURE__ */ jsx(Space, { h: 0 }),
|
|
1034
|
+
/* @__PURE__ */ jsx(AgentDefinitionDisplay, { agent: resourceDefinition, defaultExpanded })
|
|
1035
|
+
] }) });
|
|
1036
|
+
}
|
|
1037
|
+
if (isWorkflow) {
|
|
1038
|
+
return /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "sm", children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
1039
|
+
/* @__PURE__ */ jsx(CardHeader, { icon: /* @__PURE__ */ jsx(IconSitemap, { size: 18 }), title: "Workflow Definition" }),
|
|
1040
|
+
/* @__PURE__ */ jsx(Space, { h: 0 }),
|
|
1041
|
+
/* @__PURE__ */ jsx(WorkflowDefinitionDisplay, { workflow: resourceDefinition, defaultExpanded })
|
|
1042
|
+
] }) });
|
|
1043
|
+
}
|
|
1044
|
+
return /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "sm", children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "Unknown resource type" }) });
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
// src/components/operations/executions/logConstants.ts
|
|
1048
|
+
var LOG_LEVEL_CONFIG = {
|
|
1049
|
+
debug: {
|
|
1050
|
+
label: "DEBUG",
|
|
1051
|
+
color: "gray",
|
|
1052
|
+
textColor: "var(--color-text-subtle)",
|
|
1053
|
+
icon: "\u{1F50D}"
|
|
1054
|
+
},
|
|
1055
|
+
info: {
|
|
1056
|
+
label: "INFO",
|
|
1057
|
+
color: "blue",
|
|
1058
|
+
textColor: "var(--color-text-dimmed)",
|
|
1059
|
+
icon: "\u2139\uFE0F"
|
|
1060
|
+
},
|
|
1061
|
+
warn: {
|
|
1062
|
+
label: "WARN",
|
|
1063
|
+
color: "yellow",
|
|
1064
|
+
textColor: "var(--color-warning)",
|
|
1065
|
+
icon: "\u26A0\uFE0F"
|
|
1066
|
+
},
|
|
1067
|
+
error: {
|
|
1068
|
+
label: "ERROR",
|
|
1069
|
+
color: "red",
|
|
1070
|
+
textColor: "var(--color-error)",
|
|
1071
|
+
icon: "\u274C"
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
var EXECUTION_STATUS_CONFIG = {
|
|
1075
|
+
pending: {
|
|
1076
|
+
label: "Pending",
|
|
1077
|
+
color: "gray",
|
|
1078
|
+
textColor: "var(--color-text-dimmed)"
|
|
1079
|
+
},
|
|
1080
|
+
running: {
|
|
1081
|
+
label: "Running",
|
|
1082
|
+
color: "blue",
|
|
1083
|
+
textColor: "var(--color-primary)"
|
|
1084
|
+
},
|
|
1085
|
+
completed: {
|
|
1086
|
+
label: "Completed",
|
|
1087
|
+
color: "green",
|
|
1088
|
+
textColor: "var(--color-success)"
|
|
1089
|
+
},
|
|
1090
|
+
failed: {
|
|
1091
|
+
label: "Failed",
|
|
1092
|
+
color: "red",
|
|
1093
|
+
textColor: "var(--color-error)"
|
|
1094
|
+
},
|
|
1095
|
+
warning: {
|
|
1096
|
+
label: "Warning",
|
|
1097
|
+
color: "yellow",
|
|
1098
|
+
textColor: "var(--color-warning)"
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
function getLogLevelConfig(level) {
|
|
1102
|
+
const normalizedLevel = level.toLowerCase();
|
|
1103
|
+
return LOG_LEVEL_CONFIG[normalizedLevel] || LOG_LEVEL_CONFIG.info;
|
|
1104
|
+
}
|
|
1105
|
+
function getExecutionStatusConfig(status) {
|
|
1106
|
+
const normalizedStatus = status.toLowerCase();
|
|
1107
|
+
return EXECUTION_STATUS_CONFIG[normalizedStatus] || EXECUTION_STATUS_CONFIG.pending;
|
|
1108
|
+
}
|
|
1109
|
+
function BaseExecutionLogsHeader({
|
|
1110
|
+
execution,
|
|
1111
|
+
resourceId,
|
|
1112
|
+
onDeleteClick,
|
|
1113
|
+
onRetryClick,
|
|
1114
|
+
onCancelClick,
|
|
1115
|
+
renderMetrics
|
|
1116
|
+
}) {
|
|
1117
|
+
const { currentMembership } = useOrganization();
|
|
1118
|
+
const organizationName = currentMembership?.organization?.name;
|
|
1119
|
+
const resourceTag = organizationName ? `${organizationName}/${resourceId}` : resourceId;
|
|
1120
|
+
return /* @__PURE__ */ jsxs(Stack, { children: [
|
|
1121
|
+
/* @__PURE__ */ jsx(
|
|
1122
|
+
CardHeader,
|
|
1123
|
+
{
|
|
1124
|
+
icon: /* @__PURE__ */ jsx(IconTerminal2, { size: 18 }),
|
|
1125
|
+
title: "Execution Logs",
|
|
1126
|
+
rightSection: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
1127
|
+
/* @__PURE__ */ jsx(Badge, { color: getExecutionStatusConfig(execution.status).color, size: "sm", children: getExecutionStatusConfig(execution.status).label.toUpperCase() }),
|
|
1128
|
+
/* @__PURE__ */ jsx(Badge, { color: getResourceStatusColor(execution.resourceStatus), size: "sm", variant: "outline", children: execution.resourceStatus.toUpperCase() }),
|
|
1129
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "var(--color-text-subtle)", ff: "monospace", children: execution.id }),
|
|
1130
|
+
/* @__PURE__ */ jsx(CopyButton, { value: `${resourceTag} ${execution.id}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(ActionIcon, { onClick: copy, variant: "subtle", color: copied ? "green" : "var(--color-text-subtle)", children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 16 }) : /* @__PURE__ */ jsx(IconCopy, { size: 16 }) }) }),
|
|
1131
|
+
onCancelClick && /* @__PURE__ */ jsx(ActionIcon, { onClick: onCancelClick, variant: "subtle", color: "orange", children: /* @__PURE__ */ jsx(IconPlayerStop, { size: 16 }) }),
|
|
1132
|
+
onRetryClick && /* @__PURE__ */ jsx(ActionIcon, { onClick: onRetryClick, variant: "subtle", children: /* @__PURE__ */ jsx(IconReload, { size: 16 }) }),
|
|
1133
|
+
/* @__PURE__ */ jsx(ActionIcon, { onClick: onDeleteClick, variant: "subtle", color: "var(--color-error)", children: /* @__PURE__ */ jsx(IconTrash, { size: 16 }) })
|
|
1134
|
+
] })
|
|
1135
|
+
}
|
|
1136
|
+
),
|
|
1137
|
+
renderMetrics ? renderMetrics(execution) : /* @__PURE__ */ jsxs(Group, { gap: "lg", children: [
|
|
1138
|
+
/* @__PURE__ */ jsxs(Text, { size: "sm", children: [
|
|
1139
|
+
/* @__PURE__ */ jsx(Text, { span: true, fw: 500, children: "Started:" }),
|
|
1140
|
+
" ",
|
|
1141
|
+
new Date(execution.startTime).toLocaleString()
|
|
1142
|
+
] }),
|
|
1143
|
+
execution.endTime && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1144
|
+
/* @__PURE__ */ jsxs(Text, { size: "sm", children: [
|
|
1145
|
+
/* @__PURE__ */ jsx(Text, { span: true, fw: 500, children: "Ended:" }),
|
|
1146
|
+
" ",
|
|
1147
|
+
new Date(execution.endTime).toLocaleString()
|
|
1148
|
+
] }),
|
|
1149
|
+
/* @__PURE__ */ jsxs(Text, { size: "sm", children: [
|
|
1150
|
+
/* @__PURE__ */ jsx(Text, { span: true, fw: 500, children: "Duration:" }),
|
|
1151
|
+
" ",
|
|
1152
|
+
((execution.endTime - execution.startTime) / 1e3).toFixed(2),
|
|
1153
|
+
"s"
|
|
1154
|
+
] })
|
|
1155
|
+
] }),
|
|
1156
|
+
execution.apiVersion && /* @__PURE__ */ jsxs(Text, { size: "sm", component: "span", children: [
|
|
1157
|
+
/* @__PURE__ */ jsx(Text, { span: true, fw: 500, children: "API:" }),
|
|
1158
|
+
" ",
|
|
1159
|
+
/* @__PURE__ */ jsxs(Badge, { size: "sm", variant: "light", color: "gray", children: [
|
|
1160
|
+
"v",
|
|
1161
|
+
execution.apiVersion
|
|
1162
|
+
] })
|
|
1163
|
+
] }),
|
|
1164
|
+
execution.resourceVersion && /* @__PURE__ */ jsxs(Text, { size: "sm", component: "span", children: [
|
|
1165
|
+
/* @__PURE__ */ jsx(Text, { span: true, fw: 500, children: "Resource:" }),
|
|
1166
|
+
" ",
|
|
1167
|
+
/* @__PURE__ */ jsxs(Badge, { size: "sm", variant: "light", color: "gray", children: [
|
|
1168
|
+
"v",
|
|
1169
|
+
execution.resourceVersion
|
|
1170
|
+
] })
|
|
1171
|
+
] }),
|
|
1172
|
+
execution.sdkVersion && /* @__PURE__ */ jsxs(Text, { size: "sm", component: "span", children: [
|
|
1173
|
+
/* @__PURE__ */ jsx(Text, { span: true, fw: 500, children: "SDK:" }),
|
|
1174
|
+
" ",
|
|
1175
|
+
/* @__PURE__ */ jsxs(Badge, { size: "sm", variant: "light", color: "gray", children: [
|
|
1176
|
+
"v",
|
|
1177
|
+
execution.sdkVersion
|
|
1178
|
+
] })
|
|
1179
|
+
] })
|
|
1180
|
+
] })
|
|
1181
|
+
] });
|
|
1182
|
+
}
|
|
1183
|
+
function BaseExecutionLogsStates({ executionId, isLoading, execution }) {
|
|
1184
|
+
const { loader } = useAppearance();
|
|
1185
|
+
if (!executionId) {
|
|
1186
|
+
return /* @__PURE__ */ jsx(Center, { h: "100%", children: /* @__PURE__ */ jsx(Text, { c: "dimmed", children: "Select an execution to view details" }) });
|
|
1187
|
+
}
|
|
1188
|
+
if (isLoading) {
|
|
1189
|
+
return /* @__PURE__ */ jsx(Center, { h: "100%", children: loader });
|
|
1190
|
+
}
|
|
1191
|
+
if (!execution) {
|
|
1192
|
+
return /* @__PURE__ */ jsx(Center, { h: "100%", children: /* @__PURE__ */ jsx(Text, { c: "dimmed", children: "Execution not found" }) });
|
|
1193
|
+
}
|
|
1194
|
+
return null;
|
|
1195
|
+
}
|
|
1196
|
+
function ExecutionErrorSection({ executionId, fallbackError }) {
|
|
1197
|
+
const { data: errors, isLoading, isError } = useErrorDetail(executionId);
|
|
1198
|
+
const [showStack, setShowStack] = useState(false);
|
|
1199
|
+
const [showErrorContext, setShowErrorContext] = useState(false);
|
|
1200
|
+
const primaryError = errors?.[0];
|
|
1201
|
+
if (isLoading || isError || !primaryError) {
|
|
1202
|
+
return /* @__PURE__ */ jsxs(
|
|
1203
|
+
Paper,
|
|
1204
|
+
{
|
|
1205
|
+
withBorder: true,
|
|
1206
|
+
p: "sm",
|
|
1207
|
+
bg: "color-mix(in srgb, var(--color-error) 10%, transparent)",
|
|
1208
|
+
style: { borderColor: "var(--color-error)" },
|
|
1209
|
+
children: [
|
|
1210
|
+
/* @__PURE__ */ jsx(Text, { fw: 500, c: "var(--color-error)", mb: "xs", children: "Error" }),
|
|
1211
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "var(--color-error)", ff: "monospace", style: { whiteSpace: "pre-wrap" }, children: fallbackError })
|
|
1212
|
+
]
|
|
1213
|
+
}
|
|
1214
|
+
);
|
|
1215
|
+
}
|
|
1216
|
+
const severityColor = primaryError.severity === "critical" ? "red" : primaryError.severity === "warning" ? "orange" : "blue";
|
|
1217
|
+
return /* @__PURE__ */ jsx(
|
|
1218
|
+
Paper,
|
|
1219
|
+
{
|
|
1220
|
+
withBorder: true,
|
|
1221
|
+
p: "sm",
|
|
1222
|
+
bg: "color-mix(in srgb, var(--color-error) 10%, transparent)",
|
|
1223
|
+
style: { borderColor: "var(--color-error)" },
|
|
1224
|
+
children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
1225
|
+
/* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
|
|
1226
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
1227
|
+
/* @__PURE__ */ jsx(
|
|
1228
|
+
Text,
|
|
1229
|
+
{
|
|
1230
|
+
fw: 600,
|
|
1231
|
+
size: "sm",
|
|
1232
|
+
c: "var(--color-error)",
|
|
1233
|
+
style: { fontFamily: "var(--mantine-font-family-headings)" },
|
|
1234
|
+
children: primaryError.errorType
|
|
1235
|
+
}
|
|
1236
|
+
),
|
|
1237
|
+
/* @__PURE__ */ jsx(Badge, { variant: "light", size: "sm", children: primaryError.category })
|
|
1238
|
+
] }),
|
|
1239
|
+
/* @__PURE__ */ jsx(Badge, { color: severityColor, variant: "light", size: "sm", children: primaryError.severity })
|
|
1240
|
+
] }),
|
|
1241
|
+
/* @__PURE__ */ jsx(Alert, { color: "red", icon: /* @__PURE__ */ jsx(IconBug, { size: 16 }), children: primaryError.message }),
|
|
1242
|
+
errors && errors.length > 1 && /* @__PURE__ */ jsxs(Alert, { color: "yellow", icon: /* @__PURE__ */ jsx(IconAlertCircle, { size: 16 }), children: [
|
|
1243
|
+
"This execution has ",
|
|
1244
|
+
errors.length,
|
|
1245
|
+
" errors (including retries). Showing most recent."
|
|
1246
|
+
] }),
|
|
1247
|
+
primaryError.stackTrace && /* @__PURE__ */ jsxs("div", { children: [
|
|
1248
|
+
/* @__PURE__ */ jsxs(
|
|
1249
|
+
Group,
|
|
1250
|
+
{
|
|
1251
|
+
justify: "space-between",
|
|
1252
|
+
mb: "xs",
|
|
1253
|
+
onClick: () => setShowStack(!showStack),
|
|
1254
|
+
style: { cursor: "pointer" },
|
|
1255
|
+
children: [
|
|
1256
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, children: "Stack Trace" }),
|
|
1257
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
1258
|
+
/* @__PURE__ */ jsx(CopyButton, { value: primaryError.stackTrace, children: ({ copied, copy }) => /* @__PURE__ */ jsx(Tooltip, { label: copied ? "Copied" : "Copy stack trace", children: /* @__PURE__ */ jsx(
|
|
1259
|
+
ActionIcon,
|
|
1260
|
+
{
|
|
1261
|
+
variant: "subtle",
|
|
1262
|
+
size: "sm",
|
|
1263
|
+
onClick: (e) => {
|
|
1264
|
+
e.stopPropagation();
|
|
1265
|
+
copy();
|
|
1266
|
+
},
|
|
1267
|
+
children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
|
|
1268
|
+
}
|
|
1269
|
+
) }) }),
|
|
1270
|
+
/* @__PURE__ */ jsx(
|
|
1271
|
+
IconChevronDown,
|
|
1272
|
+
{
|
|
1273
|
+
size: 14,
|
|
1274
|
+
style: {
|
|
1275
|
+
transform: showStack ? "rotate(180deg)" : "rotate(0)",
|
|
1276
|
+
transition: "transform var(--duration-fast)"
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
)
|
|
1280
|
+
] })
|
|
1281
|
+
]
|
|
1282
|
+
}
|
|
1283
|
+
),
|
|
1284
|
+
/* @__PURE__ */ jsx(Collapse, { in: showStack, children: /* @__PURE__ */ jsx(Code, { block: true, style: { maxHeight: 300, overflow: "auto", fontSize: "12px", lineHeight: "1.5" }, children: primaryError.stackTrace }) })
|
|
1285
|
+
] }),
|
|
1286
|
+
primaryError.errorContext && Object.keys(primaryError.errorContext).length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
1287
|
+
/* @__PURE__ */ jsxs(
|
|
1288
|
+
Group,
|
|
1289
|
+
{
|
|
1290
|
+
justify: "space-between",
|
|
1291
|
+
mb: "xs",
|
|
1292
|
+
onClick: () => setShowErrorContext(!showErrorContext),
|
|
1293
|
+
style: { cursor: "pointer" },
|
|
1294
|
+
children: [
|
|
1295
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, children: "Error Context" }),
|
|
1296
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
1297
|
+
/* @__PURE__ */ jsx(CopyButton, { value: JSON.stringify(primaryError.errorContext, null, 2), children: ({ copied, copy }) => /* @__PURE__ */ jsx(Tooltip, { label: copied ? "Copied" : "Copy error context", children: /* @__PURE__ */ jsx(
|
|
1298
|
+
ActionIcon,
|
|
1299
|
+
{
|
|
1300
|
+
variant: "subtle",
|
|
1301
|
+
size: "sm",
|
|
1302
|
+
onClick: (e) => {
|
|
1303
|
+
e.stopPropagation();
|
|
1304
|
+
copy();
|
|
1305
|
+
},
|
|
1306
|
+
children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
|
|
1307
|
+
}
|
|
1308
|
+
) }) }),
|
|
1309
|
+
/* @__PURE__ */ jsx(
|
|
1310
|
+
IconChevronDown,
|
|
1311
|
+
{
|
|
1312
|
+
size: 14,
|
|
1313
|
+
style: {
|
|
1314
|
+
transform: showErrorContext ? "rotate(180deg)" : "rotate(0)",
|
|
1315
|
+
transition: "transform var(--duration-fast)"
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
)
|
|
1319
|
+
] })
|
|
1320
|
+
]
|
|
1321
|
+
}
|
|
1322
|
+
),
|
|
1323
|
+
/* @__PURE__ */ jsx(Collapse, { in: showErrorContext, children: /* @__PURE__ */ jsx(JsonViewer, { data: primaryError.errorContext, maxHeight: 200, fontSize: "12px" }) })
|
|
1324
|
+
] })
|
|
1325
|
+
] })
|
|
1326
|
+
}
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1329
|
+
function ArchivedLogsNotice({ logCount, isLoading, error, onLoad }) {
|
|
1330
|
+
return /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "md", radius: "md", bg: "color-mix(in srgb, var(--color-primary) 5%, transparent)", children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
1331
|
+
/* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
|
|
1332
|
+
/* @__PURE__ */ jsx(IconArchive, { size: 18, style: { color: "var(--color-text-dimmed)" } }),
|
|
1333
|
+
/* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
|
|
1334
|
+
"Logs archived (",
|
|
1335
|
+
logCount.toLocaleString(),
|
|
1336
|
+
" entries)"
|
|
1337
|
+
] })
|
|
1338
|
+
] }),
|
|
1339
|
+
error && /* @__PURE__ */ jsx(Text, { size: "sm", c: "var(--color-error)", children: error }),
|
|
1340
|
+
/* @__PURE__ */ jsx(
|
|
1341
|
+
Button,
|
|
1342
|
+
{
|
|
1343
|
+
variant: "light",
|
|
1344
|
+
size: "xs",
|
|
1345
|
+
leftSection: isLoading ? /* @__PURE__ */ jsx(Loader, { size: 14 }) : /* @__PURE__ */ jsx(IconDownload, { size: 14 }),
|
|
1346
|
+
onClick: onLoad,
|
|
1347
|
+
disabled: isLoading,
|
|
1348
|
+
w: "fit-content",
|
|
1349
|
+
children: isLoading ? "Loading archived logs..." : "Load archived logs"
|
|
1350
|
+
}
|
|
1351
|
+
)
|
|
1352
|
+
] }) });
|
|
1353
|
+
}
|
|
1354
|
+
function BaseExecutionLogs({
|
|
1355
|
+
resourceId,
|
|
1356
|
+
resourceType,
|
|
1357
|
+
executionId,
|
|
1358
|
+
execution: externalExecution,
|
|
1359
|
+
onExecutionDeleted,
|
|
1360
|
+
renderLogsSection,
|
|
1361
|
+
renderMetrics,
|
|
1362
|
+
hideInput = false,
|
|
1363
|
+
hideResult = false,
|
|
1364
|
+
hideError = false
|
|
1365
|
+
}) {
|
|
1366
|
+
const { data: fetchedExecution, isLoading } = useExecution(resourceId, executionId || "");
|
|
1367
|
+
const baseExecution = externalExecution ?? fetchedExecution;
|
|
1368
|
+
const archivedLogs = useArchivedLogs(baseExecution?.isArchived ? executionId : void 0);
|
|
1369
|
+
const typedExecution = useMemo(() => {
|
|
1370
|
+
if (!baseExecution) return void 0;
|
|
1371
|
+
if (archivedLogs.logs) {
|
|
1372
|
+
return { ...baseExecution, executionLogs: archivedLogs.logs, isArchived: false };
|
|
1373
|
+
}
|
|
1374
|
+
return baseExecution;
|
|
1375
|
+
}, [baseExecution, archivedLogs.logs]);
|
|
1376
|
+
const [deleteModalOpened, setDeleteModalOpened] = useState(false);
|
|
1377
|
+
const [retryModalOpened, setRetryModalOpened] = useState(false);
|
|
1378
|
+
const [cancelModalOpened, setCancelModalOpened] = useState(false);
|
|
1379
|
+
const [retryError, setRetryError] = useState(null);
|
|
1380
|
+
const deleteExecutionMutation = useDeleteExecution();
|
|
1381
|
+
const retryExecutionMutation = useRetryExecution();
|
|
1382
|
+
const cancelExecutionMutation = useCancelExecution();
|
|
1383
|
+
const handleDelete = async () => {
|
|
1384
|
+
if (!executionId) return;
|
|
1385
|
+
try {
|
|
1386
|
+
await deleteExecutionMutation.mutateAsync({
|
|
1387
|
+
resourceId,
|
|
1388
|
+
executionId
|
|
1389
|
+
});
|
|
1390
|
+
setDeleteModalOpened(false);
|
|
1391
|
+
onExecutionDeleted?.();
|
|
1392
|
+
} catch (error) {
|
|
1393
|
+
console.error("Failed to delete execution:", error);
|
|
1394
|
+
showApiErrorNotification(error);
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1397
|
+
const handleCancel = async () => {
|
|
1398
|
+
if (!executionId) return;
|
|
1399
|
+
try {
|
|
1400
|
+
await cancelExecutionMutation.mutateAsync({
|
|
1401
|
+
resourceId,
|
|
1402
|
+
executionId
|
|
1403
|
+
});
|
|
1404
|
+
setCancelModalOpened(false);
|
|
1405
|
+
} catch (error) {
|
|
1406
|
+
console.error("Failed to cancel execution:", error);
|
|
1407
|
+
showApiErrorNotification(error);
|
|
1408
|
+
}
|
|
1409
|
+
};
|
|
1410
|
+
const handleRetry = async () => {
|
|
1411
|
+
if (!typedExecution || !resourceType) return;
|
|
1412
|
+
setRetryError(null);
|
|
1413
|
+
try {
|
|
1414
|
+
await retryExecutionMutation.mutateAsync({
|
|
1415
|
+
resourceId,
|
|
1416
|
+
resourceType,
|
|
1417
|
+
input: typedExecution.input
|
|
1418
|
+
});
|
|
1419
|
+
setRetryModalOpened(false);
|
|
1420
|
+
showSuccessNotification("Resource re-executed with the same inputs.");
|
|
1421
|
+
} catch (error) {
|
|
1422
|
+
const message = error instanceof Error ? error.message : "Failed to re-execute resource";
|
|
1423
|
+
setRetryError(message);
|
|
1424
|
+
}
|
|
1425
|
+
};
|
|
1426
|
+
if (!executionId || isLoading || !typedExecution) {
|
|
1427
|
+
return /* @__PURE__ */ jsx(BaseExecutionLogsStates, { executionId, isLoading, execution: typedExecution });
|
|
1428
|
+
}
|
|
1429
|
+
return /* @__PURE__ */ jsxs(Stack, { h: "100%", children: [
|
|
1430
|
+
/* @__PURE__ */ jsx(
|
|
1431
|
+
BaseExecutionLogsHeader,
|
|
1432
|
+
{
|
|
1433
|
+
execution: typedExecution,
|
|
1434
|
+
resourceId,
|
|
1435
|
+
onDeleteClick: () => setDeleteModalOpened(true),
|
|
1436
|
+
onCancelClick: typedExecution.status === "running" ? () => setCancelModalOpened(true) : void 0,
|
|
1437
|
+
onRetryClick: resourceType ? () => {
|
|
1438
|
+
setRetryError(null);
|
|
1439
|
+
setRetryModalOpened(true);
|
|
1440
|
+
} : void 0,
|
|
1441
|
+
renderMetrics
|
|
1442
|
+
}
|
|
1443
|
+
),
|
|
1444
|
+
!hideInput && typedExecution.input != null && /* @__PURE__ */ jsx(Paper, { withBorder: true, bg: "none", children: /* @__PURE__ */ jsx(CollapsibleJsonSection, { title: /* @__PURE__ */ jsx(Text, { fw: 500, children: "Input" }), data: typedExecution.input }) }),
|
|
1445
|
+
typedExecution.isArchived && /* @__PURE__ */ jsx(
|
|
1446
|
+
ArchivedLogsNotice,
|
|
1447
|
+
{
|
|
1448
|
+
logCount: typedExecution.archivedLogCount ?? 0,
|
|
1449
|
+
isLoading: archivedLogs.isLoading,
|
|
1450
|
+
error: archivedLogs.error,
|
|
1451
|
+
onLoad: archivedLogs.fetch
|
|
1452
|
+
}
|
|
1453
|
+
),
|
|
1454
|
+
!typedExecution.isArchived && renderLogsSection && /* @__PURE__ */ jsx(Paper, { withBorder: true, bg: "none", p: "sm", style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: renderLogsSection(typedExecution) }),
|
|
1455
|
+
!hideResult && typedExecution.result != null && /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsx(
|
|
1456
|
+
CollapsibleJsonSection,
|
|
1457
|
+
{
|
|
1458
|
+
title: /* @__PURE__ */ jsx(Text, { fw: 500, c: "var(--color-success)", children: "Result" }),
|
|
1459
|
+
data: typedExecution.result
|
|
1460
|
+
}
|
|
1461
|
+
) }),
|
|
1462
|
+
!hideError && typedExecution.error && /* @__PURE__ */ jsx(ExecutionErrorSection, { executionId: typedExecution.id, fallbackError: typedExecution.error }),
|
|
1463
|
+
/* @__PURE__ */ jsx(
|
|
1464
|
+
ConfirmationModal,
|
|
1465
|
+
{
|
|
1466
|
+
opened: deleteModalOpened,
|
|
1467
|
+
onClose: () => setDeleteModalOpened(false),
|
|
1468
|
+
icon: /* @__PURE__ */ jsx(IconTrash, { color: "red" }),
|
|
1469
|
+
title: "Delete Execution Log",
|
|
1470
|
+
text: "Are you sure you want to delete this execution log? This action cannot be undone.",
|
|
1471
|
+
buttonText: "Delete",
|
|
1472
|
+
buttonColor: "red",
|
|
1473
|
+
confirmationHandler: handleDelete,
|
|
1474
|
+
loading: deleteExecutionMutation.isPending
|
|
1475
|
+
}
|
|
1476
|
+
),
|
|
1477
|
+
/* @__PURE__ */ jsx(
|
|
1478
|
+
ConfirmationModal,
|
|
1479
|
+
{
|
|
1480
|
+
opened: cancelModalOpened,
|
|
1481
|
+
onClose: () => setCancelModalOpened(false),
|
|
1482
|
+
icon: /* @__PURE__ */ jsx(IconPlayerStop, {}),
|
|
1483
|
+
title: "Stop Execution",
|
|
1484
|
+
text: "Are you sure you want to stop this running execution? This action cannot be undone.",
|
|
1485
|
+
buttonText: "Stop",
|
|
1486
|
+
buttonColor: "orange",
|
|
1487
|
+
confirmationHandler: handleCancel,
|
|
1488
|
+
loading: cancelExecutionMutation.isPending
|
|
1489
|
+
}
|
|
1490
|
+
),
|
|
1491
|
+
/* @__PURE__ */ jsx(
|
|
1492
|
+
CustomModal,
|
|
1493
|
+
{
|
|
1494
|
+
opened: retryModalOpened,
|
|
1495
|
+
onClose: () => setRetryModalOpened(false),
|
|
1496
|
+
size: "sm",
|
|
1497
|
+
loading: retryExecutionMutation.isPending,
|
|
1498
|
+
children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
1499
|
+
/* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
|
|
1500
|
+
/* @__PURE__ */ jsx(IconReload, { size: 24, color: "var(--color-primary)" }),
|
|
1501
|
+
/* @__PURE__ */ jsx(Title, { order: 4, children: "Re-execute Resource" })
|
|
1502
|
+
] }),
|
|
1503
|
+
/* @__PURE__ */ jsxs(Text, { size: "sm", children: [
|
|
1504
|
+
"This will re-execute",
|
|
1505
|
+
" ",
|
|
1506
|
+
/* @__PURE__ */ jsx(Text, { span: true, fw: 600, children: resourceId }),
|
|
1507
|
+
" ",
|
|
1508
|
+
"with the exact same inputs from this execution."
|
|
1509
|
+
] }),
|
|
1510
|
+
typedExecution?.input != null && /* @__PURE__ */ jsx(Paper, { withBorder: true, bg: "none", style: { maxHeight: 150, overflow: "auto" }, children: /* @__PURE__ */ jsx(Text, { size: "xs", ff: "monospace", style: { whiteSpace: "pre-wrap" }, children: JSON.stringify(typedExecution.input, null, 2) }) }),
|
|
1511
|
+
retryError && /* @__PURE__ */ jsx(
|
|
1512
|
+
Paper,
|
|
1513
|
+
{
|
|
1514
|
+
withBorder: true,
|
|
1515
|
+
p: "xs",
|
|
1516
|
+
bg: "color-mix(in srgb, var(--color-error) 10%, transparent)",
|
|
1517
|
+
style: { borderColor: "var(--color-error)" },
|
|
1518
|
+
children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "var(--color-error)", children: retryError })
|
|
1519
|
+
}
|
|
1520
|
+
),
|
|
1521
|
+
/* @__PURE__ */ jsxs(Group, { justify: "flex-end", mt: "md", children: [
|
|
1522
|
+
/* @__PURE__ */ jsx(
|
|
1523
|
+
Button,
|
|
1524
|
+
{
|
|
1525
|
+
variant: "light",
|
|
1526
|
+
onClick: () => setRetryModalOpened(false),
|
|
1527
|
+
disabled: retryExecutionMutation.isPending,
|
|
1528
|
+
children: "Cancel"
|
|
1529
|
+
}
|
|
1530
|
+
),
|
|
1531
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleRetry, loading: retryExecutionMutation.isPending, children: "Re-execute" })
|
|
1532
|
+
] })
|
|
1533
|
+
] })
|
|
1534
|
+
}
|
|
1535
|
+
)
|
|
1536
|
+
] });
|
|
1537
|
+
}
|
|
1538
|
+
function LogEntry({ log, index }) {
|
|
1539
|
+
const hasContext = log.context && Object.keys(log.context).length > 0;
|
|
1540
|
+
const logConfig = getLogLevelConfig(log.level);
|
|
1541
|
+
const logTitle = /* @__PURE__ */ jsxs(Group, { gap: "xs", style: { flex: 1 }, wrap: "nowrap", children: [
|
|
1542
|
+
/* @__PURE__ */ jsx(
|
|
1543
|
+
Badge,
|
|
1544
|
+
{
|
|
1545
|
+
size: "sm",
|
|
1546
|
+
variant: "light",
|
|
1547
|
+
color: logConfig.color,
|
|
1548
|
+
style: { minWidth: "60px", fontFamily: "var(--mantine-font-family-monospace)" },
|
|
1549
|
+
children: logConfig.label
|
|
1550
|
+
}
|
|
1551
|
+
),
|
|
1552
|
+
/* @__PURE__ */ jsx(Text, { span: true, c: "dimmed", size: "xs", style: { fontFamily: "var(--mantine-font-family-monospace)" }, children: new Date(log.timestamp).toLocaleTimeString("en-US", {
|
|
1553
|
+
hour12: false,
|
|
1554
|
+
hour: "2-digit",
|
|
1555
|
+
minute: "2-digit",
|
|
1556
|
+
second: "2-digit",
|
|
1557
|
+
fractionalSecondDigits: 3
|
|
1558
|
+
}) }),
|
|
1559
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", span: true, style: { fontFamily: "var(--mantine-font-family-monospace)" }, children: log.message })
|
|
1560
|
+
] });
|
|
1561
|
+
if (!hasContext) {
|
|
1562
|
+
return /* @__PURE__ */ jsx(
|
|
1563
|
+
"div",
|
|
1564
|
+
{
|
|
1565
|
+
style: {
|
|
1566
|
+
padding: "0.375rem 0.5rem",
|
|
1567
|
+
borderRadius: "var(--mantine-radius-default)"
|
|
1568
|
+
},
|
|
1569
|
+
children: logTitle
|
|
1570
|
+
},
|
|
1571
|
+
index
|
|
1572
|
+
);
|
|
1573
|
+
}
|
|
1574
|
+
return /* @__PURE__ */ jsx(CollapsibleJsonSection, { title: logTitle, data: log.context }, index);
|
|
1575
|
+
}
|
|
1576
|
+
function LogGroup({ title, logs, statusBadge }) {
|
|
1577
|
+
return /* @__PURE__ */ jsxs(
|
|
1578
|
+
"div",
|
|
1579
|
+
{
|
|
1580
|
+
style: {
|
|
1581
|
+
borderRadius: "8px",
|
|
1582
|
+
padding: "12px",
|
|
1583
|
+
border: "1px solid var(--color-border)"
|
|
1584
|
+
},
|
|
1585
|
+
children: [
|
|
1586
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", mb: "xs", children: [
|
|
1587
|
+
/* @__PURE__ */ jsx(Text, { fw: 600, size: "sm", c: "var(--color-text)", style: { fontFamily: "var(--elevasis-font-family-subtitle)" }, children: title }),
|
|
1588
|
+
statusBadge && /* @__PURE__ */ jsx(Badge, { size: "sm", variant: "light", color: statusBadge.color, children: statusBadge.label }),
|
|
1589
|
+
/* @__PURE__ */ jsxs(Badge, { size: "sm", variant: "light", color: "gray", children: [
|
|
1590
|
+
logs.length,
|
|
1591
|
+
" ",
|
|
1592
|
+
logs.length === 1 ? "log" : "logs"
|
|
1593
|
+
] })
|
|
1594
|
+
] }),
|
|
1595
|
+
/* @__PURE__ */ jsx(Stack, { gap: 4, children: logs.map((log, logIndex) => /* @__PURE__ */ jsx(LogEntry, { log, index: logIndex }, logIndex)) })
|
|
1596
|
+
]
|
|
1597
|
+
}
|
|
1598
|
+
);
|
|
1599
|
+
}
|
|
1600
|
+
function AgentExecutionLogs({
|
|
1601
|
+
resourceId,
|
|
1602
|
+
executionId,
|
|
1603
|
+
execution: externalExecution,
|
|
1604
|
+
selectedIterationId,
|
|
1605
|
+
iterationData,
|
|
1606
|
+
onExecutionDeleted
|
|
1607
|
+
}) {
|
|
1608
|
+
const isIterationSelected = selectedIterationId !== null;
|
|
1609
|
+
const logGroups = useMemo(() => {
|
|
1610
|
+
if (!iterationData) {
|
|
1611
|
+
return [];
|
|
1612
|
+
}
|
|
1613
|
+
if (selectedIterationId !== null) {
|
|
1614
|
+
if (selectedIterationId === "initialization") {
|
|
1615
|
+
return [
|
|
1616
|
+
{
|
|
1617
|
+
title: "Initialization",
|
|
1618
|
+
groupKey: "initialization",
|
|
1619
|
+
logs: [],
|
|
1620
|
+
// Will be filled in renderLogsSection
|
|
1621
|
+
status: iterationData.initialization.status
|
|
1622
|
+
}
|
|
1623
|
+
];
|
|
1624
|
+
}
|
|
1625
|
+
if (selectedIterationId === "completion") {
|
|
1626
|
+
return [
|
|
1627
|
+
{
|
|
1628
|
+
title: "Completion",
|
|
1629
|
+
groupKey: "completion",
|
|
1630
|
+
logs: [],
|
|
1631
|
+
// Will be filled in renderLogsSection
|
|
1632
|
+
status: iterationData.completion.status
|
|
1633
|
+
}
|
|
1634
|
+
];
|
|
1635
|
+
}
|
|
1636
|
+
const selectedIteration = iterationData.iterations.find((iter) => iter.iterationNumber === selectedIterationId);
|
|
1637
|
+
if (!selectedIteration) {
|
|
1638
|
+
return [];
|
|
1639
|
+
}
|
|
1640
|
+
return [
|
|
1641
|
+
{
|
|
1642
|
+
title: `Iteration ${selectedIteration.iterationNumber}`,
|
|
1643
|
+
groupKey: selectedIteration.iterationNumber,
|
|
1644
|
+
logs: [],
|
|
1645
|
+
// Will be filled in renderLogsSection
|
|
1646
|
+
status: selectedIteration.status
|
|
1647
|
+
}
|
|
1648
|
+
];
|
|
1649
|
+
}
|
|
1650
|
+
const groups = [];
|
|
1651
|
+
groups.push({
|
|
1652
|
+
title: "Initialization",
|
|
1653
|
+
groupKey: "initialization",
|
|
1654
|
+
logs: [],
|
|
1655
|
+
status: iterationData.initialization.status
|
|
1656
|
+
});
|
|
1657
|
+
for (const iteration of iterationData.iterations) {
|
|
1658
|
+
groups.push({
|
|
1659
|
+
title: `Iteration ${iteration.iterationNumber}`,
|
|
1660
|
+
groupKey: iteration.iterationNumber,
|
|
1661
|
+
logs: [],
|
|
1662
|
+
status: iteration.status
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1665
|
+
groups.push({
|
|
1666
|
+
title: "Completion",
|
|
1667
|
+
groupKey: "completion",
|
|
1668
|
+
logs: [],
|
|
1669
|
+
status: iterationData.completion.status
|
|
1670
|
+
});
|
|
1671
|
+
return groups;
|
|
1672
|
+
}, [selectedIterationId, iterationData]);
|
|
1673
|
+
const getSelectedNodeTitle = () => {
|
|
1674
|
+
if (selectedIterationId === null) return null;
|
|
1675
|
+
if (selectedIterationId === "initialization") return "Initialization";
|
|
1676
|
+
if (selectedIterationId === "completion") return "Completion";
|
|
1677
|
+
return `Iteration ${selectedIterationId}`;
|
|
1678
|
+
};
|
|
1679
|
+
const selectedNodeTitle = getSelectedNodeTitle();
|
|
1680
|
+
const getIterationStatusBadge = (_groupKey, status) => {
|
|
1681
|
+
if (status) {
|
|
1682
|
+
const statusConfig = getExecutionStatusConfig(status);
|
|
1683
|
+
return {
|
|
1684
|
+
label: statusConfig.label,
|
|
1685
|
+
color: statusConfig.color
|
|
1686
|
+
};
|
|
1687
|
+
}
|
|
1688
|
+
return null;
|
|
1689
|
+
};
|
|
1690
|
+
const renderLogsSection = (execution) => {
|
|
1691
|
+
if (!execution.executionLogs || execution.executionLogs.length === 0) {
|
|
1692
|
+
return /* @__PURE__ */ jsx(Text, { c: "dimmed", ta: "center", mt: "md", children: "No logs available" });
|
|
1693
|
+
}
|
|
1694
|
+
const logsByGroup = /* @__PURE__ */ new Map();
|
|
1695
|
+
for (const log of execution.executionLogs) {
|
|
1696
|
+
const context = log.context;
|
|
1697
|
+
let groupKey;
|
|
1698
|
+
if (context?.type === "agent" && "lifecycle" in context) {
|
|
1699
|
+
const lifecycle = context.lifecycle;
|
|
1700
|
+
if (lifecycle === "initialization") {
|
|
1701
|
+
groupKey = "initialization";
|
|
1702
|
+
} else if (lifecycle === "iteration" && "iteration" in context) {
|
|
1703
|
+
groupKey = context.iteration;
|
|
1704
|
+
} else if (lifecycle === "completion") {
|
|
1705
|
+
groupKey = "completion";
|
|
1706
|
+
} else {
|
|
1707
|
+
groupKey = "completion";
|
|
1708
|
+
}
|
|
1709
|
+
} else {
|
|
1710
|
+
groupKey = "completion";
|
|
1711
|
+
}
|
|
1712
|
+
if (!logsByGroup.has(groupKey)) {
|
|
1713
|
+
logsByGroup.set(groupKey, []);
|
|
1714
|
+
}
|
|
1715
|
+
logsByGroup.get(groupKey).push(log);
|
|
1716
|
+
}
|
|
1717
|
+
const populatedGroups = logGroups.map((group) => ({
|
|
1718
|
+
...group,
|
|
1719
|
+
logs: logsByGroup.get(group.groupKey) || []
|
|
1720
|
+
})).filter((group) => group.logs.length > 0);
|
|
1721
|
+
const totalLogsCount = populatedGroups.reduce((total, group) => total + group.logs.length, 0);
|
|
1722
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", style: { flex: 1, minHeight: 0 }, children: [
|
|
1723
|
+
/* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
|
|
1724
|
+
/* @__PURE__ */ jsx(Text, { fw: 500, children: selectedNodeTitle ? `Logs for ${selectedNodeTitle} (${totalLogsCount})` : `Logs (${totalLogsCount})` }),
|
|
1725
|
+
iterationData && /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
1726
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
1727
|
+
"Iterations: ",
|
|
1728
|
+
iterationData.iterations.filter((i) => i.status === "completed").length,
|
|
1729
|
+
"/",
|
|
1730
|
+
iterationData.totalIterations
|
|
1731
|
+
] }),
|
|
1732
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
1733
|
+
"Events: ",
|
|
1734
|
+
iterationData.iterations.reduce((sum, iter) => sum + iter.iterationEvents.length, 0)
|
|
1735
|
+
] })
|
|
1736
|
+
] })
|
|
1737
|
+
] }),
|
|
1738
|
+
/* @__PURE__ */ jsx(ScrollArea, { style: { flex: 1 }, scrollbarSize: 8, children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
1739
|
+
populatedGroups.map((group) => {
|
|
1740
|
+
const statusBadge = getIterationStatusBadge(group.groupKey, group.status);
|
|
1741
|
+
return /* @__PURE__ */ jsx(
|
|
1742
|
+
LogGroup,
|
|
1743
|
+
{
|
|
1744
|
+
title: group.title,
|
|
1745
|
+
logs: group.logs,
|
|
1746
|
+
statusBadge: statusBadge || void 0
|
|
1747
|
+
},
|
|
1748
|
+
group.groupKey
|
|
1749
|
+
);
|
|
1750
|
+
}),
|
|
1751
|
+
populatedGroups.length === 0 && /* @__PURE__ */ jsx(Text, { c: "dimmed", ta: "center", mt: "md", children: selectedNodeTitle ? `No logs for ${selectedNodeTitle}` : "No logs available" })
|
|
1752
|
+
] }) })
|
|
1753
|
+
] });
|
|
1754
|
+
};
|
|
1755
|
+
return /* @__PURE__ */ jsx(
|
|
1756
|
+
BaseExecutionLogs,
|
|
1757
|
+
{
|
|
1758
|
+
resourceId,
|
|
1759
|
+
resourceType: "agent",
|
|
1760
|
+
executionId,
|
|
1761
|
+
execution: externalExecution,
|
|
1762
|
+
onExecutionDeleted,
|
|
1763
|
+
renderLogsSection,
|
|
1764
|
+
hideInput: isIterationSelected,
|
|
1765
|
+
hideResult: isIterationSelected,
|
|
1766
|
+
hideError: isIterationSelected
|
|
1767
|
+
}
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
function WorkflowExecutionLogs({
|
|
1771
|
+
resourceId,
|
|
1772
|
+
executionId,
|
|
1773
|
+
execution: externalExecution,
|
|
1774
|
+
selectedStepId,
|
|
1775
|
+
timelineData,
|
|
1776
|
+
onExecutionDeleted
|
|
1777
|
+
}) {
|
|
1778
|
+
const { data: fetchedExecution } = useExecution(resourceId, executionId || "");
|
|
1779
|
+
const typedExecution = externalExecution ?? fetchedExecution;
|
|
1780
|
+
const isStepSelected = !!selectedStepId;
|
|
1781
|
+
const logGroups = useMemo(() => {
|
|
1782
|
+
if (selectedStepId && timelineData) {
|
|
1783
|
+
const selectedStep2 = timelineData.steps.find((s) => s.stepId === selectedStepId);
|
|
1784
|
+
return selectedStep2 ? [{ stepName: selectedStep2.stepName, stepId: selectedStep2.stepId, logs: selectedStep2.logs }] : [];
|
|
1785
|
+
}
|
|
1786
|
+
if (!timelineData || !typedExecution) {
|
|
1787
|
+
return [];
|
|
1788
|
+
}
|
|
1789
|
+
const groups = [];
|
|
1790
|
+
for (const step of timelineData.steps) {
|
|
1791
|
+
if (step.logs.length > 0) {
|
|
1792
|
+
groups.push({
|
|
1793
|
+
stepName: step.stepName,
|
|
1794
|
+
stepId: step.stepId,
|
|
1795
|
+
logs: step.logs
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
const stepLogTimestamps = new Set(timelineData.steps.flatMap((s) => s.logs.map((l) => l.timestamp)));
|
|
1800
|
+
const generalExecutionLogs = typedExecution.executionLogs.filter((log) => !stepLogTimestamps.has(log.timestamp));
|
|
1801
|
+
const generalWorkflowLogs = toWorkflowLogMessages(generalExecutionLogs);
|
|
1802
|
+
if (generalWorkflowLogs.length > 0) {
|
|
1803
|
+
groups.unshift({
|
|
1804
|
+
stepName: "General",
|
|
1805
|
+
stepId: "general",
|
|
1806
|
+
logs: generalWorkflowLogs
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
return groups;
|
|
1810
|
+
}, [selectedStepId, timelineData, typedExecution]);
|
|
1811
|
+
const selectedStep = selectedStepId && timelineData ? timelineData.steps.find((s) => s.stepId === selectedStepId) : null;
|
|
1812
|
+
const totalLogsCount = logGroups.reduce((total, group) => total + group.logs.length, 0);
|
|
1813
|
+
const scrollViewportRef = useRef(null);
|
|
1814
|
+
const isNearBottomRef = useRef(true);
|
|
1815
|
+
const handleScroll = useCallback(() => {
|
|
1816
|
+
const viewport = scrollViewportRef.current;
|
|
1817
|
+
if (!viewport) return;
|
|
1818
|
+
isNearBottomRef.current = viewport.scrollHeight - viewport.scrollTop - viewport.clientHeight < 50;
|
|
1819
|
+
}, []);
|
|
1820
|
+
useEffect(() => {
|
|
1821
|
+
if (!isNearBottomRef.current) return;
|
|
1822
|
+
const viewport = scrollViewportRef.current;
|
|
1823
|
+
if (!viewport) return;
|
|
1824
|
+
viewport.scrollTop = viewport.scrollHeight;
|
|
1825
|
+
}, [totalLogsCount]);
|
|
1826
|
+
const getStepStatusBadge = (stepId) => {
|
|
1827
|
+
if (stepId === "general") {
|
|
1828
|
+
return { label: "General", color: "blue" };
|
|
1829
|
+
}
|
|
1830
|
+
if (!timelineData) {
|
|
1831
|
+
return null;
|
|
1832
|
+
}
|
|
1833
|
+
const step = timelineData.steps.find((s) => s.stepId === stepId);
|
|
1834
|
+
if (!step) {
|
|
1835
|
+
return null;
|
|
1836
|
+
}
|
|
1837
|
+
const statusConfig = getExecutionStatusConfig(step.status);
|
|
1838
|
+
return {
|
|
1839
|
+
label: statusConfig.label,
|
|
1840
|
+
color: statusConfig.color
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
1843
|
+
const renderLogsSection = () => {
|
|
1844
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", style: { flex: 1, minHeight: 0 }, children: [
|
|
1845
|
+
/* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
|
|
1846
|
+
/* @__PURE__ */ jsx(Text, { fw: 500, children: selectedStep ? `Logs for ${selectedStep.stepName} (${totalLogsCount})` : `Logs (${totalLogsCount})` }),
|
|
1847
|
+
timelineData && /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
1848
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
1849
|
+
"Steps: ",
|
|
1850
|
+
timelineData.steps.filter((s) => s.status === "completed").length,
|
|
1851
|
+
"/",
|
|
1852
|
+
timelineData.steps.length
|
|
1853
|
+
] }),
|
|
1854
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
1855
|
+
"Duration:",
|
|
1856
|
+
" ",
|
|
1857
|
+
timelineData.totalDuration < 1e3 ? `${timelineData.totalDuration}ms` : `${(timelineData.totalDuration / 1e3).toFixed(2)}s`
|
|
1858
|
+
] })
|
|
1859
|
+
] })
|
|
1860
|
+
] }),
|
|
1861
|
+
/* @__PURE__ */ jsx(
|
|
1862
|
+
ScrollArea,
|
|
1863
|
+
{
|
|
1864
|
+
style: { flex: 1 },
|
|
1865
|
+
scrollbarSize: 8,
|
|
1866
|
+
viewportRef: scrollViewportRef,
|
|
1867
|
+
onScrollPositionChange: handleScroll,
|
|
1868
|
+
children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
1869
|
+
logGroups.map((group) => {
|
|
1870
|
+
const statusBadge = getStepStatusBadge(group.stepId);
|
|
1871
|
+
return /* @__PURE__ */ jsx(
|
|
1872
|
+
LogGroup,
|
|
1873
|
+
{
|
|
1874
|
+
title: group.stepName,
|
|
1875
|
+
logs: group.logs,
|
|
1876
|
+
statusBadge: statusBadge || void 0
|
|
1877
|
+
},
|
|
1878
|
+
group.stepId
|
|
1879
|
+
);
|
|
1880
|
+
}),
|
|
1881
|
+
logGroups.length === 0 && /* @__PURE__ */ jsx(Text, { c: "dimmed", ta: "center", mt: "md", children: selectedStep ? `No logs for ${selectedStep.stepName}` : "No logs available" })
|
|
1882
|
+
] })
|
|
1883
|
+
}
|
|
1884
|
+
)
|
|
1885
|
+
] });
|
|
1886
|
+
};
|
|
1887
|
+
return /* @__PURE__ */ jsx(
|
|
1888
|
+
BaseExecutionLogs,
|
|
1889
|
+
{
|
|
1890
|
+
resourceId,
|
|
1891
|
+
resourceType: "workflow",
|
|
1892
|
+
executionId,
|
|
1893
|
+
onExecutionDeleted,
|
|
1894
|
+
renderLogsSection,
|
|
1895
|
+
hideInput: isStepSelected,
|
|
1896
|
+
hideResult: isStepSelected,
|
|
1897
|
+
hideError: isStepSelected
|
|
1898
|
+
}
|
|
1899
|
+
);
|
|
1900
|
+
}
|
|
1901
|
+
function getPriorityColor(priority) {
|
|
1902
|
+
if (priority >= 8) return "red";
|
|
1903
|
+
if (priority >= 5) return "yellow";
|
|
1904
|
+
return "gray";
|
|
1905
|
+
}
|
|
1906
|
+
function getPriorityLabel(priority) {
|
|
1907
|
+
if (priority >= 8) return "Critical";
|
|
1908
|
+
if (priority >= 5) return "High";
|
|
1909
|
+
if (priority >= 3) return "Medium";
|
|
1910
|
+
return "Low";
|
|
1911
|
+
}
|
|
1912
|
+
function getStatusColor(status) {
|
|
1913
|
+
switch (status) {
|
|
1914
|
+
case "pending":
|
|
1915
|
+
return "blue";
|
|
1916
|
+
case "processing":
|
|
1917
|
+
return "blue";
|
|
1918
|
+
case "completed":
|
|
1919
|
+
return "green";
|
|
1920
|
+
case "failed":
|
|
1921
|
+
return "red";
|
|
1922
|
+
case "expired":
|
|
1923
|
+
return "orange";
|
|
1924
|
+
default:
|
|
1925
|
+
return "gray";
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
function getPriorityDotColor(priority) {
|
|
1929
|
+
if (priority >= 8) return "var(--mantine-color-red-6)";
|
|
1930
|
+
if (priority >= 5) return "var(--mantine-color-yellow-6)";
|
|
1931
|
+
if (priority >= 3) return "var(--mantine-color-blue-6)";
|
|
1932
|
+
return "var(--color-text-subtle)";
|
|
1933
|
+
}
|
|
1934
|
+
function formatRelativeTime(date) {
|
|
1935
|
+
const now = /* @__PURE__ */ new Date();
|
|
1936
|
+
const diffMs = now.getTime() - date.getTime();
|
|
1937
|
+
const diffMins = Math.floor(diffMs / 6e4);
|
|
1938
|
+
const diffHours = Math.floor(diffMins / 60);
|
|
1939
|
+
const diffDays = Math.floor(diffHours / 24);
|
|
1940
|
+
if (diffMins < 60) return `${diffMins}m ago`;
|
|
1941
|
+
if (diffHours < 24) return `${diffHours}h ago`;
|
|
1942
|
+
return `${diffDays}d ago`;
|
|
1943
|
+
}
|
|
1944
|
+
function CommandQueueTaskRow({ task, onClick, onDelete }) {
|
|
1945
|
+
const [hovered, setHovered] = useState(false);
|
|
1946
|
+
const OriginIcon = task.originResourceType === "agent" ? IconRobot : IconGitBranch;
|
|
1947
|
+
return /* @__PURE__ */ jsx(
|
|
1948
|
+
Card,
|
|
1949
|
+
{
|
|
1950
|
+
padding: 0,
|
|
1951
|
+
style: {
|
|
1952
|
+
cursor: "pointer",
|
|
1953
|
+
border: "1px solid var(--color-border)",
|
|
1954
|
+
transition: "background var(--duration-fast) var(--easing)",
|
|
1955
|
+
background: hovered ? "var(--active-background)" : "var(--glass-background)"
|
|
1956
|
+
},
|
|
1957
|
+
onClick: (e) => {
|
|
1958
|
+
if (e.target.closest("[data-menu-dropdown]") || e.target.closest("button")) {
|
|
1959
|
+
return;
|
|
1960
|
+
}
|
|
1961
|
+
onClick();
|
|
1962
|
+
},
|
|
1963
|
+
onMouseEnter: () => setHovered(true),
|
|
1964
|
+
onMouseLeave: () => setHovered(false),
|
|
1965
|
+
children: /* @__PURE__ */ jsxs(
|
|
1966
|
+
"div",
|
|
1967
|
+
{
|
|
1968
|
+
style: {
|
|
1969
|
+
display: "grid",
|
|
1970
|
+
gridTemplateColumns: "10px 80px 1fr 1fr 90px 90px 32px",
|
|
1971
|
+
alignItems: "center",
|
|
1972
|
+
gap: "var(--mantine-spacing-sm)"
|
|
1973
|
+
},
|
|
1974
|
+
children: [
|
|
1975
|
+
/* @__PURE__ */ jsx(Tooltip, { label: `P${task.priority} \u2014 ${getPriorityLabel(task.priority)}`, children: /* @__PURE__ */ jsx(
|
|
1976
|
+
"div",
|
|
1977
|
+
{
|
|
1978
|
+
style: {
|
|
1979
|
+
width: 10,
|
|
1980
|
+
height: 10,
|
|
1981
|
+
borderRadius: "50%",
|
|
1982
|
+
flexShrink: 0,
|
|
1983
|
+
backgroundColor: getPriorityDotColor(task.priority)
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
) }),
|
|
1987
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", fw: 600, c: getPriorityColor(task.priority), children: getPriorityLabel(task.priority).toUpperCase() }),
|
|
1988
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, truncate: true, title: task.description || "Task approval required", children: task.description || "Task approval required" }),
|
|
1989
|
+
/* @__PURE__ */ jsxs(Group, { gap: 5, wrap: "nowrap", style: { minWidth: 0 }, children: [
|
|
1990
|
+
/* @__PURE__ */ jsx(OriginIcon, { size: 13, color: "var(--color-text-subtle)", style: { flexShrink: 0 } }),
|
|
1991
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", truncate: true, ff: "monospace", style: { minWidth: 0 }, children: task.originResourceId })
|
|
1992
|
+
] }),
|
|
1993
|
+
/* @__PURE__ */ jsx(Badge, { size: "sm", variant: "light", color: getStatusColor(task.status), radius: "sm", children: task.status.charAt(0).toUpperCase() + task.status.slice(1) }),
|
|
1994
|
+
/* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
|
|
1995
|
+
/* @__PURE__ */ jsx(IconClock, { size: 11, color: "var(--color-text-subtle)", style: { flexShrink: 0 } }),
|
|
1996
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { whiteSpace: "nowrap" }, children: formatRelativeTime(task.createdAt) })
|
|
1997
|
+
] }),
|
|
1998
|
+
/* @__PURE__ */ jsxs(Menu, { position: "bottom-end", withinPortal: true, children: [
|
|
1999
|
+
/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", color: "gray", children: /* @__PURE__ */ jsx(IconDotsVertical, { size: 16 }) }) }),
|
|
2000
|
+
/* @__PURE__ */ jsx(Menu.Dropdown, { children: /* @__PURE__ */ jsx(Menu.Item, { leftSection: /* @__PURE__ */ jsx(IconTrash, { size: 14 }), color: "red", onClick: () => onDelete(task.id), children: "Delete" }) })
|
|
2001
|
+
] })
|
|
2002
|
+
]
|
|
2003
|
+
}
|
|
2004
|
+
)
|
|
2005
|
+
}
|
|
2006
|
+
);
|
|
2007
|
+
}
|
|
2008
|
+
function CheckpointGroup({ name, count, isActive, onClick }) {
|
|
2009
|
+
const theme = useMantineTheme();
|
|
2010
|
+
const activeColor = theme.colors[theme.primaryColor][6];
|
|
2011
|
+
const defaultTextColor = "var(--color-text)";
|
|
2012
|
+
const textColor = isActive ? activeColor : defaultTextColor;
|
|
2013
|
+
const fontWeight = isActive ? 600 : 500;
|
|
2014
|
+
const activeBg = `color-mix(in srgb, ${activeColor} 10%, transparent)`;
|
|
2015
|
+
return /* @__PURE__ */ jsx(
|
|
2016
|
+
UnstyledButton,
|
|
2017
|
+
{
|
|
2018
|
+
onClick,
|
|
2019
|
+
style: {
|
|
2020
|
+
display: "flex",
|
|
2021
|
+
alignItems: "center",
|
|
2022
|
+
width: "100%",
|
|
2023
|
+
padding: theme.spacing.xs,
|
|
2024
|
+
borderRadius: theme.radius.sm,
|
|
2025
|
+
backgroundColor: isActive ? activeBg : "transparent",
|
|
2026
|
+
transition: `all var(--duration-fast) var(--easing)`,
|
|
2027
|
+
cursor: "pointer"
|
|
2028
|
+
},
|
|
2029
|
+
onMouseEnter: (e) => {
|
|
2030
|
+
if (!isActive) {
|
|
2031
|
+
e.currentTarget.style.backgroundColor = "var(--color-surface-hover)";
|
|
2032
|
+
}
|
|
2033
|
+
},
|
|
2034
|
+
onMouseLeave: (e) => {
|
|
2035
|
+
if (!isActive) {
|
|
2036
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
2037
|
+
}
|
|
2038
|
+
},
|
|
2039
|
+
children: /* @__PURE__ */ jsxs(Group, { justify: "space-between", wrap: "nowrap", style: { width: "100%" }, children: [
|
|
2040
|
+
/* @__PURE__ */ jsx(
|
|
2041
|
+
Text,
|
|
2042
|
+
{
|
|
2043
|
+
size: "sm",
|
|
2044
|
+
fw: fontWeight,
|
|
2045
|
+
style: {
|
|
2046
|
+
color: textColor,
|
|
2047
|
+
fontFamily: "var(--elevasis-font-family-subtitle)",
|
|
2048
|
+
transition: `color var(--duration-fast) var(--easing)`
|
|
2049
|
+
},
|
|
2050
|
+
children: name
|
|
2051
|
+
}
|
|
2052
|
+
),
|
|
2053
|
+
/* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: count })
|
|
2054
|
+
] })
|
|
2055
|
+
}
|
|
2056
|
+
);
|
|
2057
|
+
}
|
|
2058
|
+
var CommandQueueSidebarTop = ({
|
|
2059
|
+
status,
|
|
2060
|
+
onStatusChange,
|
|
2061
|
+
priorityRange,
|
|
2062
|
+
onPriorityRangeChange
|
|
2063
|
+
}) => {
|
|
2064
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2065
|
+
/* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconFilter, label: "Filters" }),
|
|
2066
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xs", p: "sm", children: [
|
|
2067
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Status" }),
|
|
2068
|
+
/* @__PURE__ */ jsx(
|
|
2069
|
+
Select,
|
|
2070
|
+
{
|
|
2071
|
+
size: "sm",
|
|
2072
|
+
value: status,
|
|
2073
|
+
onChange: (value) => value && onStatusChange(value),
|
|
2074
|
+
data: [
|
|
2075
|
+
{ value: "all", label: "All" },
|
|
2076
|
+
{ value: "pending", label: "Pending" },
|
|
2077
|
+
{ value: "completed", label: "Completed" },
|
|
2078
|
+
{ value: "expired", label: "Expired" }
|
|
2079
|
+
],
|
|
2080
|
+
leftSection: /* @__PURE__ */ jsx(IconCircleCheck, { size: 14 })
|
|
2081
|
+
}
|
|
2082
|
+
),
|
|
2083
|
+
/* @__PURE__ */ jsx(Group, { justify: "space-between", children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Priority" }) }),
|
|
2084
|
+
/* @__PURE__ */ jsx(
|
|
2085
|
+
RangeSlider,
|
|
2086
|
+
{
|
|
2087
|
+
size: "sm",
|
|
2088
|
+
min: 1,
|
|
2089
|
+
max: 10,
|
|
2090
|
+
step: 1,
|
|
2091
|
+
minRange: 0,
|
|
2092
|
+
defaultValue: priorityRange,
|
|
2093
|
+
onChangeEnd: onPriorityRangeChange,
|
|
2094
|
+
marks: [
|
|
2095
|
+
{ value: 1, label: "1" },
|
|
2096
|
+
{ value: 5, label: "5" },
|
|
2097
|
+
{ value: 10, label: "10" }
|
|
2098
|
+
],
|
|
2099
|
+
styles: { markLabel: { fontSize: 10 } }
|
|
2100
|
+
},
|
|
2101
|
+
`${priorityRange[0]}-${priorityRange[1]}`
|
|
2102
|
+
),
|
|
2103
|
+
/* @__PURE__ */ jsx(Space, { h: 8 })
|
|
2104
|
+
] })
|
|
2105
|
+
] });
|
|
2106
|
+
};
|
|
2107
|
+
function CommandQueueSidebarMiddle({
|
|
2108
|
+
selectedCheckpoint,
|
|
2109
|
+
onSelectCheckpoint,
|
|
2110
|
+
priorityRange,
|
|
2111
|
+
status,
|
|
2112
|
+
timeRange
|
|
2113
|
+
}) {
|
|
2114
|
+
const { data, isLoading } = useCommandQueueTotals({
|
|
2115
|
+
timeRange,
|
|
2116
|
+
priorityMin: priorityRange[0],
|
|
2117
|
+
priorityMax: priorityRange[1],
|
|
2118
|
+
status: status === "all" ? void 0 : status
|
|
2119
|
+
});
|
|
2120
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2121
|
+
/* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconCategory, label: "Checkpoint Groups", withTopBorder: true }),
|
|
2122
|
+
/* @__PURE__ */ jsx(Stack, { gap: "xs", p: "sm", style: { flex: 1, overflowY: "auto" }, children: isLoading ? /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2123
|
+
/* @__PURE__ */ jsx(
|
|
2124
|
+
CheckpointGroup,
|
|
2125
|
+
{
|
|
2126
|
+
id: void 0,
|
|
2127
|
+
name: "All Tasks",
|
|
2128
|
+
count: data?.total ?? 0,
|
|
2129
|
+
isActive: selectedCheckpoint === void 0,
|
|
2130
|
+
onClick: () => onSelectCheckpoint(void 0)
|
|
2131
|
+
}
|
|
2132
|
+
),
|
|
2133
|
+
data?.checkpoints.map((checkpoint) => /* @__PURE__ */ jsx(
|
|
2134
|
+
CheckpointGroup,
|
|
2135
|
+
{
|
|
2136
|
+
id: checkpoint.id,
|
|
2137
|
+
name: checkpoint.name,
|
|
2138
|
+
count: checkpoint.count,
|
|
2139
|
+
isActive: selectedCheckpoint === checkpoint.id,
|
|
2140
|
+
onClick: () => onSelectCheckpoint(checkpoint.id)
|
|
2141
|
+
},
|
|
2142
|
+
checkpoint.id
|
|
2143
|
+
))
|
|
2144
|
+
] }) })
|
|
2145
|
+
] });
|
|
2146
|
+
}
|
|
2147
|
+
var CommandQueueSidebar = ({
|
|
2148
|
+
selectedCheckpoint,
|
|
2149
|
+
onSelectCheckpoint,
|
|
2150
|
+
status,
|
|
2151
|
+
onStatusChange,
|
|
2152
|
+
priorityRange,
|
|
2153
|
+
onPriorityRangeChange,
|
|
2154
|
+
timeRange
|
|
2155
|
+
}) => {
|
|
2156
|
+
const colors = useCyberColors();
|
|
2157
|
+
const statusFilter = status === "all" ? void 0 : status;
|
|
2158
|
+
const { data: checkpointData, isLoading: isDonutLoading } = useCommandQueueTotals({
|
|
2159
|
+
timeRange,
|
|
2160
|
+
priorityMin: priorityRange[0],
|
|
2161
|
+
priorityMax: priorityRange[1],
|
|
2162
|
+
status: statusFilter
|
|
2163
|
+
});
|
|
2164
|
+
const {
|
|
2165
|
+
pending: pendingCount,
|
|
2166
|
+
completed: completedCount,
|
|
2167
|
+
expired: expiredCount
|
|
2168
|
+
} = checkpointData?.statusCounts ?? { pending: 0, completed: 0, expired: 0 };
|
|
2169
|
+
const {
|
|
2170
|
+
critical: criticalCount,
|
|
2171
|
+
high: highCount,
|
|
2172
|
+
medium: mediumCount,
|
|
2173
|
+
low: lowCount
|
|
2174
|
+
} = checkpointData?.priorityCounts ?? { critical: 0, high: 0, medium: 0, low: 0 };
|
|
2175
|
+
const totalTasks = checkpointData?.total ?? 0;
|
|
2176
|
+
const statusSegments = [
|
|
2177
|
+
{ name: "Pending", value: pendingCount, color: colors.cyan },
|
|
2178
|
+
{ name: "Completed", value: completedCount, color: colors.green },
|
|
2179
|
+
{ name: "Expired", value: expiredCount, color: colors.red }
|
|
2180
|
+
];
|
|
2181
|
+
const prioritySegments = [
|
|
2182
|
+
{ name: "Critical", value: criticalCount, color: colors.red },
|
|
2183
|
+
{ name: "High", value: highCount, color: colors.yellow },
|
|
2184
|
+
{ name: "Medium", value: mediumCount, color: colors.blue },
|
|
2185
|
+
{ name: "Low", value: lowCount, color: colors.cyanDim }
|
|
2186
|
+
];
|
|
2187
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
2188
|
+
/* @__PURE__ */ jsx(Box, { p: "sm", style: { borderBottom: "1px solid var(--color-border)" }, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
2189
|
+
status === "all" && /* @__PURE__ */ jsx(
|
|
2190
|
+
CyberDonut,
|
|
2191
|
+
{
|
|
2192
|
+
title: "Status",
|
|
2193
|
+
segments: statusSegments,
|
|
2194
|
+
centerValue: totalTasks,
|
|
2195
|
+
centerLabel: "total",
|
|
2196
|
+
glowId: "sbStatusGlow",
|
|
2197
|
+
colors,
|
|
2198
|
+
isLoading: isDonutLoading
|
|
2199
|
+
}
|
|
2200
|
+
),
|
|
2201
|
+
/* @__PURE__ */ jsx(
|
|
2202
|
+
CyberDonut,
|
|
2203
|
+
{
|
|
2204
|
+
title: "Priority",
|
|
2205
|
+
segments: prioritySegments,
|
|
2206
|
+
centerValue: criticalCount + highCount + mediumCount + lowCount,
|
|
2207
|
+
centerLabel: status === "all" ? "total" : status,
|
|
2208
|
+
glowId: "sbPrioGlow",
|
|
2209
|
+
colors,
|
|
2210
|
+
isLoading: isDonutLoading
|
|
2211
|
+
}
|
|
2212
|
+
)
|
|
2213
|
+
] }) }),
|
|
2214
|
+
/* @__PURE__ */ jsx(
|
|
2215
|
+
CommandQueueSidebarTop,
|
|
2216
|
+
{
|
|
2217
|
+
status,
|
|
2218
|
+
onStatusChange,
|
|
2219
|
+
priorityRange,
|
|
2220
|
+
onPriorityRangeChange
|
|
2221
|
+
}
|
|
2222
|
+
),
|
|
2223
|
+
/* @__PURE__ */ jsx(
|
|
2224
|
+
CommandQueueSidebarMiddle,
|
|
2225
|
+
{
|
|
2226
|
+
selectedCheckpoint,
|
|
2227
|
+
onSelectCheckpoint,
|
|
2228
|
+
priorityRange,
|
|
2229
|
+
status,
|
|
2230
|
+
timeRange
|
|
2231
|
+
}
|
|
2232
|
+
)
|
|
2233
|
+
] });
|
|
2234
|
+
};
|
|
2235
|
+
var triggerTypeIcons = {
|
|
2236
|
+
webhook: IconWebhook,
|
|
2237
|
+
schedule: IconClock,
|
|
2238
|
+
manual: IconHandClick,
|
|
2239
|
+
event: IconBolt
|
|
2240
|
+
};
|
|
2241
|
+
var connectionStatusIcons = {
|
|
2242
|
+
connected: IconCircleCheck,
|
|
2243
|
+
disconnected: IconCircleX,
|
|
2244
|
+
error: IconAlertCircle
|
|
2245
|
+
};
|
|
2246
|
+
var statBubbleBase = {
|
|
2247
|
+
minWidth: 20,
|
|
2248
|
+
height: 20,
|
|
2249
|
+
borderRadius: 10,
|
|
2250
|
+
display: "flex",
|
|
2251
|
+
alignItems: "center",
|
|
2252
|
+
justifyContent: "center",
|
|
2253
|
+
fontSize: 11,
|
|
2254
|
+
fontWeight: 600,
|
|
2255
|
+
padding: "0 6px",
|
|
2256
|
+
color: "white",
|
|
2257
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.2)"
|
|
2258
|
+
};
|
|
2259
|
+
var CommandViewNode = memo(function CommandViewNode2({ data, selected }) {
|
|
2260
|
+
const Icon = getResourceIcon(data.type);
|
|
2261
|
+
const color = getResourceColor(data.type);
|
|
2262
|
+
const successCount = (data.type === "agent" || data.type === "workflow") && data.stats ? data.stats.successCount : 0;
|
|
2263
|
+
const failureCount = (data.type === "agent" || data.type === "workflow") && data.stats ? data.stats.failureCount : 0;
|
|
2264
|
+
const warningCount = (data.type === "agent" || data.type === "workflow") && data.stats ? data.stats.warningCount : 0;
|
|
2265
|
+
const pendingCount = data.type === "human" && data.stats ? data.stats.pendingCount : 0;
|
|
2266
|
+
const showBubbles = successCount > 0 || failureCount > 0 || warningCount > 0 || pendingCount > 0;
|
|
2267
|
+
return /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
2268
|
+
showBubbles && /* @__PURE__ */ jsxs(
|
|
2269
|
+
"div",
|
|
2270
|
+
{
|
|
2271
|
+
style: {
|
|
2272
|
+
position: "absolute",
|
|
2273
|
+
top: -8,
|
|
2274
|
+
right: -8,
|
|
2275
|
+
display: "flex",
|
|
2276
|
+
gap: 4,
|
|
2277
|
+
zIndex: 10
|
|
2278
|
+
},
|
|
2279
|
+
children: [
|
|
2280
|
+
successCount > 0 && /* @__PURE__ */ jsx(
|
|
2281
|
+
"div",
|
|
2282
|
+
{
|
|
2283
|
+
style: {
|
|
2284
|
+
...statBubbleBase,
|
|
2285
|
+
background: "linear-gradient(135deg, var(--mantine-color-green-5), var(--mantine-color-green-7))"
|
|
2286
|
+
},
|
|
2287
|
+
children: successCount
|
|
2288
|
+
}
|
|
2289
|
+
),
|
|
2290
|
+
warningCount > 0 && /* @__PURE__ */ jsx(
|
|
2291
|
+
"div",
|
|
2292
|
+
{
|
|
2293
|
+
style: {
|
|
2294
|
+
...statBubbleBase,
|
|
2295
|
+
background: "linear-gradient(135deg, var(--mantine-color-yellow-5), var(--mantine-color-yellow-7))"
|
|
2296
|
+
},
|
|
2297
|
+
children: warningCount
|
|
2298
|
+
}
|
|
2299
|
+
),
|
|
2300
|
+
failureCount > 0 && /* @__PURE__ */ jsx(
|
|
2301
|
+
"div",
|
|
2302
|
+
{
|
|
2303
|
+
style: {
|
|
2304
|
+
...statBubbleBase,
|
|
2305
|
+
background: "linear-gradient(135deg, var(--mantine-color-red-5), var(--mantine-color-red-7))"
|
|
2306
|
+
},
|
|
2307
|
+
children: failureCount
|
|
2308
|
+
}
|
|
2309
|
+
),
|
|
2310
|
+
pendingCount > 0 && /* @__PURE__ */ jsx(
|
|
2311
|
+
"div",
|
|
2312
|
+
{
|
|
2313
|
+
style: {
|
|
2314
|
+
...statBubbleBase,
|
|
2315
|
+
background: "linear-gradient(135deg, var(--mantine-color-orange-5), var(--mantine-color-orange-7))"
|
|
2316
|
+
},
|
|
2317
|
+
children: pendingCount
|
|
2318
|
+
}
|
|
2319
|
+
)
|
|
2320
|
+
]
|
|
2321
|
+
}
|
|
2322
|
+
),
|
|
2323
|
+
/* @__PURE__ */ jsx(BaseNode, { color, selected, highlighted: Boolean(data.highlighted), children: /* @__PURE__ */ jsxs(Stack, { gap: 8, children: [
|
|
2324
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
|
|
2325
|
+
/* @__PURE__ */ jsx(
|
|
2326
|
+
ThemeIcon,
|
|
2327
|
+
{
|
|
2328
|
+
size: "md",
|
|
2329
|
+
variant: "gradient",
|
|
2330
|
+
gradient: { from: `${color}.4`, to: `${color}.6`, deg: 135 },
|
|
2331
|
+
className: Graph_module_css_default.nodeIcon,
|
|
2332
|
+
children: /* @__PURE__ */ jsx(Icon, { size: 16 })
|
|
2333
|
+
}
|
|
2334
|
+
),
|
|
2335
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, truncate: true, style: { flex: 1, fontFamily: "var(--elevasis-font-family-subtitle)" }, children: data.name })
|
|
2336
|
+
] }),
|
|
2337
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", lineClamp: 2, children: data.description }),
|
|
2338
|
+
/* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "wrap", children: [
|
|
2339
|
+
/* @__PURE__ */ jsx(
|
|
2340
|
+
Badge,
|
|
2341
|
+
{
|
|
2342
|
+
size: "xs",
|
|
2343
|
+
variant: "gradient",
|
|
2344
|
+
gradient: data.status === "prod" ? { from: "green.5", to: "green.7", deg: 135 } : { from: "blue.5", to: "blue.7", deg: 135 },
|
|
2345
|
+
className: data.status === "prod" ? Graph_module_css_default.badgeProd : "",
|
|
2346
|
+
style: {
|
|
2347
|
+
textTransform: "uppercase",
|
|
2348
|
+
letterSpacing: "0.5px"
|
|
2349
|
+
},
|
|
2350
|
+
children: data.status
|
|
2351
|
+
}
|
|
2352
|
+
),
|
|
2353
|
+
data.type === "agent" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2354
|
+
/* @__PURE__ */ jsxs(
|
|
2355
|
+
Badge,
|
|
2356
|
+
{
|
|
2357
|
+
size: "xs",
|
|
2358
|
+
variant: "outline",
|
|
2359
|
+
color: "gray",
|
|
2360
|
+
className: Graph_module_css_default.badge,
|
|
2361
|
+
style: { backdropFilter: "blur(4px)" },
|
|
2362
|
+
children: [
|
|
2363
|
+
data.toolCount,
|
|
2364
|
+
" tools"
|
|
2365
|
+
]
|
|
2366
|
+
}
|
|
2367
|
+
),
|
|
2368
|
+
data.hasKnowledgeMap && /* @__PURE__ */ jsx(
|
|
2369
|
+
Badge,
|
|
2370
|
+
{
|
|
2371
|
+
size: "xs",
|
|
2372
|
+
variant: "gradient",
|
|
2373
|
+
gradient: { from: "grape.5", to: "grape.7", deg: 135 },
|
|
2374
|
+
leftSection: /* @__PURE__ */ jsx(IconBrain, { size: 10 }),
|
|
2375
|
+
className: Graph_module_css_default.badge,
|
|
2376
|
+
children: "KM"
|
|
2377
|
+
}
|
|
2378
|
+
),
|
|
2379
|
+
data.hasMemory && /* @__PURE__ */ jsx(
|
|
2380
|
+
Badge,
|
|
2381
|
+
{
|
|
2382
|
+
size: "xs",
|
|
2383
|
+
variant: "gradient",
|
|
2384
|
+
gradient: { from: "cyan.5", to: "cyan.7", deg: 135 },
|
|
2385
|
+
leftSection: /* @__PURE__ */ jsx(IconDatabase, { size: 10 }),
|
|
2386
|
+
className: Graph_module_css_default.badge,
|
|
2387
|
+
children: "Mem"
|
|
2388
|
+
}
|
|
2389
|
+
),
|
|
2390
|
+
data.sessionCapable && /* @__PURE__ */ jsx(
|
|
2391
|
+
Badge,
|
|
2392
|
+
{
|
|
2393
|
+
size: "xs",
|
|
2394
|
+
variant: "gradient",
|
|
2395
|
+
gradient: { from: "blue.5", to: "blue.7", deg: 135 },
|
|
2396
|
+
leftSection: /* @__PURE__ */ jsx(IconMessage, { size: 10 }),
|
|
2397
|
+
className: Graph_module_css_default.badge,
|
|
2398
|
+
children: "Session"
|
|
2399
|
+
}
|
|
2400
|
+
)
|
|
2401
|
+
] }),
|
|
2402
|
+
data.type === "workflow" && /* @__PURE__ */ jsxs(
|
|
2403
|
+
Badge,
|
|
2404
|
+
{
|
|
2405
|
+
size: "xs",
|
|
2406
|
+
variant: "outline",
|
|
2407
|
+
color: "gray",
|
|
2408
|
+
className: Graph_module_css_default.badge,
|
|
2409
|
+
style: { backdropFilter: "blur(4px)" },
|
|
2410
|
+
children: [
|
|
2411
|
+
data.stepCount,
|
|
2412
|
+
" steps"
|
|
2413
|
+
]
|
|
2414
|
+
}
|
|
2415
|
+
),
|
|
2416
|
+
data.type === "integration" && /* @__PURE__ */ jsx(
|
|
2417
|
+
Badge,
|
|
2418
|
+
{
|
|
2419
|
+
size: "xs",
|
|
2420
|
+
variant: "gradient",
|
|
2421
|
+
gradient: data.connectionStatus === "connected" ? { from: "green.5", to: "green.7", deg: 135 } : data.connectionStatus === "error" ? { from: "red.5", to: "red.7", deg: 135 } : { from: "gray.5", to: "gray.7", deg: 135 },
|
|
2422
|
+
leftSection: (() => {
|
|
2423
|
+
const StatusIcon = connectionStatusIcons[data.connectionStatus];
|
|
2424
|
+
return /* @__PURE__ */ jsx(StatusIcon, { size: 10 });
|
|
2425
|
+
})(),
|
|
2426
|
+
className: Graph_module_css_default.badge,
|
|
2427
|
+
children: data.connectionStatus
|
|
2428
|
+
}
|
|
2429
|
+
),
|
|
2430
|
+
data.type === "trigger" && /* @__PURE__ */ jsx(
|
|
2431
|
+
Badge,
|
|
2432
|
+
{
|
|
2433
|
+
size: "xs",
|
|
2434
|
+
variant: "outline",
|
|
2435
|
+
color: "gray",
|
|
2436
|
+
leftSection: (() => {
|
|
2437
|
+
const TriggerIcon = triggerTypeIcons[data.triggerType] || IconBolt;
|
|
2438
|
+
return /* @__PURE__ */ jsx(TriggerIcon, { size: 10 });
|
|
2439
|
+
})(),
|
|
2440
|
+
className: Graph_module_css_default.badge,
|
|
2441
|
+
style: { backdropFilter: "blur(4px)" },
|
|
2442
|
+
children: data.triggerType
|
|
2443
|
+
}
|
|
2444
|
+
),
|
|
2445
|
+
data.type === "external" && /* @__PURE__ */ jsx(
|
|
2446
|
+
Badge,
|
|
2447
|
+
{
|
|
2448
|
+
size: "xs",
|
|
2449
|
+
variant: "outline",
|
|
2450
|
+
color: "gray",
|
|
2451
|
+
leftSection: /* @__PURE__ */ jsx(IconExternalLink, { size: 10 }),
|
|
2452
|
+
className: Graph_module_css_default.badge,
|
|
2453
|
+
style: { backdropFilter: "blur(4px)" },
|
|
2454
|
+
children: data.platform
|
|
2455
|
+
}
|
|
2456
|
+
),
|
|
2457
|
+
data.type === "human" && /* @__PURE__ */ jsx(
|
|
2458
|
+
Badge,
|
|
2459
|
+
{
|
|
2460
|
+
size: "xs",
|
|
2461
|
+
variant: "gradient",
|
|
2462
|
+
gradient: { from: "yellow.5", to: "orange.6", deg: 135 },
|
|
2463
|
+
leftSection: /* @__PURE__ */ jsx(IconHandClick, { size: 10 }),
|
|
2464
|
+
className: Graph_module_css_default.badge,
|
|
2465
|
+
children: "Approval Required"
|
|
2466
|
+
}
|
|
2467
|
+
)
|
|
2468
|
+
] })
|
|
2469
|
+
] }) })
|
|
2470
|
+
] });
|
|
2471
|
+
});
|
|
2472
|
+
var relationshipColorMap = {
|
|
2473
|
+
triggers: { color: "edgeTriggers", glow: "edgeTriggersGlow" },
|
|
2474
|
+
uses: { color: "edgeUses", glow: "edgeUsesGlow" },
|
|
2475
|
+
approval: { color: "edgeApproval", glow: "edgeApprovalGlow" }
|
|
2476
|
+
};
|
|
2477
|
+
function getEdgeColors(relationship, colors) {
|
|
2478
|
+
const mapping = relationshipColorMap[relationship] ?? relationshipColorMap.approval;
|
|
2479
|
+
return {
|
|
2480
|
+
edgeColor: colors[mapping.color],
|
|
2481
|
+
glowColor: colors[mapping.glow]
|
|
2482
|
+
};
|
|
2483
|
+
}
|
|
2484
|
+
var CommandViewEdge = memo(function CommandViewEdge2({
|
|
2485
|
+
id,
|
|
2486
|
+
sourceX,
|
|
2487
|
+
sourceY,
|
|
2488
|
+
targetX,
|
|
2489
|
+
targetY,
|
|
2490
|
+
sourcePosition,
|
|
2491
|
+
targetPosition,
|
|
2492
|
+
data,
|
|
2493
|
+
selected
|
|
2494
|
+
}) {
|
|
2495
|
+
const colors = useGraphTheme();
|
|
2496
|
+
const relationship = data?.relationship || "uses";
|
|
2497
|
+
const { edgeColor, glowColor } = getEdgeColors(relationship, colors);
|
|
2498
|
+
return /* @__PURE__ */ jsx(
|
|
2499
|
+
BaseEdge,
|
|
2500
|
+
{
|
|
2501
|
+
id,
|
|
2502
|
+
sourceX,
|
|
2503
|
+
sourceY,
|
|
2504
|
+
targetX,
|
|
2505
|
+
targetY,
|
|
2506
|
+
sourcePosition,
|
|
2507
|
+
targetPosition,
|
|
2508
|
+
color: edgeColor,
|
|
2509
|
+
glowColor,
|
|
2510
|
+
label: data?.label || relationship,
|
|
2511
|
+
animated: data?.animated ?? false,
|
|
2512
|
+
selected,
|
|
2513
|
+
dimmed: data?.dimmed,
|
|
2514
|
+
edgeIndex: data?.edgeIndex,
|
|
2515
|
+
totalEdges: data?.totalEdges
|
|
2516
|
+
}
|
|
2517
|
+
);
|
|
2518
|
+
});
|
|
2519
|
+
var nodeTypes2 = {
|
|
2520
|
+
commandView: CommandViewNode
|
|
2521
|
+
};
|
|
2522
|
+
var edgeTypes2 = {
|
|
2523
|
+
commandView: CommandViewEdge
|
|
2524
|
+
};
|
|
2525
|
+
var CommandViewGraphInner = forwardRef(function CommandViewGraphInner2({ graph, height, selectedNodeId, onNodeSelect }, ref) {
|
|
2526
|
+
const { fitView } = useReactFlow();
|
|
2527
|
+
const { nodes: layoutNodes, edges: layoutEdges } = useCommandViewLayout(graph);
|
|
2528
|
+
const { nodes, edges, handleNodeMouseEnter, handleNodeMouseLeave } = useDirectedChainHighlighting(
|
|
2529
|
+
layoutNodes,
|
|
2530
|
+
layoutEdges,
|
|
2531
|
+
{ selectedNodeId }
|
|
2532
|
+
);
|
|
2533
|
+
const { handleNodeClick, handlePaneClick } = useNodeSelection(selectedNodeId ?? null, onNodeSelect ?? (() => {
|
|
2534
|
+
}));
|
|
2535
|
+
const nodesWithSelection = useMemo(
|
|
2536
|
+
() => nodes.map((node) => ({
|
|
2537
|
+
...node,
|
|
2538
|
+
selected: node.id === selectedNodeId
|
|
2539
|
+
})),
|
|
2540
|
+
[nodes, selectedNodeId]
|
|
2541
|
+
);
|
|
2542
|
+
useImperativeHandle(ref, () => ({
|
|
2543
|
+
fitView: () => fitView({ padding: 0.15, duration: 300 })
|
|
2544
|
+
}));
|
|
2545
|
+
return /* @__PURE__ */ jsx(
|
|
2546
|
+
Box,
|
|
2547
|
+
{
|
|
2548
|
+
className: Graph_module_css_default.graphContainer,
|
|
2549
|
+
style: {
|
|
2550
|
+
width: "100%",
|
|
2551
|
+
height,
|
|
2552
|
+
border: "1px solid var(--color-border)",
|
|
2553
|
+
borderRadius: "var(--mantine-radius-default)",
|
|
2554
|
+
overflow: "hidden"
|
|
2555
|
+
},
|
|
2556
|
+
children: /* @__PURE__ */ jsxs(
|
|
2557
|
+
ReactFlow,
|
|
2558
|
+
{
|
|
2559
|
+
nodes: nodesWithSelection,
|
|
2560
|
+
edges,
|
|
2561
|
+
nodeTypes: nodeTypes2,
|
|
2562
|
+
edgeTypes: edgeTypes2,
|
|
2563
|
+
onNodeMouseEnter: handleNodeMouseEnter,
|
|
2564
|
+
onNodeMouseLeave: handleNodeMouseLeave,
|
|
2565
|
+
onNodeClick: onNodeSelect ? handleNodeClick : void 0,
|
|
2566
|
+
onPaneClick: onNodeSelect ? handlePaneClick : void 0,
|
|
2567
|
+
fitView: true,
|
|
2568
|
+
fitViewOptions: { padding: 0.15 },
|
|
2569
|
+
proOptions: { hideAttribution: true },
|
|
2570
|
+
minZoom: GRAPH_CONSTANTS.MIN_ZOOM,
|
|
2571
|
+
maxZoom: GRAPH_CONSTANTS.MAX_ZOOM,
|
|
2572
|
+
nodesDraggable: false,
|
|
2573
|
+
nodesConnectable: false,
|
|
2574
|
+
elementsSelectable: !!onNodeSelect,
|
|
2575
|
+
selectNodesOnDrag: false,
|
|
2576
|
+
panOnDrag: true,
|
|
2577
|
+
zoomOnScroll: true,
|
|
2578
|
+
zoomOnPinch: true,
|
|
2579
|
+
panOnScroll: false,
|
|
2580
|
+
children: [
|
|
2581
|
+
/* @__PURE__ */ jsx(GraphBackground, {}),
|
|
2582
|
+
/* @__PURE__ */ jsx(
|
|
2583
|
+
GraphLegend,
|
|
2584
|
+
{
|
|
2585
|
+
title: "",
|
|
2586
|
+
position: "bottom-right",
|
|
2587
|
+
items: [
|
|
2588
|
+
{ color: "orange", label: "Triggers" },
|
|
2589
|
+
{ color: "violet", label: "Agents" },
|
|
2590
|
+
{ color: "blue", label: "Workflows" },
|
|
2591
|
+
{ color: "teal", label: "Integrations" },
|
|
2592
|
+
{ color: "yellow", label: "Human" },
|
|
2593
|
+
{ color: "gray", label: "External" }
|
|
2594
|
+
]
|
|
2595
|
+
}
|
|
2596
|
+
),
|
|
2597
|
+
/* @__PURE__ */ jsx(
|
|
2598
|
+
GraphLegend,
|
|
2599
|
+
{
|
|
2600
|
+
title: "",
|
|
2601
|
+
position: "bottom-left",
|
|
2602
|
+
items: [
|
|
2603
|
+
{ color: "blue", label: "Triggers", type: "line" },
|
|
2604
|
+
{ color: "teal", label: "Uses", type: "line" },
|
|
2605
|
+
{ color: "yellow", label: "Requires Approval", type: "line" }
|
|
2606
|
+
]
|
|
2607
|
+
}
|
|
2608
|
+
),
|
|
2609
|
+
/* @__PURE__ */ jsx(GraphFitViewButton, { padding: 0.15, variant: "mantine", duration: 300 })
|
|
2610
|
+
]
|
|
2611
|
+
}
|
|
2612
|
+
)
|
|
2613
|
+
}
|
|
2614
|
+
);
|
|
2615
|
+
});
|
|
2616
|
+
var CommandViewGraph = forwardRef(
|
|
2617
|
+
function CommandViewGraph2(props, ref) {
|
|
2618
|
+
return /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(CommandViewGraphInner, { ref, ...props }) });
|
|
2619
|
+
}
|
|
2620
|
+
);
|
|
2621
|
+
|
|
2622
|
+
export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CheckpointGroup, CollapsibleJsonSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CommandViewEdge, CommandViewGraph, CommandViewNode, ConfigCard, ContentSections, ContractDisplay, ExecutionErrorSection, FormFieldRenderer, LogEntry, LogGroup, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, ResourceDefinitionSection, TaskCard, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap, useNewKnowledgeMapLayout };
|