@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,17 +1,16 @@
|
|
|
1
|
+
import { useWorkflowCheckpoints } from "../../../hooks/useWorkflows.js";
|
|
1
2
|
import { cn } from "../../../lib/utils.js";
|
|
2
3
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
3
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip.js";
|
|
4
|
-
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
5
4
|
import { c } from "react/compiler-runtime";
|
|
6
5
|
import React from "react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { ChevronRight, Clock, Loader2, Play
|
|
7
|
+
import { ChevronRight, Clock, Loader2, Play } from "lucide-react";
|
|
9
8
|
import { format } from "date-fns";
|
|
10
|
-
var WorkflowHistoryItem_default = (
|
|
11
|
-
let
|
|
12
|
-
if (
|
|
13
|
-
let
|
|
14
|
-
return
|
|
9
|
+
var WorkflowHistoryItem_default = (m) => {
|
|
10
|
+
let h = c(19), { workflowId: g, workflow: _ } = m, v = useWorkflowCheckpoints(g), y = v.data;
|
|
11
|
+
if (v.isLoading) {
|
|
12
|
+
let e;
|
|
13
|
+
return h[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("li", {
|
|
15
14
|
className: "group/menu-item relative list-none",
|
|
16
15
|
children: /* @__PURE__ */ jsxs("div", {
|
|
17
16
|
className: "flex w-full items-center gap-2 rounded-md p-2 text-sm opacity-50",
|
|
@@ -20,130 +19,110 @@ var WorkflowHistoryItem_default = (_) => {
|
|
|
20
19
|
children: "Loading..."
|
|
21
20
|
})]
|
|
22
21
|
})
|
|
23
|
-
}),
|
|
22
|
+
}), h[0] = e) : e = h[0], e;
|
|
24
23
|
}
|
|
25
|
-
if (!
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
let
|
|
29
|
-
|
|
24
|
+
if (!y?.length) return null;
|
|
25
|
+
let b;
|
|
26
|
+
h[1] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ jsx(Play, { className: "text-primary h-3.5 w-3.5 fill-current" }), h[1] = b) : b = h[1];
|
|
27
|
+
let x = _.title ?? _.alias, S;
|
|
28
|
+
h[2] === x ? S = h[3] : (S = /* @__PURE__ */ jsx("span", {
|
|
30
29
|
className: "truncate text-sm",
|
|
31
|
-
children:
|
|
32
|
-
}),
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
let
|
|
36
|
-
|
|
30
|
+
children: x
|
|
31
|
+
}), h[2] = x, h[3] = S);
|
|
32
|
+
let C;
|
|
33
|
+
h[4] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(ChevronRight, { className: "text-muted-foreground ml-auto h-3.5 w-3.5 transition-transform group-data-[state=open]/collapsible:rotate-90" }), h[4] = C) : C = h[4];
|
|
34
|
+
let w;
|
|
35
|
+
h[5] === S ? w = h[6] : (w = /* @__PURE__ */ jsx(CollapsibleTrigger, {
|
|
37
36
|
asChild: !0,
|
|
38
37
|
children: /* @__PURE__ */ jsxs("button", {
|
|
39
38
|
className: "hover:bg-accent hover:text-accent-foreground group/trigger flex w-full items-center gap-2 rounded-md p-2 text-left text-sm font-medium",
|
|
40
39
|
children: [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
b,
|
|
41
|
+
S,
|
|
42
|
+
C
|
|
44
43
|
]
|
|
45
44
|
})
|
|
46
|
-
}),
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
|
|
45
|
+
}), h[5] = S, h[6] = w);
|
|
46
|
+
let T;
|
|
47
|
+
h[7] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ jsx("div", { className: "from-primary/60 via-primary/30 to-muted/20 absolute top-7 bottom-3 left-1.75 w-0.5 rounded-full bg-linear-to-b" }), h[7] = T) : T = h[7];
|
|
48
|
+
let E;
|
|
49
|
+
h[8] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ jsx("div", {
|
|
51
50
|
className: "relative z-10 flex shrink-0 items-center justify-center",
|
|
52
51
|
children: /* @__PURE__ */ jsx("div", { className: "border-primary/60 bg-primary/20 flex h-4 w-4 items-center justify-center rounded-full border-2" })
|
|
53
|
-
}),
|
|
54
|
-
let
|
|
55
|
-
|
|
52
|
+
}), h[8] = E) : E = h[8];
|
|
53
|
+
let D;
|
|
54
|
+
h[9] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsxs("div", {
|
|
56
55
|
className: "group/entry relative flex gap-3 py-1 pl-0",
|
|
57
|
-
children: [
|
|
56
|
+
children: [E, /* @__PURE__ */ jsx("div", {
|
|
58
57
|
className: "flex min-w-0 flex-1 items-center gap-1.5",
|
|
59
58
|
children: /* @__PURE__ */ jsx("span", {
|
|
60
59
|
className: "bg-muted text-foreground w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium",
|
|
61
60
|
children: "start"
|
|
62
61
|
})
|
|
63
62
|
})]
|
|
64
|
-
}),
|
|
65
|
-
let
|
|
66
|
-
if (
|
|
67
|
-
let
|
|
68
|
-
|
|
69
|
-
|
|
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;
|
|
63
|
+
}), h[9] = D) : D = h[9];
|
|
64
|
+
let O;
|
|
65
|
+
if (h[10] !== y) {
|
|
66
|
+
let e;
|
|
67
|
+
h[12] === y.length ? e = h[13] : (e = (e, u) => {
|
|
68
|
+
let d = u === y.length - 1, f = e.place ?? "unknown", p = e.transitionId;
|
|
71
69
|
return /* @__PURE__ */ jsxs("div", {
|
|
72
70
|
className: "group/entry relative flex gap-3 py-1 pl-0",
|
|
73
71
|
children: [/* @__PURE__ */ jsx("div", {
|
|
74
72
|
className: "relative z-10 flex shrink-0 items-center justify-center",
|
|
75
73
|
children: /* @__PURE__ */ jsx("div", {
|
|
76
|
-
className: cn("flex h-4 w-4 items-center justify-center rounded-full border-2 transition-all",
|
|
77
|
-
children:
|
|
74
|
+
className: cn("flex h-4 w-4 items-center justify-center rounded-full border-2 transition-all", d ? "border-primary bg-primary shadow-primary/40 shadow-sm" : "border-muted-foreground/30 bg-background"),
|
|
75
|
+
children: d && /* @__PURE__ */ jsx("div", { className: "bg-primary-foreground h-1.5 w-1.5 animate-pulse rounded-full" })
|
|
78
76
|
})
|
|
79
77
|
}), /* @__PURE__ */ jsxs("div", {
|
|
80
78
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
81
79
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
82
80
|
className: "flex items-baseline gap-1.5",
|
|
83
81
|
children: [/* @__PURE__ */ jsx("span", {
|
|
84
|
-
className: cn("w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium",
|
|
85
|
-
children:
|
|
86
|
-
}),
|
|
82
|
+
className: cn("w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium", d ? "bg-primary/15 text-primary" : "bg-muted/60 text-muted-foreground"),
|
|
83
|
+
children: f
|
|
84
|
+
}), p && /* @__PURE__ */ jsxs("span", {
|
|
87
85
|
className: "text-muted-foreground truncate text-[10px] italic",
|
|
88
86
|
children: [
|
|
89
87
|
"(via ",
|
|
90
|
-
|
|
88
|
+
p,
|
|
91
89
|
")"
|
|
92
90
|
]
|
|
93
91
|
})]
|
|
94
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
95
93
|
className: "text-muted-foreground flex items-center gap-2 text-[10px]",
|
|
96
|
-
children:
|
|
97
|
-
asChild: !0,
|
|
98
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
99
|
-
className: "flex cursor-default items-center gap-0.5",
|
|
100
|
-
children: [/* @__PURE__ */ jsx(Wrench, { className: "h-3 w-3" }), /* @__PURE__ */ jsx("span", {
|
|
101
|
-
className: "tabular-nums",
|
|
102
|
-
children: h.length
|
|
103
|
-
})]
|
|
104
|
-
})
|
|
105
|
-
}), /* @__PURE__ */ jsxs(TooltipContent, {
|
|
106
|
-
side: "right",
|
|
107
|
-
className: "max-w-48",
|
|
108
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
109
|
-
className: "text-xs font-medium",
|
|
110
|
-
children: "Tools used:"
|
|
111
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
112
|
-
className: "text-muted-foreground text-[11px]",
|
|
113
|
-
children: h.join(", ")
|
|
114
|
-
})]
|
|
115
|
-
})] }), /* @__PURE__ */ jsxs("div", {
|
|
94
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
116
95
|
className: "flex items-center gap-0.5",
|
|
117
96
|
children: [/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }), /* @__PURE__ */ jsx("span", {
|
|
118
97
|
className: "tabular-nums",
|
|
119
|
-
children: format(new Date(
|
|
98
|
+
children: format(new Date(e.createdAt), "HH:mm:ss")
|
|
120
99
|
})]
|
|
121
|
-
})
|
|
100
|
+
})
|
|
122
101
|
})]
|
|
123
102
|
})]
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
} else
|
|
127
|
-
let
|
|
128
|
-
|
|
103
|
+
}, e.version);
|
|
104
|
+
}, h[12] = y.length, h[13] = e), O = y.map(e), h[10] = y, h[11] = O;
|
|
105
|
+
} else O = h[11];
|
|
106
|
+
let k;
|
|
107
|
+
h[14] === O ? k = h[15] : (k = /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("ul", {
|
|
129
108
|
className: "ml-2 flex min-w-0 flex-col gap-1 pl-0",
|
|
130
109
|
children: /* @__PURE__ */ jsxs("div", {
|
|
131
110
|
className: "relative py-2",
|
|
132
111
|
children: [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
112
|
+
T,
|
|
113
|
+
D,
|
|
114
|
+
O
|
|
136
115
|
]
|
|
137
116
|
})
|
|
138
|
-
}) }),
|
|
139
|
-
let
|
|
140
|
-
return
|
|
117
|
+
}) }), h[14] = O, h[15] = k);
|
|
118
|
+
let A;
|
|
119
|
+
return h[16] !== k || h[17] !== w ? (A = /* @__PURE__ */ jsx(Collapsible, {
|
|
141
120
|
defaultOpen: !0,
|
|
142
121
|
className: "group/collapsible",
|
|
143
122
|
children: /* @__PURE__ */ jsxs("li", {
|
|
144
123
|
className: "group/menu-item relative list-none",
|
|
145
|
-
children: [
|
|
124
|
+
children: [w, k]
|
|
146
125
|
})
|
|
147
|
-
}),
|
|
126
|
+
}), h[16] = k, h[17] = w, h[18] = A) : A = h[18], A;
|
|
148
127
|
};
|
|
149
128
|
export { WorkflowHistoryItem_default as default };
|
package/dist/features/workbench/components/{PipelineHistoryList.js → WorkflowHistoryList.js}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useChildWorkflows } from "../../../hooks/useWorkflows.js";
|
|
2
2
|
import WorkflowHistoryItem_default from "./WorkflowHistoryItem.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import React, { useMemo } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Clock, Loader2 } from "lucide-react";
|
|
7
|
-
var
|
|
8
|
-
let l = c(10), {
|
|
7
|
+
var WorkflowHistoryList_default = (s) => {
|
|
8
|
+
let l = c(10), { workflow: u } = s, d = useChildWorkflows(u?.id), f;
|
|
9
9
|
l[0] === d.data ? f = l[1] : (f = d.data ?? [], l[0] = d.data, l[1] = f);
|
|
10
10
|
let p = f;
|
|
11
11
|
if (!u) {
|
|
12
12
|
let e;
|
|
13
13
|
return l[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
|
|
14
14
|
className: "text-muted-foreground flex items-center justify-center py-8 text-sm",
|
|
15
|
-
children: "No
|
|
15
|
+
children: "No workflow selected"
|
|
16
16
|
}), l[2] = e) : e = l[2], e;
|
|
17
17
|
}
|
|
18
18
|
if (d.isLoading) {
|
|
@@ -53,4 +53,4 @@ function _temp(e) {
|
|
|
53
53
|
workflow: e
|
|
54
54
|
}, e.id);
|
|
55
55
|
}
|
|
56
|
-
export {
|
|
56
|
+
export { WorkflowHistoryList_default as default };
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
+
import { useStudio } from "../../../../providers/StudioProvider.js";
|
|
2
|
+
import { useCreateWorkflow, useWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
1
3
|
import { Button } from "../../../../components/ui/button.js";
|
|
2
4
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../../../../components/ui/alert-dialog.js";
|
|
3
5
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../components/ui/tooltip.js";
|
|
4
|
-
import {
|
|
5
|
-
import { useDeleteWorkflow, useWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
6
|
+
import { useRunWorkflow } from "../../../../hooks/useProcessor.js";
|
|
6
7
|
import { c } from "react/compiler-runtime";
|
|
7
8
|
import React from "react";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { LockOpen, Repeat } from "lucide-react";
|
|
10
|
-
var WorkflowButtons_default = (
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
var WorkflowButtons_default = (T) => {
|
|
12
|
+
let E = c(34), { workflow: D, workflowId: O } = T, { router: k } = useStudio(), A = useWorkflow(O).data, j = useCreateWorkflow(), M = useRunWorkflow(), N = j.isPending || M.isPending, P;
|
|
13
|
+
E[0] !== j || E[1] !== k || E[2] !== M || E[3] !== D.alias || E[4] !== D.args || E[5] !== D.workspaceId ? (P = () => {
|
|
14
|
+
j.mutate({ workflowCreateDto: {
|
|
15
|
+
alias: D.alias,
|
|
16
|
+
title: null,
|
|
17
|
+
workspaceId: D.workspaceId,
|
|
18
|
+
transition: null,
|
|
19
|
+
args: D.args ?? {}
|
|
20
|
+
} }, { onSuccess: (t) => {
|
|
21
|
+
M.mutate({
|
|
22
|
+
workflowId: t.id,
|
|
23
|
+
runWorkflowPayloadDto: {},
|
|
24
|
+
force: !0
|
|
25
|
+
}, { onSuccess: () => {
|
|
26
|
+
k.navigateToWorkflow(t.id);
|
|
27
|
+
} });
|
|
28
|
+
} });
|
|
29
|
+
}, E[0] = j, E[1] = k, E[2] = M, E[3] = D.alias, E[4] = D.args, E[5] = D.workspaceId, E[6] = P) : P = E[6];
|
|
30
|
+
let F = P, I;
|
|
31
|
+
E[7] !== M || E[8] !== D.id || E[9] !== O ? (I = () => {
|
|
32
|
+
M.mutate({
|
|
33
|
+
workflowId: D.id,
|
|
34
|
+
runWorkflowPayloadDto: { transition: {
|
|
24
35
|
name: "unlock",
|
|
25
|
-
workflowId:
|
|
36
|
+
workflowId: O
|
|
26
37
|
} },
|
|
27
38
|
force: !1
|
|
28
39
|
});
|
|
29
|
-
},
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
if (O) try {
|
|
33
|
-
k.mutate(O), M();
|
|
34
|
-
} catch (t) {
|
|
35
|
-
let C = t;
|
|
36
|
-
console.error("Mutation failed:", C);
|
|
37
|
-
}
|
|
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);
|
|
40
|
+
}, E[7] = M, E[8] = D.id, E[9] = O, E[10] = I) : I = E[10];
|
|
41
|
+
let L = I;
|
|
42
|
+
if (!A) return null;
|
|
43
43
|
let R;
|
|
44
|
-
|
|
44
|
+
E[11] === N ? R = E[12] : (R = N ? /* @__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" }), E[11] = N, E[12] = R);
|
|
45
|
+
let z;
|
|
46
|
+
E[13] !== N || E[14] !== R ? (z = /* @__PURE__ */ jsx(TooltipTrigger, {
|
|
45
47
|
asChild: !0,
|
|
46
48
|
children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
|
|
47
49
|
asChild: !0,
|
|
@@ -49,28 +51,28 @@ var WorkflowButtons_default = (w) => {
|
|
|
49
51
|
variant: "ghost",
|
|
50
52
|
size: "icon",
|
|
51
53
|
className: "h-7 w-7",
|
|
52
|
-
disabled:
|
|
53
|
-
children:
|
|
54
|
+
disabled: N,
|
|
55
|
+
children: R
|
|
54
56
|
})
|
|
55
57
|
})
|
|
56
|
-
}),
|
|
57
|
-
let z;
|
|
58
|
-
T[16] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ jsx(TooltipContent, { children: "Repeat" }), T[16] = z) : z = T[16];
|
|
58
|
+
}), E[13] = N, E[14] = R, E[15] = z) : z = E[15];
|
|
59
59
|
let B;
|
|
60
|
-
|
|
60
|
+
E[16] === Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ jsx(TooltipContent, { children: "Repeat" }), E[16] = B) : B = E[16];
|
|
61
61
|
let V;
|
|
62
|
-
|
|
62
|
+
E[17] === z ? V = E[18] : (V = /* @__PURE__ */ jsxs(Tooltip, { children: [z, B] }), E[17] = z, E[18] = V);
|
|
63
63
|
let H;
|
|
64
|
-
|
|
64
|
+
E[19] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Repeat workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This will create a new run with the same arguments and redirect you to it." })] }), E[19] = H) : H = E[19];
|
|
65
65
|
let U;
|
|
66
|
-
|
|
67
|
-
onClick: I,
|
|
68
|
-
children: "Repeat"
|
|
69
|
-
})] })] }), T[21] = I, T[22] = U);
|
|
66
|
+
E[20] === Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), E[20] = U) : U = E[20];
|
|
70
67
|
let W;
|
|
71
|
-
|
|
68
|
+
E[21] === F ? W = E[22] : (W = /* @__PURE__ */ jsxs(AlertDialogContent, { children: [H, /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [U, /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
69
|
+
onClick: F,
|
|
70
|
+
children: "Repeat"
|
|
71
|
+
})] })] }), E[21] = F, E[22] = W);
|
|
72
72
|
let G;
|
|
73
|
-
|
|
73
|
+
E[23] !== V || E[24] !== W ? (G = /* @__PURE__ */ jsxs(AlertDialog, { children: [V, W] }), E[23] = V, E[24] = W, E[25] = G) : G = E[25];
|
|
74
|
+
let K;
|
|
75
|
+
E[26] !== A.availableTransitions || E[27] !== A.place || E[28] !== L || E[29] !== M.isPending ? (K = A.place === "end" && A.availableTransitions?.find(_temp2) && /* @__PURE__ */ jsxs(AlertDialog, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
74
76
|
asChild: !0,
|
|
75
77
|
children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
|
|
76
78
|
asChild: !0,
|
|
@@ -78,20 +80,20 @@ var WorkflowButtons_default = (w) => {
|
|
|
78
80
|
variant: "ghost",
|
|
79
81
|
size: "icon",
|
|
80
82
|
className: "h-7 w-7",
|
|
81
|
-
disabled:
|
|
82
|
-
children:
|
|
83
|
+
disabled: M.isPending,
|
|
84
|
+
children: M.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" })
|
|
83
85
|
})
|
|
84
86
|
})
|
|
85
87
|
}), /* @__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, {
|
|
86
|
-
onClick:
|
|
88
|
+
onClick: L,
|
|
87
89
|
children: "Unlock"
|
|
88
|
-
})] })] })] }),
|
|
89
|
-
let
|
|
90
|
-
return
|
|
90
|
+
})] })] })] }), E[26] = A.availableTransitions, E[27] = A.place, E[28] = L, E[29] = M.isPending, E[30] = K) : K = E[30];
|
|
91
|
+
let q;
|
|
92
|
+
return E[31] !== G || E[32] !== K ? (q = /* @__PURE__ */ jsxs("div", {
|
|
91
93
|
className: "flex items-center",
|
|
92
94
|
onClick: _temp,
|
|
93
|
-
children: [
|
|
94
|
-
}),
|
|
95
|
+
children: [G, K]
|
|
96
|
+
}), E[31] = G, E[32] = K, E[33] = q) : q = E[33], q;
|
|
95
97
|
};
|
|
96
98
|
function _temp(t) {
|
|
97
99
|
return t.stopPropagation();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
2
|
+
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
2
3
|
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
3
4
|
import { useFilterDocuments } from "../../../hooks/useDocuments.js";
|
|
4
|
-
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { useCallback, useMemo } from "react";
|
|
7
7
|
var import_enums = require_enums();
|
|
8
|
-
function useWorkflowData(
|
|
9
|
-
let o = c(
|
|
8
|
+
function useWorkflowData(i) {
|
|
9
|
+
let o = c(21), { workflowId: s, showFullMessageHistory: l } = i, u = useWorkflow(s), d = useFilterDocuments(s), f = useRunWorkflow(), p;
|
|
10
10
|
o[0] !== u.data?.place || o[1] !== l ? (p = (e) => {
|
|
11
11
|
let r = e.meta, i = e.ui, a = r?.hidden || i?.hidden || !!r?.hideAtPlaces?.includes(u.data?.place ?? "");
|
|
12
12
|
return !l && e.tags?.includes("internal") && (a = !0), !a;
|
|
@@ -22,18 +22,18 @@ function useWorkflowData(r) {
|
|
|
22
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
23
|
}
|
|
24
24
|
let g = h, _;
|
|
25
|
-
o[7] !==
|
|
25
|
+
o[7] !== f || o[8] !== s ? (_ = (e, r) => {
|
|
26
26
|
f.mutate({
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
workflowId: s,
|
|
28
|
+
runWorkflowPayloadDto: { transition: {
|
|
29
29
|
id: e,
|
|
30
30
|
workflowId: s,
|
|
31
31
|
payload: r
|
|
32
32
|
} }
|
|
33
33
|
});
|
|
34
|
-
}, o[7] =
|
|
34
|
+
}, o[7] = f, o[8] = s, o[9] = _) : _ = o[9];
|
|
35
35
|
let v = _, y = f.isPending || u.data?.status === import_enums.WorkflowState.Running, b = u.data?.errorMessage, x;
|
|
36
|
-
return o[
|
|
36
|
+
return o[10] !== g || o[11] !== d.error || o[12] !== d.isLoading || o[13] !== d.isSuccess || o[14] !== u.data || o[15] !== u.isLoading || o[16] !== u.isSuccess || o[17] !== v || o[18] !== y || o[19] !== b ? (x = {
|
|
37
37
|
workflow: u.data,
|
|
38
38
|
workflowLoading: u.isLoading,
|
|
39
39
|
workflowReady: u.isSuccess,
|
|
@@ -44,6 +44,6 @@ function useWorkflowData(r) {
|
|
|
44
44
|
documentsError: d.error,
|
|
45
45
|
isLoading: y,
|
|
46
46
|
handleRun: v
|
|
47
|
-
}, o[
|
|
47
|
+
}, o[10] = g, o[11] = d.error, o[12] = d.isLoading, o[13] = d.isSuccess, o[14] = u.data, o[15] = u.isLoading, o[16] = u.isSuccess, o[17] = v, o[18] = y, o[19] = b, o[20] = x) : x = o[20], x;
|
|
48
48
|
}
|
|
49
49
|
export { useWorkflowData };
|
|
@@ -1,50 +1,13 @@
|
|
|
1
|
-
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
2
1
|
import { useScrollToBottom } from "./useAutoScrollBottom.js";
|
|
3
|
-
import { useIntersectionObserver } from "./useIntersectionObserver.js";
|
|
4
2
|
import { useScrollToListItem } from "./useScrollToListItem.js";
|
|
5
3
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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;
|
|
4
|
+
function useWorkflowListState() {
|
|
5
|
+
let r = c(5), { listRef: i, scrollTo: a } = useScrollToListItem(), { canScrollDown: o, scrollToBottom: s } = useScrollToBottom(), l;
|
|
6
|
+
return r[0] !== o || r[1] !== i || r[2] !== a || r[3] !== s ? (l = {
|
|
7
|
+
listRef: i,
|
|
8
|
+
scrollTo: a,
|
|
9
|
+
canScrollDown: o,
|
|
10
|
+
scrollToBottom: s
|
|
11
|
+
}, r[0] = o, r[1] = i, r[2] = a, r[3] = s, r[4] = l) : l = r[4], l;
|
|
49
12
|
}
|
|
50
13
|
export { useWorkflowListState };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import WorkflowItem_default from "./WorkflowItem.js";
|
|
2
2
|
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
3
|
-
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
4
3
|
import WorkflowList_default from "./WorkflowList.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
5
|
+
import WorkflowHistoryList_default from "./components/WorkflowHistoryList.js";
|
|
7
6
|
import Workbench from "./Workbench.js";
|
|
8
7
|
import { NewRunDialog } from "./components/NewRunDialog.js";
|
|
@@ -3,7 +3,7 @@ import { createContext, useCallback, useContext, useMemo, useState } from "react
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var WorkbenchLayoutContext = createContext(null);
|
|
5
5
|
function WorkbenchLayoutProvider(a) {
|
|
6
|
-
let o = c(44), { children: s,
|
|
6
|
+
let o = c(44), { children: s, workflow: l, isDeveloperMode: u, workspaceConfig: d, getPreviewUrl: f, getEnvironmentPreviewUrl: p, environments: m, previewPanelOpen: h, onPreviewPanelOpenChange: g } = a, _ = u === void 0 ? !1 : u, [v, y] = useState(null), [b, x] = useState(null), [S, C] = useState("preview"), [w, T] = useState(null), [E, D] = useState(""), O = h !== void 0, k = O ? h ? b ?? "preview" : null : b, A = d?.features?.previewPanel?.enabled ?? !1, j;
|
|
7
7
|
o[0] === m ? j = o[1] : (j = m === void 0 || m.some(_temp), o[0] = m, o[1] = j);
|
|
8
8
|
let M = A && j, N;
|
|
9
9
|
o[2] !== m?.[0]?.slotId || o[3] !== d?.features?.fileExplorer?.enabled || o[4] !== d?.features?.fileExplorer?.environments ? (N = d?.features?.fileExplorer?.enabled && d?.features?.fileExplorer?.environments?.includes(m?.[0]?.slotId ?? ""), o[2] = m?.[0]?.slotId, o[3] = d?.features?.fileExplorer?.enabled, o[4] = d?.features?.fileExplorer?.environments, o[5] = N) : N = o[5];
|
|
@@ -37,8 +37,8 @@ function WorkbenchLayoutProvider(a) {
|
|
|
37
37
|
U("preview");
|
|
38
38
|
}, o[19] = U, o[20] = J);
|
|
39
39
|
let Y = J, X = P ?? !1, Z;
|
|
40
|
-
o[21] !== v || o[22] !== S || o[23] !== w || o[24] !== k || o[25] !== G || o[26] !== m || o[27] !== p || o[28] !== f || o[29] !== _ || o[30] !== q || o[31] !==
|
|
41
|
-
|
|
40
|
+
o[21] !== v || o[22] !== S || o[23] !== w || o[24] !== k || o[25] !== G || o[26] !== m || o[27] !== p || o[28] !== f || o[29] !== _ || o[30] !== q || o[31] !== M || o[32] !== F || o[33] !== E || o[34] !== X || o[35] !== z || o[36] !== Y || o[37] !== U || o[38] !== l || o[39] !== d ? (Z = {
|
|
41
|
+
workflow: l,
|
|
42
42
|
previewPanelEnabled: M,
|
|
43
43
|
fileExplorerEnabled: X,
|
|
44
44
|
isDeveloperMode: _,
|
|
@@ -61,7 +61,7 @@ function WorkbenchLayoutProvider(a) {
|
|
|
61
61
|
setActivePreviewTab: C,
|
|
62
62
|
activeSectionId: w,
|
|
63
63
|
setActiveSectionId: T
|
|
64
|
-
}, o[21] = v, o[22] = S, o[23] = w, o[24] = k, o[25] = G, o[26] = m, o[27] = p, o[28] = f, o[29] = _, o[30] = q, o[31] =
|
|
64
|
+
}, o[21] = v, o[22] = S, o[23] = w, o[24] = k, o[25] = G, o[26] = m, o[27] = p, o[28] = f, o[29] = _, o[30] = q, o[31] = M, o[32] = F, o[33] = E, o[34] = X, o[35] = z, o[36] = Y, o[37] = U, o[38] = l, o[39] = d, o[40] = Z) : Z = o[40];
|
|
65
65
|
let Q = Z, $;
|
|
66
66
|
return o[41] !== s || o[42] !== Q ? ($ = /* @__PURE__ */ jsx(WorkbenchLayoutContext.Provider, {
|
|
67
67
|
value: Q,
|