@datatechsolutions/ui 2.11.82 → 2.11.84
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/astrlabe/index.d.mts +2 -2
- package/dist/astrlabe/index.d.ts +2 -2
- package/dist/astrlabe/index.js +110 -106
- package/dist/astrlabe/index.mjs +4 -4
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/chunk-3T2WGL47.js +44 -0
- package/dist/chunk-3T2WGL47.js.map +1 -0
- package/dist/{chunk-HAZP5J67.mjs → chunk-63AL2RN5.mjs} +187 -17
- package/dist/chunk-63AL2RN5.mjs.map +1 -0
- package/dist/chunk-64G2HBRQ.mjs +481 -0
- package/dist/chunk-64G2HBRQ.mjs.map +1 -0
- package/dist/{chunk-J3OYJ44D.mjs → chunk-BH2AU3LG.mjs} +3 -3
- package/dist/{chunk-J3OYJ44D.mjs.map → chunk-BH2AU3LG.mjs.map} +1 -1
- package/dist/chunk-CCRBT7TA.mjs +941 -0
- package/dist/chunk-CCRBT7TA.mjs.map +1 -0
- package/dist/chunk-CHLJUSXX.mjs +128 -0
- package/dist/chunk-CHLJUSXX.mjs.map +1 -0
- package/dist/chunk-CXIQWPBH.js +214 -0
- package/dist/chunk-CXIQWPBH.js.map +1 -0
- package/dist/chunk-EDE36MKE.mjs +412 -0
- package/dist/chunk-EDE36MKE.mjs.map +1 -0
- package/dist/{chunk-M7P2TQ6X.js → chunk-EFREXNZB.js} +64 -64
- package/dist/{chunk-M7P2TQ6X.js.map → chunk-EFREXNZB.js.map} +1 -1
- package/dist/chunk-FAGDZEKM.js +23 -0
- package/dist/chunk-FAGDZEKM.js.map +1 -0
- package/dist/{chunk-TUEYBNWL.js → chunk-GV6WJCEB.js} +3 -3
- package/dist/{chunk-TUEYBNWL.js.map → chunk-GV6WJCEB.js.map} +1 -1
- package/dist/chunk-HU3EAHFO.mjs +20 -0
- package/dist/chunk-HU3EAHFO.mjs.map +1 -0
- package/dist/{chunk-LLFU42KC.mjs → chunk-I6WYV2AN.mjs} +3 -3
- package/dist/{chunk-LLFU42KC.mjs.map → chunk-I6WYV2AN.mjs.map} +1 -1
- package/dist/chunk-JJWFMKZY.js +132 -0
- package/dist/chunk-JJWFMKZY.js.map +1 -0
- package/dist/{chunk-K4QJV3GC.js → chunk-L6FVIWAJ.js} +308 -137
- package/dist/chunk-L6FVIWAJ.js.map +1 -0
- package/dist/chunk-MNQEZL7B.mjs +210 -0
- package/dist/chunk-MNQEZL7B.mjs.map +1 -0
- package/dist/chunk-SGJ24J2Q.js +943 -0
- package/dist/chunk-SGJ24J2Q.js.map +1 -0
- package/dist/chunk-SW6TVAIJ.js +418 -0
- package/dist/chunk-SW6TVAIJ.js.map +1 -0
- package/dist/chunk-SYNVNTLJ.mjs +20 -0
- package/dist/chunk-SYNVNTLJ.mjs.map +1 -0
- package/dist/chunk-UQXVCVAN.mjs +41 -0
- package/dist/chunk-UQXVCVAN.mjs.map +1 -0
- package/dist/chunk-WGELLCOZ.js +22 -0
- package/dist/chunk-WGELLCOZ.js.map +1 -0
- package/dist/chunk-YXPHJ2BQ.js +541 -0
- package/dist/chunk-YXPHJ2BQ.js.map +1 -0
- package/dist/index.d.mts +3 -47
- package/dist/index.d.ts +3 -47
- package/dist/index.js +765 -765
- package/dist/index.mjs +2 -2
- package/dist/navigation-BiWVffAN.d.mts +49 -0
- package/dist/navigation-BiWVffAN.d.ts +49 -0
- package/dist/platform/agents-workspace.d.mts +19 -0
- package/dist/platform/agents-workspace.d.ts +19 -0
- package/dist/platform/agents-workspace.js +26 -0
- package/dist/platform/agents-workspace.js.map +1 -0
- package/dist/platform/agents-workspace.mjs +17 -0
- package/dist/platform/agents-workspace.mjs.map +1 -0
- package/dist/platform/app-shell.d.mts +58 -0
- package/dist/platform/app-shell.d.ts +58 -0
- package/dist/platform/app-shell.js +17 -0
- package/dist/platform/app-shell.js.map +1 -0
- package/dist/platform/app-shell.mjs +8 -0
- package/dist/platform/app-shell.mjs.map +1 -0
- package/dist/platform/index.d.mts +100 -3
- package/dist/platform/index.d.ts +100 -3
- package/dist/platform/index.js +499 -28
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/index.mjs +472 -27
- package/dist/platform/index.mjs.map +1 -1
- package/dist/platform/pages/index.d.mts +243 -82
- package/dist/platform/pages/index.d.ts +243 -82
- package/dist/platform/pages/index.js +886 -614
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +756 -511
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/utils/index.js +18 -56
- package/dist/platform/utils/index.js.map +1 -1
- package/dist/platform/utils/index.mjs +3 -53
- package/dist/platform/utils/index.mjs.map +1 -1
- package/dist/platform/workflow-api-client.d.mts +6 -0
- package/dist/platform/workflow-api-client.d.ts +6 -0
- package/dist/platform/workflow-api-client.js +246 -0
- package/dist/platform/workflow-api-client.js.map +1 -0
- package/dist/platform/workflow-api-client.mjs +5 -0
- package/dist/platform/workflow-api-client.mjs.map +1 -0
- package/dist/platform/workflow-canvas-shell.d.mts +18 -0
- package/dist/platform/workflow-canvas-shell.d.ts +18 -0
- package/dist/platform/workflow-canvas-shell.js +20 -0
- package/dist/platform/workflow-canvas-shell.js.map +1 -0
- package/dist/platform/workflow-canvas-shell.mjs +11 -0
- package/dist/platform/workflow-canvas-shell.mjs.map +1 -0
- package/dist/{rule-form-F5jBOeqk.d.mts → rule-form-BYJzyork.d.mts} +50 -1
- package/dist/{rule-form-F5jBOeqk.d.ts → rule-form-BYJzyork.d.ts} +50 -1
- package/dist/workflow-api-client-C8gPn_D1.d.mts +386 -0
- package/dist/workflow-api-client-Dy1Ph8W-.d.ts +386 -0
- package/package.json +21 -1
- package/dist/chunk-HAZP5J67.mjs.map +0 -1
- package/dist/chunk-K4QJV3GC.js.map +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// src/platform/utils/workflow-graph-adapter.ts
|
|
5
|
+
function assertEntityConfig(node) {
|
|
6
|
+
if (node.type !== "entity") return node;
|
|
7
|
+
const config = node.data.config;
|
|
8
|
+
if (!config || config.type !== "entity") {
|
|
9
|
+
throw new Error(`Entity node ${node.id} is missing entity config`);
|
|
10
|
+
}
|
|
11
|
+
const entityConfig = config;
|
|
12
|
+
if (!entityConfig.entityMasterId || entityConfig.entityMasterId.trim().length === 0) {
|
|
13
|
+
throw new Error(`Entity node ${node.id} is missing required entityMasterId`);
|
|
14
|
+
}
|
|
15
|
+
return node;
|
|
16
|
+
}
|
|
17
|
+
function adaptWorkflowGraphToUi(graph) {
|
|
18
|
+
const nodes = graph.nodes.map((node) => assertEntityConfig(node));
|
|
19
|
+
return {
|
|
20
|
+
nodes,
|
|
21
|
+
edges: graph.edges,
|
|
22
|
+
viewport: graph.viewport
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// src/platform/utils/format-duration.ts
|
|
27
|
+
function formatDurationMs(ms) {
|
|
28
|
+
if (ms === null || ms === void 0 || Number.isNaN(ms)) return "\u2014";
|
|
29
|
+
if (ms < 0) return "\u2014";
|
|
30
|
+
if (ms < 1e3) return `${Math.round(ms)}ms`;
|
|
31
|
+
const totalSeconds = ms / 1e3;
|
|
32
|
+
if (totalSeconds < 60) return `${totalSeconds.toFixed(totalSeconds < 10 ? 2 : 1)}s`;
|
|
33
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
34
|
+
const seconds = Math.round(totalSeconds - minutes * 60);
|
|
35
|
+
if (minutes < 60) return seconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`;
|
|
36
|
+
const hours = Math.floor(minutes / 60);
|
|
37
|
+
const remainingMinutes = minutes - hours * 60;
|
|
38
|
+
return remainingMinutes === 0 ? `${hours}h` : `${hours}h ${remainingMinutes}m`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
exports.adaptWorkflowGraphToUi = adaptWorkflowGraphToUi;
|
|
42
|
+
exports.formatDurationMs = formatDurationMs;
|
|
43
|
+
//# sourceMappingURL=chunk-3T2WGL47.js.map
|
|
44
|
+
//# sourceMappingURL=chunk-3T2WGL47.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/platform/utils/workflow-graph-adapter.ts","../src/platform/utils/format-duration.ts"],"names":[],"mappings":";;;AAOA,SAAS,mBAAmB,IAAA,EAAsC;AAChE,EAAA,IAAI,IAAA,CAAK,IAAA,KAAS,QAAA,EAAU,OAAO,IAAA;AAEnC,EAAA,MAAM,MAAA,GAAS,KAAK,IAAA,CAAK,MAAA;AACzB,EAAA,IAAI,CAAC,MAAA,IAAU,MAAA,CAAO,IAAA,KAAS,QAAA,EAAU;AACvC,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,YAAA,EAAe,IAAA,CAAK,EAAE,CAAA,yBAAA,CAA2B,CAAA;AAAA,EACnE;AAEA,EAAA,MAAM,YAAA,GAAe,MAAA;AACrB,EAAA,IAAI,CAAC,aAAa,cAAA,IAAkB,YAAA,CAAa,eAAe,IAAA,EAAK,CAAE,WAAW,CAAA,EAAG;AACnF,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,YAAA,EAAe,IAAA,CAAK,EAAE,CAAA,mCAAA,CAAqC,CAAA;AAAA,EAC7E;AAEA,EAAA,OAAO,IAAA;AACT;AAEO,SAAS,uBAAuB,KAAA,EAA6C;AAClF,EAAA,MAAM,KAAA,GAAQ,MAAM,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,KAAS,kBAAA,CAAmB,IAAiC,CAAC,CAAA;AAC7F,EAAA,OAAO;AAAA,IACL,KAAA;AAAA,IACA,OAAO,KAAA,CAAM,KAAA;AAAA,IACb,UAAU,KAAA,CAAM;AAAA,GAClB;AACF;;;AC7BO,SAAS,iBAAiB,EAAA,EAAuC;AACtE,EAAA,IAAI,EAAA,KAAO,QAAQ,EAAA,KAAO,MAAA,IAAa,OAAO,KAAA,CAAM,EAAE,GAAG,OAAO,QAAA;AAChE,EAAA,IAAI,EAAA,GAAK,GAAG,OAAO,QAAA;AACnB,EAAA,IAAI,KAAK,GAAA,EAAO,OAAO,GAAG,IAAA,CAAK,KAAA,CAAM,EAAE,CAAC,CAAA,EAAA,CAAA;AAExC,EAAA,MAAM,eAAe,EAAA,GAAK,GAAA;AAC1B,EAAA,IAAI,YAAA,GAAe,EAAA,EAAI,OAAO,CAAA,EAAG,YAAA,CAAa,QAAQ,YAAA,GAAe,EAAA,GAAK,CAAA,GAAI,CAAC,CAAC,CAAA,CAAA,CAAA;AAEhF,EAAA,MAAM,OAAA,GAAU,IAAA,CAAK,KAAA,CAAM,YAAA,GAAe,EAAE,CAAA;AAC5C,EAAA,MAAM,OAAA,GAAU,IAAA,CAAK,KAAA,CAAM,YAAA,GAAe,UAAU,EAAE,CAAA;AACtD,EAAA,IAAI,OAAA,GAAU,EAAA,EAAI,OAAO,OAAA,KAAY,CAAA,GAAI,CAAA,EAAG,OAAO,CAAA,CAAA,CAAA,GAAM,CAAA,EAAG,OAAO,CAAA,EAAA,EAAK,OAAO,CAAA,CAAA,CAAA;AAE/E,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,KAAA,CAAM,OAAA,GAAU,EAAE,CAAA;AACrC,EAAA,MAAM,gBAAA,GAAmB,UAAU,KAAA,GAAQ,EAAA;AAC3C,EAAA,OAAO,gBAAA,KAAqB,IAAI,CAAA,EAAG,KAAK,MAAM,CAAA,EAAG,KAAK,KAAK,gBAAgB,CAAA,CAAA,CAAA;AAC7E","file":"chunk-3T2WGL47.js","sourcesContent":["import type { WorkflowGraph as SharedWorkflowGraph } from '@datatechsolutions/shared-domain/ports/workflow'\nimport type {\n WorkflowGraph as UiWorkflowGraph,\n WorkflowNode as UiWorkflowNode,\n EntityNodeConfig as UiEntityNodeConfig,\n} from '../../astrlabe/contracts'\n\nfunction assertEntityConfig(node: UiWorkflowNode): UiWorkflowNode {\n if (node.type !== 'entity') return node\n\n const config = node.data.config\n if (!config || config.type !== 'entity') {\n throw new Error(`Entity node ${node.id} is missing entity config`)\n }\n\n const entityConfig = config as UiEntityNodeConfig\n if (!entityConfig.entityMasterId || entityConfig.entityMasterId.trim().length === 0) {\n throw new Error(`Entity node ${node.id} is missing required entityMasterId`)\n }\n\n return node\n}\n\nexport function adaptWorkflowGraphToUi(graph: SharedWorkflowGraph): UiWorkflowGraph {\n const nodes = graph.nodes.map((node) => assertEntityConfig(node as unknown as UiWorkflowNode))\n return {\n nodes,\n edges: graph.edges as UiWorkflowGraph['edges'],\n viewport: graph.viewport as UiWorkflowGraph['viewport'],\n }\n}\n","/** Formats a millisecond count as a short, human-readable duration string. */\nexport function formatDurationMs(ms: number | null | undefined): string {\n if (ms === null || ms === undefined || Number.isNaN(ms)) return '—'\n if (ms < 0) return '—'\n if (ms < 1_000) return `${Math.round(ms)}ms`\n\n const totalSeconds = ms / 1_000\n if (totalSeconds < 60) return `${totalSeconds.toFixed(totalSeconds < 10 ? 2 : 1)}s`\n\n const minutes = Math.floor(totalSeconds / 60)\n const seconds = Math.round(totalSeconds - minutes * 60)\n if (minutes < 60) return seconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`\n\n const hours = Math.floor(minutes / 60)\n const remainingMinutes = minutes - hours * 60\n return remainingMinutes === 0 ? `${hours}h` : `${hours}h ${remainingMinutes}m`\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Workspace, useModalStore, CATEGORY_COLORS, CATEGORY_PILL_COLORS, ICON_MAP, WorkflowCanvas, getEntityIcon, getEntityGradient, useWorkflowStore, LOGIC_ICON_MAP, LOGIC_NODE_GRADIENTS, getFrameworkMeta, getCompatibleModels, isModelCompatibleWithFramework, FRAMEWORK_META, isFrameworkCompatibleWithProviders } from './chunk-
|
|
3
|
-
import { Button, FormInput, FormSelect, GlassModal, FormTextarea,
|
|
2
|
+
import { Workspace, useModalStore, CATEGORY_COLORS, CATEGORY_PILL_COLORS, ICON_MAP, WorkflowCanvas, getEntityIcon, getEntityGradient, useWorkflowStore, LOGIC_ICON_MAP, LOGIC_NODE_GRADIENTS, getFrameworkMeta, getCompatibleModels, isModelCompatibleWithFramework, FRAMEWORK_META, isFrameworkCompatibleWithProviders } from './chunk-BH2AU3LG.mjs';
|
|
3
|
+
import { Button, FormInput, FormSelect, GlassModal, FormTextarea, Badge, FormGrid, ToggleSwitch, Input, DynamicIslandConfirm } from './chunk-I6WYV2AN.mjs';
|
|
4
4
|
import { useTranslations } from './chunk-7VJ7CMMT.mjs';
|
|
5
5
|
import { getAgentTier, createDefaultLogicNodeConfig } from './chunk-WNCPAWLC.mjs';
|
|
6
6
|
import { memo, useCallback, useMemo, useState, useEffect, useRef, Children } from 'react';
|
|
7
|
-
import { UserCircleIcon, Cog6ToothIcon, SparklesIcon, CommandLineIcon, KeyIcon, PlayCircleIcon, CpuChipIcon, ArrowPathRoundedSquareIcon, ArrowsPointingOutIcon, ArrowsPointingInIcon, BoltIcon, ClockIcon, CheckIcon, ArrowPathIcon, AdjustmentsHorizontalIcon, CircleStackIcon, TrashIcon, PlusIcon, XMarkIcon, EyeIcon, PlayIcon, StopIcon,
|
|
7
|
+
import { UserCircleIcon, Cog6ToothIcon, SparklesIcon, CommandLineIcon, KeyIcon, PlayCircleIcon, CpuChipIcon, ArrowPathRoundedSquareIcon, ArrowsPointingOutIcon, ArrowsPointingInIcon, BoltIcon, ClockIcon, CheckIcon, ArrowPathIcon, MinusCircleIcon, XCircleIcon, CheckCircleIcon, ExclamationTriangleIcon, AdjustmentsHorizontalIcon, CircleStackIcon, TrashIcon, PlusIcon, XMarkIcon, EyeIcon, PlayIcon, StopIcon, VariableIcon, ChevronDownIcon, ChevronRightIcon, ExclamationCircleIcon, ClipboardDocumentIcon, ArrowDownTrayIcon, ArrowUpTrayIcon } from '@heroicons/react/24/outline';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
import { create } from 'zustand';
|
|
10
10
|
|
|
@@ -2017,6 +2017,176 @@ function parseRow(row) {
|
|
|
2017
2017
|
}
|
|
2018
2018
|
}
|
|
2019
2019
|
}
|
|
2020
|
+
var STATUS_META = {
|
|
2021
|
+
completed: { color: "emerald", icon: CheckCircleIcon },
|
|
2022
|
+
running: { color: "sky", icon: ArrowPathIcon },
|
|
2023
|
+
failed: { color: "rose", icon: XCircleIcon },
|
|
2024
|
+
pending: { color: "amber", icon: ClockIcon },
|
|
2025
|
+
skipped: { color: "zinc", icon: MinusCircleIcon }
|
|
2026
|
+
};
|
|
2027
|
+
function ExecutionTimelinePanel({
|
|
2028
|
+
entries,
|
|
2029
|
+
labels,
|
|
2030
|
+
selectedNodeId,
|
|
2031
|
+
onSelect
|
|
2032
|
+
}) {
|
|
2033
|
+
const [internalSelected, setInternalSelected] = useState(null);
|
|
2034
|
+
const effectiveSelected = selectedNodeId ?? internalSelected;
|
|
2035
|
+
const selected = useMemo(
|
|
2036
|
+
() => entries.find((entry) => entry.nodeId === effectiveSelected) ?? entries[0] ?? null,
|
|
2037
|
+
[entries, effectiveSelected]
|
|
2038
|
+
);
|
|
2039
|
+
const handleSelect = (nodeId) => {
|
|
2040
|
+
if (onSelect) onSelect(nodeId);
|
|
2041
|
+
setInternalSelected(nodeId);
|
|
2042
|
+
};
|
|
2043
|
+
if (entries.length === 0) {
|
|
2044
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-6 text-center text-sm text-slate-500 dark:border-slate-700 dark:bg-slate-900/40 dark:text-slate-400", children: labels.empty ?? "\u2014" });
|
|
2045
|
+
}
|
|
2046
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-12", children: [
|
|
2047
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-3 lg:col-span-5 xl:col-span-4", children: entries.map((entry, index) => {
|
|
2048
|
+
const meta = STATUS_META[entry.status];
|
|
2049
|
+
const Icon = meta.icon;
|
|
2050
|
+
const isActive = (selected?.nodeId ?? "") === entry.nodeId;
|
|
2051
|
+
return /* @__PURE__ */ jsx(
|
|
2052
|
+
"button",
|
|
2053
|
+
{
|
|
2054
|
+
type: "button",
|
|
2055
|
+
onClick: () => handleSelect(entry.nodeId),
|
|
2056
|
+
className: [
|
|
2057
|
+
"w-full text-left rounded-xl border p-4 transition",
|
|
2058
|
+
isActive ? "border-indigo-400/60 bg-indigo-50/70 shadow-md dark:border-indigo-400/40 dark:bg-indigo-500/10" : "border-slate-200/60 bg-white/70 hover:border-indigo-300 hover:shadow-sm dark:border-white/10 dark:bg-white/5 dark:hover:border-indigo-400/30"
|
|
2059
|
+
].join(" "),
|
|
2060
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
2061
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
2062
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-indigo-100 text-xs font-semibold text-indigo-700 dark:bg-indigo-500/20 dark:text-indigo-200", children: index + 1 }),
|
|
2063
|
+
index < entries.length - 1 && /* @__PURE__ */ jsx("span", { className: "mt-1 h-8 w-px bg-slate-200 dark:bg-white/10" })
|
|
2064
|
+
] }),
|
|
2065
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2066
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2067
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2068
|
+
/* @__PURE__ */ jsx("div", { className: "truncate font-medium text-slate-900 dark:text-white", children: entry.nodeId }),
|
|
2069
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-slate-500 dark:text-slate-400", children: entry.nodeType })
|
|
2070
|
+
] }),
|
|
2071
|
+
/* @__PURE__ */ jsxs(Badge, { color: meta.color, children: [
|
|
2072
|
+
/* @__PURE__ */ jsx(Icon, { className: "mr-1 h-3 w-3" }),
|
|
2073
|
+
labels[entry.status]
|
|
2074
|
+
] })
|
|
2075
|
+
] }),
|
|
2076
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
2077
|
+
/* @__PURE__ */ jsx("span", { children: formatDuration2(entry.durationMs) }),
|
|
2078
|
+
/* @__PURE__ */ jsx("span", { children: "\xB7" }),
|
|
2079
|
+
/* @__PURE__ */ jsx("span", { children: formatTimestamp(entry.startedAt) })
|
|
2080
|
+
] })
|
|
2081
|
+
] })
|
|
2082
|
+
] })
|
|
2083
|
+
},
|
|
2084
|
+
entry.nodeId
|
|
2085
|
+
);
|
|
2086
|
+
}) }),
|
|
2087
|
+
/* @__PURE__ */ jsx("div", { className: "lg:col-span-7 xl:col-span-8", children: selected ? /* @__PURE__ */ jsx(NodeInspector, { entry: selected, labels }) : /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-6 text-center text-sm text-slate-500 dark:border-slate-700 dark:bg-slate-900/40", children: labels.selectNode }) })
|
|
2088
|
+
] });
|
|
2089
|
+
}
|
|
2090
|
+
function NodeInspector({
|
|
2091
|
+
entry,
|
|
2092
|
+
labels
|
|
2093
|
+
}) {
|
|
2094
|
+
const meta = STATUS_META[entry.status];
|
|
2095
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-700 dark:bg-slate-900/40", children: [
|
|
2096
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-start justify-between gap-2", children: [
|
|
2097
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2098
|
+
/* @__PURE__ */ jsx("h3", { className: "truncate text-base font-semibold text-slate-900 dark:text-white", children: entry.nodeId }),
|
|
2099
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: entry.nodeType })
|
|
2100
|
+
] }),
|
|
2101
|
+
/* @__PURE__ */ jsx(Badge, { color: meta.color, children: labels[entry.status] })
|
|
2102
|
+
] }),
|
|
2103
|
+
/* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-2 gap-3 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
2104
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2105
|
+
/* @__PURE__ */ jsx("dt", { className: "font-semibold", children: labels.started }),
|
|
2106
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: formatTimestamp(entry.startedAt) })
|
|
2107
|
+
] }),
|
|
2108
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2109
|
+
/* @__PURE__ */ jsx("dt", { className: "font-semibold", children: labels.completed }),
|
|
2110
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: formatTimestamp(entry.completedAt) })
|
|
2111
|
+
] }),
|
|
2112
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2113
|
+
/* @__PURE__ */ jsx("dt", { className: "font-semibold", children: labels.duration }),
|
|
2114
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: formatDuration2(entry.durationMs) })
|
|
2115
|
+
] }),
|
|
2116
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2117
|
+
/* @__PURE__ */ jsx("dt", { className: "font-semibold", children: labels.status }),
|
|
2118
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 text-slate-700 dark:text-slate-200", children: labels[entry.status] })
|
|
2119
|
+
] })
|
|
2120
|
+
] }),
|
|
2121
|
+
entry.metrics && hasMetrics(entry.metrics) && /* @__PURE__ */ jsx("div", { className: "mt-4 rounded-lg border border-indigo-300/50 bg-indigo-50/60 p-3 text-xs dark:border-indigo-400/30 dark:bg-indigo-500/10", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3 sm:grid-cols-3", children: [
|
|
2122
|
+
entry.metrics.model && /* @__PURE__ */ jsxs("div", { children: [
|
|
2123
|
+
/* @__PURE__ */ jsx("dt", { className: "font-semibold text-indigo-700 dark:text-indigo-200", children: labels.model }),
|
|
2124
|
+
/* @__PURE__ */ jsxs("dd", { className: "mt-0.5 truncate text-indigo-900 dark:text-indigo-100", children: [
|
|
2125
|
+
entry.metrics.provider ? `${entry.metrics.provider} \xB7 ` : "",
|
|
2126
|
+
entry.metrics.model
|
|
2127
|
+
] })
|
|
2128
|
+
] }),
|
|
2129
|
+
(entry.metrics.tokensIn !== void 0 || entry.metrics.tokensOut !== void 0) && /* @__PURE__ */ jsxs("div", { children: [
|
|
2130
|
+
/* @__PURE__ */ jsx("dt", { className: "font-semibold text-indigo-700 dark:text-indigo-200", children: labels.tokens }),
|
|
2131
|
+
/* @__PURE__ */ jsxs("dd", { className: "mt-0.5 text-indigo-900 dark:text-indigo-100", children: [
|
|
2132
|
+
entry.metrics.tokensIn ?? 0,
|
|
2133
|
+
" in \xB7 ",
|
|
2134
|
+
entry.metrics.tokensOut ?? 0,
|
|
2135
|
+
" out"
|
|
2136
|
+
] })
|
|
2137
|
+
] }),
|
|
2138
|
+
entry.metrics.costUsd !== void 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
2139
|
+
/* @__PURE__ */ jsx("dt", { className: "font-semibold text-indigo-700 dark:text-indigo-200", children: labels.cost }),
|
|
2140
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 text-indigo-900 dark:text-indigo-100", children: formatCost(entry.metrics.costUsd) })
|
|
2141
|
+
] })
|
|
2142
|
+
] }) }),
|
|
2143
|
+
entry.error && /* @__PURE__ */ jsxs("div", { className: "mt-4 rounded-lg border border-rose-300/60 bg-rose-50/60 p-3 text-xs dark:border-rose-400/30 dark:bg-rose-500/10", children: [
|
|
2144
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 font-semibold text-rose-700 dark:text-rose-300", children: [
|
|
2145
|
+
/* @__PURE__ */ jsx(ExclamationTriangleIcon, { className: "h-4 w-4" }),
|
|
2146
|
+
labels.error
|
|
2147
|
+
] }),
|
|
2148
|
+
/* @__PURE__ */ jsx("pre", { className: "mt-2 whitespace-pre-wrap break-words text-rose-800 dark:text-rose-200", children: entry.error })
|
|
2149
|
+
] }),
|
|
2150
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-4 space-y-3", children: [
|
|
2151
|
+
/* @__PURE__ */ jsx(JsonBlock, { title: labels.inputs, value: entry.inputs }),
|
|
2152
|
+
/* @__PURE__ */ jsx(JsonBlock, { title: labels.outputs, value: entry.outputs })
|
|
2153
|
+
] })
|
|
2154
|
+
] });
|
|
2155
|
+
}
|
|
2156
|
+
function JsonBlock({ title, value }) {
|
|
2157
|
+
const hasValue = value && Object.keys(value).length > 0;
|
|
2158
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-slate-200/60 bg-slate-50/60 p-3 dark:border-white/10 dark:bg-white/5", children: [
|
|
2159
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400", children: title }),
|
|
2160
|
+
hasValue ? /* @__PURE__ */ jsx("pre", { className: "max-h-72 overflow-auto whitespace-pre text-xs text-slate-800 dark:text-slate-200", children: JSON.stringify(value, null, 2) }) : /* @__PURE__ */ jsx("div", { className: "text-xs italic text-slate-400 dark:text-slate-500", children: "\u2014" })
|
|
2161
|
+
] });
|
|
2162
|
+
}
|
|
2163
|
+
function hasMetrics(metrics) {
|
|
2164
|
+
return Boolean(
|
|
2165
|
+
metrics.model || metrics.tokensIn !== void 0 || metrics.tokensOut !== void 0 || metrics.costUsd !== void 0
|
|
2166
|
+
);
|
|
2167
|
+
}
|
|
2168
|
+
function formatDuration2(ms) {
|
|
2169
|
+
if (ms === null) return "\u2014";
|
|
2170
|
+
if (ms < 1e3) return `${ms}ms`;
|
|
2171
|
+
if (ms < 6e4) return `${(ms / 1e3).toFixed(1)}s`;
|
|
2172
|
+
const mins = Math.floor(ms / 6e4);
|
|
2173
|
+
const secs = Math.floor(ms % 6e4 / 1e3);
|
|
2174
|
+
return `${mins}m${secs}s`;
|
|
2175
|
+
}
|
|
2176
|
+
function formatCost(usd) {
|
|
2177
|
+
if (usd === 0) return "$0";
|
|
2178
|
+
if (usd < 0.01) return `$${usd.toFixed(4)}`;
|
|
2179
|
+
if (usd < 1) return `$${usd.toFixed(3)}`;
|
|
2180
|
+
return `$${usd.toFixed(2)}`;
|
|
2181
|
+
}
|
|
2182
|
+
function formatTimestamp(iso) {
|
|
2183
|
+
if (!iso) return "\u2014";
|
|
2184
|
+
return new Date(iso).toLocaleString(void 0, {
|
|
2185
|
+
hour: "2-digit",
|
|
2186
|
+
minute: "2-digit",
|
|
2187
|
+
second: "2-digit"
|
|
2188
|
+
});
|
|
2189
|
+
}
|
|
2020
2190
|
|
|
2021
2191
|
// src/astrlabe/components/rules/types.ts
|
|
2022
2192
|
var RULE_STATUS_OPTIONS = ["draft", "active", "archived"];
|
|
@@ -3302,7 +3472,7 @@ function VersionHistoryPanel({
|
|
|
3302
3472
|
loadVersions();
|
|
3303
3473
|
}
|
|
3304
3474
|
}, [open, loadVersions]);
|
|
3305
|
-
const
|
|
3475
|
+
const formatTimestamp3 = useCallback((timestamp) => {
|
|
3306
3476
|
try {
|
|
3307
3477
|
const date = new Date(timestamp);
|
|
3308
3478
|
return new Intl.DateTimeFormat(void 0, {
|
|
@@ -3373,7 +3543,7 @@ function VersionHistoryPanel({
|
|
|
3373
3543
|
isCurrentVersion && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-medium text-blue-700 dark:bg-blue-500/20 dark:text-blue-300", children: translations("current") })
|
|
3374
3544
|
] }) }),
|
|
3375
3545
|
/* @__PURE__ */ jsxs("div", { className: "mt-1 text-xs text-gray-500 dark:text-gray-400", children: [
|
|
3376
|
-
/* @__PURE__ */ jsx("div", { children:
|
|
3546
|
+
/* @__PURE__ */ jsx("div", { children: formatTimestamp3(version.publishedAt) }),
|
|
3377
3547
|
/* @__PURE__ */ jsxs("div", { className: "mt-0.5", children: [
|
|
3378
3548
|
translations("publishedBy"),
|
|
3379
3549
|
": ",
|
|
@@ -3453,7 +3623,7 @@ var STATUS_CONFIG = {
|
|
|
3453
3623
|
label: "error"
|
|
3454
3624
|
}
|
|
3455
3625
|
};
|
|
3456
|
-
function
|
|
3626
|
+
function formatDuration3(durationMs) {
|
|
3457
3627
|
if (durationMs < 1e3) {
|
|
3458
3628
|
return `${durationMs}ms`;
|
|
3459
3629
|
}
|
|
@@ -3547,7 +3717,7 @@ function RunPanel({ open, onClose, onRun, onStop }) {
|
|
|
3547
3717
|
] }),
|
|
3548
3718
|
result?.error && /* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-xs text-red-500 dark:text-red-400", children: result.error })
|
|
3549
3719
|
] }),
|
|
3550
|
-
result?.durationMs !== void 0 && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children:
|
|
3720
|
+
result?.durationMs !== void 0 && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children: formatDuration3(result.durationMs) })
|
|
3551
3721
|
]
|
|
3552
3722
|
},
|
|
3553
3723
|
node.id
|
|
@@ -3948,12 +4118,12 @@ var STATUS_STYLES = {
|
|
|
3948
4118
|
error: { icon: ExclamationCircleIcon, colorClass: "text-red-500" },
|
|
3949
4119
|
skipped: { icon: ClockIcon, colorClass: "text-gray-400" }
|
|
3950
4120
|
};
|
|
3951
|
-
function
|
|
4121
|
+
function formatDuration4(durationMs) {
|
|
3952
4122
|
if (durationMs === null) return "\u2014";
|
|
3953
4123
|
if (durationMs < 1e3) return `${durationMs}ms`;
|
|
3954
4124
|
return `${(durationMs / 1e3).toFixed(1)}s`;
|
|
3955
4125
|
}
|
|
3956
|
-
function
|
|
4126
|
+
function formatTimestamp2(timestamp) {
|
|
3957
4127
|
const date = new Date(timestamp);
|
|
3958
4128
|
return date.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", second: "2-digit" });
|
|
3959
4129
|
}
|
|
@@ -4010,7 +4180,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4010
4180
|
/* @__PURE__ */ jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
|
|
4011
4181
|
/* @__PURE__ */ jsx("span", { className: "truncate text-gray-700 dark:text-gray-300", children: nodeId.slice(0, 8) })
|
|
4012
4182
|
] }),
|
|
4013
|
-
result.durationMs !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-gray-400", children:
|
|
4183
|
+
result.durationMs !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: formatDuration4(result.durationMs) })
|
|
4014
4184
|
] }, nodeId);
|
|
4015
4185
|
}) })
|
|
4016
4186
|
] }),
|
|
@@ -4026,7 +4196,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4026
4196
|
] }),
|
|
4027
4197
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
|
|
4028
4198
|
/* @__PURE__ */ jsx("span", { className: "text-gray-500", children: t("duration") }),
|
|
4029
|
-
/* @__PURE__ */ jsx("span", { className: "text-gray-700 dark:text-gray-300", children:
|
|
4199
|
+
/* @__PURE__ */ jsx("span", { className: "text-gray-700 dark:text-gray-300", children: formatDuration4(selectedNode.durationMs) })
|
|
4030
4200
|
] }),
|
|
4031
4201
|
selectedNode.error && /* @__PURE__ */ jsxs("div", { children: [
|
|
4032
4202
|
/* @__PURE__ */ jsx("span", { className: "text-red-500", children: t("error") }),
|
|
@@ -4063,9 +4233,9 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4063
4233
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
4064
4234
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4065
4235
|
/* @__PURE__ */ jsx(StatusIcon, { className: `h-3.5 w-3.5 ${statusStyle.colorClass}` }),
|
|
4066
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-gray-900 dark:text-white", children:
|
|
4236
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-gray-900 dark:text-white", children: formatTimestamp2(run.createdAt) })
|
|
4067
4237
|
] }),
|
|
4068
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children:
|
|
4238
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration4(run.totalDurationMs) })
|
|
4069
4239
|
] }),
|
|
4070
4240
|
run.error && /* @__PURE__ */ jsx("p", { className: "mt-1 truncate text-[10px] text-red-500", children: run.error })
|
|
4071
4241
|
]
|
|
@@ -4089,7 +4259,7 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
4089
4259
|
/* @__PURE__ */ jsx(NodeStatusIcon, { className: `h-3 w-3 ${nodeStatusStyle.colorClass}` }),
|
|
4090
4260
|
/* @__PURE__ */ jsx("span", { className: "text-gray-700 dark:text-gray-300", children: nodeResult.nodeType })
|
|
4091
4261
|
] }),
|
|
4092
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children:
|
|
4262
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children: formatDuration4(nodeResult.durationMs) })
|
|
4093
4263
|
]
|
|
4094
4264
|
},
|
|
4095
4265
|
nodeResult.nodeId
|
|
@@ -4776,6 +4946,6 @@ function useHelpLines() {
|
|
|
4776
4946
|
};
|
|
4777
4947
|
}
|
|
4778
4948
|
|
|
4779
|
-
export { AgentModal, AmazonNovaIcon, AnthropicModelIcon, AutoSaveWorkspace, DslExportModal, DslImportModal, DynamicIslandConfirm2 as DynamicIslandConfirm, MetaLlamaIcon, NodePalette, OutputSchemaBuilder, PipelineSettingsModal, PreviewPanel, RULE_STATUS_OPTIONS, RuleActionBuilder, RuleConditionBuilder, RuleForm, RunInputDialog, RunPanel, RunReplayModal, SaveStatusBadge, SubworkflowModal, TIMEZONE_OPTIONS, VariableInspector, VersionHistoryPanel, WorkflowListBar, defaultAgentOutputSchema, defaultRuleAction, defaultRuleCondition, defaultRuleForm, getModelIcon, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo };
|
|
4780
|
-
//# sourceMappingURL=chunk-
|
|
4781
|
-
//# sourceMappingURL=chunk-
|
|
4949
|
+
export { AgentModal, AmazonNovaIcon, AnthropicModelIcon, AutoSaveWorkspace, DslExportModal, DslImportModal, DynamicIslandConfirm2 as DynamicIslandConfirm, ExecutionTimelinePanel, MetaLlamaIcon, NodePalette, OutputSchemaBuilder, PipelineSettingsModal, PreviewPanel, RULE_STATUS_OPTIONS, RuleActionBuilder, RuleConditionBuilder, RuleForm, RunInputDialog, RunPanel, RunReplayModal, SaveStatusBadge, SubworkflowModal, TIMEZONE_OPTIONS, VariableInspector, VersionHistoryPanel, WorkflowListBar, defaultAgentOutputSchema, defaultRuleAction, defaultRuleCondition, defaultRuleForm, getModelIcon, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo };
|
|
4950
|
+
//# sourceMappingURL=chunk-63AL2RN5.mjs.map
|
|
4951
|
+
//# sourceMappingURL=chunk-63AL2RN5.mjs.map
|