@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,21 +1,14 @@
|
|
|
1
1
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
2
|
+
import { useFilterWorkflows, useWorkflow, useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
4
3
|
import { Button } from "../components/ui/button.js";
|
|
5
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../components/ui/collapsible.js";
|
|
6
|
-
import { SidebarMenu, SidebarProvider } from "../components/ui/sidebar.js";
|
|
7
4
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
8
5
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
9
6
|
import { require_enums } from "../packages/contracts/dist/enums/index.js";
|
|
10
|
-
import { useFetchWorkflowsByPipeline } from "../hooks/useWorkflows.js";
|
|
11
7
|
import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
|
|
12
|
-
import WorkflowButtons_default from "../features/workbench/components/buttons/WorkflowButtons.js";
|
|
13
8
|
import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
|
|
14
|
-
import
|
|
9
|
+
import WorkflowFlowViewer_default from "../features/debug/components/WorkflowFlowViewer.js";
|
|
15
10
|
import "../features/debug/index.js";
|
|
16
|
-
import
|
|
17
|
-
import WorkbenchNavigation_default from "../features/workbench/WorkbenchNavigation.js";
|
|
18
|
-
import PipelineHistoryList_default from "../features/workbench/components/PipelineHistoryList.js";
|
|
11
|
+
import WorkflowHistoryList_default from "../features/workbench/components/WorkflowHistoryList.js";
|
|
19
12
|
import { NewRunDialog } from "../features/workbench/components/NewRunDialog.js";
|
|
20
13
|
import "../features/workbench/index.js";
|
|
21
14
|
import { c } from "react/compiler-runtime";
|
|
@@ -23,15 +16,15 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
|
23
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
17
|
import { useQuery } from "@tanstack/react-query";
|
|
25
18
|
import { useNavigate, useParams } from "react-router-dom";
|
|
26
|
-
import { ChevronDown,
|
|
19
|
+
import { ChevronDown, ListOrdered, Loader2, Play, RefreshCw, ScrollText, Workflow } from "lucide-react";
|
|
27
20
|
import { formatDistanceToNow } from "date-fns";
|
|
28
21
|
var import_enums = require_enums(), EMBED_MESSAGE_TYPE = "loopstack:embed:workflow-completed", EMBED_RESIZE_MESSAGE_TYPE = "loopstack:embed:resize", EMBED_NEW_RUN_MESSAGE_TYPE = "loopstack:embed:new-run";
|
|
29
22
|
function PreviewWorkbenchPage() {
|
|
30
|
-
let e = c(5), {
|
|
23
|
+
let e = c(5), { workflowId: t } = useParams(), [n, r] = useState(!1), i;
|
|
31
24
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = (e) => {
|
|
32
25
|
r(!1), window.parent !== window && window.parent.postMessage({
|
|
33
26
|
type: EMBED_NEW_RUN_MESSAGE_TYPE,
|
|
34
|
-
|
|
27
|
+
workflowId: e
|
|
35
28
|
}, window.location.origin);
|
|
36
29
|
}, e[0] = i) : i = e[0];
|
|
37
30
|
let a = i;
|
|
@@ -45,125 +38,116 @@ function PreviewWorkbenchPage() {
|
|
|
45
38
|
}
|
|
46
39
|
let o;
|
|
47
40
|
return e[3] === t ? o = e[4] : (o = /* @__PURE__ */ jsx(PreviewWorkbenchContent, {
|
|
48
|
-
|
|
41
|
+
workflowId: t,
|
|
49
42
|
onNewRunSuccess: a
|
|
50
43
|
}), e[3] = t, e[4] = o), o;
|
|
51
44
|
}
|
|
52
45
|
function PreviewWorkbenchContent(e) {
|
|
53
|
-
let t = c(
|
|
54
|
-
t[0]
|
|
55
|
-
|
|
56
|
-
t[2] !== x.data || t[3] !== o ? (O = () => {
|
|
57
|
-
!x.data || E.current || x.data.length > 0 && x.data.every(_temp) && window.parent !== window && (E.current = !0, window.parent.postMessage({
|
|
46
|
+
let t = c(49), { workflowId: s, onNewRunSuccess: m } = e, g = useRef(null), [v, ce] = useState("output"), [y, b] = useState(!1), S = useWorkflow(s), C = useRef(!1), E = useWorkflowConfigByName(S.data?.className ?? void 0), k, A;
|
|
47
|
+
t[0] !== S.data || t[1] !== s ? (k = () => {
|
|
48
|
+
!S.data || C.current || S.data.status === import_enums.WorkflowState.Completed && window.parent !== window && (C.current = !0, window.parent.postMessage({
|
|
58
49
|
type: EMBED_MESSAGE_TYPE,
|
|
59
|
-
|
|
50
|
+
workflowId: s
|
|
60
51
|
}, window.location.origin));
|
|
61
|
-
},
|
|
62
|
-
let
|
|
63
|
-
t[
|
|
64
|
-
if (window.parent === window || !
|
|
52
|
+
}, A = [S.data, s], t[0] = S.data, t[1] = s, t[2] = k, t[3] = A) : (k = t[2], A = t[3]), useEffect(k, A);
|
|
53
|
+
let j, M;
|
|
54
|
+
t[4] === s ? (j = t[5], M = t[6]) : (j = () => {
|
|
55
|
+
if (window.parent === window || !g.current) return;
|
|
65
56
|
let e = new ResizeObserver(() => {
|
|
66
|
-
if (!
|
|
57
|
+
if (!g.current) return;
|
|
67
58
|
let e = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);
|
|
68
59
|
window.parent.postMessage({
|
|
69
60
|
type: EMBED_RESIZE_MESSAGE_TYPE,
|
|
70
|
-
|
|
61
|
+
workflowId: s,
|
|
71
62
|
height: e
|
|
72
63
|
}, window.location.origin);
|
|
73
64
|
});
|
|
74
|
-
return e.observe(
|
|
75
|
-
},
|
|
76
|
-
let
|
|
77
|
-
t[
|
|
78
|
-
|
|
79
|
-
}, t[
|
|
80
|
-
let
|
|
81
|
-
t[
|
|
65
|
+
return e.observe(g.current), () => e.disconnect();
|
|
66
|
+
}, M = [s], t[4] = s, t[5] = j, t[6] = M), useEffect(j, M);
|
|
67
|
+
let N;
|
|
68
|
+
t[7] === m ? N = t[8] : (N = (e) => {
|
|
69
|
+
b(!1), m(e);
|
|
70
|
+
}, t[7] = m, t[8] = N);
|
|
71
|
+
let P = N, F = _temp, I;
|
|
72
|
+
t[9] === Symbol.for("react.memo_cache_sentinel") ? (I = {
|
|
82
73
|
enableDebugMode: !1,
|
|
83
74
|
showFullMessageHistory: !1
|
|
84
|
-
}, t[
|
|
85
|
-
let
|
|
86
|
-
t[
|
|
75
|
+
}, t[9] = I) : I = t[9];
|
|
76
|
+
let L = I, R;
|
|
77
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (R = {
|
|
87
78
|
value: "output",
|
|
88
79
|
label: "Output",
|
|
89
80
|
icon: /* @__PURE__ */ jsx(ScrollText, { className: "h-3.5 w-3.5" })
|
|
90
|
-
}, t[
|
|
91
|
-
let
|
|
92
|
-
t[
|
|
81
|
+
}, t[10] = R) : R = t[10];
|
|
82
|
+
let z;
|
|
83
|
+
t[11] === Symbol.for("react.memo_cache_sentinel") ? (z = {
|
|
93
84
|
value: "graph",
|
|
94
85
|
label: "Graph",
|
|
95
86
|
icon: /* @__PURE__ */ jsx(Workflow, { className: "h-3.5 w-3.5" })
|
|
96
|
-
}, t[
|
|
97
|
-
let
|
|
98
|
-
t[
|
|
87
|
+
}, t[11] = z) : z = t[11];
|
|
88
|
+
let B;
|
|
89
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (B = {
|
|
99
90
|
value: "run-log",
|
|
100
91
|
label: "Run Log",
|
|
101
92
|
icon: /* @__PURE__ */ jsx(ListOrdered, { className: "h-3.5 w-3.5" })
|
|
102
|
-
}, t[
|
|
103
|
-
let
|
|
104
|
-
t[
|
|
105
|
-
L,
|
|
93
|
+
}, t[12] = B) : B = t[12];
|
|
94
|
+
let V;
|
|
95
|
+
t[13] === Symbol.for("react.memo_cache_sentinel") ? (V = [
|
|
106
96
|
R,
|
|
107
97
|
z,
|
|
98
|
+
B,
|
|
108
99
|
{
|
|
109
100
|
value: "logs",
|
|
110
101
|
label: "Logs",
|
|
111
102
|
icon: /* @__PURE__ */ jsx(ScrollText, { className: "h-3.5 w-3.5" })
|
|
112
103
|
}
|
|
113
|
-
], t[
|
|
114
|
-
let
|
|
115
|
-
t[
|
|
104
|
+
], t[13] = V) : V = t[13];
|
|
105
|
+
let H = V, U;
|
|
106
|
+
t[14] === v ? U = t[15] : (U = /* @__PURE__ */ jsx("div", {
|
|
116
107
|
className: "bg-background flex items-center rounded-md border p-0.5",
|
|
117
|
-
children:
|
|
118
|
-
onClick: () =>
|
|
119
|
-
className: `flex items-center gap-1.5 rounded-sm px-2.5 py-1 text-xs font-medium transition-colors ${
|
|
108
|
+
children: H.map((e) => /* @__PURE__ */ jsxs("button", {
|
|
109
|
+
onClick: () => ce(e.value),
|
|
110
|
+
className: `flex items-center gap-1.5 rounded-sm px-2.5 py-1 text-xs font-medium transition-colors ${v === e.value ? "bg-foreground text-background shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
|
|
120
111
|
children: [e.icon, e.label]
|
|
121
112
|
}, e.value))
|
|
122
|
-
}), t[
|
|
123
|
-
let
|
|
124
|
-
t[
|
|
113
|
+
}), t[14] = v, t[15] = U);
|
|
114
|
+
let W;
|
|
115
|
+
t[16] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ jsxs(Button, {
|
|
125
116
|
variant: "outline",
|
|
126
117
|
size: "sm",
|
|
127
118
|
className: "h-7 gap-1.5",
|
|
128
|
-
onClick: () =>
|
|
119
|
+
onClick: () => b(!0),
|
|
129
120
|
children: [/* @__PURE__ */ jsx(Play, { className: "h-3 w-3" }), "New Run"]
|
|
130
|
-
}), t[
|
|
131
|
-
let U;
|
|
132
|
-
t[19] === V ? U = t[20] : (U = /* @__PURE__ */ jsxs("div", {
|
|
133
|
-
className: "bg-muted/50 flex h-11 shrink-0 items-center justify-between border-b px-3",
|
|
134
|
-
children: [V, H]
|
|
135
|
-
}), t[19] = V, t[20] = U);
|
|
136
|
-
let W;
|
|
137
|
-
t[21] === b.error ? W = t[22] : (W = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: b.error }), t[21] = b.error, t[22] = W);
|
|
121
|
+
}), t[16] = W) : W = t[16];
|
|
138
122
|
let G;
|
|
139
|
-
t[
|
|
123
|
+
t[17] === U ? G = t[18] : (G = /* @__PURE__ */ jsxs("div", {
|
|
124
|
+
className: "bg-muted/50 flex h-11 shrink-0 items-center justify-between border-b px-3",
|
|
125
|
+
children: [U, W]
|
|
126
|
+
}), t[17] = U, t[18] = G);
|
|
140
127
|
let K;
|
|
141
|
-
t[
|
|
128
|
+
t[19] === S.error ? K = t[20] : (K = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), t[19] = S.error, t[20] = K);
|
|
129
|
+
let q;
|
|
130
|
+
t[21] !== v || t[22] !== S.data || t[23] !== S.isLoading ? (q = v === "output" && /* @__PURE__ */ jsx("div", {
|
|
142
131
|
className: "px-4 py-3",
|
|
143
132
|
children: /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
144
|
-
loading:
|
|
145
|
-
children:
|
|
146
|
-
workflow:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
workflowId: e.id,
|
|
152
|
-
scrollTo: P,
|
|
153
|
-
settings: I
|
|
154
|
-
})
|
|
155
|
-
}, e.id)) : null
|
|
133
|
+
loading: S.isLoading,
|
|
134
|
+
children: S.data ? /* @__PURE__ */ jsx(WorkflowItem_default, {
|
|
135
|
+
workflow: S.data,
|
|
136
|
+
workflowId: S.data.id,
|
|
137
|
+
scrollTo: F,
|
|
138
|
+
settings: L
|
|
139
|
+
}) : null
|
|
156
140
|
})
|
|
157
|
-
}), t[
|
|
158
|
-
let
|
|
159
|
-
t[
|
|
141
|
+
}), t[21] = v, t[22] = S.data, t[23] = S.isLoading, t[24] = q) : q = t[24];
|
|
142
|
+
let J;
|
|
143
|
+
t[25] !== v || t[26] !== S.data || t[27] !== S.isLoading || t[28] !== E || t[29] !== s ? (J = v === "graph" && /* @__PURE__ */ jsx("div", {
|
|
160
144
|
className: "h-full",
|
|
161
145
|
children: /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
162
|
-
loading:
|
|
163
|
-
children:
|
|
164
|
-
|
|
165
|
-
workflows:
|
|
166
|
-
|
|
146
|
+
loading: S.isLoading,
|
|
147
|
+
children: S.data ? /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(WorkflowFlowViewer_default, {
|
|
148
|
+
workflowId: s,
|
|
149
|
+
workflows: [S.data],
|
|
150
|
+
workflowConfig: E.data,
|
|
167
151
|
direction: "TB"
|
|
168
152
|
}) }) : /* @__PURE__ */ jsx("div", {
|
|
169
153
|
className: "text-muted-foreground flex h-full items-center justify-center",
|
|
@@ -173,53 +157,43 @@ function PreviewWorkbenchContent(e) {
|
|
|
173
157
|
})
|
|
174
158
|
})
|
|
175
159
|
})
|
|
176
|
-
}), t[
|
|
177
|
-
let J;
|
|
178
|
-
t[38] !== u || t[39] !== b.data ? (J = u === "run-log" && /* @__PURE__ */ jsx("div", {
|
|
179
|
-
className: "px-4",
|
|
180
|
-
children: /* @__PURE__ */ jsx(PipelineHistoryList_default, { pipeline: b.data })
|
|
181
|
-
}), t[38] = u, t[39] = b.data, t[40] = J) : J = t[40];
|
|
160
|
+
}), t[25] = v, t[26] = S.data, t[27] = S.isLoading, t[28] = E, t[29] = s, t[30] = J) : J = t[30];
|
|
182
161
|
let Y;
|
|
183
|
-
t[
|
|
184
|
-
className: "px-4
|
|
185
|
-
children: /* @__PURE__ */ jsx(
|
|
186
|
-
}), t[
|
|
162
|
+
t[31] !== v || t[32] !== S.data ? (Y = v === "run-log" && /* @__PURE__ */ jsx("div", {
|
|
163
|
+
className: "px-4",
|
|
164
|
+
children: /* @__PURE__ */ jsx(WorkflowHistoryList_default, { workflow: S.data })
|
|
165
|
+
}), t[31] = v, t[32] = S.data, t[33] = Y) : Y = t[33];
|
|
187
166
|
let X;
|
|
188
|
-
t[
|
|
167
|
+
t[34] === v ? X = t[35] : (X = v === "logs" && /* @__PURE__ */ jsx(EmbedLogsContent, {}), t[34] = v, t[35] = X);
|
|
189
168
|
let Z;
|
|
190
|
-
t[
|
|
169
|
+
t[36] !== K || t[37] !== q || t[38] !== J || t[39] !== Y || t[40] !== X ? (Z = /* @__PURE__ */ jsxs("div", {
|
|
191
170
|
className: "flex-1 overflow-auto",
|
|
192
171
|
children: [
|
|
193
|
-
W,
|
|
194
|
-
G,
|
|
195
172
|
K,
|
|
196
173
|
q,
|
|
197
174
|
J,
|
|
198
175
|
Y,
|
|
199
176
|
X
|
|
200
177
|
]
|
|
201
|
-
}), t[
|
|
178
|
+
}), t[36] = K, t[37] = q, t[38] = J, t[39] = Y, t[40] = X, t[41] = Z) : Z = t[41];
|
|
202
179
|
let Q;
|
|
203
|
-
t[
|
|
204
|
-
open:
|
|
205
|
-
onOpenChange:
|
|
206
|
-
onSuccess:
|
|
207
|
-
}), t[
|
|
180
|
+
t[42] !== P || t[43] !== y ? (Q = /* @__PURE__ */ jsx(NewRunDialog, {
|
|
181
|
+
open: y,
|
|
182
|
+
onOpenChange: b,
|
|
183
|
+
onSuccess: P
|
|
184
|
+
}), t[42] = P, t[43] = y, t[44] = Q) : Q = t[44];
|
|
208
185
|
let $;
|
|
209
|
-
return t[
|
|
210
|
-
ref:
|
|
186
|
+
return t[45] !== G || t[46] !== Z || t[47] !== Q ? ($ = /* @__PURE__ */ jsxs("div", {
|
|
187
|
+
ref: g,
|
|
211
188
|
className: "flex h-screen flex-col overflow-hidden",
|
|
212
189
|
children: [
|
|
213
|
-
|
|
190
|
+
G,
|
|
214
191
|
Z,
|
|
215
192
|
Q
|
|
216
193
|
]
|
|
217
|
-
}), t[
|
|
218
|
-
}
|
|
219
|
-
function _temp2() {}
|
|
220
|
-
function _temp(e) {
|
|
221
|
-
return e.status === import_enums.WorkflowState.Completed;
|
|
194
|
+
}), t[45] = G, t[46] = Z, t[47] = Q, t[48] = $) : $ = t[48], $;
|
|
222
195
|
}
|
|
196
|
+
function _temp() {}
|
|
223
197
|
var STATUS_DOT_COLORS = {
|
|
224
198
|
completed: "bg-green-500",
|
|
225
199
|
running: "bg-blue-500",
|
|
@@ -229,30 +203,30 @@ var STATUS_DOT_COLORS = {
|
|
|
229
203
|
pending: "bg-muted-foreground"
|
|
230
204
|
};
|
|
231
205
|
function PreviewEmptyState(n) {
|
|
232
|
-
let r = c(24), { newRunDialogOpen:
|
|
233
|
-
r[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
234
|
-
let
|
|
235
|
-
r[1] ===
|
|
236
|
-
let
|
|
237
|
-
r[3] === o ?
|
|
238
|
-
let
|
|
239
|
-
r[5] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
240
|
-
let
|
|
241
|
-
r[6] ===
|
|
206
|
+
let r = c(24), { newRunDialogOpen: a, onNewRunDialogOpenChange: o, onNewRunSuccess: s } = n, l = useNavigate(), { router: u } = useStudio(), [d, f] = useState(3), m;
|
|
207
|
+
r[0] === Symbol.for("react.memo_cache_sentinel") ? (m = { parentId: null }, r[0] = m) : m = r[0];
|
|
208
|
+
let h = useFilterWorkflows(void 0, m, "createdAt", "DESC", 0, d), g;
|
|
209
|
+
r[1] === h.data?.data ? g = r[2] : (g = h.data?.data ?? [], r[1] = h.data?.data, r[2] = g);
|
|
210
|
+
let _ = g, v = h.data?.total ?? 0, y = _.length < v, x;
|
|
211
|
+
r[3] === o ? x = r[4] : (x = () => o(!0), r[3] = o, r[4] = x);
|
|
212
|
+
let C;
|
|
213
|
+
r[5] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(Play, { className: "h-3.5 w-3.5" }), r[5] = C) : C = r[5];
|
|
214
|
+
let w;
|
|
215
|
+
r[6] === x ? w = r[7] : (w = /* @__PURE__ */ jsx("div", {
|
|
242
216
|
className: "flex justify-center",
|
|
243
217
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
244
218
|
variant: "secondary",
|
|
245
219
|
size: "sm",
|
|
246
220
|
className: "gap-1.5",
|
|
247
|
-
onClick:
|
|
248
|
-
children: [
|
|
221
|
+
onClick: x,
|
|
222
|
+
children: [C, "New Run"]
|
|
249
223
|
})
|
|
250
|
-
}), r[6] =
|
|
251
|
-
let
|
|
252
|
-
r[8] !==
|
|
224
|
+
}), r[6] = x, r[7] = w);
|
|
225
|
+
let T;
|
|
226
|
+
r[8] !== h.isLoading || r[9] !== y || r[10] !== l || r[11] !== u || r[12] !== _ ? (T = h.isLoading && _.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
253
227
|
className: "flex justify-center py-4",
|
|
254
228
|
children: /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-4 w-4 animate-spin" })
|
|
255
|
-
}) :
|
|
229
|
+
}) : _.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
256
230
|
/* @__PURE__ */ jsx("p", {
|
|
257
231
|
className: "text-muted-foreground mb-2 text-xs font-medium",
|
|
258
232
|
children: "Recent"
|
|
@@ -261,51 +235,51 @@ function PreviewEmptyState(n) {
|
|
|
261
235
|
className: "max-h-[280px] overflow-auto",
|
|
262
236
|
children: /* @__PURE__ */ jsx("div", {
|
|
263
237
|
className: "divide-border divide-y",
|
|
264
|
-
children:
|
|
265
|
-
|
|
266
|
-
onClick: () => void l(u.
|
|
238
|
+
children: _.map((e) => /* @__PURE__ */ jsx(RecentRunItem, {
|
|
239
|
+
workflow: e,
|
|
240
|
+
onClick: () => void l(u.getPreviewWorkflow(e.id))
|
|
267
241
|
}, e.id))
|
|
268
242
|
})
|
|
269
243
|
}),
|
|
270
|
-
|
|
244
|
+
y && /* @__PURE__ */ jsxs("button", {
|
|
271
245
|
className: "text-muted-foreground hover:text-foreground mt-2 flex w-full items-center justify-center gap-1 py-1 text-xs transition-colors",
|
|
272
|
-
onClick: () => f(
|
|
246
|
+
onClick: () => f(_temp2),
|
|
273
247
|
children: [/* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3" }), "Load more"]
|
|
274
248
|
})
|
|
275
|
-
] }) : null, r[8] =
|
|
276
|
-
let
|
|
277
|
-
r[14] !==
|
|
249
|
+
] }) : null, r[8] = h.isLoading, r[9] = y, r[10] = l, r[11] = u, r[12] = _, r[13] = T) : T = r[13];
|
|
250
|
+
let E;
|
|
251
|
+
r[14] !== w || r[15] !== T ? (E = /* @__PURE__ */ jsxs("div", {
|
|
278
252
|
className: "w-full max-w-sm space-y-6 px-4",
|
|
279
|
-
children: [
|
|
280
|
-
}), r[14] =
|
|
281
|
-
let
|
|
282
|
-
r[17] !==
|
|
283
|
-
open:
|
|
253
|
+
children: [w, T]
|
|
254
|
+
}), r[14] = w, r[15] = T, r[16] = E) : E = r[16];
|
|
255
|
+
let D;
|
|
256
|
+
r[17] !== a || r[18] !== o || r[19] !== s ? (D = /* @__PURE__ */ jsx(NewRunDialog, {
|
|
257
|
+
open: a,
|
|
284
258
|
onOpenChange: o,
|
|
285
259
|
onSuccess: s
|
|
286
|
-
}), r[17] =
|
|
287
|
-
let
|
|
288
|
-
return r[21] !==
|
|
260
|
+
}), r[17] = a, r[18] = o, r[19] = s, r[20] = D) : D = r[20];
|
|
261
|
+
let O;
|
|
262
|
+
return r[21] !== E || r[22] !== D ? (O = /* @__PURE__ */ jsxs("div", {
|
|
289
263
|
className: "flex h-screen flex-col items-center justify-center",
|
|
290
|
-
children: [
|
|
291
|
-
}), r[21] =
|
|
264
|
+
children: [E, D]
|
|
265
|
+
}), r[21] = E, r[22] = D, r[23] = O) : O = r[23], O;
|
|
292
266
|
}
|
|
293
|
-
function
|
|
267
|
+
function _temp2(e) {
|
|
294
268
|
return e + 5;
|
|
295
269
|
}
|
|
296
270
|
function RecentRunItem(e) {
|
|
297
|
-
let t = c(17), {
|
|
271
|
+
let t = c(17), { workflow: n, onClick: r } = e, i = `h-1.5 w-1.5 shrink-0 rounded-full ${STATUS_DOT_COLORS[n.status] ?? "bg-muted-foreground"}`, a;
|
|
298
272
|
t[0] === i ? a = t[1] : (a = /* @__PURE__ */ jsx("span", { className: i }), t[0] = i, t[1] = a);
|
|
299
273
|
let o;
|
|
300
|
-
t[2] !== n.
|
|
274
|
+
t[2] !== n.alias || t[3] !== n.run ? (o = /* @__PURE__ */ jsxs("span", {
|
|
301
275
|
className: "truncate text-sm font-medium",
|
|
302
276
|
children: [
|
|
303
277
|
"Run #",
|
|
304
278
|
n.run,
|
|
305
279
|
" · ",
|
|
306
|
-
n.
|
|
280
|
+
n.alias
|
|
307
281
|
]
|
|
308
|
-
}), t[2] = n.
|
|
282
|
+
}), t[2] = n.alias, t[3] = n.run, t[4] = o) : o = t[4];
|
|
309
283
|
let s;
|
|
310
284
|
t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ jsxs("div", {
|
|
311
285
|
className: "flex items-center gap-2",
|
|
@@ -314,14 +288,14 @@ function RecentRunItem(e) {
|
|
|
314
288
|
let l = n.status, u;
|
|
315
289
|
t[8] === n.createdAt ? u = t[9] : (u = formatDistanceToNow(new Date(n.createdAt), { addSuffix: !0 }), t[8] = n.createdAt, t[9] = u);
|
|
316
290
|
let d;
|
|
317
|
-
t[10] !==
|
|
291
|
+
t[10] !== u || t[11] !== n.status ? (d = /* @__PURE__ */ jsxs("p", {
|
|
318
292
|
className: "text-muted-foreground mt-0.5 pl-3.5 text-xs",
|
|
319
293
|
children: [
|
|
320
294
|
l,
|
|
321
295
|
" · ",
|
|
322
296
|
u
|
|
323
297
|
]
|
|
324
|
-
}), t[10] =
|
|
298
|
+
}), t[10] = u, t[11] = n.status, t[12] = d) : d = t[12];
|
|
325
299
|
let f;
|
|
326
300
|
return t[13] !== r || t[14] !== s || t[15] !== d ? (f = /* @__PURE__ */ jsxs("button", {
|
|
327
301
|
className: "hover:bg-accent w-full rounded-md px-2 py-2.5 text-left transition-colors",
|
|
@@ -329,77 +303,6 @@ function RecentRunItem(e) {
|
|
|
329
303
|
children: [s, d]
|
|
330
304
|
}), t[13] = r, t[14] = s, t[15] = d, t[16] = f) : f = t[16], f;
|
|
331
305
|
}
|
|
332
|
-
function EmbedWorkflowSection(e) {
|
|
333
|
-
let t = c(29), { workflow: n, pipeline: r, collapsible: i, children: a } = e;
|
|
334
|
-
if (!i) {
|
|
335
|
-
let e;
|
|
336
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(Play, { className: "text-primary h-3.5 w-3.5 fill-current" }), t[0] = e) : e = t[0];
|
|
337
|
-
let i = n.title ?? n.blockName, o;
|
|
338
|
-
t[1] === i ? o = t[2] : (o = /* @__PURE__ */ jsx("span", {
|
|
339
|
-
className: "flex-1 truncate text-sm",
|
|
340
|
-
children: i
|
|
341
|
-
}), t[1] = i, t[2] = o);
|
|
342
|
-
let s;
|
|
343
|
-
t[3] !== r || t[4] !== n.id ? (s = /* @__PURE__ */ jsx(WorkflowButtons_default, {
|
|
344
|
-
pipeline: r,
|
|
345
|
-
workflowId: n.id
|
|
346
|
-
}), t[3] = r, t[4] = n.id, t[5] = s) : s = t[5];
|
|
347
|
-
let l;
|
|
348
|
-
t[6] !== o || t[7] !== s ? (l = /* @__PURE__ */ jsxs("div", {
|
|
349
|
-
className: "flex items-center gap-2 p-2 text-sm font-medium",
|
|
350
|
-
children: [
|
|
351
|
-
e,
|
|
352
|
-
o,
|
|
353
|
-
s
|
|
354
|
-
]
|
|
355
|
-
}), t[6] = o, t[7] = s, t[8] = l) : l = t[8];
|
|
356
|
-
let u;
|
|
357
|
-
t[9] === a ? u = t[10] : (u = /* @__PURE__ */ jsx("div", {
|
|
358
|
-
className: "py-1",
|
|
359
|
-
children: a
|
|
360
|
-
}), t[9] = a, t[10] = u);
|
|
361
|
-
let d;
|
|
362
|
-
return t[11] !== l || t[12] !== u ? (d = /* @__PURE__ */ jsxs("div", { children: [l, u] }), t[11] = l, t[12] = u, t[13] = d) : d = t[13], d;
|
|
363
|
-
}
|
|
364
|
-
let u;
|
|
365
|
-
t[14] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ jsx(Play, { className: "text-primary h-3.5 w-3.5 fill-current" }), t[14] = u) : u = t[14];
|
|
366
|
-
let d = n.title ?? n.blockName, f;
|
|
367
|
-
t[15] === d ? f = t[16] : (f = /* @__PURE__ */ jsx("span", {
|
|
368
|
-
className: "flex-1 truncate text-sm",
|
|
369
|
-
children: d
|
|
370
|
-
}), t[15] = d, t[16] = f);
|
|
371
|
-
let p;
|
|
372
|
-
t[17] !== r || t[18] !== n.id ? (p = /* @__PURE__ */ jsx(WorkflowButtons_default, {
|
|
373
|
-
pipeline: r,
|
|
374
|
-
workflowId: n.id
|
|
375
|
-
}), t[17] = r, t[18] = n.id, t[19] = p) : p = t[19];
|
|
376
|
-
let m;
|
|
377
|
-
t[20] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ jsx(ChevronRight, { className: "text-muted-foreground h-3.5 w-3.5 transition-transform group-data-[state=open]/collapsible:rotate-90" }), t[20] = m) : m = t[20];
|
|
378
|
-
let h;
|
|
379
|
-
t[21] !== f || t[22] !== p ? (h = /* @__PURE__ */ jsx(CollapsibleTrigger, {
|
|
380
|
-
asChild: !0,
|
|
381
|
-
children: /* @__PURE__ */ jsxs("button", {
|
|
382
|
-
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",
|
|
383
|
-
children: [
|
|
384
|
-
u,
|
|
385
|
-
f,
|
|
386
|
-
p,
|
|
387
|
-
m
|
|
388
|
-
]
|
|
389
|
-
})
|
|
390
|
-
}), t[21] = f, t[22] = p, t[23] = h) : h = t[23];
|
|
391
|
-
let g;
|
|
392
|
-
t[24] === a ? g = t[25] : (g = /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", {
|
|
393
|
-
className: "py-1",
|
|
394
|
-
children: a
|
|
395
|
-
}) }), t[24] = a, t[25] = g);
|
|
396
|
-
let v;
|
|
397
|
-
return t[26] !== h || t[27] !== g ? (v = /* @__PURE__ */ jsxs(Collapsible, {
|
|
398
|
-
defaultOpen: !0,
|
|
399
|
-
className: "group/collapsible",
|
|
400
|
-
children: [h, g]
|
|
401
|
-
}), t[26] = h, t[27] = g, t[28] = v) : v = t[28], v;
|
|
402
|
-
}
|
|
403
306
|
function stripAnsi(e) {
|
|
404
307
|
return e.replace(/\x1b\[[0-9;]*m/g, "");
|
|
405
308
|
}
|
|
@@ -485,32 +388,4 @@ function EmbedLogsContent() {
|
|
|
485
388
|
})]
|
|
486
389
|
});
|
|
487
390
|
}
|
|
488
|
-
function EmbedNavigationContent(e) {
|
|
489
|
-
let t = c(4), { pipelineId: n } = e, r = useNamespaceTree(n);
|
|
490
|
-
if (!r || r.length === 0) {
|
|
491
|
-
let e;
|
|
492
|
-
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsxs("div", {
|
|
493
|
-
className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-8",
|
|
494
|
-
children: [/* @__PURE__ */ jsx(Navigation, { className: "h-6 w-6" }), /* @__PURE__ */ jsx("span", {
|
|
495
|
-
className: "text-sm",
|
|
496
|
-
children: "No navigation items"
|
|
497
|
-
})]
|
|
498
|
-
}), t[0] = e) : e = t[0], e;
|
|
499
|
-
}
|
|
500
|
-
let i;
|
|
501
|
-
t[1] === Symbol.for("react.memo_cache_sentinel") ? (i = { "--sidebar-width": "100%" }, t[1] = i) : i = t[1];
|
|
502
|
-
let a;
|
|
503
|
-
return t[2] === r ? a = t[3] : (a = /* @__PURE__ */ jsx(SidebarProvider, {
|
|
504
|
-
defaultOpen: !0,
|
|
505
|
-
className: "min-h-0",
|
|
506
|
-
style: i,
|
|
507
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
508
|
-
className: "w-full overflow-auto",
|
|
509
|
-
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(WorkbenchNavigation_default, {
|
|
510
|
-
namespaceTree: r,
|
|
511
|
-
indent: 0
|
|
512
|
-
}) })
|
|
513
|
-
})
|
|
514
|
-
}), t[2] = r, t[3] = a), a;
|
|
515
|
-
}
|
|
516
391
|
export { PreviewWorkbenchPage as default };
|
|
@@ -43,7 +43,7 @@ function RunsListPage() {
|
|
|
43
43
|
}), w = /* @__PURE__ */ jsx(Runs_default, {}), f[9] = C, f[10] = w) : (C = f[9], w = f[10]);
|
|
44
44
|
let T;
|
|
45
45
|
f[11] === p ? T = f[12] : (T = (r) => {
|
|
46
|
-
h(!1), p.
|
|
46
|
+
h(!1), p.navigateToWorkflow(r);
|
|
47
47
|
}, f[11] = p, f[12] = T);
|
|
48
48
|
let E;
|
|
49
49
|
f[13] !== m || f[14] !== T ? (E = /* @__PURE__ */ jsx(NewRunDialog, {
|