@loopstack/loopstack-studio 0.22.0 → 0.23.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/app/EnvironmentEmbedRoot.js +20 -18
- package/dist/components/feedback/ErrorBoundary.js +43 -0
- package/dist/components/{LoadingCentered.js → feedback/LoadingCentered.js} +1 -1
- package/dist/components/feedback/index.js +5 -0
- package/dist/components/index.js +6 -3
- package/dist/components/layout/MainLayout.js +32 -16
- package/dist/components/layout/StudioSidebar.js +165 -0
- package/dist/components/ui-widgets/widgets/SandboxRun.js +1 -0
- package/dist/features/code-explorer/CodeExplorer.js +6 -0
- package/dist/features/code-explorer/components/CodeExplorerTree.js +5 -0
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +6 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +1 -0
- package/dist/features/code-explorer/components/FileTabsBar.js +1 -1
- package/dist/features/code-explorer/index.js +4 -0
- package/dist/features/debug/components/ConfigFlowViewer.js +1 -1
- package/dist/features/debug/components/PipelineFlowViewer.js +1 -1
- package/dist/features/debug/index.js +3 -0
- package/dist/features/documents/DocumentRenderer.js +53 -0
- package/dist/features/{workbench → documents}/components/DocumentItem.js +1 -1
- package/dist/features/{workbench → documents}/components/DocumentMetadataPills.js +2 -2
- package/dist/features/{workbench/components → documents}/document-details/DocumentDetails.js +3 -3
- package/dist/features/{workbench/components → documents}/document-details/PromptDetails.js +3 -3
- package/dist/features/documents/index.js +4 -0
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessage.js +5 -5
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentDebugRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentFormRenderer.js +3 -3
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/ErrorMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/LinkMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/MarkdownMessageRenderer.js +2 -2
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/PlainMessageRenderer.js +1 -1
- package/dist/features/health/index.js +1 -0
- package/dist/features/workbench/NavigationItems.js +29 -29
- package/dist/features/workbench/Workbench.js +57 -69
- package/dist/features/workbench/WorkflowItem.js +63 -55
- package/dist/features/workbench/WorkflowList.js +52 -81
- package/dist/features/workbench/components/NewRunDialog.js +2 -1
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +5 -4
- package/dist/features/workbench/components/WorkflowHistoryItem.js +11 -11
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +49 -50
- package/dist/features/workbench/hooks/useWorkflowData.js +49 -0
- package/dist/features/workbench/hooks/useWorkflowListState.js +50 -0
- package/dist/features/workbench/index.js +8 -0
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +2 -3
- package/dist/features/workspaces/components/CreateWorkspace.js +1 -1
- package/dist/features/workspaces/components/ExecutionTimeline.js +1 -1
- package/dist/features/workspaces/components/PipelineForm.js +1 -1
- package/dist/features/workspaces/index.js +3 -0
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/query-keys.js +138 -0
- package/dist/hooks/useAuth.js +43 -42
- package/dist/hooks/useConfig.js +31 -35
- package/dist/hooks/useDashboard.js +9 -13
- package/dist/hooks/useDebounce.js +8 -17
- package/dist/hooks/useDocuments.js +4 -9
- package/dist/hooks/useFiles.js +31 -39
- package/dist/hooks/useNamespaces.js +2 -8
- package/dist/hooks/usePipelines.js +132 -155
- package/dist/hooks/useProcessor.js +11 -14
- package/dist/hooks/useWorkflows.js +40 -62
- package/dist/hooks/useWorkspaces.js +105 -110
- package/dist/index.d.ts +99 -3
- package/dist/index.js +14 -7
- package/dist/pages/DashboardPage.js +1 -1
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/EmbedWorkbenchPage.js +4 -3
- package/dist/pages/PipelineDebugPage.js +6 -5
- package/dist/pages/PreviewWorkbenchPage.js +121 -118
- package/dist/pages/RunsListPage.js +52 -24
- package/dist/pages/StudioLandingPage.js +1 -0
- package/dist/pages/WorkbenchPage.js +3 -2
- package/dist/pages/WorkspacePage.js +1 -1
- package/dist/providers/InvalidationEventsProvider.js +9 -11
- package/dist/providers/StudioProvider.js +2 -2
- package/dist/routing/LocalRouter.js +12 -8
- package/package.json +1 -1
- package/dist/features/workbench/components/DocumentRenderer.js +0 -54
- /package/dist/components/{content → feedback}/ErrorAlert.js +0 -0
- /package/dist/components/{snackbars → feedback}/ErrorSnackbar.js +0 -0
- /package/dist/components/{snackbars → feedback}/Snackbar.js +0 -0
- /package/dist/features/{workbench → documents}/components/DocumentList.js +0 -0
- /package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessageContent.js +0 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { usePipeline,
|
|
1
|
+
import { usePipeline, usePipelineConfigByName } from "../../../hooks/usePipelines.js";
|
|
2
2
|
import { useWorkspace } from "../../../hooks/useWorkspaces.js";
|
|
3
|
-
import { useFetchWorkflowsByPipeline } from "../../../hooks/useWorkflows.js";
|
|
4
3
|
import { ReactFlowProvider } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
5
|
-
import {
|
|
4
|
+
import { useFetchWorkflowsByPipeline } from "../../../hooks/useWorkflows.js";
|
|
6
5
|
import PipelineFlowViewer_default from "../../debug/components/PipelineFlowViewer.js";
|
|
6
|
+
import "../../debug/index.js";
|
|
7
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
7
8
|
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { useMemo } from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { X } from "lucide-react";
|
|
11
12
|
function WorkbenchFlowPanel() {
|
|
12
|
-
let f = c(13), { pipeline: p, closeSidePanel: m } = useWorkbenchLayout(), h = usePipeline(p.id), g = useWorkspace(p.workspaceId), _ = useFetchWorkflowsByPipeline(p.id), v =
|
|
13
|
+
let f = c(13), { pipeline: p, closeSidePanel: m } = useWorkbenchLayout(), h = usePipeline(p.id), g = useWorkspace(p.workspaceId), _ = useFetchWorkflowsByPipeline(p.id), v = usePipelineConfigByName(g.data?.blockName, h.data?.blockName), y;
|
|
13
14
|
f[0] === _.data ? y = f[1] : (y = _.data ?? [], f[0] = _.data, f[1] = y);
|
|
14
15
|
let b = y, x;
|
|
15
16
|
f[2] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ jsx("span", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
2
1
|
import { cn } from "../../../lib/utils.js";
|
|
3
2
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
4
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip.js";
|
|
4
|
+
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -10,8 +10,8 @@ import { format } from "date-fns";
|
|
|
10
10
|
var WorkflowHistoryItem_default = (_) => {
|
|
11
11
|
let y = c(19), { workflowId: b, workflow: x } = _, S = useWorkflow(b), C = S.data?.history;
|
|
12
12
|
if (S.isLoading) {
|
|
13
|
-
let
|
|
14
|
-
return y[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
13
|
+
let t;
|
|
14
|
+
return y[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ jsx("li", {
|
|
15
15
|
className: "group/menu-item relative list-none",
|
|
16
16
|
children: /* @__PURE__ */ jsxs("div", {
|
|
17
17
|
className: "flex w-full items-center gap-2 rounded-md p-2 text-sm opacity-50",
|
|
@@ -20,7 +20,7 @@ var WorkflowHistoryItem_default = (_) => {
|
|
|
20
20
|
children: "Loading..."
|
|
21
21
|
})]
|
|
22
22
|
})
|
|
23
|
-
}), y[0] =
|
|
23
|
+
}), y[0] = t) : t = y[0], t;
|
|
24
24
|
}
|
|
25
25
|
if (!C?.length) return null;
|
|
26
26
|
let w;
|
|
@@ -64,10 +64,10 @@ var WorkflowHistoryItem_default = (_) => {
|
|
|
64
64
|
}), y[9] = j) : j = y[9];
|
|
65
65
|
let M;
|
|
66
66
|
if (y[10] !== C) {
|
|
67
|
-
let
|
|
68
|
-
y[12] === C.length ?
|
|
69
|
-
console.log(
|
|
70
|
-
let m =
|
|
67
|
+
let f;
|
|
68
|
+
y[12] === C.length ? f = y[13] : (f = (f, p) => {
|
|
69
|
+
console.log(f);
|
|
70
|
+
let m = f.data?.transition, h = Object.keys(f.data?.tools ?? {}), g = p === C.length - 1, _ = f.data?.place ?? m?.to ?? "unknown", v = m?.id;
|
|
71
71
|
return /* @__PURE__ */ jsxs("div", {
|
|
72
72
|
className: "group/entry relative flex gap-3 py-1 pl-0",
|
|
73
73
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -116,13 +116,13 @@ var WorkflowHistoryItem_default = (_) => {
|
|
|
116
116
|
className: "flex items-center gap-0.5",
|
|
117
117
|
children: [/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }), /* @__PURE__ */ jsx("span", {
|
|
118
118
|
className: "tabular-nums",
|
|
119
|
-
children: format(new Date(
|
|
119
|
+
children: format(new Date(f.timestamp), "HH:mm:ss")
|
|
120
120
|
})]
|
|
121
121
|
})]
|
|
122
122
|
})]
|
|
123
123
|
})]
|
|
124
|
-
},
|
|
125
|
-
}, y[12] = C.length, y[13] =
|
|
124
|
+
}, f.version);
|
|
125
|
+
}, y[12] = C.length, y[13] = f), M = C.map(f), y[10] = C, y[11] = M;
|
|
126
126
|
} else M = y[11];
|
|
127
127
|
let N;
|
|
128
128
|
y[14] === M ? N = y[15] : (N = /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("ul", {
|
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
import { useStudio } from "../../../../providers/StudioProvider.js";
|
|
2
|
-
import { useDeleteWorkflow, useWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
3
1
|
import { Button } from "../../../../components/ui/button.js";
|
|
4
2
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../../../../components/ui/alert-dialog.js";
|
|
5
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../components/ui/tooltip.js";
|
|
6
4
|
import { useRunPipeline } from "../../../../hooks/useProcessor.js";
|
|
5
|
+
import { useDeleteWorkflow, useWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
7
6
|
import { c } from "react/compiler-runtime";
|
|
8
7
|
import React from "react";
|
|
9
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { LockOpen, Repeat } from "lucide-react";
|
|
11
|
-
var WorkflowButtons_default = (
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
pipelineId:
|
|
10
|
+
var WorkflowButtons_default = (w) => {
|
|
11
|
+
let T = c(34), { pipeline: E, workflowId: D } = w, O = useWorkflow(D).data, k = useDeleteWorkflow(), A = useRunPipeline(), j;
|
|
12
|
+
T[0] !== E.id || T[1] !== A ? (j = () => {
|
|
13
|
+
A.mutate({
|
|
14
|
+
pipelineId: E.id,
|
|
16
15
|
runPipelinePayloadDto: {},
|
|
17
16
|
force: !1
|
|
18
17
|
});
|
|
19
|
-
},
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
pipelineId:
|
|
18
|
+
}, T[0] = E.id, T[1] = A, T[2] = j) : j = T[2];
|
|
19
|
+
let M = j, N;
|
|
20
|
+
T[3] !== E.id || T[4] !== A || T[5] !== D ? (N = () => {
|
|
21
|
+
A.mutate({
|
|
22
|
+
pipelineId: E.id,
|
|
24
23
|
runPipelinePayloadDto: { transition: {
|
|
25
24
|
name: "unlock",
|
|
26
|
-
workflowId:
|
|
25
|
+
workflowId: D
|
|
27
26
|
} },
|
|
28
27
|
force: !1
|
|
29
28
|
});
|
|
30
|
-
},
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
if (
|
|
34
|
-
|
|
29
|
+
}, T[3] = E.id, T[4] = A, T[5] = D, T[6] = N) : N = T[6];
|
|
30
|
+
let P = N, F;
|
|
31
|
+
T[7] !== k || T[8] !== M || T[9] !== O ? (F = () => {
|
|
32
|
+
if (O) try {
|
|
33
|
+
k.mutate(O), M();
|
|
35
34
|
} catch (t) {
|
|
36
|
-
let
|
|
37
|
-
console.error("Mutation failed:",
|
|
35
|
+
let C = t;
|
|
36
|
+
console.error("Mutation failed:", C);
|
|
38
37
|
}
|
|
39
|
-
},
|
|
40
|
-
let
|
|
41
|
-
if (!
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
|
|
38
|
+
}, T[7] = k, T[8] = M, T[9] = O, T[10] = F) : F = T[10];
|
|
39
|
+
let I = F;
|
|
40
|
+
if (!O) return null;
|
|
41
|
+
let L;
|
|
42
|
+
T[11] === k.isPending ? L = T[12] : (L = k.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(Repeat, { className: "h-3.5 w-3.5" }), T[11] = k.isPending, T[12] = L);
|
|
43
|
+
let R;
|
|
44
|
+
T[13] !== k.isPending || T[14] !== L ? (R = /* @__PURE__ */ jsx(TooltipTrigger, {
|
|
46
45
|
asChild: !0,
|
|
47
46
|
children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
|
|
48
47
|
asChild: !0,
|
|
@@ -50,28 +49,28 @@ var WorkflowButtons_default = (T) => {
|
|
|
50
49
|
variant: "ghost",
|
|
51
50
|
size: "icon",
|
|
52
51
|
className: "h-7 w-7",
|
|
53
|
-
disabled:
|
|
54
|
-
children:
|
|
52
|
+
disabled: k.isPending,
|
|
53
|
+
children: L
|
|
55
54
|
})
|
|
56
55
|
})
|
|
57
|
-
}),
|
|
56
|
+
}), T[13] = k.isPending, T[14] = L, T[15] = R) : R = T[15];
|
|
57
|
+
let z;
|
|
58
|
+
T[16] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ jsx(TooltipContent, { children: "Repeat" }), T[16] = z) : z = T[16];
|
|
59
|
+
let B;
|
|
60
|
+
T[17] === R ? B = T[18] : (B = /* @__PURE__ */ jsxs(Tooltip, { children: [R, z] }), T[17] = R, T[18] = B);
|
|
58
61
|
let V;
|
|
59
|
-
|
|
62
|
+
T[19] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Repeat workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This will delete the current workflow run and re-trigger the pipeline." })] }), T[19] = V) : V = T[19];
|
|
60
63
|
let H;
|
|
61
|
-
|
|
64
|
+
T[20] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), T[20] = H) : H = T[20];
|
|
62
65
|
let U;
|
|
63
|
-
|
|
66
|
+
T[21] === I ? U = T[22] : (U = /* @__PURE__ */ jsxs(AlertDialogContent, { children: [V, /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [H, /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
67
|
+
onClick: I,
|
|
68
|
+
children: "Repeat"
|
|
69
|
+
})] })] }), T[21] = I, T[22] = U);
|
|
64
70
|
let W;
|
|
65
|
-
|
|
71
|
+
T[23] !== U || T[24] !== B ? (W = /* @__PURE__ */ jsxs(AlertDialog, { children: [B, U] }), T[23] = U, T[24] = B, T[25] = W) : W = T[25];
|
|
66
72
|
let G;
|
|
67
|
-
|
|
68
|
-
onClick: R,
|
|
69
|
-
children: "Repeat"
|
|
70
|
-
})] })] }), E[23] = R, E[24] = G);
|
|
71
|
-
let K;
|
|
72
|
-
E[25] !== G || E[26] !== H ? (K = /* @__PURE__ */ jsxs(AlertDialog, { children: [H, G] }), E[25] = G, E[26] = H, E[27] = K) : K = E[27];
|
|
73
|
-
let q;
|
|
74
|
-
E[28] !== I || E[29] !== M.isPending || E[30] !== A.availableTransitions || E[31] !== A.place ? (q = A.place === "end" && A.availableTransitions?.find(_temp2) && /* @__PURE__ */ jsxs(AlertDialog, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
73
|
+
T[26] !== P || T[27] !== A.isPending || T[28] !== O.availableTransitions || T[29] !== O.place ? (G = O.place === "end" && O.availableTransitions?.find(_temp2) && /* @__PURE__ */ jsxs(AlertDialog, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
75
74
|
asChild: !0,
|
|
76
75
|
children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
|
|
77
76
|
asChild: !0,
|
|
@@ -79,20 +78,20 @@ var WorkflowButtons_default = (T) => {
|
|
|
79
78
|
variant: "ghost",
|
|
80
79
|
size: "icon",
|
|
81
80
|
className: "h-7 w-7",
|
|
82
|
-
disabled:
|
|
83
|
-
children:
|
|
81
|
+
disabled: A.isPending,
|
|
82
|
+
children: A.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(LockOpen, { className: "h-3.5 w-3.5" })
|
|
84
83
|
})
|
|
85
84
|
})
|
|
86
85
|
}), /* @__PURE__ */ jsx(TooltipContent, { children: "Unlock Step" })] }), /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Unlock workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "Are you sure you want to unlock this workflow?" })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
87
|
-
onClick:
|
|
86
|
+
onClick: P,
|
|
88
87
|
children: "Unlock"
|
|
89
|
-
})] })] })] }),
|
|
90
|
-
let
|
|
91
|
-
return
|
|
88
|
+
})] })] })] }), T[26] = P, T[27] = A.isPending, T[28] = O.availableTransitions, T[29] = O.place, T[30] = G) : G = T[30];
|
|
89
|
+
let K;
|
|
90
|
+
return T[31] !== W || T[32] !== G ? (K = /* @__PURE__ */ jsxs("div", {
|
|
92
91
|
className: "flex items-center",
|
|
93
92
|
onClick: _temp,
|
|
94
|
-
children: [
|
|
95
|
-
}),
|
|
93
|
+
children: [W, G]
|
|
94
|
+
}), T[31] = W, T[32] = G, T[33] = K) : K = T[33], K;
|
|
96
95
|
};
|
|
97
96
|
function _temp(t) {
|
|
98
97
|
return t.stopPropagation();
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
2
|
+
import { useRunPipeline } from "../../../hooks/useProcessor.js";
|
|
3
|
+
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
4
|
+
import { useFilterDocuments } from "../../../hooks/useDocuments.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { useCallback, useMemo } from "react";
|
|
7
|
+
var import_enums = require_enums();
|
|
8
|
+
function useWorkflowData(e) {
|
|
9
|
+
let o = c(22), { workflowId: s, showFullMessageHistory: l } = e, u = useWorkflow(s), d = useFilterDocuments(s), f = useRunPipeline(), p;
|
|
10
|
+
o[0] !== u.data?.place || o[1] !== l ? (p = (e) => {
|
|
11
|
+
let r = e.meta, i = e.ui, a = r?.hidden || i?.hidden || !!r?.hideAtPlaces?.includes(u.data?.place ?? "");
|
|
12
|
+
return !l && e.tags?.includes("internal") && (a = !0), !a;
|
|
13
|
+
}, o[0] = u.data?.place, o[1] = l, o[2] = p) : p = o[2];
|
|
14
|
+
let m = p, h;
|
|
15
|
+
bb0: {
|
|
16
|
+
if (!d.data) {
|
|
17
|
+
let e;
|
|
18
|
+
o[3] === Symbol.for("react.memo_cache_sentinel") ? (e = [], o[3] = e) : e = o[3], h = e;
|
|
19
|
+
break bb0;
|
|
20
|
+
}
|
|
21
|
+
let e;
|
|
22
|
+
o[4] !== d.data || o[5] !== m ? (e = d.data.filter(m), o[4] = d.data, o[5] = m, o[6] = e) : e = o[6], h = e;
|
|
23
|
+
}
|
|
24
|
+
let g = h, _;
|
|
25
|
+
o[7] !== u.data || o[8] !== f || o[9] !== s ? (_ = (e, r) => {
|
|
26
|
+
f.mutate({
|
|
27
|
+
pipelineId: u.data.pipelineId,
|
|
28
|
+
runPipelinePayloadDto: { transition: {
|
|
29
|
+
id: e,
|
|
30
|
+
workflowId: s,
|
|
31
|
+
payload: r
|
|
32
|
+
} }
|
|
33
|
+
});
|
|
34
|
+
}, o[7] = u.data, o[8] = f, o[9] = s, o[10] = _) : _ = o[10];
|
|
35
|
+
let v = _, y = f.isPending || u.data?.status === import_enums.WorkflowState.Running, b = u.data?.errorMessage, x;
|
|
36
|
+
return o[11] !== g || o[12] !== d.error || o[13] !== d.isLoading || o[14] !== d.isSuccess || o[15] !== u.data || o[16] !== u.isLoading || o[17] !== u.isSuccess || o[18] !== v || o[19] !== y || o[20] !== b ? (x = {
|
|
37
|
+
workflow: u.data,
|
|
38
|
+
workflowLoading: u.isLoading,
|
|
39
|
+
workflowReady: u.isSuccess,
|
|
40
|
+
workflowError: b,
|
|
41
|
+
documents: g,
|
|
42
|
+
documentsLoading: d.isLoading,
|
|
43
|
+
documentsReady: d.isSuccess,
|
|
44
|
+
documentsError: d.error,
|
|
45
|
+
isLoading: y,
|
|
46
|
+
handleRun: v
|
|
47
|
+
}, o[11] = g, o[12] = d.error, o[13] = d.isLoading, o[14] = d.isSuccess, o[15] = u.data, o[16] = u.isLoading, o[17] = u.isSuccess, o[18] = v, o[19] = y, o[20] = b, o[21] = x) : x = o[21], x;
|
|
48
|
+
}
|
|
49
|
+
export { useWorkflowData };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
2
|
+
import { useScrollToBottom } from "./useAutoScrollBottom.js";
|
|
3
|
+
import { useIntersectionObserver } from "./useIntersectionObserver.js";
|
|
4
|
+
import { useScrollToListItem } from "./useScrollToListItem.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
function useWorkflowListState(s) {
|
|
8
|
+
let l = c(19), u;
|
|
9
|
+
l[0] === Symbol.for("react.memo_cache_sentinel") ? (u = {}, l[0] = u) : u = l[0];
|
|
10
|
+
let [d, f] = useState(u), { activeId: p, observe: m } = useIntersectionObserver("0px 0px 0px 0px"), { listRef: h, scrollTo: g } = useScrollToListItem(), { canScrollDown: _, scrollToBottom: v } = useScrollToBottom(), { activeSectionId: y, setActiveSectionId: b } = useWorkbenchLayout(), x, S;
|
|
11
|
+
l[1] !== p || l[2] !== y || l[3] !== b ? (x = () => {
|
|
12
|
+
y !== p && (b(p), p && f((e) => ({
|
|
13
|
+
...e,
|
|
14
|
+
[p]: !0
|
|
15
|
+
})));
|
|
16
|
+
}, S = [
|
|
17
|
+
p,
|
|
18
|
+
y,
|
|
19
|
+
b
|
|
20
|
+
], l[1] = p, l[2] = y, l[3] = b, l[4] = x, l[5] = S) : (x = l[4], S = l[5]), useEffect(x, S);
|
|
21
|
+
let C, w;
|
|
22
|
+
l[6] !== p || l[7] !== s ? (C = () => {
|
|
23
|
+
if (s && s.length > 0) {
|
|
24
|
+
let e = s[s.length - 1], o = `section-${e.index}-${e.id}`;
|
|
25
|
+
f({
|
|
26
|
+
[o]: !0,
|
|
27
|
+
...p && p !== o ? { [p]: !0 } : {}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}, w = [s, p], l[6] = p, l[7] = s, l[8] = C, l[9] = w) : (C = l[8], w = l[9]), useEffect(C, w);
|
|
31
|
+
let T;
|
|
32
|
+
l[10] === Symbol.for("react.memo_cache_sentinel") ? (T = (e) => {
|
|
33
|
+
f((o) => ({
|
|
34
|
+
...o,
|
|
35
|
+
[e]: !o[e]
|
|
36
|
+
}));
|
|
37
|
+
}, l[10] = T) : T = l[10];
|
|
38
|
+
let E = T, D;
|
|
39
|
+
return l[11] !== p || l[12] !== _ || l[13] !== d || l[14] !== h || l[15] !== m || l[16] !== g || l[17] !== v ? (D = {
|
|
40
|
+
activeId: p,
|
|
41
|
+
expandedSections: d,
|
|
42
|
+
observe: m,
|
|
43
|
+
listRef: h,
|
|
44
|
+
scrollTo: g,
|
|
45
|
+
canScrollDown: _,
|
|
46
|
+
scrollToBottom: v,
|
|
47
|
+
toggleSection: E
|
|
48
|
+
}, l[11] = p, l[12] = _, l[13] = d, l[14] = h, l[15] = m, l[16] = g, l[17] = v, l[18] = D) : D = l[18], D;
|
|
49
|
+
}
|
|
50
|
+
export { useWorkflowListState };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import WorkflowItem_default from "./WorkflowItem.js";
|
|
2
|
+
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
3
|
+
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
4
|
+
import WorkflowList_default from "./WorkflowList.js";
|
|
5
|
+
import WorkbenchNavigation_default from "./WorkbenchNavigation.js";
|
|
6
|
+
import PipelineHistoryList_default from "./components/PipelineHistoryList.js";
|
|
7
|
+
import Workbench from "./Workbench.js";
|
|
8
|
+
import { NewRunDialog } from "./components/NewRunDialog.js";
|
|
@@ -66,12 +66,11 @@ function WorkbenchLayoutProvider(a) {
|
|
|
66
66
|
}), o[36] = s, o[37] = Y, o[38] = X) : X = o[38], X;
|
|
67
67
|
}
|
|
68
68
|
function _temp(t) {
|
|
69
|
-
return !!t.connectionUrl && !!t.workerId;
|
|
69
|
+
return !!t.connectionUrl && (!!t.workerId || t.local);
|
|
70
70
|
}
|
|
71
71
|
function useWorkbenchLayout() {
|
|
72
72
|
let t = useContext(WorkbenchLayoutContext);
|
|
73
73
|
if (!t) throw Error("useWorkbenchLayout must be used within a WorkbenchLayoutProvider");
|
|
74
74
|
return t;
|
|
75
75
|
}
|
|
76
|
-
|
|
77
|
-
export { WorkbenchContextProvider, WorkbenchLayoutProvider, useWorkbenchLayout };
|
|
76
|
+
export { WorkbenchLayoutProvider, useWorkbenchLayout };
|
|
@@ -5,7 +5,7 @@ import { DialogHeader } from "../../../components/ui/dialog.js";
|
|
|
5
5
|
import { Input } from "../../../components/ui/input.js";
|
|
6
6
|
import { Label } from "../../../components/ui/label.js";
|
|
7
7
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select.js";
|
|
8
|
-
import ErrorSnackbar_default from "../../../components/
|
|
8
|
+
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
9
9
|
import { EnvironmentSlotSelector } from "./EnvironmentSlotSelector.js";
|
|
10
10
|
import { c } from "react/compiler-runtime";
|
|
11
11
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
@@ -2,7 +2,7 @@ import { useStudio } from "../../../providers/StudioProvider.js";
|
|
|
2
2
|
import { useBatchDeletePipeline, useChildPipelines, useFilterPipelines } from "../../../hooks/usePipelines.js";
|
|
3
3
|
import { Badge } from "../../../components/ui/badge.js";
|
|
4
4
|
import CustomListView_default from "../../../components/lists/CustomListView.js";
|
|
5
|
-
import ErrorSnackbar_default from "../../../components/
|
|
5
|
+
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
6
6
|
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
7
7
|
import NewPipelineRunDialog_default from "./NewPipelineRunDialog.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useStudio } from "../../../providers/StudioProvider.js";
|
|
2
2
|
import { usePipelineConfig } from "../../../hooks/useConfig.js";
|
|
3
3
|
import { useCreatePipeline } from "../../../hooks/usePipelines.js";
|
|
4
|
-
import ErrorSnackbar_default from "../../../components/
|
|
4
|
+
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
5
5
|
import ArgumentsView_default from "./pipeline-form/ArgumentsView.js";
|
|
6
6
|
import SelectionView_default from "./pipeline-form/SelectionView.js";
|
|
7
7
|
import { useRunPipeline } from "../../../hooks/useProcessor.js";
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
1
2
|
import { useApiClient } from "./useApi.js";
|
|
2
3
|
import { useIsMobile } from "./use-mobile.js";
|
|
3
|
-
import { useAvailableEnvironments, useWorkspaceConfig } from "./useConfig.js";
|
|
4
|
-
import { useBatchDeletePipeline, useChildPipelines, useCreatePipeline, useDeletePipeline, useFilterPipelines, usePipeline,
|
|
4
|
+
import { useAvailableEnvironments, usePipelineConfig, useWorkspaceConfig } from "./useConfig.js";
|
|
5
|
+
import { useBatchDeletePipeline, useChildPipelines, useCreatePipeline, useDeletePipeline, useFilterPipelines, usePipeline, usePipelineConfigByName, usePipelineSource, useUpdatePipeline } from "./usePipelines.js";
|
|
5
6
|
import { useBatchDeleteWorkspaces, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace, useUpdateWorkspace, useWorkspace } from "./useWorkspaces.js";
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
function getMeCacheKey(e) {
|
|
2
|
+
return ["me", e];
|
|
3
|
+
}
|
|
4
|
+
function getHealthCacheKey(e) {
|
|
5
|
+
return ["health", e];
|
|
6
|
+
}
|
|
7
|
+
function getWorkspaceTypesCacheKey(e) {
|
|
8
|
+
return ["workspace-types", e];
|
|
9
|
+
}
|
|
10
|
+
function getPipelineTypesCacheKey(e, x) {
|
|
11
|
+
return [
|
|
12
|
+
"pipeline-types",
|
|
13
|
+
e,
|
|
14
|
+
x
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
function getAvailableEnvironmentsCacheKey(e) {
|
|
18
|
+
return ["available-environments", e];
|
|
19
|
+
}
|
|
20
|
+
function getDashboardStatsCacheKey(e) {
|
|
21
|
+
return [
|
|
22
|
+
"dashboard",
|
|
23
|
+
"stats",
|
|
24
|
+
e
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
function getPipelineCacheKey(e, x) {
|
|
28
|
+
return [
|
|
29
|
+
"pipeline",
|
|
30
|
+
e,
|
|
31
|
+
x
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
function getPipelinesCacheKey(e) {
|
|
35
|
+
return ["pipelines", e];
|
|
36
|
+
}
|
|
37
|
+
function getPipelinesChildrenCacheKey(e, x) {
|
|
38
|
+
return [
|
|
39
|
+
"pipelines",
|
|
40
|
+
"children",
|
|
41
|
+
e,
|
|
42
|
+
x
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
function getPipelineConfigCacheKey(e, x, S) {
|
|
46
|
+
return [
|
|
47
|
+
"pipelineConfig",
|
|
48
|
+
e,
|
|
49
|
+
x,
|
|
50
|
+
S
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
function getPipelineSourceCacheKey(e, x, S) {
|
|
54
|
+
return [
|
|
55
|
+
"pipelineSource",
|
|
56
|
+
e,
|
|
57
|
+
x,
|
|
58
|
+
S
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
function getWorkspaceCacheKey(e, x) {
|
|
62
|
+
return [
|
|
63
|
+
"workspace",
|
|
64
|
+
e,
|
|
65
|
+
x
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
function getWorkspacesCacheKey(e) {
|
|
69
|
+
return ["workspaces", e];
|
|
70
|
+
}
|
|
71
|
+
function getWorkflowCacheKey(e, x) {
|
|
72
|
+
return [
|
|
73
|
+
"workflow",
|
|
74
|
+
e,
|
|
75
|
+
x
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
function getWorkflowsCacheKey(e, x) {
|
|
79
|
+
return [
|
|
80
|
+
"workflows",
|
|
81
|
+
e,
|
|
82
|
+
x
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
function getWorkflowsByPipelineCacheKey(e, x) {
|
|
86
|
+
return [
|
|
87
|
+
"workflows-by-pipeline",
|
|
88
|
+
e,
|
|
89
|
+
x
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
function getAllWorkflowsCacheKey(e) {
|
|
93
|
+
return ["all-workflows", e];
|
|
94
|
+
}
|
|
95
|
+
function getNamespaceCacheKey(e, x) {
|
|
96
|
+
return [
|
|
97
|
+
"namespace",
|
|
98
|
+
e,
|
|
99
|
+
x
|
|
100
|
+
];
|
|
101
|
+
}
|
|
102
|
+
function getNamespacesByPipelineCacheKey(e, x) {
|
|
103
|
+
return [
|
|
104
|
+
"namespaces",
|
|
105
|
+
e,
|
|
106
|
+
x
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
function getDocumentCacheKey(e, x) {
|
|
110
|
+
return [
|
|
111
|
+
"document",
|
|
112
|
+
e,
|
|
113
|
+
x
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
function getDocumentsCacheKey(e, x) {
|
|
117
|
+
return [
|
|
118
|
+
"documents",
|
|
119
|
+
e,
|
|
120
|
+
x
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
function getFileTreeCacheKey(e, x) {
|
|
124
|
+
return [
|
|
125
|
+
"fileTree",
|
|
126
|
+
e,
|
|
127
|
+
x
|
|
128
|
+
];
|
|
129
|
+
}
|
|
130
|
+
function getFileContentCacheKey(e, x, S) {
|
|
131
|
+
return [
|
|
132
|
+
"fileContent",
|
|
133
|
+
e,
|
|
134
|
+
x,
|
|
135
|
+
S
|
|
136
|
+
];
|
|
137
|
+
}
|
|
138
|
+
export { getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
|