@elevasis/ui 1.15.3 → 1.17.1
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/charts/index.d.ts +25 -2
- package/dist/charts/index.js +2 -2
- package/dist/{chunk-FEZ2TGSH.js → chunk-7ATCF6UL.js} +282 -14
- package/dist/{chunk-4NHYV42S.js → chunk-7S5FS7WW.js} +35 -4
- package/dist/chunk-ADSSLKKP.js +10 -0
- package/dist/{chunk-WY2BCL5F.js → chunk-F25DUOWI.js} +2 -2
- package/dist/chunk-MHW43EOH.js +47 -0
- package/dist/{chunk-6YIE72M2.js → chunk-NUULWBAD.js} +1 -1
- package/dist/{chunk-E6Q6A5TU.js → chunk-QCEUL5QG.js} +2 -6
- package/dist/{chunk-4NAZQ7WO.js → chunk-RYSPAQGW.js} +2 -2
- package/dist/{chunk-XY7VKOKI.js → chunk-UEYUPTAD.js} +80 -777
- package/dist/chunk-ZGK6XZVY.js +1208 -0
- package/dist/components/index.d.ts +511 -488
- package/dist/components/index.js +28 -1221
- package/dist/features/operations/index.css +565 -0
- package/dist/features/operations/index.d.ts +90 -0
- package/dist/features/operations/index.js +241 -0
- package/dist/hooks/index.d.ts +509 -488
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/published.d.ts +509 -488
- package/dist/hooks/published.js +4 -4
- package/dist/index.d.ts +522 -490
- package/dist/index.js +6 -6
- package/dist/initialization/index.d.ts +508 -487
- package/dist/layout/index.d.ts +196 -6
- package/dist/layout/index.js +5 -4
- package/dist/profile/index.d.ts +508 -487
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.js +4 -4
- package/dist/provider/published.d.ts +1 -1
- package/dist/router/index.d.ts +12 -1
- package/dist/router/index.js +1 -1
- package/dist/supabase/index.d.ts +890 -851
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +3 -3
- package/dist/types/index.d.ts +509 -488
- package/package.json +5 -1
- package/dist/chunk-LHQTTUL2.js +0 -27
- package/dist/components/layout/backgrounds/CyberParticles.d.ts +0 -30
- package/dist/components/layout/backgrounds/CyberParticles.d.ts.map +0 -1
- package/dist/components/layout/backgrounds/CyberParticles.js +0 -138
package/dist/components/index.js
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer, PageContainer, AppShellLoader, SubshellSidebarSection, CollapsibleSidebarGroup, SidebarListItem } from '../chunk-QCEUL5QG.js';
|
|
2
|
+
import { BaseNode, useGraphTheme, BaseEdge, GraphBackground, GraphLegend, GraphFitViewButton, GraphFitViewHandler } from '../chunk-ZGK6XZVY.js';
|
|
3
|
+
export { AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, EmptyVisualizer, ExecutionStats, ExecutionStatusBadge, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowExecutionTimeline, getGraphBackgroundStyles, useGraphBackgroundStyles, useGraphTheme } from '../chunk-ZGK6XZVY.js';
|
|
4
|
+
import { SubshellLoader } from '../chunk-ADSSLKKP.js';
|
|
5
|
+
import { useCyberColors, EmptyState, CyberLegendItem, CyberAreaChart, APIErrorAlert, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, ContextViewer, JsonViewer, StyledMarkdown, PageTitleCaption, StatCard, CyberDonut, CollapsibleSection, ListSkeleton } from '../chunk-7S5FS7WW.js';
|
|
6
|
+
export { APIErrorAlert, CardHeader, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, GlowDot, JsonViewer, ListSkeleton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, StyledMarkdown, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-7S5FS7WW.js';
|
|
4
7
|
export { NavigationButton } from '../chunk-KBLGVZBD.js';
|
|
5
8
|
import { useUpdateApiKey, useDeleteApiKey, useCreateApiKey, useListApiKeys, useDeleteCredential, useCreateCredential, useCredentials, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, showApiErrorNotification, showSuccessNotification, CredentialSchemas, showErrorNotification } from '../chunk-XGVD76EL.js';
|
|
6
9
|
export { showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification } from '../chunk-XGVD76EL.js';
|
|
7
10
|
import { useCommandViewLayout, useResourcesHealth, useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useMarkAllAsRead, useNotificationCount, useNotifications, useSubmitAction, useDeleteTask, useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useDeploymentDocs, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, useCommandQueueTotals } from '../chunk-TRVSTJTK.js';
|
|
8
11
|
import { getTimeRangeDates, formatBucketTime } from '../chunk-LXHZYSMQ.js';
|
|
9
12
|
import '../chunk-NJJ3NQ7B.js';
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, GRAPH_CONSTANTS,
|
|
13
|
+
import '../chunk-MHW43EOH.js';
|
|
14
|
+
import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, GRAPH_CONSTANTS, useGraphHighlighting, calculateGraphHeight } from '../chunk-F6RBK7NJ.js';
|
|
12
15
|
export { Graph_module_css_default as graphStyles } from '../chunk-F6RBK7NJ.js';
|
|
13
|
-
import {
|
|
16
|
+
import { formatDuration, getResourceStatusColor } from '../chunk-XA34RETF.js';
|
|
14
17
|
export { CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS } from '../chunk-XA34RETF.js';
|
|
15
18
|
import { ResourceStatusColors, toWorkflowLogMessages } from '../chunk-ELJIFLCB.js';
|
|
16
19
|
import '../chunk-L4XXM55J.js';
|
|
17
20
|
import '../chunk-SLVC5OJ2.js';
|
|
18
21
|
import '../chunk-RNP5R5I3.js';
|
|
19
|
-
import '../chunk-
|
|
22
|
+
import '../chunk-F25DUOWI.js';
|
|
23
|
+
import '../chunk-NUULWBAD.js';
|
|
20
24
|
export { ElevasisLoader } from '../chunk-SZHARWKU.js';
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import '../chunk-
|
|
23
|
-
import '../chunk-FEZ2TGSH.js';
|
|
25
|
+
import '../chunk-UEYUPTAD.js';
|
|
26
|
+
import '../chunk-7ATCF6UL.js';
|
|
24
27
|
import '../chunk-53GNREDV.js';
|
|
25
28
|
import { useAppearance } from '../chunk-QJ2KCHKX.js';
|
|
26
29
|
import '../chunk-U2522LSW.js';
|
|
@@ -34,17 +37,17 @@ import { useOrganization } from '../chunk-DD3CCMCZ.js';
|
|
|
34
37
|
import '../chunk-BRJ3QZ4E.js';
|
|
35
38
|
import { useRouterContext } from '../chunk-Q7DJKLEN.js';
|
|
36
39
|
import { z } from 'zod';
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import { memo, forwardRef, useMemo, useImperativeHandle, cloneElement, useState,
|
|
40
|
-
import {
|
|
40
|
+
import { Stack, Group, Text, Badge, ThemeIcon, Box, Modal, Center, Space, Button, Title, TextInput, Table, Paper, Textarea, Radio, Checkbox, Select, NumberInput, Tooltip, Card, Loader, ActionIcon, SegmentedControl, NumberFormatter, Alert, Switch, Pagination, UnstyledButton, Divider, ScrollArea, Popover, Indicator, Menu, Accordion, Collapse, SimpleGrid, CopyButton, Code, useMantineTheme, Timeline, RangeSlider, Progress, PasswordInput, Anchor } from '@mantine/core';
|
|
41
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
42
|
+
import { memo, forwardRef, useMemo, useImperativeHandle, cloneElement, useState, useRef, useCallback, useEffect } from 'react';
|
|
43
|
+
import { IconBrain, IconFileText, IconDatabase, IconMessage, IconAlertCircle, IconCircleX, IconCircleCheck, IconBolt, IconHandClick, IconClock, IconWebhook, IconExternalLink, IconMail, IconSend, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconChevronUp, IconChevronDown, IconSelector, IconTrash, IconChartBar, IconThumbDown, IconThumbUp, IconSearch, IconFilterOff, IconArrowUpRight, IconDownload, IconInfoCircle, IconBug, IconChecks, IconCircle, IconCircleFilled, IconBell, IconRobot, IconGitBranch, IconDotsVertical, IconPlayerPlay, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconNetwork, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconArrowLeft, IconBook2, IconFileOff, IconList, IconCalendarRepeat, IconCalendarEvent, IconCalendarTime, IconPlus, IconCalendar, IconKey, IconPlayerPause, IconCalendarDue, IconCalendarStats, IconCalendarOff, IconListCheck, IconFilter, IconCategory, IconPencil, IconExclamationMark, IconShieldLock, IconPower, IconTag, IconBuilding, IconUserX, IconUserCheck, IconArrowDown, IconUser, IconArchive, IconFolderOpen, IconFolder } from '@tabler/icons-react';
|
|
41
44
|
import { AreaChart } from '@mantine/charts';
|
|
42
45
|
import { formatDistanceToNow } from 'date-fns';
|
|
43
46
|
import { useDisclosure, useClipboard } from '@mantine/hooks';
|
|
44
|
-
import { Position, Handle, getSmoothStepPath, BaseEdge as BaseEdge$1, EdgeLabelRenderer, useReactFlow, ReactFlow, ReactFlowProvider, Panel, Controls } from '@xyflow/react';
|
|
45
|
-
import '@xyflow/react/dist/style.css';
|
|
46
47
|
import { useForm } from '@mantine/form';
|
|
48
|
+
import { useReactFlow, ReactFlow, ReactFlowProvider } from '@xyflow/react';
|
|
47
49
|
import dagre from '@dagrejs/dagre';
|
|
50
|
+
import '@xyflow/react/dist/style.css';
|
|
48
51
|
import { notifications } from '@mantine/notifications';
|
|
49
52
|
import { useNavigate } from '@tanstack/react-router';
|
|
50
53
|
|
|
@@ -1734,1202 +1737,6 @@ function NotificationBell({ unreadCount, onNavigate }) {
|
|
|
1734
1737
|
) })
|
|
1735
1738
|
] });
|
|
1736
1739
|
}
|
|
1737
|
-
function ExecutionStatusBadge({
|
|
1738
|
-
status,
|
|
1739
|
-
size = "sm",
|
|
1740
|
-
variant = "light",
|
|
1741
|
-
showLoader = true
|
|
1742
|
-
}) {
|
|
1743
|
-
const statusColors = STATUS_COLORS[status];
|
|
1744
|
-
const isRunning = status === "running" && showLoader;
|
|
1745
|
-
return /* @__PURE__ */ jsx(
|
|
1746
|
-
Badge,
|
|
1747
|
-
{
|
|
1748
|
-
color: statusColors.badge,
|
|
1749
|
-
size,
|
|
1750
|
-
variant,
|
|
1751
|
-
leftSection: isRunning ? /* @__PURE__ */ jsx(Loader, { size: 10, color: statusColors.badge }) : void 0,
|
|
1752
|
-
children: status.charAt(0).toUpperCase() + status.slice(1)
|
|
1753
|
-
}
|
|
1754
|
-
);
|
|
1755
|
-
}
|
|
1756
|
-
function getRateColor(rate) {
|
|
1757
|
-
if (rate >= 95) return "var(--color-success)";
|
|
1758
|
-
if (rate >= 80) return "var(--color-warning)";
|
|
1759
|
-
return "var(--color-error)";
|
|
1760
|
-
}
|
|
1761
|
-
function getMantineRateColor(rate) {
|
|
1762
|
-
if (rate >= 95) return "green";
|
|
1763
|
-
if (rate >= 80) return "yellow";
|
|
1764
|
-
return "red";
|
|
1765
|
-
}
|
|
1766
|
-
function ExecutionStats({
|
|
1767
|
-
totalExecutions,
|
|
1768
|
-
successCount,
|
|
1769
|
-
failureCount,
|
|
1770
|
-
warningCount,
|
|
1771
|
-
successRate,
|
|
1772
|
-
align = "flex-end",
|
|
1773
|
-
compact = false
|
|
1774
|
-
}) {
|
|
1775
|
-
const cyberColors = useCyberColors();
|
|
1776
|
-
if (totalExecutions === 0 && !compact) {
|
|
1777
|
-
return null;
|
|
1778
|
-
}
|
|
1779
|
-
if (compact && totalExecutions === 0) {
|
|
1780
|
-
return /* @__PURE__ */ jsxs(Group, { gap: 10, wrap: "nowrap", style: { width: "100%" }, children: [
|
|
1781
|
-
/* @__PURE__ */ jsx(Text, { size: "md", fw: 700, ff: "monospace", c: "dimmed", style: { minWidth: 42 }, children: "\u2014" }),
|
|
1782
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap" }, children: "No recent executions" })
|
|
1783
|
-
] });
|
|
1784
|
-
}
|
|
1785
|
-
if (compact) {
|
|
1786
|
-
return /* @__PURE__ */ jsxs(Group, { gap: 10, wrap: "nowrap", style: { width: "100%" }, children: [
|
|
1787
|
-
/* @__PURE__ */ jsxs(Group, { gap: 8, wrap: "nowrap", children: [
|
|
1788
|
-
/* @__PURE__ */ jsxs(Text, { size: "md", fw: 700, ff: "monospace", style: { color: getRateColor(successRate), minWidth: 42 }, children: [
|
|
1789
|
-
successRate,
|
|
1790
|
-
"%"
|
|
1791
|
-
] }),
|
|
1792
|
-
/* @__PURE__ */ jsxs(Group, { gap: 5, wrap: "nowrap", children: [
|
|
1793
|
-
/* @__PURE__ */ jsx(GlowDot, { size: "sm", color: cyberColors.green }),
|
|
1794
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, c: "green", children: successCount })
|
|
1795
|
-
] }),
|
|
1796
|
-
failureCount > 0 && /* @__PURE__ */ jsxs(Group, { gap: 5, wrap: "nowrap", children: [
|
|
1797
|
-
/* @__PURE__ */ jsx(GlowDot, { size: "sm", color: cyberColors.red }),
|
|
1798
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, c: "red", children: failureCount })
|
|
1799
|
-
] })
|
|
1800
|
-
] }),
|
|
1801
|
-
/* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap" }, children: [
|
|
1802
|
-
totalExecutions,
|
|
1803
|
-
" ",
|
|
1804
|
-
totalExecutions === 1 ? "run" : "runs"
|
|
1805
|
-
] })
|
|
1806
|
-
] });
|
|
1807
|
-
}
|
|
1808
|
-
return /* @__PURE__ */ jsxs(Stack, { gap: 2, align, style: { whiteSpace: "nowrap" }, children: [
|
|
1809
|
-
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "blue", children: [
|
|
1810
|
-
totalExecutions,
|
|
1811
|
-
" ",
|
|
1812
|
-
totalExecutions === 1 ? "execution" : "executions"
|
|
1813
|
-
] }),
|
|
1814
|
-
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "green", children: [
|
|
1815
|
-
successCount,
|
|
1816
|
-
" success"
|
|
1817
|
-
] }),
|
|
1818
|
-
warningCount != null && warningCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "yellow", children: [
|
|
1819
|
-
warningCount,
|
|
1820
|
-
" warning"
|
|
1821
|
-
] }),
|
|
1822
|
-
failureCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "red", children: [
|
|
1823
|
-
failureCount,
|
|
1824
|
-
" failed"
|
|
1825
|
-
] }),
|
|
1826
|
-
/* @__PURE__ */ jsxs(Text, { size: "xs", fw: 600, c: getMantineRateColor(successRate), children: [
|
|
1827
|
-
successRate,
|
|
1828
|
-
"% Success Rate"
|
|
1829
|
-
] })
|
|
1830
|
-
] });
|
|
1831
|
-
}
|
|
1832
|
-
function TimelineAxis({ totalDuration }) {
|
|
1833
|
-
const markers = [
|
|
1834
|
-
{ position: 0, time: 0 },
|
|
1835
|
-
{ position: 25, time: totalDuration * 0.25 },
|
|
1836
|
-
{ position: 50, time: totalDuration * 0.5 },
|
|
1837
|
-
{ position: 75, time: totalDuration * 0.75 },
|
|
1838
|
-
{ position: 100, time: totalDuration }
|
|
1839
|
-
];
|
|
1840
|
-
return /* @__PURE__ */ jsx(
|
|
1841
|
-
Box,
|
|
1842
|
-
{
|
|
1843
|
-
style: {
|
|
1844
|
-
position: "relative",
|
|
1845
|
-
height: 20
|
|
1846
|
-
},
|
|
1847
|
-
children: markers.map((marker, idx) => /* @__PURE__ */ jsx(
|
|
1848
|
-
Box,
|
|
1849
|
-
{
|
|
1850
|
-
style: {
|
|
1851
|
-
position: "absolute",
|
|
1852
|
-
left: `${marker.position}%`,
|
|
1853
|
-
transform: marker.position === 100 ? "translateX(-100%)" : marker.position === 0 ? "none" : "translateX(-50%)",
|
|
1854
|
-
top: 4
|
|
1855
|
-
},
|
|
1856
|
-
children: /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: formatDuration(marker.time) })
|
|
1857
|
-
},
|
|
1858
|
-
idx
|
|
1859
|
-
))
|
|
1860
|
-
}
|
|
1861
|
-
);
|
|
1862
|
-
}
|
|
1863
|
-
function TimelineContainer({ executionStart, executionEnd, children }) {
|
|
1864
|
-
const totalDuration = executionEnd - executionStart;
|
|
1865
|
-
return /* @__PURE__ */ jsxs(
|
|
1866
|
-
Box,
|
|
1867
|
-
{
|
|
1868
|
-
style: {
|
|
1869
|
-
borderBottom: "1px solid var(--color-border)",
|
|
1870
|
-
backgroundColor: "var(--color-background)",
|
|
1871
|
-
padding: "var(--mantine-spacing-xs)"
|
|
1872
|
-
},
|
|
1873
|
-
children: [
|
|
1874
|
-
/* @__PURE__ */ jsx(
|
|
1875
|
-
Box,
|
|
1876
|
-
{
|
|
1877
|
-
style: {
|
|
1878
|
-
position: "relative"
|
|
1879
|
-
},
|
|
1880
|
-
children: /* @__PURE__ */ jsx(Box, { style: { position: "relative", zIndex: 1 }, children })
|
|
1881
|
-
}
|
|
1882
|
-
),
|
|
1883
|
-
/* @__PURE__ */ jsx(Box, { style: { paddingLeft: TIMELINE_CONSTANTS.LABEL_WIDTH + 12, paddingRight: 16 }, children: /* @__PURE__ */ jsx(TimelineAxis, { totalDuration }) })
|
|
1884
|
-
]
|
|
1885
|
-
}
|
|
1886
|
-
);
|
|
1887
|
-
}
|
|
1888
|
-
function TimelineBar({
|
|
1889
|
-
startTime,
|
|
1890
|
-
endTime,
|
|
1891
|
-
executionStart,
|
|
1892
|
-
executionEnd,
|
|
1893
|
-
status,
|
|
1894
|
-
label,
|
|
1895
|
-
onClick,
|
|
1896
|
-
isSelected = false,
|
|
1897
|
-
hasSelection = false
|
|
1898
|
-
}) {
|
|
1899
|
-
const colors = getStatusColors(status);
|
|
1900
|
-
const { left, width } = calculateBarPosition(startTime, endTime, executionStart, executionEnd);
|
|
1901
|
-
const opacity = hasSelection && !isSelected ? 0.5 : 1;
|
|
1902
|
-
return /* @__PURE__ */ jsx(
|
|
1903
|
-
Box,
|
|
1904
|
-
{
|
|
1905
|
-
style: {
|
|
1906
|
-
position: "absolute",
|
|
1907
|
-
left: `${left}%`,
|
|
1908
|
-
width: `${width}%`,
|
|
1909
|
-
top: 4,
|
|
1910
|
-
height: TIMELINE_CONSTANTS.BAR_HEIGHT / 2,
|
|
1911
|
-
backgroundColor: colors.color,
|
|
1912
|
-
opacity,
|
|
1913
|
-
borderRadius: 4,
|
|
1914
|
-
cursor: onClick ? "pointer" : "default",
|
|
1915
|
-
display: "flex",
|
|
1916
|
-
alignItems: "center",
|
|
1917
|
-
justifyContent: "center",
|
|
1918
|
-
overflow: "hidden"
|
|
1919
|
-
},
|
|
1920
|
-
onClick,
|
|
1921
|
-
children: label && /* @__PURE__ */ jsx(Text, { size: "xs", c: "white", style: { whiteSpace: "nowrap" }, children: label })
|
|
1922
|
-
}
|
|
1923
|
-
);
|
|
1924
|
-
}
|
|
1925
|
-
function TimelineRow({
|
|
1926
|
-
label,
|
|
1927
|
-
bars,
|
|
1928
|
-
executionStart,
|
|
1929
|
-
executionEnd,
|
|
1930
|
-
indent = 0,
|
|
1931
|
-
selectedNodeId
|
|
1932
|
-
}) {
|
|
1933
|
-
const labelMatch = label.match(/^(.+?)\s*\((.+?)\)$/);
|
|
1934
|
-
const labelName = labelMatch ? labelMatch[1] : label;
|
|
1935
|
-
const labelDuration = labelMatch ? labelMatch[2] : null;
|
|
1936
|
-
const statusColor = bars.length > 0 ? getStatusColors(bars[0].status).color : "var(--color-text-dimmed)";
|
|
1937
|
-
const hasSelection = selectedNodeId !== null && selectedNodeId !== void 0;
|
|
1938
|
-
return /* @__PURE__ */ jsxs(
|
|
1939
|
-
Box,
|
|
1940
|
-
{
|
|
1941
|
-
style: {
|
|
1942
|
-
display: "flex",
|
|
1943
|
-
gap: 0,
|
|
1944
|
-
height: TIMELINE_CONSTANTS.BAR_HEIGHT
|
|
1945
|
-
// paddingLeft: indent * TIMELINE_CONSTANTS.INDENT_SIZE
|
|
1946
|
-
},
|
|
1947
|
-
children: [
|
|
1948
|
-
/* @__PURE__ */ jsxs(
|
|
1949
|
-
Box,
|
|
1950
|
-
{
|
|
1951
|
-
style: {
|
|
1952
|
-
height: TIMELINE_CONSTANTS.BAR_HEIGHT,
|
|
1953
|
-
width: TIMELINE_CONSTANTS.LABEL_WIDTH,
|
|
1954
|
-
flexShrink: 0,
|
|
1955
|
-
display: "flex",
|
|
1956
|
-
alignItems: "center",
|
|
1957
|
-
gap: 6,
|
|
1958
|
-
paddingRight: 12,
|
|
1959
|
-
paddingLeft: 8 + indent * TIMELINE_CONSTANTS.INDENT_SIZE,
|
|
1960
|
-
// Indent only the label, not the timeline bars
|
|
1961
|
-
overflow: "hidden"
|
|
1962
|
-
},
|
|
1963
|
-
children: [
|
|
1964
|
-
/* @__PURE__ */ jsx(
|
|
1965
|
-
Box,
|
|
1966
|
-
{
|
|
1967
|
-
style: {
|
|
1968
|
-
width: 6,
|
|
1969
|
-
height: 6,
|
|
1970
|
-
borderRadius: "50%",
|
|
1971
|
-
backgroundColor: statusColor,
|
|
1972
|
-
flexShrink: 0
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
),
|
|
1976
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", truncate: true, style: { flexShrink: 1, minWidth: 0 }, children: labelName }),
|
|
1977
|
-
labelDuration && /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", ff: "monospace", style: { flexShrink: 0 }, children: [
|
|
1978
|
-
"(",
|
|
1979
|
-
labelDuration,
|
|
1980
|
-
")"
|
|
1981
|
-
] })
|
|
1982
|
-
]
|
|
1983
|
-
}
|
|
1984
|
-
),
|
|
1985
|
-
/* @__PURE__ */ jsx(
|
|
1986
|
-
Box,
|
|
1987
|
-
{
|
|
1988
|
-
style: {
|
|
1989
|
-
position: "relative",
|
|
1990
|
-
flex: 1,
|
|
1991
|
-
height: TIMELINE_CONSTANTS.BAR_HEIGHT,
|
|
1992
|
-
marginLeft: 12,
|
|
1993
|
-
marginRight: 16
|
|
1994
|
-
// Right margin to match grid padding
|
|
1995
|
-
},
|
|
1996
|
-
children: bars.map((bar, idx) => {
|
|
1997
|
-
const isSelected = bar.nodeId !== void 0 && bar.nodeId === selectedNodeId;
|
|
1998
|
-
return /* @__PURE__ */ jsx(
|
|
1999
|
-
TimelineBar,
|
|
2000
|
-
{
|
|
2001
|
-
...bar,
|
|
2002
|
-
executionStart,
|
|
2003
|
-
executionEnd,
|
|
2004
|
-
isSelected,
|
|
2005
|
-
hasSelection
|
|
2006
|
-
},
|
|
2007
|
-
idx
|
|
2008
|
-
);
|
|
2009
|
-
})
|
|
2010
|
-
}
|
|
2011
|
-
)
|
|
2012
|
-
]
|
|
2013
|
-
}
|
|
2014
|
-
);
|
|
2015
|
-
}
|
|
2016
|
-
var VisualizerContainer = ({ children, handleContainerClick, height }) => {
|
|
2017
|
-
const containerHeight = height ?? CONTAINER_CONSTANTS.CONTAINER_HEIGHT;
|
|
2018
|
-
return /* @__PURE__ */ jsx(
|
|
2019
|
-
Box,
|
|
2020
|
-
{
|
|
2021
|
-
bg: "var(--color-background)",
|
|
2022
|
-
onClick: handleContainerClick,
|
|
2023
|
-
style: {
|
|
2024
|
-
// borderBottom: '1px solid var(--color-border)',
|
|
2025
|
-
// borderRadius: 'var(--mantine-radius-default)'
|
|
2026
|
-
},
|
|
2027
|
-
children: /* @__PURE__ */ jsx(
|
|
2028
|
-
"div",
|
|
2029
|
-
{
|
|
2030
|
-
style: {
|
|
2031
|
-
width: "100%",
|
|
2032
|
-
height: `${containerHeight}px`,
|
|
2033
|
-
overflow: "hidden"
|
|
2034
|
-
},
|
|
2035
|
-
children
|
|
2036
|
-
}
|
|
2037
|
-
)
|
|
2038
|
-
}
|
|
2039
|
-
);
|
|
2040
|
-
};
|
|
2041
|
-
var EmptyVisualizer = ({ message = "Select an execution to view timeline" }) => {
|
|
2042
|
-
return /* @__PURE__ */ jsx(
|
|
2043
|
-
Box,
|
|
2044
|
-
{
|
|
2045
|
-
h: CONTAINER_CONSTANTS.CONTAINER_HEIGHT,
|
|
2046
|
-
bg: "var(--color-background)",
|
|
2047
|
-
style: {
|
|
2048
|
-
borderBottom: "1px solid var(--color-border)",
|
|
2049
|
-
borderRadius: "var(--mantine-radius-default)",
|
|
2050
|
-
display: "flex",
|
|
2051
|
-
alignItems: "center",
|
|
2052
|
-
justifyContent: "center"
|
|
2053
|
-
},
|
|
2054
|
-
children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: message })
|
|
2055
|
-
}
|
|
2056
|
-
);
|
|
2057
|
-
};
|
|
2058
|
-
var DOMAIN_COLORS = {
|
|
2059
|
-
primary: "var(--color-primary)",
|
|
2060
|
-
agent: "#8b5cf6",
|
|
2061
|
-
workflow: "#3b82f6",
|
|
2062
|
-
trigger: "#f97316",
|
|
2063
|
-
integration: "#14b8a6",
|
|
2064
|
-
approval: "#f59e0b"
|
|
2065
|
-
};
|
|
2066
|
-
function fill(color, isDark) {
|
|
2067
|
-
return isDark ? `color-mix(in srgb, ${color} 80%, black)` : `color-mix(in srgb, ${color} 60%, white)`;
|
|
2068
|
-
}
|
|
2069
|
-
function glow(color) {
|
|
2070
|
-
return `color-mix(in srgb, ${color} 40%, transparent)`;
|
|
2071
|
-
}
|
|
2072
|
-
function useGraphTheme() {
|
|
2073
|
-
const isDark = useComputedColorScheme("dark") === "dark";
|
|
2074
|
-
return useMemo(
|
|
2075
|
-
() => ({
|
|
2076
|
-
primary: fill(DOMAIN_COLORS.primary, isDark),
|
|
2077
|
-
primaryGlow: glow(DOMAIN_COLORS.primary),
|
|
2078
|
-
agent: fill(DOMAIN_COLORS.agent, isDark),
|
|
2079
|
-
workflow: fill(DOMAIN_COLORS.workflow, isDark),
|
|
2080
|
-
trigger: fill(DOMAIN_COLORS.trigger, isDark),
|
|
2081
|
-
integration: fill(DOMAIN_COLORS.integration, isDark),
|
|
2082
|
-
approval: fill(DOMAIN_COLORS.approval, isDark),
|
|
2083
|
-
agentGlow: glow(DOMAIN_COLORS.agent),
|
|
2084
|
-
workflowGlow: glow(DOMAIN_COLORS.workflow),
|
|
2085
|
-
triggerGlow: glow(DOMAIN_COLORS.trigger),
|
|
2086
|
-
integrationGlow: glow(DOMAIN_COLORS.integration),
|
|
2087
|
-
approvalGlow: glow(DOMAIN_COLORS.approval),
|
|
2088
|
-
edgeTriggers: fill(DOMAIN_COLORS.workflow, isDark),
|
|
2089
|
-
edgeUses: fill(DOMAIN_COLORS.integration, isDark),
|
|
2090
|
-
edgeApproval: fill(DOMAIN_COLORS.approval, isDark),
|
|
2091
|
-
edgeTriggersGlow: glow(DOMAIN_COLORS.workflow),
|
|
2092
|
-
edgeUsesGlow: glow(DOMAIN_COLORS.integration),
|
|
2093
|
-
edgeApprovalGlow: glow(DOMAIN_COLORS.approval)
|
|
2094
|
-
}),
|
|
2095
|
-
[isDark]
|
|
2096
|
-
);
|
|
2097
|
-
}
|
|
2098
|
-
function getGraphBackgroundStyles(isDark) {
|
|
2099
|
-
const pct = isDark ? 5 : 3;
|
|
2100
|
-
const glowPct = isDark ? 8 : 5;
|
|
2101
|
-
const mix = (percent) => `color-mix(in srgb, var(--color-primary) ${percent}%, transparent)`;
|
|
2102
|
-
return {
|
|
2103
|
-
backgroundImage: `
|
|
2104
|
-
linear-gradient(${mix(pct)} 1px, transparent 1px),
|
|
2105
|
-
linear-gradient(90deg, ${mix(pct)} 1px, transparent 1px),
|
|
2106
|
-
radial-gradient(ellipse at 50% 50%, ${mix(glowPct)} 0%, transparent 70%)
|
|
2107
|
-
`,
|
|
2108
|
-
backgroundColor: "color-mix(in srgb, var(--color-background) 50%, var(--glass-background))",
|
|
2109
|
-
backdropFilter: "var(--glass-blur)",
|
|
2110
|
-
backgroundSize: "40px 40px, 40px 40px, 100% 100%"
|
|
2111
|
-
};
|
|
2112
|
-
}
|
|
2113
|
-
function useGraphBackgroundStyles() {
|
|
2114
|
-
const isDark = useComputedColorScheme("dark") === "dark";
|
|
2115
|
-
return useMemo(() => getGraphBackgroundStyles(isDark), [isDark]);
|
|
2116
|
-
}
|
|
2117
|
-
function GraphContainer({ children, height = 600 }) {
|
|
2118
|
-
const backgroundStyles = useGraphBackgroundStyles();
|
|
2119
|
-
return /* @__PURE__ */ jsx(
|
|
2120
|
-
Box,
|
|
2121
|
-
{
|
|
2122
|
-
style: {
|
|
2123
|
-
width: "100%",
|
|
2124
|
-
height,
|
|
2125
|
-
border: "1px solid var(--color-border)",
|
|
2126
|
-
borderRadius: "var(--mantine-radius-md)",
|
|
2127
|
-
overflow: "hidden",
|
|
2128
|
-
position: "relative",
|
|
2129
|
-
...backgroundStyles
|
|
2130
|
-
},
|
|
2131
|
-
children
|
|
2132
|
-
}
|
|
2133
|
-
);
|
|
2134
|
-
}
|
|
2135
|
-
function GraphBackground() {
|
|
2136
|
-
return null;
|
|
2137
|
-
}
|
|
2138
|
-
function LegendDot({ color }) {
|
|
2139
|
-
return /* @__PURE__ */ jsx(
|
|
2140
|
-
Box,
|
|
2141
|
-
{
|
|
2142
|
-
style: {
|
|
2143
|
-
width: 10,
|
|
2144
|
-
height: 10,
|
|
2145
|
-
borderRadius: "50%",
|
|
2146
|
-
backgroundColor: `var(--mantine-color-${color}-5)`
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
);
|
|
2150
|
-
}
|
|
2151
|
-
function LegendLine({ color }) {
|
|
2152
|
-
return /* @__PURE__ */ jsx(
|
|
2153
|
-
Box,
|
|
2154
|
-
{
|
|
2155
|
-
style: {
|
|
2156
|
-
width: 20,
|
|
2157
|
-
height: 3,
|
|
2158
|
-
borderRadius: 2,
|
|
2159
|
-
background: `linear-gradient(90deg, var(--mantine-color-${color}-5), var(--mantine-color-${color}-6))`
|
|
2160
|
-
}
|
|
2161
|
-
}
|
|
2162
|
-
);
|
|
2163
|
-
}
|
|
2164
|
-
function GraphLegend({ title = "Legend", items, position = "bottom-right" }) {
|
|
2165
|
-
const margins = {
|
|
2166
|
-
marginBottom: position.includes("bottom") ? 12 : void 0,
|
|
2167
|
-
marginTop: position.includes("top") ? 12 : void 0,
|
|
2168
|
-
marginRight: position.includes("right") ? 60 : 12,
|
|
2169
|
-
marginLeft: position.includes("left") ? 12 : void 0
|
|
2170
|
-
};
|
|
2171
|
-
return /* @__PURE__ */ jsx(Panel, { position, style: margins, children: /* @__PURE__ */ jsx(
|
|
2172
|
-
Card,
|
|
2173
|
-
{
|
|
2174
|
-
p: "xs",
|
|
2175
|
-
className: Graph_module_css_default.legend,
|
|
2176
|
-
style: {
|
|
2177
|
-
backgroundColor: "var(--glass-background)"
|
|
2178
|
-
},
|
|
2179
|
-
children: /* @__PURE__ */ jsxs(Group, { children: [
|
|
2180
|
-
/* @__PURE__ */ jsx(
|
|
2181
|
-
Text,
|
|
2182
|
-
{
|
|
2183
|
-
size: "xs",
|
|
2184
|
-
fw: 600,
|
|
2185
|
-
style: {
|
|
2186
|
-
letterSpacing: "0.5px",
|
|
2187
|
-
textTransform: "uppercase",
|
|
2188
|
-
fontFamily: "var(--mantine-font-family-headings)"
|
|
2189
|
-
},
|
|
2190
|
-
children: title
|
|
2191
|
-
}
|
|
2192
|
-
),
|
|
2193
|
-
items.map((item) => /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
2194
|
-
item.type === "line" ? /* @__PURE__ */ jsx(LegendLine, { color: item.color }) : /* @__PURE__ */ jsx(LegendDot, { color: item.color }),
|
|
2195
|
-
/* @__PURE__ */ jsx(Text, { size: "xs", children: item.label })
|
|
2196
|
-
] }, item.label))
|
|
2197
|
-
] })
|
|
2198
|
-
}
|
|
2199
|
-
) });
|
|
2200
|
-
}
|
|
2201
|
-
function GraphFitViewButton({ padding = 0.2, variant = "reactflow", duration = 300 }) {
|
|
2202
|
-
const { fitView } = useReactFlow();
|
|
2203
|
-
const handleFitView = () => {
|
|
2204
|
-
fitView({ padding, duration });
|
|
2205
|
-
};
|
|
2206
|
-
if (variant === "mantine") {
|
|
2207
|
-
return /* @__PURE__ */ jsx(
|
|
2208
|
-
ActionIcon,
|
|
2209
|
-
{
|
|
2210
|
-
onClick: handleFitView,
|
|
2211
|
-
variant: "default",
|
|
2212
|
-
size: "lg",
|
|
2213
|
-
title: "Fit view",
|
|
2214
|
-
style: {
|
|
2215
|
-
position: "absolute",
|
|
2216
|
-
bottom: 12,
|
|
2217
|
-
right: 12,
|
|
2218
|
-
zIndex: 5,
|
|
2219
|
-
background: "var(--color-surface)",
|
|
2220
|
-
border: "1px solid var(--color-border)"
|
|
2221
|
-
},
|
|
2222
|
-
children: /* @__PURE__ */ jsx(IconFocus2, { size: 18 })
|
|
2223
|
-
}
|
|
2224
|
-
);
|
|
2225
|
-
}
|
|
2226
|
-
return /* @__PURE__ */ jsx(Controls, { position: "bottom-right", showZoom: false, showFitView: false, showInteractive: false, children: /* @__PURE__ */ jsx(
|
|
2227
|
-
"button",
|
|
2228
|
-
{
|
|
2229
|
-
className: "react-flow__controls-button react-flow__controls-fitview",
|
|
2230
|
-
onClick: handleFitView,
|
|
2231
|
-
title: "Fit view",
|
|
2232
|
-
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { d: "M8 3H5C3.89 3 3 3.89 3 5V8H5V5H8V3M19 3H16V5H19V8H21V5C21 3.89 20.11 3 19 3M19 19H16V21H19C20.11 21 21 20.11 21 19V16H19V19M5 19H8V21H5C3.89 21 3 20.11 3 19V16H5V19Z" }) })
|
|
2233
|
-
}
|
|
2234
|
-
) });
|
|
2235
|
-
}
|
|
2236
|
-
function GraphFitViewHandler({
|
|
2237
|
-
trigger,
|
|
2238
|
-
padding = 0.15,
|
|
2239
|
-
duration = 300,
|
|
2240
|
-
delay = 250
|
|
2241
|
-
}) {
|
|
2242
|
-
const { fitView } = useReactFlow();
|
|
2243
|
-
useEffect(() => {
|
|
2244
|
-
if (trigger && trigger > 0) {
|
|
2245
|
-
const timeout = setTimeout(() => {
|
|
2246
|
-
fitView({ padding, duration });
|
|
2247
|
-
}, delay);
|
|
2248
|
-
return () => clearTimeout(timeout);
|
|
2249
|
-
}
|
|
2250
|
-
return void 0;
|
|
2251
|
-
}, [trigger, fitView, padding, duration, delay]);
|
|
2252
|
-
return null;
|
|
2253
|
-
}
|
|
2254
|
-
var colorClassMap = {
|
|
2255
|
-
violet: Graph_module_css_default.nodeAgent,
|
|
2256
|
-
blue: Graph_module_css_default.nodeWorkflow,
|
|
2257
|
-
orange: Graph_module_css_default.nodeTrigger,
|
|
2258
|
-
teal: Graph_module_css_default.nodeIntegration,
|
|
2259
|
-
gray: Graph_module_css_default.nodeExternal,
|
|
2260
|
-
yellow: Graph_module_css_default.nodeHuman
|
|
2261
|
-
};
|
|
2262
|
-
var BaseNode = memo(function BaseNode2({
|
|
2263
|
-
children,
|
|
2264
|
-
color,
|
|
2265
|
-
selected = false,
|
|
2266
|
-
highlighted = false,
|
|
2267
|
-
width = 220,
|
|
2268
|
-
className = "",
|
|
2269
|
-
handleDirection = "horizontal",
|
|
2270
|
-
showSourceHandle = true,
|
|
2271
|
-
showTargetHandle = true
|
|
2272
|
-
}) {
|
|
2273
|
-
const typeClass = colorClassMap[color] || Graph_module_css_default.nodeAgent;
|
|
2274
|
-
const highlightClass = highlighted ? Graph_module_css_default.nodeHighlighted : "";
|
|
2275
|
-
const targetPosition = handleDirection === "horizontal" ? Position.Left : Position.Top;
|
|
2276
|
-
const sourcePosition = handleDirection === "horizontal" ? Position.Right : Position.Bottom;
|
|
2277
|
-
return /* @__PURE__ */ jsxs("div", { className: `${Graph_module_css_default.node} ${typeClass} ${highlightClass} ${className}`, children: [
|
|
2278
|
-
showTargetHandle && /* @__PURE__ */ jsx(Handle, { type: "target", position: targetPosition, style: { opacity: 0, pointerEvents: "none" } }),
|
|
2279
|
-
showSourceHandle && /* @__PURE__ */ jsx(Handle, { type: "source", position: sourcePosition, style: { opacity: 0, pointerEvents: "none" } }),
|
|
2280
|
-
/* @__PURE__ */ jsx(
|
|
2281
|
-
Paper,
|
|
2282
|
-
{
|
|
2283
|
-
p: "sm",
|
|
2284
|
-
className: `${Graph_module_css_default.nodeCard} ${selected ? Graph_module_css_default.nodeCardSelected : ""}`,
|
|
2285
|
-
style: {
|
|
2286
|
-
width,
|
|
2287
|
-
border: `1px solid ${selected ? `var(--mantine-color-${color}-5)` : "var(--color-border)"}`,
|
|
2288
|
-
backgroundColor: "var(--color-surface)",
|
|
2289
|
-
cursor: "pointer",
|
|
2290
|
-
boxShadow: selected ? `0 0 15px var(--mantine-color-${color}-5), 0 4px 12px rgba(0,0,0,0.1)` : "0 2px 8px rgba(0,0,0,0.08)"
|
|
2291
|
-
},
|
|
2292
|
-
children
|
|
2293
|
-
}
|
|
2294
|
-
)
|
|
2295
|
-
] });
|
|
2296
|
-
});
|
|
2297
|
-
var BaseEdge = memo(function BaseEdge2({
|
|
2298
|
-
id,
|
|
2299
|
-
sourceX,
|
|
2300
|
-
sourceY,
|
|
2301
|
-
targetX,
|
|
2302
|
-
targetY,
|
|
2303
|
-
sourcePosition,
|
|
2304
|
-
targetPosition,
|
|
2305
|
-
color,
|
|
2306
|
-
glowColor,
|
|
2307
|
-
label,
|
|
2308
|
-
selected,
|
|
2309
|
-
animated = true,
|
|
2310
|
-
dimmed = false,
|
|
2311
|
-
edgeIndex = 0,
|
|
2312
|
-
totalEdges = 1
|
|
2313
|
-
}) {
|
|
2314
|
-
const edgeSpacing = 10;
|
|
2315
|
-
const baseOffset = 15;
|
|
2316
|
-
const offsetAmount = totalEdges > 1 ? (edgeIndex - (totalEdges - 1) / 2) * edgeSpacing : 0;
|
|
2317
|
-
const [edgePath, labelX, labelY] = getSmoothStepPath({
|
|
2318
|
-
sourceX,
|
|
2319
|
-
sourceY: sourceY + offsetAmount,
|
|
2320
|
-
sourcePosition,
|
|
2321
|
-
targetX,
|
|
2322
|
-
targetY: targetY + offsetAmount,
|
|
2323
|
-
targetPosition,
|
|
2324
|
-
borderRadius: 8,
|
|
2325
|
-
offset: baseOffset + Math.abs(offsetAmount)
|
|
2326
|
-
// Stagger the turn points horizontally
|
|
2327
|
-
});
|
|
2328
|
-
const edgeOpacity = dimmed ? 0.25 : 1;
|
|
2329
|
-
return /* @__PURE__ */ jsxs("g", { style: { opacity: edgeOpacity }, children: [
|
|
2330
|
-
/* @__PURE__ */ jsx(
|
|
2331
|
-
"path",
|
|
2332
|
-
{
|
|
2333
|
-
d: edgePath,
|
|
2334
|
-
fill: "none",
|
|
2335
|
-
stroke: color,
|
|
2336
|
-
strokeWidth: selected ? 8 : 6,
|
|
2337
|
-
strokeOpacity: 0.2,
|
|
2338
|
-
style: { filter: "blur(4px)" }
|
|
2339
|
-
}
|
|
2340
|
-
),
|
|
2341
|
-
animated && !dimmed && /* @__PURE__ */ jsx(
|
|
2342
|
-
"path",
|
|
2343
|
-
{
|
|
2344
|
-
d: edgePath,
|
|
2345
|
-
fill: "none",
|
|
2346
|
-
stroke: color,
|
|
2347
|
-
strokeWidth: selected ? 4 : 3,
|
|
2348
|
-
strokeOpacity: 0.3,
|
|
2349
|
-
strokeDasharray: "12 6",
|
|
2350
|
-
className: Graph_module_css_default.edgeAnimated,
|
|
2351
|
-
style: { filter: `drop-shadow(0 0 3px ${glowColor})` }
|
|
2352
|
-
}
|
|
2353
|
-
),
|
|
2354
|
-
/* @__PURE__ */ jsx(
|
|
2355
|
-
BaseEdge$1,
|
|
2356
|
-
{
|
|
2357
|
-
id,
|
|
2358
|
-
path: edgePath,
|
|
2359
|
-
style: {
|
|
2360
|
-
stroke: color,
|
|
2361
|
-
strokeWidth: selected ? 3 : 2,
|
|
2362
|
-
filter: dimmed ? "none" : selected ? `drop-shadow(0 0 6px ${glowColor})` : `drop-shadow(0 0 2px ${glowColor})`
|
|
2363
|
-
}
|
|
2364
|
-
}
|
|
2365
|
-
),
|
|
2366
|
-
animated && !dimmed && /* @__PURE__ */ jsx(
|
|
2367
|
-
"path",
|
|
2368
|
-
{
|
|
2369
|
-
d: edgePath,
|
|
2370
|
-
fill: "none",
|
|
2371
|
-
stroke: "white",
|
|
2372
|
-
strokeWidth: 2,
|
|
2373
|
-
strokeOpacity: 0.6,
|
|
2374
|
-
strokeDasharray: "4 20",
|
|
2375
|
-
className: Graph_module_css_default.edgeAnimated,
|
|
2376
|
-
style: { filter: "drop-shadow(0 0 2px white)" }
|
|
2377
|
-
}
|
|
2378
|
-
),
|
|
2379
|
-
label && /* @__PURE__ */ jsx(EdgeLabelRenderer, { children: /* @__PURE__ */ jsx(
|
|
2380
|
-
"div",
|
|
2381
|
-
{
|
|
2382
|
-
className: `${Graph_module_css_default.edgeLabel} ${dimmed ? Graph_module_css_default.edgeLabelDimmed : ""}`,
|
|
2383
|
-
style: {
|
|
2384
|
-
position: "absolute",
|
|
2385
|
-
transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)`,
|
|
2386
|
-
pointerEvents: "all",
|
|
2387
|
-
fontSize: 10,
|
|
2388
|
-
fontWeight: 600,
|
|
2389
|
-
textTransform: "uppercase",
|
|
2390
|
-
letterSpacing: "0.5px",
|
|
2391
|
-
padding: "3px 8px",
|
|
2392
|
-
borderRadius: 6,
|
|
2393
|
-
background: `linear-gradient(135deg, ${color}, ${color}dd)`,
|
|
2394
|
-
color: "var(--color-text)",
|
|
2395
|
-
boxShadow: "0 2px 8px rgba(0,0,0,0.2)",
|
|
2396
|
-
opacity: dimmed ? 0.25 : 1
|
|
2397
|
-
},
|
|
2398
|
-
children: label
|
|
2399
|
-
}
|
|
2400
|
-
) })
|
|
2401
|
-
] });
|
|
2402
|
-
});
|
|
2403
|
-
var UnifiedWorkflowNode = memo(function UnifiedWorkflowNode2({ data }) {
|
|
2404
|
-
const selected = data.isSelected ?? false;
|
|
2405
|
-
const primaryColor = data.isEntryPoint ? "teal" : data.isEndNode ? "violet" : data.isConditional ? "orange" : "blue";
|
|
2406
|
-
const statusColors = data.executionStatus ? STATUS_COLORS[data.executionStatus] : void 0;
|
|
2407
|
-
const showExecutionStatus = data.isExecuted && data.executionStatus;
|
|
2408
|
-
return /* @__PURE__ */ jsx(
|
|
2409
|
-
BaseNode,
|
|
2410
|
-
{
|
|
2411
|
-
color: primaryColor,
|
|
2412
|
-
selected,
|
|
2413
|
-
highlighted: Boolean(data.highlighted),
|
|
2414
|
-
width: 220,
|
|
2415
|
-
className: data.isDimmed ? "dimmed-node" : "",
|
|
2416
|
-
showSourceHandle: !data.isEndNode,
|
|
2417
|
-
children: /* @__PURE__ */ jsx("div", { style: { opacity: data.isDimmed ? 0.3 : 1 }, children: /* @__PURE__ */ jsxs(Stack, { gap: 6, children: [
|
|
2418
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, lineClamp: 1, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: data.name }),
|
|
2419
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
2420
|
-
data.isEntryPoint && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "teal", leftSection: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 10 }), children: "Entry" }),
|
|
2421
|
-
data.isEndNode && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "violet", leftSection: /* @__PURE__ */ jsx(IconPlayerStop, { size: 10 }), children: "End" }),
|
|
2422
|
-
data.isConditional && /* @__PURE__ */ jsxs(Badge, { size: "xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ jsx(IconArrowsSplit, { size: 10 }), children: [
|
|
2423
|
-
data.routeCount,
|
|
2424
|
-
" routes"
|
|
2425
|
-
] }),
|
|
2426
|
-
!data.isEntryPoint && !data.isEndNode && !data.isConditional && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ jsx(IconSquare, { size: 10 }), children: "Step" }),
|
|
2427
|
-
/* @__PURE__ */ jsx(Text, { size: "xs", ff: "monospace", c: "dimmed", truncate: true, children: data.id })
|
|
2428
|
-
] }),
|
|
2429
|
-
!data.isDimmed && data.description && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", lineClamp: 2, children: data.description }),
|
|
2430
|
-
showExecutionStatus && statusColors && /* @__PURE__ */ jsx(Box, { mt: 4, children: /* @__PURE__ */ jsxs(Group, { gap: 8, align: "center", children: [
|
|
2431
|
-
/* @__PURE__ */ jsx(Box, { children: getStatusIcon({
|
|
2432
|
-
status: data.executionStatus,
|
|
2433
|
-
colors: { icon: statusColors.color },
|
|
2434
|
-
iconSize: 16,
|
|
2435
|
-
spinDuration: "1s"
|
|
2436
|
-
}) }),
|
|
2437
|
-
/* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: statusColors.badge, children: data.executionStatus }),
|
|
2438
|
-
data.duration !== void 0 && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: formatDuration(data.duration) })
|
|
2439
|
-
] }) })
|
|
2440
|
-
] }) })
|
|
2441
|
-
}
|
|
2442
|
-
);
|
|
2443
|
-
});
|
|
2444
|
-
var UnifiedWorkflowEdge = memo(function UnifiedWorkflowEdge2({
|
|
2445
|
-
id,
|
|
2446
|
-
sourceX,
|
|
2447
|
-
sourceY,
|
|
2448
|
-
targetX,
|
|
2449
|
-
targetY,
|
|
2450
|
-
selected,
|
|
2451
|
-
data
|
|
2452
|
-
}) {
|
|
2453
|
-
const colors = useGraphTheme();
|
|
2454
|
-
const edgeType = data?.edgeType || "linear";
|
|
2455
|
-
const isDimmed = data?.isDimmed ?? false;
|
|
2456
|
-
const isAnimated = data?.isAnimated ?? false;
|
|
2457
|
-
let edgeColor;
|
|
2458
|
-
let glowColor;
|
|
2459
|
-
let label;
|
|
2460
|
-
switch (edgeType) {
|
|
2461
|
-
case "conditional":
|
|
2462
|
-
edgeColor = colors.trigger;
|
|
2463
|
-
glowColor = colors.triggerGlow;
|
|
2464
|
-
label = data?.label || "route";
|
|
2465
|
-
break;
|
|
2466
|
-
case "default":
|
|
2467
|
-
edgeColor = colors.integration;
|
|
2468
|
-
glowColor = colors.integrationGlow;
|
|
2469
|
-
label = data?.label || "default";
|
|
2470
|
-
break;
|
|
2471
|
-
case "linear":
|
|
2472
|
-
default:
|
|
2473
|
-
edgeColor = colors.workflow;
|
|
2474
|
-
glowColor = colors.workflowGlow;
|
|
2475
|
-
label = void 0;
|
|
2476
|
-
break;
|
|
2477
|
-
}
|
|
2478
|
-
return /* @__PURE__ */ jsx(
|
|
2479
|
-
BaseEdge,
|
|
2480
|
-
{
|
|
2481
|
-
id,
|
|
2482
|
-
sourceX,
|
|
2483
|
-
sourceY,
|
|
2484
|
-
targetX,
|
|
2485
|
-
targetY,
|
|
2486
|
-
sourcePosition: Position.Right,
|
|
2487
|
-
targetPosition: Position.Left,
|
|
2488
|
-
color: edgeColor,
|
|
2489
|
-
glowColor,
|
|
2490
|
-
label,
|
|
2491
|
-
selected,
|
|
2492
|
-
animated: isAnimated,
|
|
2493
|
-
dimmed: isDimmed
|
|
2494
|
-
}
|
|
2495
|
-
);
|
|
2496
|
-
});
|
|
2497
|
-
var nodeTypes = {
|
|
2498
|
-
unifiedWorkflowNode: UnifiedWorkflowNode
|
|
2499
|
-
};
|
|
2500
|
-
var edgeTypes = {
|
|
2501
|
-
unifiedWorkflowEdge: UnifiedWorkflowEdge
|
|
2502
|
-
};
|
|
2503
|
-
var NODE_LEGEND_ITEMS = [
|
|
2504
|
-
{ color: "teal", label: "Entry" },
|
|
2505
|
-
{ color: "blue", label: "Step" },
|
|
2506
|
-
{ color: "orange", label: "Conditional" },
|
|
2507
|
-
{ color: "violet", label: "End" }
|
|
2508
|
-
];
|
|
2509
|
-
var EDGE_LEGEND_ITEMS = [
|
|
2510
|
-
{ color: "blue", label: "Next", type: "line" },
|
|
2511
|
-
{ color: "orange", label: "Route", type: "line" },
|
|
2512
|
-
{ color: "teal", label: "Default", type: "line" }
|
|
2513
|
-
];
|
|
2514
|
-
function UnifiedWorkflowGraph({
|
|
2515
|
-
resourceDefinition,
|
|
2516
|
-
executionLogs,
|
|
2517
|
-
selectedStepId,
|
|
2518
|
-
onStepSelect,
|
|
2519
|
-
fitViewTrigger: externalFitViewTrigger
|
|
2520
|
-
}) {
|
|
2521
|
-
const hasExecutionData = executionLogs && executionLogs.length > 0;
|
|
2522
|
-
const [mode, setMode] = useState(hasExecutionData ? "execution" : "definition");
|
|
2523
|
-
useEffect(() => {
|
|
2524
|
-
setMode(hasExecutionData ? "execution" : "definition");
|
|
2525
|
-
}, [hasExecutionData]);
|
|
2526
|
-
const isDefinitionMode = mode === "definition";
|
|
2527
|
-
const executionPath = useExecutionPath(
|
|
2528
|
-
isDefinitionMode ? void 0 : executionLogs,
|
|
2529
|
-
isDefinitionMode ? void 0 : resourceDefinition
|
|
2530
|
-
);
|
|
2531
|
-
const workflowInput = useMemo(
|
|
2532
|
-
() => resourceDefinition ? { entryPoint: resourceDefinition.entryPoint, steps: resourceDefinition.steps } : void 0,
|
|
2533
|
-
[resourceDefinition]
|
|
2534
|
-
);
|
|
2535
|
-
const {
|
|
2536
|
-
nodes: layoutNodes,
|
|
2537
|
-
edges: layoutEdges,
|
|
2538
|
-
graphHeight
|
|
2539
|
-
} = useUnifiedWorkflowLayout(workflowInput, executionPath, isDefinitionMode ? null : selectedStepId, mode);
|
|
2540
|
-
const {
|
|
2541
|
-
nodes: highlightedNodes,
|
|
2542
|
-
edges: highlightedEdges,
|
|
2543
|
-
handleNodeMouseEnter,
|
|
2544
|
-
handleNodeMouseLeave
|
|
2545
|
-
} = useDirectedChainHighlighting(layoutNodes, layoutEdges);
|
|
2546
|
-
const nodes = isDefinitionMode ? highlightedNodes : layoutNodes;
|
|
2547
|
-
const edges = isDefinitionMode ? highlightedEdges : layoutEdges;
|
|
2548
|
-
const [internalFitViewTrigger, setInternalFitViewTrigger] = useState(0);
|
|
2549
|
-
const executedStepsCount = executionPath?.executedSteps.size ?? 0;
|
|
2550
|
-
const nodesCount = nodes.length;
|
|
2551
|
-
useEffect(() => {
|
|
2552
|
-
if (nodesCount > 0) {
|
|
2553
|
-
setInternalFitViewTrigger((prev) => prev + 1);
|
|
2554
|
-
}
|
|
2555
|
-
}, [nodesCount, executedStepsCount]);
|
|
2556
|
-
const fitViewTrigger = (externalFitViewTrigger ?? 0) + internalFitViewTrigger;
|
|
2557
|
-
const { handleNodeClick, handlePaneClick, handleContainerClick } = useNodeSelection(
|
|
2558
|
-
selectedStepId || null,
|
|
2559
|
-
onStepSelect || (() => {
|
|
2560
|
-
})
|
|
2561
|
-
);
|
|
2562
|
-
if (!resourceDefinition || !resourceDefinition.steps.length) {
|
|
2563
|
-
return /* @__PURE__ */ jsx(EmptyVisualizer, {});
|
|
2564
|
-
}
|
|
2565
|
-
return /* @__PURE__ */ jsx(
|
|
2566
|
-
VisualizerContainer,
|
|
2567
|
-
{
|
|
2568
|
-
handleContainerClick: isDefinitionMode ? void 0 : handleContainerClick,
|
|
2569
|
-
height: graphHeight,
|
|
2570
|
-
children: /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsxs(
|
|
2571
|
-
ReactFlow,
|
|
2572
|
-
{
|
|
2573
|
-
nodes,
|
|
2574
|
-
edges,
|
|
2575
|
-
nodeTypes,
|
|
2576
|
-
edgeTypes,
|
|
2577
|
-
onNodeClick: isDefinitionMode ? void 0 : handleNodeClick,
|
|
2578
|
-
onPaneClick: isDefinitionMode ? void 0 : handlePaneClick,
|
|
2579
|
-
onNodeMouseEnter: isDefinitionMode ? handleNodeMouseEnter : void 0,
|
|
2580
|
-
onNodeMouseLeave: isDefinitionMode ? handleNodeMouseLeave : void 0,
|
|
2581
|
-
fitView: true,
|
|
2582
|
-
fitViewOptions: {
|
|
2583
|
-
padding: WORKFLOW_CONSTANTS.FIT_VIEW_PADDING
|
|
2584
|
-
},
|
|
2585
|
-
proOptions: { hideAttribution: true },
|
|
2586
|
-
minZoom: WORKFLOW_CONSTANTS.MIN_ZOOM,
|
|
2587
|
-
maxZoom: WORKFLOW_CONSTANTS.MAX_ZOOM,
|
|
2588
|
-
defaultViewport: { x: 0, y: 0, zoom: 1 },
|
|
2589
|
-
nodesDraggable: false,
|
|
2590
|
-
nodesConnectable: false,
|
|
2591
|
-
elementsSelectable: !isDefinitionMode,
|
|
2592
|
-
selectNodesOnDrag: false,
|
|
2593
|
-
zoomOnScroll: true,
|
|
2594
|
-
panOnDrag: true,
|
|
2595
|
-
className: Graph_module_css_default.graphContainer,
|
|
2596
|
-
children: [
|
|
2597
|
-
/* @__PURE__ */ jsx(GraphBackground, {}),
|
|
2598
|
-
/* @__PURE__ */ jsx(Panel, { position: "top-right", style: { marginTop: 12, marginRight: 12 }, children: /* @__PURE__ */ jsx(
|
|
2599
|
-
SegmentedControl,
|
|
2600
|
-
{
|
|
2601
|
-
size: "xs",
|
|
2602
|
-
value: mode,
|
|
2603
|
-
onChange: (value) => setMode(value),
|
|
2604
|
-
data: [
|
|
2605
|
-
{ label: "Definition", value: "definition" },
|
|
2606
|
-
{ label: "Execution", value: "execution" }
|
|
2607
|
-
],
|
|
2608
|
-
styles: {
|
|
2609
|
-
root: {
|
|
2610
|
-
backgroundColor: "var(--color-surface)",
|
|
2611
|
-
border: "1px solid var(--color-border)"
|
|
2612
|
-
}
|
|
2613
|
-
}
|
|
2614
|
-
}
|
|
2615
|
-
) }),
|
|
2616
|
-
/* @__PURE__ */ jsx(GraphLegend, { title: "Legend", items: NODE_LEGEND_ITEMS, position: "bottom-right" }),
|
|
2617
|
-
/* @__PURE__ */ jsx(GraphLegend, { title: "Flow", items: EDGE_LEGEND_ITEMS, position: "bottom-left" }),
|
|
2618
|
-
/* @__PURE__ */ jsx(GraphFitViewButton, { padding: WORKFLOW_CONSTANTS.FIT_VIEW_PADDING, variant: "mantine" }),
|
|
2619
|
-
/* @__PURE__ */ jsx(GraphFitViewHandler, { trigger: fitViewTrigger, padding: WORKFLOW_CONSTANTS.FIT_VIEW_PADDING })
|
|
2620
|
-
]
|
|
2621
|
-
}
|
|
2622
|
-
) })
|
|
2623
|
-
}
|
|
2624
|
-
);
|
|
2625
|
-
}
|
|
2626
|
-
function WorkflowExecutionTimeline({ timelineData, selectedStepId }) {
|
|
2627
|
-
const { steps } = timelineData;
|
|
2628
|
-
const executionStart = steps[0]?.startTime || 0;
|
|
2629
|
-
const executionEnd = steps[steps.length - 1]?.endTime || executionStart;
|
|
2630
|
-
return /* @__PURE__ */ jsx(TimelineContainer, { executionStart, executionEnd, children: steps.map(
|
|
2631
|
-
(step) => step.startTime && step.endTime && /* @__PURE__ */ jsx(
|
|
2632
|
-
TimelineRow,
|
|
2633
|
-
{
|
|
2634
|
-
label: step.stepName,
|
|
2635
|
-
bars: [
|
|
2636
|
-
{
|
|
2637
|
-
startTime: step.startTime,
|
|
2638
|
-
endTime: step.endTime,
|
|
2639
|
-
status: step.status,
|
|
2640
|
-
nodeId: step.stepId
|
|
2641
|
-
}
|
|
2642
|
-
],
|
|
2643
|
-
executionStart,
|
|
2644
|
-
executionEnd,
|
|
2645
|
-
selectedNodeId: selectedStepId
|
|
2646
|
-
},
|
|
2647
|
-
step.stepId
|
|
2648
|
-
)
|
|
2649
|
-
) });
|
|
2650
|
-
}
|
|
2651
|
-
var statusColorMap = {
|
|
2652
|
-
running: "blue",
|
|
2653
|
-
completed: "teal",
|
|
2654
|
-
failed: "orange",
|
|
2655
|
-
pending: "violet",
|
|
2656
|
-
warning: "yellow"
|
|
2657
|
-
};
|
|
2658
|
-
var AgentIterationNode = memo(function AgentIterationNode2({ data, selected }) {
|
|
2659
|
-
const { nodeType, label, iterationNumber, status, reasoningCount, actionCount, duration, isLive } = data;
|
|
2660
|
-
const colors = getStatusColors(status);
|
|
2661
|
-
const nodeColor = statusColorMap[status];
|
|
2662
|
-
return /* @__PURE__ */ jsxs(BaseNode, { color: nodeColor, selected, width: AGENT_CONSTANTS.NODE_WIDTH, children: [
|
|
2663
|
-
/* @__PURE__ */ jsxs(Box, { style: { display: "flex", flexDirection: "column", alignItems: "center" }, children: [
|
|
2664
|
-
/* @__PURE__ */ jsx(
|
|
2665
|
-
Box,
|
|
2666
|
-
{
|
|
2667
|
-
style: {
|
|
2668
|
-
width: AGENT_CONSTANTS.CIRCLE_SIZE,
|
|
2669
|
-
height: AGENT_CONSTANTS.CIRCLE_SIZE,
|
|
2670
|
-
borderRadius: "50%",
|
|
2671
|
-
backgroundColor: "var(--color-surface)",
|
|
2672
|
-
border: `2px solid ${colors.color}`,
|
|
2673
|
-
display: "flex",
|
|
2674
|
-
alignItems: "center",
|
|
2675
|
-
justifyContent: "center"
|
|
2676
|
-
},
|
|
2677
|
-
children: getStatusIcon({
|
|
2678
|
-
status,
|
|
2679
|
-
colors: { icon: colors.color },
|
|
2680
|
-
iconSize: AGENT_CONSTANTS.STATUS_ICON_SIZE,
|
|
2681
|
-
spinDuration: "1s"
|
|
2682
|
-
})
|
|
2683
|
-
}
|
|
2684
|
-
),
|
|
2685
|
-
/* @__PURE__ */ jsx(
|
|
2686
|
-
Text,
|
|
2687
|
-
{
|
|
2688
|
-
size: "sm",
|
|
2689
|
-
fw: status === "running" ? 500 : 400,
|
|
2690
|
-
ta: "center",
|
|
2691
|
-
mt: 4,
|
|
2692
|
-
style: { maxWidth: 150, fontFamily: "var(--mantine-font-family-headings)" },
|
|
2693
|
-
children: nodeType === "iteration" ? `Iteration ${iterationNumber}` : label
|
|
2694
|
-
}
|
|
2695
|
-
),
|
|
2696
|
-
/* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: colors.badge, mt: 4, children: status.toUpperCase() }),
|
|
2697
|
-
/* @__PURE__ */ jsxs(Stack, { gap: 2, mt: 2, align: "center", children: [
|
|
2698
|
-
nodeType === "iteration" && reasoningCount !== void 0 && reasoningCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
2699
|
-
reasoningCount,
|
|
2700
|
-
" reasoning"
|
|
2701
|
-
] }),
|
|
2702
|
-
nodeType === "iteration" && actionCount !== void 0 && actionCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
|
|
2703
|
-
actionCount,
|
|
2704
|
-
" ",
|
|
2705
|
-
actionCount === 1 ? "action" : "actions"
|
|
2706
|
-
] }),
|
|
2707
|
-
duration !== void 0 && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: formatDuration(duration) })
|
|
2708
|
-
] })
|
|
2709
|
-
] }),
|
|
2710
|
-
isLive && /* @__PURE__ */ jsx(
|
|
2711
|
-
Badge,
|
|
2712
|
-
{
|
|
2713
|
-
size: "xs",
|
|
2714
|
-
variant: "filled",
|
|
2715
|
-
style: {
|
|
2716
|
-
position: "absolute",
|
|
2717
|
-
top: 4,
|
|
2718
|
-
right: 4
|
|
2719
|
-
},
|
|
2720
|
-
children: /* @__PURE__ */ jsx("span", { className: Graph_module_css_default.livePulse, children: "LIVE" })
|
|
2721
|
-
}
|
|
2722
|
-
)
|
|
2723
|
-
] });
|
|
2724
|
-
});
|
|
2725
|
-
var statusEdgeColors = {
|
|
2726
|
-
running: {
|
|
2727
|
-
color: "var(--mantine-color-blue-5)",
|
|
2728
|
-
glow: "rgba(59, 130, 246, 0.5)"
|
|
2729
|
-
},
|
|
2730
|
-
completed: {
|
|
2731
|
-
color: "var(--mantine-color-teal-5)",
|
|
2732
|
-
glow: "rgba(20, 184, 166, 0.5)"
|
|
2733
|
-
},
|
|
2734
|
-
failed: {
|
|
2735
|
-
color: "var(--mantine-color-orange-5)",
|
|
2736
|
-
glow: "rgba(249, 115, 22, 0.5)"
|
|
2737
|
-
},
|
|
2738
|
-
pending: {
|
|
2739
|
-
color: "var(--mantine-color-gray-5)",
|
|
2740
|
-
glow: "rgba(156, 163, 175, 0.3)"
|
|
2741
|
-
},
|
|
2742
|
-
warning: {
|
|
2743
|
-
color: "var(--mantine-color-yellow-5)",
|
|
2744
|
-
glow: "rgba(234, 179, 8, 0.5)"
|
|
2745
|
-
}
|
|
2746
|
-
};
|
|
2747
|
-
var AgentIterationEdge = memo(function AgentIterationEdge2({
|
|
2748
|
-
id,
|
|
2749
|
-
sourceX,
|
|
2750
|
-
sourceY,
|
|
2751
|
-
targetX,
|
|
2752
|
-
targetY,
|
|
2753
|
-
data,
|
|
2754
|
-
selected
|
|
2755
|
-
}) {
|
|
2756
|
-
const edgeData = data;
|
|
2757
|
-
const sourceStatus = edgeData?.sourceStatus || "pending";
|
|
2758
|
-
const targetStatus = edgeData?.targetStatus || "pending";
|
|
2759
|
-
const edgeColors = statusEdgeColors[sourceStatus];
|
|
2760
|
-
const isAnimated = shouldAnimateEdge(sourceStatus, targetStatus);
|
|
2761
|
-
return /* @__PURE__ */ jsx(
|
|
2762
|
-
BaseEdge,
|
|
2763
|
-
{
|
|
2764
|
-
id,
|
|
2765
|
-
sourceX,
|
|
2766
|
-
sourceY,
|
|
2767
|
-
targetX,
|
|
2768
|
-
targetY,
|
|
2769
|
-
sourcePosition: Position.Right,
|
|
2770
|
-
targetPosition: Position.Left,
|
|
2771
|
-
color: edgeColors.color,
|
|
2772
|
-
glowColor: edgeColors.glow,
|
|
2773
|
-
animated: isAnimated,
|
|
2774
|
-
selected
|
|
2775
|
-
}
|
|
2776
|
-
);
|
|
2777
|
-
});
|
|
2778
|
-
var nodeTypes2 = {
|
|
2779
|
-
agentIteration: AgentIterationNode
|
|
2780
|
-
};
|
|
2781
|
-
var edgeTypes2 = {
|
|
2782
|
-
agentIteration: AgentIterationEdge
|
|
2783
|
-
};
|
|
2784
|
-
function AgentExecutionVisualizer({
|
|
2785
|
-
resourceDefinition,
|
|
2786
|
-
iterationData,
|
|
2787
|
-
selectedExecutionId,
|
|
2788
|
-
liveExecutions,
|
|
2789
|
-
selectedIterationId,
|
|
2790
|
-
onIterationSelect
|
|
2791
|
-
}) {
|
|
2792
|
-
const { nodes, edges } = useReactFlowAgent(
|
|
2793
|
-
iterationData,
|
|
2794
|
-
resourceDefinition,
|
|
2795
|
-
selectedIterationId,
|
|
2796
|
-
liveExecutions,
|
|
2797
|
-
selectedExecutionId
|
|
2798
|
-
);
|
|
2799
|
-
const fitViewTrigger = useFitViewTrigger(iterationData, nodes);
|
|
2800
|
-
const handleIterationSelect = useCallback(
|
|
2801
|
-
(id) => {
|
|
2802
|
-
onIterationSelect(id);
|
|
2803
|
-
},
|
|
2804
|
-
[onIterationSelect]
|
|
2805
|
-
);
|
|
2806
|
-
const { handlePaneClick, handleContainerClick } = useNodeSelection(selectedIterationId, handleIterationSelect);
|
|
2807
|
-
const handleNodeClick = useCallback(
|
|
2808
|
-
(_event, node) => {
|
|
2809
|
-
if (node.id === "initialization" || node.id === "completion") {
|
|
2810
|
-
handleIterationSelect(selectedIterationId === node.id ? null : node.id);
|
|
2811
|
-
return;
|
|
2812
|
-
}
|
|
2813
|
-
const iterationNumber = Number.parseInt(node.id.replace("iteration-", ""), 10);
|
|
2814
|
-
if (!Number.isNaN(iterationNumber)) {
|
|
2815
|
-
handleIterationSelect(iterationNumber === selectedIterationId ? null : iterationNumber);
|
|
2816
|
-
}
|
|
2817
|
-
},
|
|
2818
|
-
[selectedIterationId, handleIterationSelect]
|
|
2819
|
-
);
|
|
2820
|
-
if (!iterationData || nodes.length === 0) {
|
|
2821
|
-
return /* @__PURE__ */ jsx(EmptyVisualizer, {});
|
|
2822
|
-
}
|
|
2823
|
-
return /* @__PURE__ */ jsx(VisualizerContainer, { handleContainerClick, children: /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsxs(
|
|
2824
|
-
ReactFlow,
|
|
2825
|
-
{
|
|
2826
|
-
nodes,
|
|
2827
|
-
edges,
|
|
2828
|
-
nodeTypes: nodeTypes2,
|
|
2829
|
-
edgeTypes: edgeTypes2,
|
|
2830
|
-
onNodeClick: handleNodeClick,
|
|
2831
|
-
onPaneClick: handlePaneClick,
|
|
2832
|
-
fitView: true,
|
|
2833
|
-
fitViewOptions: {
|
|
2834
|
-
padding: AGENT_CONSTANTS.FIT_VIEW_PADDING
|
|
2835
|
-
},
|
|
2836
|
-
proOptions: { hideAttribution: true },
|
|
2837
|
-
minZoom: AGENT_CONSTANTS.MIN_ZOOM,
|
|
2838
|
-
maxZoom: AGENT_CONSTANTS.MAX_ZOOM,
|
|
2839
|
-
nodesDraggable: false,
|
|
2840
|
-
nodesConnectable: false,
|
|
2841
|
-
elementsSelectable: true,
|
|
2842
|
-
selectNodesOnDrag: false,
|
|
2843
|
-
zoomOnScroll: false,
|
|
2844
|
-
panOnDrag: false,
|
|
2845
|
-
className: Graph_module_css_default.graphContainer,
|
|
2846
|
-
children: [
|
|
2847
|
-
/* @__PURE__ */ jsx(GraphBackground, {}),
|
|
2848
|
-
/* @__PURE__ */ jsx(GraphFitViewButton, { padding: AGENT_CONSTANTS.FIT_VIEW_PADDING, variant: "mantine", duration: 300 }),
|
|
2849
|
-
/* @__PURE__ */ jsx(GraphFitViewHandler, { trigger: fitViewTrigger, padding: AGENT_CONSTANTS.FIT_VIEW_PADDING })
|
|
2850
|
-
]
|
|
2851
|
-
}
|
|
2852
|
-
) }) });
|
|
2853
|
-
}
|
|
2854
|
-
function AgentExecutionTimeline({ iterationData, selectedIterationId }) {
|
|
2855
|
-
const { initialization, iterations, completion } = iterationData;
|
|
2856
|
-
const executionStart = initialization.startTime;
|
|
2857
|
-
const executionEnd = completion.endTime;
|
|
2858
|
-
return /* @__PURE__ */ jsxs(TimelineContainer, { executionStart, executionEnd, children: [
|
|
2859
|
-
initialization.startTime && initialization.endTime && /* @__PURE__ */ jsx(
|
|
2860
|
-
TimelineRow,
|
|
2861
|
-
{
|
|
2862
|
-
label: `Initialization (${formatDuration(initialization.duration || 0)})`,
|
|
2863
|
-
bars: [
|
|
2864
|
-
{
|
|
2865
|
-
startTime: initialization.startTime,
|
|
2866
|
-
endTime: initialization.endTime,
|
|
2867
|
-
status: initialization.status,
|
|
2868
|
-
nodeId: "initialization"
|
|
2869
|
-
}
|
|
2870
|
-
],
|
|
2871
|
-
executionStart,
|
|
2872
|
-
executionEnd,
|
|
2873
|
-
selectedNodeId: selectedIterationId
|
|
2874
|
-
}
|
|
2875
|
-
),
|
|
2876
|
-
iterations.map((iteration) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2877
|
-
iteration.startTime && iteration.endTime && /* @__PURE__ */ jsx(
|
|
2878
|
-
TimelineRow,
|
|
2879
|
-
{
|
|
2880
|
-
label: `Iteration ${iteration.iterationNumber} (${formatDuration(iteration.duration || 0)})`,
|
|
2881
|
-
bars: [
|
|
2882
|
-
{
|
|
2883
|
-
startTime: iteration.startTime,
|
|
2884
|
-
endTime: iteration.endTime,
|
|
2885
|
-
status: iteration.status,
|
|
2886
|
-
nodeId: iteration.iterationNumber
|
|
2887
|
-
}
|
|
2888
|
-
],
|
|
2889
|
-
executionStart,
|
|
2890
|
-
executionEnd,
|
|
2891
|
-
selectedNodeId: selectedIterationId
|
|
2892
|
-
}
|
|
2893
|
-
),
|
|
2894
|
-
iteration.subActivities.map((activity, activityIndex) => /* @__PURE__ */ jsx(
|
|
2895
|
-
TimelineRow,
|
|
2896
|
-
{
|
|
2897
|
-
label: `${activity.type} (${formatDuration(activity.duration)})`,
|
|
2898
|
-
bars: [
|
|
2899
|
-
{
|
|
2900
|
-
startTime: activity.startTime,
|
|
2901
|
-
endTime: activity.endTime,
|
|
2902
|
-
status: "completed",
|
|
2903
|
-
nodeId: iteration.iterationNumber
|
|
2904
|
-
}
|
|
2905
|
-
],
|
|
2906
|
-
executionStart,
|
|
2907
|
-
executionEnd,
|
|
2908
|
-
indent: 1,
|
|
2909
|
-
selectedNodeId: selectedIterationId
|
|
2910
|
-
},
|
|
2911
|
-
`${iteration.iterationNumber}-${activity.type}-${activity.startTime}-${activityIndex}`
|
|
2912
|
-
))
|
|
2913
|
-
] }, iteration.iterationNumber)),
|
|
2914
|
-
completion.startTime && completion.endTime && /* @__PURE__ */ jsx(
|
|
2915
|
-
TimelineRow,
|
|
2916
|
-
{
|
|
2917
|
-
label: `Completion (${formatDuration(completion.duration || 0)})`,
|
|
2918
|
-
bars: [
|
|
2919
|
-
{
|
|
2920
|
-
startTime: completion.startTime,
|
|
2921
|
-
endTime: completion.endTime,
|
|
2922
|
-
status: completion.status,
|
|
2923
|
-
nodeId: "completion"
|
|
2924
|
-
}
|
|
2925
|
-
],
|
|
2926
|
-
executionStart,
|
|
2927
|
-
executionEnd,
|
|
2928
|
-
selectedNodeId: selectedIterationId
|
|
2929
|
-
}
|
|
2930
|
-
)
|
|
2931
|
-
] });
|
|
2932
|
-
}
|
|
2933
1740
|
var iconMap = {
|
|
2934
1741
|
IconCheck,
|
|
2935
1742
|
IconX,
|
|
@@ -3530,10 +2337,10 @@ var NewKnowledgeMapEdge = memo(function NewKnowledgeMapEdge2({
|
|
|
3530
2337
|
}
|
|
3531
2338
|
);
|
|
3532
2339
|
});
|
|
3533
|
-
var
|
|
2340
|
+
var nodeTypes = {
|
|
3534
2341
|
knowledgeMap: NewKnowledgeMapNode
|
|
3535
2342
|
};
|
|
3536
|
-
var
|
|
2343
|
+
var edgeTypes = {
|
|
3537
2344
|
knowledgeMap: NewKnowledgeMapEdge
|
|
3538
2345
|
};
|
|
3539
2346
|
function NewKnowledgeMapGraphInner({ knowledgeMap, agentName, compact, fitViewTrigger }) {
|
|
@@ -3576,8 +2383,8 @@ function NewKnowledgeMapGraphInner({ knowledgeMap, agentName, compact, fitViewTr
|
|
|
3576
2383
|
{
|
|
3577
2384
|
nodes,
|
|
3578
2385
|
edges,
|
|
3579
|
-
nodeTypes
|
|
3580
|
-
edgeTypes
|
|
2386
|
+
nodeTypes,
|
|
2387
|
+
edgeTypes,
|
|
3581
2388
|
onNodeMouseEnter: handleNodeMouseEnter,
|
|
3582
2389
|
onNodeMouseLeave: handleNodeMouseLeave,
|
|
3583
2390
|
fitView: true,
|
|
@@ -7308,10 +6115,10 @@ var CommandViewEdge = memo(function CommandViewEdge2({
|
|
|
7308
6115
|
}
|
|
7309
6116
|
);
|
|
7310
6117
|
});
|
|
7311
|
-
var
|
|
6118
|
+
var nodeTypes2 = {
|
|
7312
6119
|
commandView: CommandViewNode
|
|
7313
6120
|
};
|
|
7314
|
-
var
|
|
6121
|
+
var edgeTypes2 = {
|
|
7315
6122
|
commandView: CommandViewEdge
|
|
7316
6123
|
};
|
|
7317
6124
|
var CommandViewGraphInner = forwardRef(function CommandViewGraphInner2({ graph, height, selectedNodeId, onNodeSelect }, ref) {
|
|
@@ -7350,8 +6157,8 @@ var CommandViewGraphInner = forwardRef(function CommandViewGraphInner2({ graph,
|
|
|
7350
6157
|
{
|
|
7351
6158
|
nodes: nodesWithSelection,
|
|
7352
6159
|
edges,
|
|
7353
|
-
nodeTypes:
|
|
7354
|
-
edgeTypes:
|
|
6160
|
+
nodeTypes: nodeTypes2,
|
|
6161
|
+
edgeTypes: edgeTypes2,
|
|
7355
6162
|
onNodeMouseEnter: handleNodeMouseEnter,
|
|
7356
6163
|
onNodeMouseLeave: handleNodeMouseLeave,
|
|
7357
6164
|
onNodeClick: onNodeSelect ? handleNodeClick : void 0,
|
|
@@ -8999,4 +7806,4 @@ function WebhookUrlDisplayModal({ opened, endpoint, webhookUrl, onClose }) {
|
|
|
8999
7806
|
] }) });
|
|
9000
7807
|
}
|
|
9001
7808
|
|
|
9002
|
-
export { AbsoluteScheduleForm, ActionModal, ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, AgentDefinitionDisplay, AgentExecutionLogs,
|
|
7809
|
+
export { AbsoluteScheduleForm, ActionModal, ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, AgentDefinitionDisplay, AgentExecutionLogs, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, BusinessImpactCard, CheckpointGroup, CollapsibleJsonSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CommandViewEdge, CommandViewGraph, CommandViewNode, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContentSections, ContextUsageBadge, ContractDisplay, CostBreakdownCard, CostByModelTable, CostMetricsCard, CrashErrorFallback, CreateApiKeyModal, CreateCredentialModal, CreateScheduleModal, CredentialList, CredentialSettings, CustomModal, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, DocTreeNav, EditApiKeyModal, ErrorAnalysisCard, ErrorBreakdownTable, ErrorReportCard, ExecutionBreakdownTable, ExecutionErrorSection, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, FilterBar, FormFieldRenderer, KnowledgeBasePage, LogEntry, LogGroup, MembershipFeaturePanel, MembershipStatusBadge, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NotificationBell, NotificationItem, NotificationList, NotificationPanel, OAuthConnectModal, OrganizationMembershipsList, RecurringScheduleForm, RelativeScheduleForm, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceHealthChart, ResourceHealthPanel, ResourceNotFoundState, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, SessionMemory, SortableHeader, TableSelectionToolbar, TaskCard, TaskScheduler, ToolsListDisplay, WebhookUrlDisplayModal, WorkflowDefinitionDisplay, WorkflowExecutionLogs, buildErrorReport, getExecutionStatusConfig, getHealthColor, getIcon, getLogLevelConfig, iconMap, useNewKnowledgeMapLayout };
|