@loopstack/loopstack-studio 0.23.1 → 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 +10 -12
- package/dist/api/processor.js +1 -1
- package/dist/api/secrets.js +16 -0
- package/dist/api/workflows.js +7 -1
- package/dist/components/dynamic-form/ArrayController.js +68 -64
- package/dist/components/dynamic-form/CodeContent.js +3 -3
- package/dist/components/dynamic-form/Form.js +46 -40
- package/dist/components/dynamic-form/FormElement.js +1 -1
- package/dist/components/dynamic-form/FormElementHeader.js +2 -2
- package/dist/components/dynamic-form/ObjectController.js +24 -21
- package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +1 -1
- package/dist/components/dynamic-form/fields/CodeViewField.js +36 -36
- package/dist/components/dynamic-form/fields/InputField.js +20 -19
- package/dist/components/dynamic-form/fields/RadioField.js +18 -18
- package/dist/components/dynamic-form/fields/SelectField.js +19 -19
- package/dist/components/dynamic-form/fields/TextareaField.js +17 -17
- package/dist/components/feedback/LoadingCentered.js +1 -1
- package/dist/components/layout/MainLayout.js +18 -31
- package/dist/components/layout/StudioSidebar.js +169 -109
- package/dist/components/loopstack-elements/link.js +77 -76
- package/dist/components/loopstack-elements/tool.js +171 -0
- package/dist/components/page/PageBreadcrumbs.js +79 -32
- package/dist/components/ui-widgets/UiActions.js +10 -4
- 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 +92 -100
- 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 +18 -11
- package/dist/features/documents/document-details/DocumentDetails.js +4 -4
- package/dist/features/documents/renderers/AiMessage.js +12 -12
- 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 -65
- 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 +33 -26
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +13 -44
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +27 -29
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +17 -17
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +2 -2
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +182 -0
- 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/RemoteFileExplorerProvider.js +132 -117
- 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 +34 -68
- package/dist/hooks/useConfig.js +5 -5
- package/dist/hooks/useProcessor.js +5 -5
- package/dist/hooks/useSecrets.js +69 -0
- package/dist/hooks/useWorkflows.js +155 -68
- package/dist/index.d.ts +158 -116
- 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/DashboardPage.js +87 -35
- package/dist/pages/DebugWorkflowDetailsPage.js +8 -8
- package/dist/pages/DebugWorkflowsPage.js +10 -10
- package/dist/pages/EmbedWorkbenchPage.js +39 -45
- 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/dist/types/ai.types.js +13 -0
- package/package.json +2 -3
- 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/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/node_modules/@ai-sdk/provider/dist/index.js +0 -65
- package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -1008
- package/dist/node_modules/ai/dist/index.js +0 -1083
- package/dist/node_modules/zod/v3/ZodError.js +0 -79
- package/dist/node_modules/zod/v3/errors.js +0 -6
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -5
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -90
- package/dist/node_modules/zod/v3/helpers/util.js +0 -72
- package/dist/node_modules/zod/v3/locales/en.js +0 -58
- package/dist/node_modules/zod/v3/types.js +0 -2425
- package/dist/node_modules/zod/v4/classic/errors.js +0 -21
- package/dist/node_modules/zod/v4/classic/iso.js +0 -29
- package/dist/node_modules/zod/v4/classic/parse.js +0 -4
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -392
- package/dist/node_modules/zod/v4/core/api.js +0 -532
- package/dist/node_modules/zod/v4/core/checks.js +0 -283
- package/dist/node_modules/zod/v4/core/core.js +0 -44
- package/dist/node_modules/zod/v4/core/doc.js +0 -21
- package/dist/node_modules/zod/v4/core/errors.js +0 -40
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -305
- package/dist/node_modules/zod/v4/core/parse.js +0 -66
- package/dist/node_modules/zod/v4/core/regexes.js +0 -28
- package/dist/node_modules/zod/v4/core/registries.js +0 -38
- package/dist/node_modules/zod/v4/core/schemas.js +0 -863
- package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -220
- package/dist/node_modules/zod/v4/core/util.js +0 -267
- package/dist/node_modules/zod/v4/core/versions.js +0 -6
- 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,58 +1,110 @@
|
|
|
1
1
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Button } from "../components/ui/button.js";
|
|
3
|
+
import { Alert, AlertDescription, AlertTitle } from "../components/ui/alert.js";
|
|
3
4
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
4
5
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
5
6
|
import Dashboard from "../features/dashboard/Dashboard.js";
|
|
6
7
|
import { useDashboardStats } from "../hooks/useDashboard.js";
|
|
7
8
|
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { Home } from "lucide-react";
|
|
10
|
+
import { Home, TriangleAlert } from "lucide-react";
|
|
10
11
|
function DashboardPage() {
|
|
11
|
-
let
|
|
12
|
-
if (
|
|
12
|
+
let h = c(38), { environment: g } = useStudio(), { data: _, isLoading: v, error: y, refetch: b, isRefetching: x } = useDashboardStats();
|
|
13
|
+
if (v) {
|
|
13
14
|
let e;
|
|
14
|
-
return
|
|
15
|
+
return h[0] === v ? e = h[1] : (e = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: v }), h[0] = v, h[1] = e), e;
|
|
15
16
|
}
|
|
16
|
-
if (
|
|
17
|
+
if (y) {
|
|
17
18
|
let e;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
h[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), h[2] = e) : e = h[2];
|
|
20
|
+
let d;
|
|
21
|
+
h[3] === g.name ? d = h[4] : (d = {
|
|
22
|
+
label: g.name,
|
|
23
|
+
href: "#",
|
|
24
|
+
icon: e
|
|
25
|
+
}, h[3] = g.name, h[4] = d);
|
|
26
|
+
let f;
|
|
27
|
+
h[5] === Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
28
|
+
label: "Dashboard",
|
|
29
|
+
current: !0
|
|
30
|
+
}, h[5] = f) : f = h[5];
|
|
31
|
+
let p;
|
|
32
|
+
h[6] === d ? p = h[7] : (p = [d, f], h[6] = d, h[7] = p);
|
|
33
|
+
let m = p, _;
|
|
34
|
+
h[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("h1", {
|
|
35
|
+
className: "mb-4 text-3xl font-bold tracking-tight",
|
|
36
|
+
children: "Dashboard"
|
|
37
|
+
}), h[8] = _) : _ = h[8];
|
|
38
|
+
let v, S;
|
|
39
|
+
h[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ jsx(TriangleAlert, {}), S = /* @__PURE__ */ jsx(AlertTitle, { children: "Dashboard konnte nicht geladen werden" }), h[9] = v, h[10] = S) : (v = h[9], S = h[10]);
|
|
40
|
+
let C;
|
|
41
|
+
h[11] === y.message ? C = h[12] : (C = /* @__PURE__ */ jsxs("p", {
|
|
42
|
+
className: "wrap-break-word",
|
|
43
|
+
children: ["Bitte versuch’s nochmal. ", y.message]
|
|
44
|
+
}), h[11] = y.message, h[12] = C);
|
|
45
|
+
let w;
|
|
46
|
+
h[13] === b ? w = h[14] : (w = () => void b(), h[13] = b, h[14] = w);
|
|
47
|
+
let T = x ? "Lade neu…" : "Neu versuchen", E;
|
|
48
|
+
h[15] !== x || h[16] !== w || h[17] !== T ? (E = /* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: "mt-3 flex flex-wrap gap-2",
|
|
50
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
51
|
+
variant: "destructive",
|
|
52
|
+
onClick: w,
|
|
53
|
+
disabled: x,
|
|
54
|
+
children: T
|
|
55
|
+
})
|
|
56
|
+
}), h[15] = x, h[16] = w, h[17] = T, h[18] = E) : E = h[18];
|
|
57
|
+
let D;
|
|
58
|
+
h[19] !== E || h[20] !== C ? (D = /* @__PURE__ */ jsx("div", {
|
|
59
|
+
className: "mx-auto w-full max-w-2xl",
|
|
60
|
+
children: /* @__PURE__ */ jsxs(Alert, {
|
|
61
|
+
variant: "destructive",
|
|
62
|
+
children: [
|
|
63
|
+
v,
|
|
64
|
+
S,
|
|
65
|
+
/* @__PURE__ */ jsxs(AlertDescription, { children: [C, E] })
|
|
66
|
+
]
|
|
67
|
+
})
|
|
68
|
+
}), h[19] = E, h[20] = C, h[21] = D) : D = h[21];
|
|
69
|
+
let O;
|
|
70
|
+
return h[22] !== m || h[23] !== D ? (O = /* @__PURE__ */ jsxs(MainLayout_default, {
|
|
71
|
+
breadcrumbsData: m,
|
|
72
|
+
children: [_, D]
|
|
73
|
+
}), h[22] = m, h[23] = D, h[24] = O) : O = h[24], O;
|
|
22
74
|
}
|
|
23
|
-
if (!
|
|
75
|
+
if (!_) {
|
|
24
76
|
let e;
|
|
25
|
-
return
|
|
77
|
+
return h[25] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
|
|
26
78
|
className: "p-4",
|
|
27
79
|
children: "No data available"
|
|
28
|
-
}),
|
|
80
|
+
}), h[25] = e) : e = h[25], e;
|
|
29
81
|
}
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
label:
|
|
82
|
+
let S;
|
|
83
|
+
h[26] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), h[26] = S) : S = h[26];
|
|
84
|
+
let C;
|
|
85
|
+
h[27] === g.name ? C = h[28] : (C = {
|
|
86
|
+
label: g.name,
|
|
35
87
|
href: "#",
|
|
36
|
-
icon:
|
|
37
|
-
},
|
|
38
|
-
let
|
|
39
|
-
|
|
88
|
+
icon: S
|
|
89
|
+
}, h[27] = g.name, h[28] = C);
|
|
90
|
+
let w;
|
|
91
|
+
h[29] === Symbol.for("react.memo_cache_sentinel") ? (w = {
|
|
40
92
|
label: "Dashboard",
|
|
41
93
|
current: !0
|
|
42
|
-
},
|
|
43
|
-
let
|
|
44
|
-
|
|
45
|
-
let
|
|
46
|
-
|
|
94
|
+
}, h[29] = w) : w = h[29];
|
|
95
|
+
let T;
|
|
96
|
+
h[30] === C ? T = h[31] : (T = [C, w], h[30] = C, h[31] = T);
|
|
97
|
+
let E = T, D;
|
|
98
|
+
h[32] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsx("h1", {
|
|
47
99
|
className: "mb-4 text-3xl font-bold tracking-tight",
|
|
48
100
|
children: "Dashboard"
|
|
49
|
-
}),
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
let
|
|
53
|
-
return
|
|
54
|
-
breadcrumbsData:
|
|
55
|
-
children: [
|
|
56
|
-
}),
|
|
101
|
+
}), h[32] = D) : D = h[32];
|
|
102
|
+
let O;
|
|
103
|
+
h[33] === _ ? O = h[34] : (O = /* @__PURE__ */ jsx(Dashboard, { dashboardStats: _ }), h[33] = _, h[34] = O);
|
|
104
|
+
let k;
|
|
105
|
+
return h[35] !== E || h[36] !== O ? (k = /* @__PURE__ */ jsxs(MainLayout_default, {
|
|
106
|
+
breadcrumbsData: E,
|
|
107
|
+
children: [D, O]
|
|
108
|
+
}), h[35] = E, h[36] = O, h[37] = k) : k = h[37], k;
|
|
57
109
|
}
|
|
58
110
|
export { DashboardPage as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useWorkflowConfigByName, useWorkflowSource } from "../hooks/useWorkflows.js";
|
|
3
3
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
4
4
|
import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
|
|
5
5
|
import ConfigFlowViewer_default from "../features/debug/components/ConfigFlowViewer.js";
|
|
@@ -28,7 +28,7 @@ function DebugWorkflowDetailsPage() {
|
|
|
28
28
|
let m;
|
|
29
29
|
h[3] === g ? m = h[4] : (m = ["default", g], h[3] = g, h[4] = m), v = m;
|
|
30
30
|
}
|
|
31
|
-
let [y, b] = v, { data: x, isLoading: S } =
|
|
31
|
+
let [y, b] = v, { data: x, isLoading: S } = useWorkflowConfigByName(b), { data: C, isLoading: w } = useWorkflowSource(b), T = S || w, E;
|
|
32
32
|
h[5] === _ ? E = h[6] : (E = _.getDashboard(), h[5] = _, h[6] = E);
|
|
33
33
|
let D;
|
|
34
34
|
h[7] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), h[7] = D) : D = h[7];
|
|
@@ -45,7 +45,7 @@ function DebugWorkflowDetailsPage() {
|
|
|
45
45
|
label: "Debug Workflows",
|
|
46
46
|
href: k
|
|
47
47
|
}, h[12] = k, h[13] = A);
|
|
48
|
-
let j = x?.title || x?.
|
|
48
|
+
let j = x?.title || x?.alias || b || "Workflow Details", M;
|
|
49
49
|
h[14] === j ? M = h[15] : (M = {
|
|
50
50
|
label: j,
|
|
51
51
|
current: !0
|
|
@@ -57,7 +57,7 @@ function DebugWorkflowDetailsPage() {
|
|
|
57
57
|
M
|
|
58
58
|
], h[16] = O, h[17] = A, h[18] = M, h[19] = N) : N = h[19];
|
|
59
59
|
let P = N, F;
|
|
60
|
-
h[20] !== T || h[21] !==
|
|
60
|
+
h[20] !== T || h[21] !== C || h[22] !== b || h[23] !== x || h[24] !== y ? (F = T ? /* @__PURE__ */ jsxs("div", {
|
|
61
61
|
className: "flex items-center space-x-2",
|
|
62
62
|
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ jsx("span", { children: "Loading..." })]
|
|
63
63
|
}) : x ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -65,7 +65,7 @@ function DebugWorkflowDetailsPage() {
|
|
|
65
65
|
children: [
|
|
66
66
|
/* @__PURE__ */ jsx("h1", {
|
|
67
67
|
className: "text-3xl font-bold tracking-tight",
|
|
68
|
-
children: x.title || x.
|
|
68
|
+
children: x.title || x.alias
|
|
69
69
|
}),
|
|
70
70
|
/* @__PURE__ */ jsx("p", {
|
|
71
71
|
className: "text-muted-foreground",
|
|
@@ -81,7 +81,7 @@ function DebugWorkflowDetailsPage() {
|
|
|
81
81
|
}), /* @__PURE__ */ jsx("div", {
|
|
82
82
|
className: "flex-1 overflow-auto bg-[#1e1e1e]",
|
|
83
83
|
children: /* @__PURE__ */ jsx(Prism, {
|
|
84
|
-
language: C?.raw ? "
|
|
84
|
+
language: C?.raw ? "typescript" : "json",
|
|
85
85
|
style: vscDarkPlus,
|
|
86
86
|
customStyle: {
|
|
87
87
|
margin: 0,
|
|
@@ -108,10 +108,10 @@ function DebugWorkflowDetailsPage() {
|
|
|
108
108
|
}) : /* @__PURE__ */ jsxs("div", { children: [
|
|
109
109
|
"Workflow Type not found (Workspace: ",
|
|
110
110
|
y,
|
|
111
|
-
",
|
|
111
|
+
", Workflow: ",
|
|
112
112
|
b,
|
|
113
113
|
")"
|
|
114
|
-
] }), h[20] = T, h[21] =
|
|
114
|
+
] }), h[20] = T, h[21] = C, h[22] = b, h[23] = x, h[24] = y, h[25] = F) : F = h[25];
|
|
115
115
|
let I;
|
|
116
116
|
return h[26] !== P || h[27] !== F ? (I = /* @__PURE__ */ jsx(MainLayout_default, {
|
|
117
117
|
breadcrumbsData: P,
|
|
@@ -11,14 +11,14 @@ import { Home } from "lucide-react";
|
|
|
11
11
|
function DebugWorkflowsPage() {
|
|
12
12
|
let { router: f } = useStudio(), { envKey: p, api: m } = useApiClient(), { data: h, isLoading: g } = useWorkspaceConfig(), _ = useQueries({ queries: (h ?? []).map((e) => ({
|
|
13
13
|
queryKey: [
|
|
14
|
-
"
|
|
15
|
-
e.
|
|
14
|
+
"workflowTypes",
|
|
15
|
+
e.className,
|
|
16
16
|
p
|
|
17
17
|
],
|
|
18
18
|
queryFn: async () => {
|
|
19
|
-
let c = await m.config.
|
|
19
|
+
let c = await m.config.getWorkflowTypesByWorkspace({ workspaceBlockName: e.className });
|
|
20
20
|
return {
|
|
21
|
-
workspaceBlockName: e.
|
|
21
|
+
workspaceBlockName: e.className,
|
|
22
22
|
types: c
|
|
23
23
|
};
|
|
24
24
|
},
|
|
@@ -28,14 +28,14 @@ function DebugWorkflowsPage() {
|
|
|
28
28
|
let { workspaceBlockName: c, types: l } = e.data;
|
|
29
29
|
return (l ?? []).map((e) => ({
|
|
30
30
|
...e,
|
|
31
|
-
id: `${c}::${e.
|
|
31
|
+
id: `${c}::${e.alias}`,
|
|
32
32
|
workspaceBlockName: c
|
|
33
33
|
}));
|
|
34
|
-
}), [_, y]), [x, S] = useState(""), [C, w] = useState("
|
|
34
|
+
}), [_, y]), [x, S] = useState(""), [C, w] = useState("alias"), [T, E] = useState("ASC"), [D, O] = useState(0), [k, A] = useState(10), j = useMemo(() => {
|
|
35
35
|
let e = b;
|
|
36
36
|
if (x) {
|
|
37
37
|
let c = x.toLowerCase();
|
|
38
|
-
e = e.filter((e) => e.
|
|
38
|
+
e = e.filter((e) => e.alias?.toLowerCase().includes(c) || e.title?.toLowerCase().includes(c) || e.description?.toLowerCase().includes(c) || e.workspaceBlockName.toLowerCase().includes(c));
|
|
39
39
|
}
|
|
40
40
|
return e = [...e].sort((e, c) => {
|
|
41
41
|
let l = C, u = (e[l] || "").toLowerCase(), d = (c[l] || "").toLowerCase();
|
|
@@ -70,8 +70,8 @@ function DebugWorkflowsPage() {
|
|
|
70
70
|
data: M,
|
|
71
71
|
columns: [
|
|
72
72
|
{
|
|
73
|
-
id: "
|
|
74
|
-
label: "Type ID (
|
|
73
|
+
id: "alias",
|
|
74
|
+
label: "Type ID (Alias)",
|
|
75
75
|
sortable: !0,
|
|
76
76
|
minWidth: 200,
|
|
77
77
|
format: (e) => /* @__PURE__ */ jsx("span", {
|
|
@@ -83,7 +83,7 @@ function DebugWorkflowsPage() {
|
|
|
83
83
|
id: "title",
|
|
84
84
|
label: "Title",
|
|
85
85
|
sortable: !0,
|
|
86
|
-
format: (e, c) => /* @__PURE__ */ jsx("span", { children: String(e || c.
|
|
86
|
+
format: (e, c) => /* @__PURE__ */ jsx("span", { children: String(e || c.alias || "N/A") })
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
id: "workspaceBlockName",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useWorkflow } from "../hooks/useWorkflows.js";
|
|
2
2
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
3
3
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
4
4
|
import { require_enums } from "../packages/contracts/dist/enums/index.js";
|
|
5
|
-
import { useFetchWorkflowsByPipeline } from "../hooks/useWorkflows.js";
|
|
6
5
|
import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
|
|
6
|
+
import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
|
|
7
7
|
import "../features/workbench/index.js";
|
|
8
8
|
import { requireParam } from "../lib/requireParam.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
@@ -12,64 +12,58 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
import { useParams } from "react-router-dom";
|
|
13
13
|
var import_enums = require_enums(), EMBED_MESSAGE_TYPE = "loopstack:embed:workflow-completed", EMBED_RESIZE_MESSAGE_TYPE = "loopstack:embed:resize";
|
|
14
14
|
function EmbedWorkbenchPage() {
|
|
15
|
-
let _ = c(
|
|
16
|
-
_[0] === v ? y = _[1] : (y = requireParam(v, "
|
|
17
|
-
let b = y, x = useRef(null), S =
|
|
18
|
-
_[2] !==
|
|
19
|
-
!
|
|
15
|
+
let _ = c(20), v = useParams(), y;
|
|
16
|
+
_[0] === v ? y = _[1] : (y = requireParam(v, "workflowId"), _[0] = v, _[1] = y);
|
|
17
|
+
let b = y, x = useRef(null), S = useWorkflow(b), C = useRef(!1), w, T;
|
|
18
|
+
_[2] !== S.data || _[3] !== b ? (w = () => {
|
|
19
|
+
!S.data || C.current || S.data.status === import_enums.WorkflowState.Completed && window.parent !== window && (C.current = !0, window.parent.postMessage({
|
|
20
20
|
type: EMBED_MESSAGE_TYPE,
|
|
21
|
-
|
|
21
|
+
workflowId: b
|
|
22
22
|
}, window.location.origin));
|
|
23
|
-
},
|
|
24
|
-
let
|
|
25
|
-
_[6] === b ? (
|
|
23
|
+
}, T = [S.data, b], _[2] = S.data, _[3] = b, _[4] = w, _[5] = T) : (w = _[4], T = _[5]), useEffect(w, T);
|
|
24
|
+
let E, D;
|
|
25
|
+
_[6] === b ? (E = _[7], D = _[8]) : (E = () => {
|
|
26
26
|
if (window.parent === window || !x.current) return;
|
|
27
27
|
let t = new ResizeObserver(() => {
|
|
28
28
|
if (!x.current) return;
|
|
29
29
|
let t = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);
|
|
30
30
|
window.parent.postMessage({
|
|
31
31
|
type: EMBED_RESIZE_MESSAGE_TYPE,
|
|
32
|
-
|
|
32
|
+
workflowId: b,
|
|
33
33
|
height: t
|
|
34
34
|
}, window.location.origin);
|
|
35
35
|
});
|
|
36
36
|
return t.observe(x.current), () => t.disconnect();
|
|
37
|
-
},
|
|
38
|
-
let
|
|
39
|
-
_[9] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
37
|
+
}, D = [b], _[6] = b, _[7] = E, _[8] = D), useEffect(E, D);
|
|
38
|
+
let O = _temp, k;
|
|
39
|
+
_[9] === Symbol.for("react.memo_cache_sentinel") ? (k = {
|
|
40
40
|
enableDebugMode: !1,
|
|
41
41
|
showFullMessageHistory: !1
|
|
42
|
-
}, _[9] =
|
|
43
|
-
let
|
|
44
|
-
_[10] === S.error ?
|
|
42
|
+
}, _[9] = k) : k = _[9];
|
|
43
|
+
let A = k, j;
|
|
44
|
+
_[10] === S.error ? j = _[11] : (j = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), _[10] = S.error, _[11] = j);
|
|
45
|
+
let M;
|
|
46
|
+
_[12] === S.data ? M = _[13] : (M = S.data ? /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
47
|
+
workflow: S.data,
|
|
48
|
+
children: /* @__PURE__ */ jsx(WorkflowItem_default, {
|
|
49
|
+
workflow: S.data,
|
|
50
|
+
workflowId: S.data.id,
|
|
51
|
+
scrollTo: O,
|
|
52
|
+
settings: A,
|
|
53
|
+
embed: !0
|
|
54
|
+
})
|
|
55
|
+
}) : null, _[12] = S.data, _[13] = M);
|
|
45
56
|
let N;
|
|
46
|
-
_[
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
settings: j,
|
|
53
|
-
embed: !0
|
|
54
|
-
}, t.id)) : null, _[14] = S.data, _[15] = C.data, _[16] = F) : F = _[16];
|
|
55
|
-
let I;
|
|
56
|
-
_[17] !== P || _[18] !== F ? (I = /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
57
|
-
loading: P,
|
|
58
|
-
children: F
|
|
59
|
-
}), _[17] = P, _[18] = F, _[19] = I) : I = _[19];
|
|
60
|
-
let L;
|
|
61
|
-
return _[20] !== I || _[21] !== M || _[22] !== N ? (L = /* @__PURE__ */ jsxs("div", {
|
|
57
|
+
_[14] !== S.isLoading || _[15] !== M ? (N = /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
58
|
+
loading: S.isLoading,
|
|
59
|
+
children: M
|
|
60
|
+
}), _[14] = S.isLoading, _[15] = M, _[16] = N) : N = _[16];
|
|
61
|
+
let P;
|
|
62
|
+
return _[17] !== j || _[18] !== N ? (P = /* @__PURE__ */ jsxs("div", {
|
|
62
63
|
ref: x,
|
|
63
|
-
className: "overflow-hidden
|
|
64
|
-
children: [
|
|
65
|
-
|
|
66
|
-
N,
|
|
67
|
-
I
|
|
68
|
-
]
|
|
69
|
-
}), _[20] = I, _[21] = M, _[22] = N, _[23] = L) : L = _[23], L;
|
|
70
|
-
}
|
|
71
|
-
function _temp2() {}
|
|
72
|
-
function _temp(t) {
|
|
73
|
-
return t.status === import_enums.WorkflowState.Completed;
|
|
64
|
+
className: "overflow-hidden pl-3 py-4",
|
|
65
|
+
children: [j, N]
|
|
66
|
+
}), _[17] = j, _[18] = N, _[19] = P) : P = _[19], P;
|
|
74
67
|
}
|
|
68
|
+
function _temp() {}
|
|
75
69
|
export { EmbedWorkbenchPage as default };
|