@loopstack/loopstack-studio 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/config.js +3 -3
- package/dist/api/index.js +9 -13
- package/dist/api/processor.js +1 -1
- package/dist/api/workflows.js +7 -1
- package/dist/components/dynamic-form/CodeContent.js +3 -3
- package/dist/components/dynamic-form/fields/CodeViewField.js +36 -36
- package/dist/components/feedback/LoadingCentered.js +1 -1
- package/dist/components/layout/StudioSidebar.js +2 -2
- package/dist/components/loopstack-elements/link.js +77 -76
- package/dist/components/loopstack-elements/tool.js +171 -0
- package/dist/components/ui-widgets/UiActions.js +10 -4
- package/dist/components/ui-widgets/UiWidget.js +27 -36
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +8 -6
- package/dist/components/ui-widgets/widgets/SubmitButton.js +8 -6
- package/dist/features/code-explorer/components/FileContentViewer.js +87 -112
- package/dist/features/dashboard/RunItem.js +1 -1
- package/dist/features/debug/components/ConfigFlowViewer.js +2 -2
- package/dist/features/debug/components/{PipelineDebugHeader.js → WorkflowDebugHeader.js} +5 -5
- package/dist/features/debug/components/{PipelineDebugLegend.js → WorkflowDebugLegend.js} +2 -2
- package/dist/features/debug/components/{PipelineFlowViewer.js → WorkflowFlowViewer.js} +9 -9
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +46 -0
- package/dist/features/debug/index.js +2 -2
- package/dist/features/debug/lib/flow-utils.js +142 -150
- package/dist/features/documents/DocumentRenderer.js +66 -30
- package/dist/features/documents/components/DocumentItem.js +2 -2
- package/dist/features/documents/components/DocumentList.js +15 -12
- package/dist/features/documents/document-details/DocumentDetails.js +4 -4
- package/dist/features/documents/renderers/AiMessage.js +1 -1
- package/dist/features/documents/renderers/ChoicesRenderer.js +92 -0
- package/dist/features/documents/renderers/ClaudeMessage.js +1 -1
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +56 -0
- package/dist/features/documents/renderers/DocumentFormRenderer.js +95 -71
- package/dist/features/documents/renderers/LinkMessageRenderer.js +8 -10
- package/dist/features/documents/renderers/SecretInputRenderer.js +87 -0
- package/dist/features/documents/renderers/TextPromptRenderer.js +57 -0
- package/dist/features/documents/renderers/useDocumentTransition.js +30 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +20 -20
- package/dist/features/runs/Runs.js +8 -8
- package/dist/features/workbench/Workbench.js +35 -35
- package/dist/features/workbench/WorkflowItem.js +10 -9
- package/dist/features/workbench/WorkflowList.js +56 -73
- package/dist/features/workbench/components/NewRunDialog.js +18 -18
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +1 -1
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +33 -72
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +27 -29
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +30 -42
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +2 -2
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/workbench/components/WorkbenchSettingsModal.js +16 -41
- package/dist/features/workbench/components/WorkflowForms.js +14 -13
- package/dist/features/workbench/components/WorkflowHistoryItem.js +60 -81
- package/dist/features/workbench/components/{PipelineHistoryList.js → WorkflowHistoryList.js} +5 -5
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +56 -54
- package/dist/features/workbench/hooks/useWorkflowData.js +10 -10
- package/dist/features/workbench/hooks/useWorkflowListState.js +8 -45
- package/dist/features/workbench/index.js +2 -3
- package/dist/features/workbench/providers/ScrollProvider.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +4 -4
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/features/workspaces/components/CreateWorkspace.js +12 -12
- package/dist/features/workspaces/components/ExecutionTimeline.js +22 -21
- package/dist/features/workspaces/components/{NewPipelineRunDialog.js → NewWorkflowRunDialog.js} +6 -6
- package/dist/features/workspaces/components/{PipelineForm.js → WorkflowRunForm.js} +31 -31
- package/dist/features/workspaces/components/WorkspaceHomePage.js +11 -11
- package/dist/features/workspaces/components/{pipeline-form → workflow-form}/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/{pipeline-form → workflow-form}/SelectionView.js +16 -16
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/query-keys.js +31 -72
- package/dist/hooks/useConfig.js +5 -5
- package/dist/hooks/useProcessor.js +5 -5
- package/dist/hooks/useWorkflows.js +155 -68
- package/dist/index.d.ts +127 -128
- package/dist/index.js +5 -5
- package/dist/packages/contracts/dist/enums/index.js +11 -12
- package/dist/packages/contracts/dist/enums/workflow-state.enum.js +1 -1
- package/dist/pages/DebugWorkflowDetailsPage.js +8 -8
- package/dist/pages/DebugWorkflowsPage.js +10 -10
- package/dist/pages/EmbedWorkbenchPage.js +42 -52
- package/dist/pages/PreviewWorkbenchPage.js +130 -255
- package/dist/pages/RunsListPage.js +1 -1
- package/dist/pages/StudioLandingPage.js +13 -13
- package/dist/pages/WorkbenchPage.js +6 -6
- package/dist/pages/WorkflowDebugPage.js +114 -0
- package/dist/pages/WorkspacePage.js +4 -2
- package/dist/providers/InvalidationEventsProvider.js +19 -19
- package/dist/providers/SseProvider.js +0 -1
- package/dist/routing/LocalRouter.js +14 -17
- package/package.json +2 -2
- package/dist/api/namespaces.js +0 -7
- package/dist/api/pipelines.js +0 -13
- package/dist/components/ai-elements/tool.js +0 -158
- package/dist/components/ui-widgets/widgets/SecretInput.js +0 -42
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +0 -41
- package/dist/features/workbench/NavigationItems.js +0 -52
- package/dist/features/workbench/WorkbenchNavigation.js +0 -38
- package/dist/features/workbench/components/NavigationItem.js +0 -68
- package/dist/features/workbench/hooks/useIntersectionObserver.js +0 -44
- package/dist/hooks/useNamespaceTree.js +0 -27
- package/dist/hooks/useNamespaces.js +0 -25
- package/dist/hooks/usePipelines.js +0 -161
- package/dist/packages/contracts/dist/enums/pipeline-state.js +0 -10
- package/dist/pages/PipelineDebugPage.js +0 -115
- /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/StateNode.js +0 -0
- /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/WorkflowTransitionEdge.js +0 -0
- /package/dist/features/workspaces/components/{pipeline-form → workflow-form}/HeaderSection.js +0 -0
|
@@ -1,57 +1,48 @@
|
|
|
1
1
|
import AiPromptInput_default from "./widgets/AiPromptInput.js";
|
|
2
2
|
import { ButtonFullWidth } from "./widgets/ButtonFullWidth.js";
|
|
3
3
|
import { SandboxRun } from "./widgets/SandboxRun.js";
|
|
4
|
-
import { SecretInput } from "./widgets/SecretInput.js";
|
|
5
4
|
import { SubmitButton } from "./widgets/SubmitButton.js";
|
|
6
5
|
import { c } from "react/compiler-runtime";
|
|
7
6
|
import React from "react";
|
|
8
7
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
9
|
-
var UiWidget_default = (
|
|
10
|
-
let
|
|
11
|
-
switch (
|
|
8
|
+
var UiWidget_default = (s) => {
|
|
9
|
+
let l = c(18), { config: u, onSubmit: d, disabled: f, isLoading: p } = s, m = u.options;
|
|
10
|
+
switch (u.widget) {
|
|
12
11
|
case "prompt-input": {
|
|
13
|
-
let
|
|
14
|
-
return
|
|
15
|
-
disabled:
|
|
16
|
-
onSubmit:
|
|
17
|
-
ui:
|
|
18
|
-
}),
|
|
12
|
+
let a;
|
|
13
|
+
return l[0] !== f || l[1] !== d || l[2] !== m ? (a = /* @__PURE__ */ jsx(AiPromptInput_default, {
|
|
14
|
+
disabled: f,
|
|
15
|
+
onSubmit: d,
|
|
16
|
+
ui: m
|
|
17
|
+
}), l[0] = f, l[1] = d, l[2] = m, l[3] = a) : a = l[3], a;
|
|
19
18
|
}
|
|
20
19
|
case "button": {
|
|
21
|
-
let e =
|
|
22
|
-
return
|
|
20
|
+
let e = m, a;
|
|
21
|
+
return l[4] !== f || l[5] !== p || l[6] !== d || l[7] !== e ? (a = /* @__PURE__ */ jsx(SubmitButton, {
|
|
23
22
|
ui: e,
|
|
24
|
-
disabled:
|
|
25
|
-
onClick:
|
|
26
|
-
isLoading:
|
|
27
|
-
}),
|
|
23
|
+
disabled: f,
|
|
24
|
+
onClick: d,
|
|
25
|
+
isLoading: p
|
|
26
|
+
}), l[4] = f, l[5] = p, l[6] = d, l[7] = e, l[8] = a) : a = l[8], a;
|
|
28
27
|
}
|
|
29
28
|
case "button-full-w": {
|
|
30
|
-
let e =
|
|
31
|
-
return
|
|
29
|
+
let e = m, o;
|
|
30
|
+
return l[9] !== f || l[10] !== p || l[11] !== d || l[12] !== e ? (o = /* @__PURE__ */ jsx(ButtonFullWidth, {
|
|
32
31
|
ui: e,
|
|
33
|
-
disabled:
|
|
34
|
-
onClick:
|
|
35
|
-
isLoading:
|
|
36
|
-
}),
|
|
32
|
+
disabled: f,
|
|
33
|
+
onClick: d,
|
|
34
|
+
isLoading: p
|
|
35
|
+
}), l[9] = f, l[10] = p, l[11] = d, l[12] = e, l[13] = o) : o = l[13], o;
|
|
37
36
|
}
|
|
38
37
|
case "sandbox-run": {
|
|
39
|
-
let e =
|
|
40
|
-
return
|
|
38
|
+
let e = m, a;
|
|
39
|
+
return l[14] !== f || l[15] !== e ? (a = /* @__PURE__ */ jsx(SandboxRun, {
|
|
41
40
|
ui: e,
|
|
42
|
-
disabled:
|
|
43
|
-
}),
|
|
44
|
-
}
|
|
45
|
-
case "secret-input": {
|
|
46
|
-
let e = h, o;
|
|
47
|
-
return u[17] !== p || u[18] !== f || u[19] !== e ? (o = /* @__PURE__ */ jsx(SecretInput, {
|
|
48
|
-
ui: e,
|
|
49
|
-
disabled: p,
|
|
50
|
-
onSubmit: f
|
|
51
|
-
}), u[17] = p, u[18] = f, u[19] = e, u[20] = o) : o = u[20], o;
|
|
41
|
+
disabled: f
|
|
42
|
+
}), l[14] = f, l[15] = e, l[16] = a) : a = l[16], a;
|
|
52
43
|
}
|
|
53
44
|
}
|
|
54
|
-
let
|
|
55
|
-
return
|
|
45
|
+
let h;
|
|
46
|
+
return l[17] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ jsx(Fragment$1, {}), l[17] = h) : h = l[17], h;
|
|
56
47
|
};
|
|
57
48
|
export { UiWidget_default as default };
|
|
@@ -4,20 +4,22 @@ import React from "react";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Loader2 } from "lucide-react";
|
|
6
6
|
const ButtonFullWidth = (a) => {
|
|
7
|
-
let o = c(
|
|
7
|
+
let o = c(13), { ui: s, disabled: l, onClick: u, isLoading: d } = a, f = s?.label ?? "Submit", p;
|
|
8
8
|
o[0] === s?.props ? p = o[1] : (p = s?.props ?? {}, o[0] = s?.props, o[1] = p);
|
|
9
9
|
let m = p, h = s?.variant ?? "default", g = l || d, _;
|
|
10
|
-
o[2] ===
|
|
10
|
+
o[2] === u ? _ = o[3] : (_ = () => u(), o[2] = u, o[3] = _);
|
|
11
11
|
let v;
|
|
12
|
-
|
|
12
|
+
o[4] === d ? v = o[5] : (v = d && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), o[4] = d, o[5] = v);
|
|
13
|
+
let y;
|
|
14
|
+
return o[6] !== m || o[7] !== f || o[8] !== g || o[9] !== _ || o[10] !== v || o[11] !== h ? (y = /* @__PURE__ */ jsxs(Button, {
|
|
13
15
|
type: "button",
|
|
14
16
|
variant: h,
|
|
15
17
|
...m,
|
|
16
18
|
disabled: g,
|
|
17
|
-
onClick:
|
|
19
|
+
onClick: _,
|
|
18
20
|
size: "lg",
|
|
19
21
|
className: "w-full font-medium",
|
|
20
|
-
children: [
|
|
21
|
-
}), o[
|
|
22
|
+
children: [v, f]
|
|
23
|
+
}), o[6] = m, o[7] = f, o[8] = g, o[9] = _, o[10] = v, o[11] = h, o[12] = y) : y = o[12], y;
|
|
22
24
|
};
|
|
23
25
|
export { ButtonFullWidth };
|
|
@@ -4,20 +4,22 @@ import React from "react";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Loader2 } from "lucide-react";
|
|
6
6
|
const SubmitButton = (a) => {
|
|
7
|
-
let o = c(
|
|
7
|
+
let o = c(12), { ui: s, disabled: l, onClick: u, isLoading: d } = a, f = s?.label || "Submit", p;
|
|
8
8
|
o[0] === s?.props ? p = o[1] : (p = s?.props || {}, o[0] = s?.props, o[1] = p);
|
|
9
9
|
let m = p, h = l || d, g;
|
|
10
|
-
o[2] ===
|
|
10
|
+
o[2] === u ? g = o[3] : (g = () => u(), o[2] = u, o[3] = g);
|
|
11
11
|
let _;
|
|
12
|
-
|
|
12
|
+
o[4] === d ? _ = o[5] : (_ = d && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), o[4] = d, o[5] = _);
|
|
13
|
+
let v;
|
|
14
|
+
return o[6] !== m || o[7] !== f || o[8] !== h || o[9] !== g || o[10] !== _ ? (v = /* @__PURE__ */ jsxs(Button, {
|
|
13
15
|
type: "button",
|
|
14
16
|
variant: "default",
|
|
15
17
|
...m,
|
|
16
18
|
disabled: h,
|
|
17
|
-
onClick:
|
|
19
|
+
onClick: g,
|
|
18
20
|
size: "default",
|
|
19
21
|
className: "w-48",
|
|
20
|
-
children: [
|
|
21
|
-
}), o[
|
|
22
|
+
children: [_, f]
|
|
23
|
+
}), o[6] = m, o[7] = f, o[8] = h, o[9] = g, o[10] = _, o[11] = v) : v = o[11], v;
|
|
22
24
|
};
|
|
23
25
|
export { SubmitButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.js";
|
|
2
|
-
import { ScrollArea } from "../../../components/ui/scroll-area.js";
|
|
2
|
+
import { ScrollArea, ScrollBar } from "../../../components/ui/scroll-area.js";
|
|
3
3
|
import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
|
|
4
4
|
import { ReactFlowProvider } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
5
5
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../components/ui/tabs.js";
|
|
@@ -29,8 +29,8 @@ var BINARY_EXTENSIONS = new Set([
|
|
|
29
29
|
".dylib"
|
|
30
30
|
]);
|
|
31
31
|
function isBinaryFileName(e) {
|
|
32
|
-
let
|
|
33
|
-
return BINARY_EXTENSIONS.has(
|
|
32
|
+
let g = e.includes(".") ? e.slice(e.lastIndexOf(".")).toLowerCase() : "";
|
|
33
|
+
return BINARY_EXTENSIONS.has(g);
|
|
34
34
|
}
|
|
35
35
|
var EXTENSION_LANGUAGE = {
|
|
36
36
|
".ts": "typescript",
|
|
@@ -67,81 +67,101 @@ var EXTENSION_LANGUAGE = {
|
|
|
67
67
|
function getLanguageForFileName(e) {
|
|
68
68
|
return EXTENSION_LANGUAGE[e.includes(".") ? e.slice(e.lastIndexOf(".")).toLowerCase() : ""] ?? "plaintext";
|
|
69
69
|
}
|
|
70
|
-
function FileContentViewer(
|
|
71
|
-
let
|
|
72
|
-
if (!
|
|
73
|
-
let h;
|
|
74
|
-
y[0] === w ? h = y[1] : (h = cn("flex flex-1 items-center justify-center bg-background", w), y[0] = w, y[1] = h);
|
|
70
|
+
function FileContentViewer(y) {
|
|
71
|
+
let b = c(41), { selectedFile: x, content: S, workflowConfig: C, isLoading: w, className: T } = y, E = C === void 0 ? null : C, D = w === void 0 ? !1 : w;
|
|
72
|
+
if (!x) {
|
|
75
73
|
let g;
|
|
76
|
-
|
|
74
|
+
b[0] === T ? g = b[1] : (g = cn("flex flex-1 items-center justify-center bg-background", T), b[0] = T, b[1] = g);
|
|
75
|
+
let _;
|
|
76
|
+
b[2] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("p", {
|
|
77
77
|
className: "text-sm text-muted-foreground",
|
|
78
78
|
children: "Select a tab to view its content"
|
|
79
|
-
}),
|
|
80
|
-
let
|
|
81
|
-
return
|
|
82
|
-
className:
|
|
83
|
-
children:
|
|
84
|
-
}),
|
|
79
|
+
}), b[2] = _) : _ = b[2];
|
|
80
|
+
let v;
|
|
81
|
+
return b[3] === g ? v = b[4] : (v = /* @__PURE__ */ jsx("div", {
|
|
82
|
+
className: g,
|
|
83
|
+
children: _
|
|
84
|
+
}), b[3] = g, b[4] = v), v;
|
|
85
85
|
}
|
|
86
|
-
let
|
|
87
|
-
if (
|
|
88
|
-
let h;
|
|
89
|
-
y[5] === w ? h = y[6] : (h = cn("flex flex-1 flex-col rounded-lg border bg-background", w), y[5] = w, y[6] = h);
|
|
86
|
+
let O = isBinaryFileName(x.name), k = S != null, A = S ?? "";
|
|
87
|
+
if (O && !k) {
|
|
90
88
|
let g;
|
|
91
|
-
|
|
89
|
+
b[5] === T ? g = b[6] : (g = cn("flex flex-1 flex-col rounded-lg border bg-background", T), b[5] = T, b[6] = g);
|
|
90
|
+
let _;
|
|
91
|
+
b[7] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("div", {
|
|
92
92
|
className: "flex flex-1 items-center justify-center p-8",
|
|
93
93
|
children: /* @__PURE__ */ jsx("p", {
|
|
94
94
|
className: "text-sm text-muted-foreground",
|
|
95
95
|
children: "Binary file — preview not available"
|
|
96
96
|
})
|
|
97
|
-
}),
|
|
98
|
-
let
|
|
99
|
-
return
|
|
100
|
-
className:
|
|
101
|
-
children:
|
|
102
|
-
}),
|
|
97
|
+
}), b[7] = _) : _ = b[7];
|
|
98
|
+
let v;
|
|
99
|
+
return b[8] === g ? v = b[9] : (v = /* @__PURE__ */ jsx("div", {
|
|
100
|
+
className: g,
|
|
101
|
+
children: _
|
|
102
|
+
}), b[8] = g, b[9] = v), v;
|
|
103
103
|
}
|
|
104
|
-
if (!
|
|
105
|
-
let h;
|
|
106
|
-
y[10] === w ? h = y[11] : (h = cn("flex flex-1 flex-col rounded-lg border bg-background", w), y[10] = w, y[11] = h);
|
|
104
|
+
if (!k && !D) {
|
|
107
105
|
let g;
|
|
108
|
-
|
|
106
|
+
b[10] === T ? g = b[11] : (g = cn("flex flex-1 flex-col rounded-lg border bg-background", T), b[10] = T, b[11] = g);
|
|
107
|
+
let _;
|
|
108
|
+
b[12] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("div", {
|
|
109
109
|
className: "flex flex-1 items-center justify-center p-8",
|
|
110
110
|
children: /* @__PURE__ */ jsx("p", {
|
|
111
111
|
className: "text-sm text-destructive",
|
|
112
112
|
children: "Error loading file content"
|
|
113
113
|
})
|
|
114
|
-
}),
|
|
115
|
-
let
|
|
116
|
-
return
|
|
117
|
-
className:
|
|
118
|
-
children:
|
|
119
|
-
}),
|
|
114
|
+
}), b[12] = _) : _ = b[12];
|
|
115
|
+
let v;
|
|
116
|
+
return b[13] === g ? v = b[14] : (v = /* @__PURE__ */ jsx("div", {
|
|
117
|
+
className: g,
|
|
118
|
+
children: _
|
|
119
|
+
}), b[13] = g, b[14] = v), v;
|
|
120
120
|
}
|
|
121
|
-
if (
|
|
122
|
-
let h;
|
|
123
|
-
y[15] === w ? h = y[16] : (h = cn("flex flex-1 flex-col rounded-lg border bg-background", w), y[15] = w, y[16] = h);
|
|
121
|
+
if (D) {
|
|
124
122
|
let g;
|
|
125
|
-
|
|
123
|
+
b[15] === T ? g = b[16] : (g = cn("flex flex-1 flex-col rounded-lg border bg-background", T), b[15] = T, b[16] = g);
|
|
124
|
+
let _;
|
|
125
|
+
b[17] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("div", {
|
|
126
126
|
className: "flex justify-center p-8",
|
|
127
127
|
children: /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" })
|
|
128
|
-
}),
|
|
129
|
-
let
|
|
130
|
-
return
|
|
131
|
-
className:
|
|
132
|
-
children:
|
|
133
|
-
}),
|
|
128
|
+
}), b[17] = _) : _ = b[17];
|
|
129
|
+
let v;
|
|
130
|
+
return b[18] === g ? v = b[19] : (v = /* @__PURE__ */ jsx("div", {
|
|
131
|
+
className: g,
|
|
132
|
+
children: _
|
|
133
|
+
}), b[18] = g, b[19] = v), v;
|
|
134
134
|
}
|
|
135
|
-
let
|
|
136
|
-
|
|
137
|
-
let
|
|
138
|
-
|
|
139
|
-
let
|
|
140
|
-
|
|
141
|
-
let
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
135
|
+
let j;
|
|
136
|
+
b[20] === x.name ? j = b[21] : (j = getLanguageForFileName(x.name), b[20] = x.name, b[21] = j);
|
|
137
|
+
let M = j, N;
|
|
138
|
+
b[22] !== M || b[23] !== x.name ? (N = M === "markdown" || x.name.endsWith(".md") || x.name.endsWith(".mdx"), b[22] = M, b[23] = x.name, b[24] = N) : N = b[24];
|
|
139
|
+
let P = N, F;
|
|
140
|
+
b[25] !== M || b[26] !== x.name ? (F = M === "yaml" || x.name.endsWith(".yaml") || x.name.endsWith(".yml"), b[25] = M, b[26] = x.name, b[27] = F) : F = b[27];
|
|
141
|
+
let I = F && E !== null, L;
|
|
142
|
+
b[28] === M ? L = b[29] : (L = (e) => /* @__PURE__ */ jsxs(ScrollArea, {
|
|
143
|
+
className: "h-full w-full",
|
|
144
|
+
children: [/* @__PURE__ */ jsx(Prism, {
|
|
145
|
+
language: M,
|
|
146
|
+
style: vscDarkPlus,
|
|
147
|
+
customStyle: {
|
|
148
|
+
margin: 0,
|
|
149
|
+
padding: "1rem",
|
|
150
|
+
fontSize: "13px",
|
|
151
|
+
overflow: "visible",
|
|
152
|
+
minWidth: "max-content",
|
|
153
|
+
width: "100%"
|
|
154
|
+
},
|
|
155
|
+
showLineNumbers: !0,
|
|
156
|
+
PreTag: "div",
|
|
157
|
+
codeTagProps: { style: { fontFamily: "inherit" } },
|
|
158
|
+
children: e
|
|
159
|
+
}), /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" })]
|
|
160
|
+
}), b[28] = M, b[29] = L);
|
|
161
|
+
let R = L, z;
|
|
162
|
+
b[30] === T ? z = b[31] : (z = cn("flex h-full flex-col overflow-hidden rounded-lg border bg-background", T), b[30] = T, b[31] = z);
|
|
163
|
+
let B;
|
|
164
|
+
b[32] !== A || b[33] !== P || b[34] !== I || b[35] !== R || b[36] !== E ? (B = P && A ? /* @__PURE__ */ jsxs(Tabs, {
|
|
145
165
|
defaultValue: "rendered",
|
|
146
166
|
className: "flex h-full flex-col overflow-hidden",
|
|
147
167
|
children: [
|
|
@@ -162,32 +182,17 @@ function FileContentViewer(v) {
|
|
|
162
182
|
className: "h-full",
|
|
163
183
|
children: /* @__PURE__ */ jsx("div", {
|
|
164
184
|
className: "p-4",
|
|
165
|
-
children: /* @__PURE__ */ jsx(MarkdownContent_default, { content:
|
|
185
|
+
children: /* @__PURE__ */ jsx(MarkdownContent_default, { content: A })
|
|
166
186
|
})
|
|
167
187
|
})
|
|
168
188
|
}),
|
|
169
189
|
/* @__PURE__ */ jsx(TabsContent, {
|
|
170
190
|
value: "unrendered",
|
|
171
191
|
className: "flex-1 min-h-0 overflow-hidden mt-0",
|
|
172
|
-
children:
|
|
173
|
-
className: "flex-1 min-h-0",
|
|
174
|
-
children: /* @__PURE__ */ jsx(Prism, {
|
|
175
|
-
language: j,
|
|
176
|
-
style: vscDarkPlus,
|
|
177
|
-
customStyle: {
|
|
178
|
-
margin: 0,
|
|
179
|
-
padding: "1rem",
|
|
180
|
-
fontSize: "13px"
|
|
181
|
-
},
|
|
182
|
-
showLineNumbers: !0,
|
|
183
|
-
PreTag: "div",
|
|
184
|
-
codeTagProps: { style: { fontFamily: "inherit" } },
|
|
185
|
-
children: k ?? ""
|
|
186
|
-
})
|
|
187
|
-
})
|
|
192
|
+
children: R(A)
|
|
188
193
|
})
|
|
189
194
|
]
|
|
190
|
-
}) :
|
|
195
|
+
}) : I && E ? /* @__PURE__ */ jsxs(Tabs, {
|
|
191
196
|
defaultValue: "code",
|
|
192
197
|
className: "flex h-full flex-col overflow-hidden",
|
|
193
198
|
children: [
|
|
@@ -204,52 +209,22 @@ function FileContentViewer(v) {
|
|
|
204
209
|
/* @__PURE__ */ jsx(TabsContent, {
|
|
205
210
|
value: "code",
|
|
206
211
|
className: "flex-1 min-h-0 overflow-hidden mt-0",
|
|
207
|
-
children:
|
|
208
|
-
className: "flex-1 min-h-0",
|
|
209
|
-
children: /* @__PURE__ */ jsx(Prism, {
|
|
210
|
-
language: j,
|
|
211
|
-
style: vscDarkPlus,
|
|
212
|
-
customStyle: {
|
|
213
|
-
margin: 0,
|
|
214
|
-
padding: "1rem",
|
|
215
|
-
fontSize: "13px"
|
|
216
|
-
},
|
|
217
|
-
showLineNumbers: !0,
|
|
218
|
-
PreTag: "div",
|
|
219
|
-
codeTagProps: { style: { fontFamily: "inherit" } },
|
|
220
|
-
children: k ?? ""
|
|
221
|
-
})
|
|
222
|
-
})
|
|
212
|
+
children: R(A)
|
|
223
213
|
}),
|
|
224
214
|
/* @__PURE__ */ jsx(TabsContent, {
|
|
225
215
|
value: "flow",
|
|
226
216
|
className: "flex-1 min-h-0 overflow-hidden mt-0",
|
|
227
217
|
children: /* @__PURE__ */ jsx("div", {
|
|
228
218
|
className: "h-full w-full",
|
|
229
|
-
children: /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(ConfigFlowViewer_default, { config:
|
|
219
|
+
children: /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(ConfigFlowViewer_default, { config: E }) })
|
|
230
220
|
})
|
|
231
221
|
})
|
|
232
222
|
]
|
|
233
|
-
}) :
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
margin: 0,
|
|
240
|
-
padding: "1rem",
|
|
241
|
-
fontSize: "13px"
|
|
242
|
-
},
|
|
243
|
-
showLineNumbers: !0,
|
|
244
|
-
PreTag: "div",
|
|
245
|
-
codeTagProps: { style: { fontFamily: "inherit" } },
|
|
246
|
-
children: k ?? ""
|
|
247
|
-
})
|
|
248
|
-
}), y[30] = k, y[31] = N, y[32] = F, y[33] = j, y[34] = T, y[35] = L) : L = y[35];
|
|
249
|
-
let R;
|
|
250
|
-
return y[36] !== I || y[37] !== L ? (R = /* @__PURE__ */ jsx("div", {
|
|
251
|
-
className: I,
|
|
252
|
-
children: L
|
|
253
|
-
}), y[36] = I, y[37] = L, y[38] = R) : R = y[38], R;
|
|
223
|
+
}) : R(A), b[32] = A, b[33] = P, b[34] = I, b[35] = R, b[36] = E, b[37] = B) : B = b[37];
|
|
224
|
+
let V;
|
|
225
|
+
return b[38] !== z || b[39] !== B ? (V = /* @__PURE__ */ jsx("div", {
|
|
226
|
+
className: z,
|
|
227
|
+
children: B
|
|
228
|
+
}), b[38] = z, b[39] = B, b[40] = V) : V = b[40], V;
|
|
254
229
|
}
|
|
255
230
|
export { FileContentViewer };
|
|
@@ -11,7 +11,7 @@ function RunItem(a) {
|
|
|
11
11
|
paused: "bg-yellow-50 text-yellow-900 border-yellow-200",
|
|
12
12
|
pending: "bg-muted text-muted-foreground border-border"
|
|
13
13
|
}[s.status] || "bg-muted text-muted-foreground border-border", d;
|
|
14
|
-
o[0] !== l || o[1] !== s.id ? (d = l.
|
|
14
|
+
o[0] !== l || o[1] !== s.id ? (d = l.getWorkflow(s.id), o[0] = l, o[1] = s.id, o[2] = d) : d = o[2];
|
|
15
15
|
let f = s.id, p = s.run ?? s.index ?? "?", m = s.title ? `(${s.title})` : "", h;
|
|
16
16
|
o[3] !== p || o[4] !== m ? (h = /* @__PURE__ */ jsxs("h3", {
|
|
17
17
|
className: "text-foreground group-hover:text-primary truncate font-semibold transition-colors",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Background, BackgroundVariant, Controls, index, useEdgesState, useNodesState, useReactFlow } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import StateNode_default from "./
|
|
3
|
+
import StateNode_default from "./workflow-flow/StateNode.js";
|
|
4
4
|
import { buildWorkflowGraph } from "../lib/flow-utils.js";
|
|
5
|
-
import WorkflowTransitionEdge_default from "./
|
|
5
|
+
import WorkflowTransitionEdge_default from "./workflow-flow/WorkflowTransitionEdge.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import React, { useEffect, useRef } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Button } from "../../../components/ui/button.js";
|
|
2
|
-
import
|
|
2
|
+
import WorkflowDebugLegend_default from "./WorkflowDebugLegend.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ArrowLeft } from "lucide-react";
|
|
6
|
-
var
|
|
6
|
+
var WorkflowDebugHeader_default = (o) => {
|
|
7
7
|
let s = c(16), { title: l, runNumber: u, onBack: d } = o, f;
|
|
8
8
|
s[0] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" }), s[0] = f) : f = s[0];
|
|
9
9
|
let p;
|
|
@@ -22,7 +22,7 @@ var PipelineDebugHeader_default = (o) => {
|
|
|
22
22
|
let h = u && `· Run #${u}`, g;
|
|
23
23
|
s[5] === h ? g = s[6] : (g = /* @__PURE__ */ jsxs("p", {
|
|
24
24
|
className: "text-muted-foreground text-xs font-medium tracking-wider uppercase",
|
|
25
|
-
children: ["
|
|
25
|
+
children: ["Workflow Flow Visualization ", h]
|
|
26
26
|
}), s[5] = h, s[6] = g);
|
|
27
27
|
let _;
|
|
28
28
|
s[7] !== m || s[8] !== g ? (_ = /* @__PURE__ */ jsxs("div", {
|
|
@@ -37,7 +37,7 @@ var PipelineDebugHeader_default = (o) => {
|
|
|
37
37
|
let y;
|
|
38
38
|
s[13] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ jsx("div", {
|
|
39
39
|
className: "hidden items-center gap-6 sm:flex",
|
|
40
|
-
children: /* @__PURE__ */ jsx(
|
|
40
|
+
children: /* @__PURE__ */ jsx(WorkflowDebugLegend_default, {})
|
|
41
41
|
}), s[13] = y) : y = s[13];
|
|
42
42
|
let b;
|
|
43
43
|
return s[14] === v ? b = s[15] : (b = /* @__PURE__ */ jsxs("div", {
|
|
@@ -45,4 +45,4 @@ var PipelineDebugHeader_default = (o) => {
|
|
|
45
45
|
children: [v, y]
|
|
46
46
|
}), s[14] = v, s[15] = b), b;
|
|
47
47
|
};
|
|
48
|
-
export {
|
|
48
|
+
export { WorkflowDebugHeader_default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
var
|
|
4
|
+
var WorkflowDebugLegend_default = () => {
|
|
5
5
|
let r = c(7), i;
|
|
6
6
|
r[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ jsxs("div", {
|
|
7
7
|
className: "flex items-center gap-2",
|
|
@@ -65,4 +65,4 @@ var PipelineDebugLegend_default = () => {
|
|
|
65
65
|
]
|
|
66
66
|
}), r[6] = d) : d = r[6], d;
|
|
67
67
|
};
|
|
68
|
-
export {
|
|
68
|
+
export { WorkflowDebugLegend_default as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
2
2
|
import { Background, BackgroundVariant, Controls, index, useEdgesState, useNodesState, useReactFlow } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import StateNode_default from "./
|
|
5
|
-
import WorkflowGraph_default from "./
|
|
6
|
-
import WorkflowTransitionEdge_default from "./
|
|
4
|
+
import StateNode_default from "./workflow-flow/StateNode.js";
|
|
5
|
+
import WorkflowGraph_default from "./workflow-flow/WorkflowGraph.js";
|
|
6
|
+
import WorkflowTransitionEdge_default from "./workflow-flow/WorkflowTransitionEdge.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { Loader2 } from "lucide-react";
|
|
11
|
-
var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransition: WorkflowTransitionEdge_default },
|
|
12
|
-
let x = c(29), {
|
|
11
|
+
var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransition: WorkflowTransitionEdge_default }, WorkflowFlowViewer_default = (b) => {
|
|
12
|
+
let x = c(29), { workflowId: S, workflows: C, workflowConfig: w, direction: T } = b, E = T === void 0 ? "LR" : T, { data: D } = useWorkflow(S), O;
|
|
13
13
|
x[0] === Symbol.for("react.memo_cache_sentinel") ? (O = [], x[0] = O) : O = x[0];
|
|
14
14
|
let [k, A, j] = useNodesState(O), M;
|
|
15
15
|
x[1] === Symbol.for("react.memo_cache_sentinel") ? (M = [], x[1] = M) : M = x[1];
|
|
@@ -65,9 +65,9 @@ var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransiti
|
|
|
65
65
|
}
|
|
66
66
|
let X;
|
|
67
67
|
x[15] !== E || x[16] !== q || x[17] !== D || x[18] !== w || x[19] !== C ? (X = D && C.map((e) => /* @__PURE__ */ jsx(WorkflowGraph_default, {
|
|
68
|
-
|
|
68
|
+
parentWorkflow: D,
|
|
69
69
|
workflow: e,
|
|
70
|
-
|
|
70
|
+
workflowConfig: w,
|
|
71
71
|
onGraphReady: q,
|
|
72
72
|
onLoadingChange: G,
|
|
73
73
|
direction: E
|
|
@@ -107,4 +107,4 @@ var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransiti
|
|
|
107
107
|
function _temp(e) {
|
|
108
108
|
return e;
|
|
109
109
|
}
|
|
110
|
-
export {
|
|
110
|
+
export { WorkflowFlowViewer_default as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useWorkflow, useWorkflowCheckpoints } from "../../../../hooks/useWorkflows.js";
|
|
2
|
+
import { buildWorkflowGraph, getTransitions } from "../../lib/flow-utils.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import React, { useEffect, useRef } from "react";
|
|
5
|
+
function countTransitions(e) {
|
|
6
|
+
return e ? getTransitions(e).length : 0;
|
|
7
|
+
}
|
|
8
|
+
var WorkflowGraph_default = (l) => {
|
|
9
|
+
let u = c(24), { parentWorkflow: d, workflow: f, workflowConfig: p, onGraphReady: m, onLoadingChange: h, direction: g } = l, _ = g === void 0 ? "LR" : g, v = useWorkflow(f.id), y = v.data, b = useWorkflowCheckpoints(f.id), x;
|
|
10
|
+
u[0] === b.data ? x = u[1] : (x = b.data ?? [], u[0] = b.data, u[1] = x);
|
|
11
|
+
let S = x, C = useRef(null), w = v.isLoading || b.isLoading, T, E;
|
|
12
|
+
u[2] !== w || u[3] !== h || u[4] !== f.id ? (T = () => {
|
|
13
|
+
h(f.id, w);
|
|
14
|
+
}, E = [
|
|
15
|
+
f.id,
|
|
16
|
+
w,
|
|
17
|
+
h
|
|
18
|
+
], u[2] = w, u[3] = h, u[4] = f.id, u[5] = T, u[6] = E) : (T = u[5], E = u[6]), useEffect(T, E);
|
|
19
|
+
let D;
|
|
20
|
+
u[7] !== S || u[8] !== _ || u[9] !== w || u[10] !== m || u[11] !== d || u[12] !== f.id || u[13] !== p || u[14] !== y ? (D = () => {
|
|
21
|
+
if (w) return;
|
|
22
|
+
let e = p ? getTransitions(p) : [], a = JSON.stringify({
|
|
23
|
+
p: countTransitions(d),
|
|
24
|
+
w: countTransitions(y),
|
|
25
|
+
c: e.length,
|
|
26
|
+
checkpoints: S.length,
|
|
27
|
+
place: y?.place
|
|
28
|
+
});
|
|
29
|
+
if (a !== C.current) {
|
|
30
|
+
C.current = a;
|
|
31
|
+
let { nodes: o, edges: s } = buildWorkflowGraph(d, y, f.id, e, _, !1, S);
|
|
32
|
+
m(f.id, o, s);
|
|
33
|
+
}
|
|
34
|
+
}, u[7] = S, u[8] = _, u[9] = w, u[10] = m, u[11] = d, u[12] = f.id, u[13] = p, u[14] = y, u[15] = D) : D = u[15];
|
|
35
|
+
let O;
|
|
36
|
+
return u[16] !== S || u[17] !== w || u[18] !== m || u[19] !== d || u[20] !== f || u[21] !== p || u[22] !== y ? (O = [
|
|
37
|
+
d,
|
|
38
|
+
f,
|
|
39
|
+
y,
|
|
40
|
+
S,
|
|
41
|
+
p,
|
|
42
|
+
m,
|
|
43
|
+
w
|
|
44
|
+
], u[16] = S, u[17] = w, u[18] = m, u[19] = d, u[20] = f, u[21] = p, u[22] = y, u[23] = O) : O = u[23], useEffect(D, O), null;
|
|
45
|
+
};
|
|
46
|
+
export { WorkflowGraph_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import WorkflowFlowViewer_default from "./components/WorkflowFlowViewer.js";
|
|
2
|
+
import WorkflowDebugHeader_default from "./components/WorkflowDebugHeader.js";
|
|
3
3
|
import ConfigFlowViewer_default from "./components/ConfigFlowViewer.js";
|