@loopstack/loopstack-studio 0.23.1 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/config.js +3 -3
- package/dist/api/index.js +10 -12
- package/dist/api/processor.js +1 -1
- package/dist/api/secrets.js +16 -0
- package/dist/api/workflows.js +7 -1
- package/dist/components/dynamic-form/ArrayController.js +68 -64
- package/dist/components/dynamic-form/CodeContent.js +3 -3
- package/dist/components/dynamic-form/Form.js +46 -40
- package/dist/components/dynamic-form/FormElement.js +1 -1
- package/dist/components/dynamic-form/FormElementHeader.js +2 -2
- package/dist/components/dynamic-form/ObjectController.js +24 -21
- package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +1 -1
- package/dist/components/dynamic-form/fields/CodeViewField.js +36 -36
- package/dist/components/dynamic-form/fields/InputField.js +20 -19
- package/dist/components/dynamic-form/fields/RadioField.js +18 -18
- package/dist/components/dynamic-form/fields/SelectField.js +19 -19
- package/dist/components/dynamic-form/fields/TextareaField.js +17 -17
- package/dist/components/feedback/LoadingCentered.js +1 -1
- package/dist/components/layout/MainLayout.js +18 -31
- package/dist/components/layout/StudioSidebar.js +169 -109
- package/dist/components/loopstack-elements/link.js +77 -76
- package/dist/components/loopstack-elements/tool.js +171 -0
- package/dist/components/page/PageBreadcrumbs.js +79 -32
- package/dist/components/ui-widgets/UiActions.js +10 -4
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +8 -6
- package/dist/components/ui-widgets/widgets/SubmitButton.js +8 -6
- package/dist/features/code-explorer/components/FileContentViewer.js +92 -100
- package/dist/features/dashboard/RunItem.js +1 -1
- package/dist/features/debug/components/ConfigFlowViewer.js +2 -2
- package/dist/features/debug/components/{PipelineDebugHeader.js → WorkflowDebugHeader.js} +5 -5
- package/dist/features/debug/components/{PipelineDebugLegend.js → WorkflowDebugLegend.js} +2 -2
- package/dist/features/debug/components/{PipelineFlowViewer.js → WorkflowFlowViewer.js} +9 -9
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +46 -0
- package/dist/features/debug/index.js +2 -2
- package/dist/features/debug/lib/flow-utils.js +142 -150
- package/dist/features/documents/DocumentRenderer.js +66 -30
- package/dist/features/documents/components/DocumentItem.js +2 -2
- package/dist/features/documents/components/DocumentList.js +18 -11
- package/dist/features/documents/document-details/DocumentDetails.js +4 -4
- package/dist/features/documents/renderers/AiMessage.js +12 -12
- package/dist/features/documents/renderers/ChoicesRenderer.js +92 -0
- package/dist/features/documents/renderers/ClaudeMessage.js +1 -1
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +56 -0
- package/dist/features/documents/renderers/DocumentFormRenderer.js +95 -65
- package/dist/features/documents/renderers/LinkMessageRenderer.js +8 -10
- package/dist/features/documents/renderers/SecretInputRenderer.js +87 -0
- package/dist/features/documents/renderers/TextPromptRenderer.js +57 -0
- package/dist/features/documents/renderers/useDocumentTransition.js +30 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +20 -20
- package/dist/features/runs/Runs.js +8 -8
- package/dist/features/workbench/Workbench.js +35 -35
- package/dist/features/workbench/WorkflowItem.js +10 -9
- package/dist/features/workbench/WorkflowList.js +56 -73
- package/dist/features/workbench/components/NewRunDialog.js +18 -18
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +33 -26
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +13 -44
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +27 -29
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +17 -17
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +2 -2
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +182 -0
- package/dist/features/workbench/components/WorkbenchSettingsModal.js +16 -41
- package/dist/features/workbench/components/WorkflowForms.js +14 -13
- package/dist/features/workbench/components/WorkflowHistoryItem.js +60 -81
- package/dist/features/workbench/components/{PipelineHistoryList.js → WorkflowHistoryList.js} +5 -5
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +56 -54
- package/dist/features/workbench/hooks/useWorkflowData.js +10 -10
- package/dist/features/workbench/hooks/useWorkflowListState.js +8 -45
- package/dist/features/workbench/index.js +2 -3
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +132 -117
- package/dist/features/workbench/providers/ScrollProvider.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +4 -4
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/features/workspaces/components/CreateWorkspace.js +12 -12
- package/dist/features/workspaces/components/ExecutionTimeline.js +22 -21
- package/dist/features/workspaces/components/{NewPipelineRunDialog.js → NewWorkflowRunDialog.js} +6 -6
- package/dist/features/workspaces/components/{PipelineForm.js → WorkflowRunForm.js} +31 -31
- package/dist/features/workspaces/components/WorkspaceHomePage.js +11 -11
- package/dist/features/workspaces/components/{pipeline-form → workflow-form}/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/{pipeline-form → workflow-form}/SelectionView.js +16 -16
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/query-keys.js +34 -68
- package/dist/hooks/useConfig.js +5 -5
- package/dist/hooks/useProcessor.js +5 -5
- package/dist/hooks/useSecrets.js +69 -0
- package/dist/hooks/useWorkflows.js +155 -68
- package/dist/index.d.ts +158 -116
- package/dist/index.js +5 -5
- package/dist/packages/contracts/dist/enums/index.js +11 -12
- package/dist/packages/contracts/dist/enums/workflow-state.enum.js +1 -1
- package/dist/pages/DashboardPage.js +87 -35
- package/dist/pages/DebugWorkflowDetailsPage.js +8 -8
- package/dist/pages/DebugWorkflowsPage.js +10 -10
- package/dist/pages/EmbedWorkbenchPage.js +39 -45
- package/dist/pages/PreviewWorkbenchPage.js +130 -255
- package/dist/pages/RunsListPage.js +1 -1
- package/dist/pages/StudioLandingPage.js +13 -13
- package/dist/pages/WorkbenchPage.js +6 -6
- package/dist/pages/WorkflowDebugPage.js +114 -0
- package/dist/pages/WorkspacePage.js +4 -2
- package/dist/providers/InvalidationEventsProvider.js +19 -19
- package/dist/providers/SseProvider.js +0 -1
- package/dist/routing/LocalRouter.js +14 -17
- package/dist/types/ai.types.js +13 -0
- package/package.json +2 -3
- package/dist/api/namespaces.js +0 -7
- package/dist/api/pipelines.js +0 -13
- package/dist/components/ai-elements/tool.js +0 -158
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +0 -41
- package/dist/features/workbench/NavigationItems.js +0 -52
- package/dist/features/workbench/WorkbenchNavigation.js +0 -38
- package/dist/features/workbench/components/NavigationItem.js +0 -68
- package/dist/features/workbench/hooks/useIntersectionObserver.js +0 -44
- package/dist/hooks/useNamespaceTree.js +0 -27
- package/dist/hooks/useNamespaces.js +0 -25
- package/dist/hooks/usePipelines.js +0 -161
- package/dist/node_modules/@ai-sdk/provider/dist/index.js +0 -65
- package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -1008
- package/dist/node_modules/ai/dist/index.js +0 -1083
- package/dist/node_modules/zod/v3/ZodError.js +0 -79
- package/dist/node_modules/zod/v3/errors.js +0 -6
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -5
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -90
- package/dist/node_modules/zod/v3/helpers/util.js +0 -72
- package/dist/node_modules/zod/v3/locales/en.js +0 -58
- package/dist/node_modules/zod/v3/types.js +0 -2425
- package/dist/node_modules/zod/v4/classic/errors.js +0 -21
- package/dist/node_modules/zod/v4/classic/iso.js +0 -29
- package/dist/node_modules/zod/v4/classic/parse.js +0 -4
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -392
- package/dist/node_modules/zod/v4/core/api.js +0 -532
- package/dist/node_modules/zod/v4/core/checks.js +0 -283
- package/dist/node_modules/zod/v4/core/core.js +0 -44
- package/dist/node_modules/zod/v4/core/doc.js +0 -21
- package/dist/node_modules/zod/v4/core/errors.js +0 -40
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -305
- package/dist/node_modules/zod/v4/core/parse.js +0 -66
- package/dist/node_modules/zod/v4/core/regexes.js +0 -28
- package/dist/node_modules/zod/v4/core/registries.js +0 -38
- package/dist/node_modules/zod/v4/core/schemas.js +0 -863
- package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -220
- package/dist/node_modules/zod/v4/core/util.js +0 -267
- package/dist/node_modules/zod/v4/core/versions.js +0 -6
- package/dist/packages/contracts/dist/enums/pipeline-state.js +0 -10
- package/dist/pages/PipelineDebugPage.js +0 -115
- /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/StateNode.js +0 -0
- /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/WorkflowTransitionEdge.js +0 -0
- /package/dist/features/workspaces/components/{pipeline-form → workflow-form}/HeaderSection.js +0 -0
|
@@ -1,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";
|
|
@@ -2,135 +2,150 @@ import { c } from "react/compiler-runtime";
|
|
|
2
2
|
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
5
|
+
function getBaseUrl() {
|
|
6
|
+
return "http://localhost:8000";
|
|
7
|
+
}
|
|
8
|
+
async function refreshToken() {
|
|
9
|
+
return (await fetch(`${getBaseUrl()}/api/v1/auth/refresh`, {
|
|
10
|
+
method: "POST",
|
|
11
|
+
credentials: "include"
|
|
12
|
+
})).ok;
|
|
13
|
+
}
|
|
14
|
+
async function fetchWithRefresh(e, l) {
|
|
15
|
+
let u = await fetch(e, l);
|
|
16
|
+
return (u.status === 401 || u.status === 403) && await refreshToken() ? fetch(e, l) : u;
|
|
17
|
+
}
|
|
5
18
|
var RemoteFileExplorerContext = createContext(null);
|
|
6
|
-
function RemoteFileExplorerProvider(
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
let [
|
|
10
|
-
|
|
11
|
-
let [
|
|
12
|
-
|
|
19
|
+
function RemoteFileExplorerProvider(l) {
|
|
20
|
+
let u = c(45), { children: d } = l, f = useQueryClient(), p;
|
|
21
|
+
u[0] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ new Set(), u[0] = p) : p = u[0];
|
|
22
|
+
let [m, h] = useState(p), g;
|
|
23
|
+
u[1] === Symbol.for("react.memo_cache_sentinel") ? (g = [], u[1] = g) : g = u[1];
|
|
24
|
+
let [_, v] = useState(g), [y, b] = useState(null), x;
|
|
25
|
+
u[2] === Symbol.for("react.memo_cache_sentinel") ? (x = {
|
|
13
26
|
queryKey: ["remote-agent-file-tree"],
|
|
14
27
|
queryFn: _temp,
|
|
15
|
-
staleTime: 3e4
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
e
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
staleTime: 3e4,
|
|
29
|
+
retry: !1
|
|
30
|
+
}, u[2] = x) : x = u[2];
|
|
31
|
+
let S = useQuery(x), C = y?.path, w;
|
|
32
|
+
u[3] === C ? w = u[4] : (w = ["remote-agent-file-content", C], u[3] = C, u[4] = w);
|
|
33
|
+
let T;
|
|
34
|
+
u[5] === y ? T = u[6] : (T = async () => {
|
|
35
|
+
let e = getBaseUrl(), l = new URL(`${e}/api/v1/files/read`);
|
|
36
|
+
l.searchParams.set("path", y.path);
|
|
37
|
+
let u = await fetchWithRefresh(l.toString(), { credentials: "include" });
|
|
38
|
+
if (!u.ok) {
|
|
39
|
+
let e = await u.text();
|
|
40
|
+
throw Error(`Failed to read file (${u.status}): ${e}`);
|
|
27
41
|
}
|
|
28
|
-
return (await
|
|
29
|
-
},
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
queryKey:
|
|
33
|
-
queryFn:
|
|
34
|
-
enabled:
|
|
35
|
-
staleTime: 15e3
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
return (await u.json()).content;
|
|
43
|
+
}, u[5] = y, u[6] = T);
|
|
44
|
+
let E = !!y && y.type === "file", D;
|
|
45
|
+
u[7] !== w || u[8] !== T || u[9] !== E ? (D = {
|
|
46
|
+
queryKey: w,
|
|
47
|
+
queryFn: T,
|
|
48
|
+
enabled: E,
|
|
49
|
+
staleTime: 15e3,
|
|
50
|
+
retry: !1
|
|
51
|
+
}, u[7] = w, u[8] = T, u[9] = E, u[10] = D) : D = u[10];
|
|
52
|
+
let O = useQuery(D), k;
|
|
53
|
+
u[11] === Symbol.for("react.memo_cache_sentinel") ? (k = (e) => {
|
|
54
|
+
h((l) => {
|
|
55
|
+
let u = new Set(l);
|
|
56
|
+
return u.has(e) ? u.delete(e) : u.add(e), u;
|
|
42
57
|
});
|
|
43
|
-
},
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
e.type === "file" && (
|
|
47
|
-
},
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
let
|
|
52
|
-
if (
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
} else
|
|
56
|
-
return
|
|
58
|
+
}, u[11] = k) : k = u[11];
|
|
59
|
+
let A = k, j;
|
|
60
|
+
u[12] === Symbol.for("react.memo_cache_sentinel") ? (j = (e) => {
|
|
61
|
+
e.type === "file" && (b(e), v((l) => l.some((l) => l.path === e.path) ? l : [...l, e]));
|
|
62
|
+
}, u[12] = j) : j = u[12];
|
|
63
|
+
let M = j, N;
|
|
64
|
+
u[13] === y?.path ? N = u[14] : (N = (e) => {
|
|
65
|
+
v((l) => {
|
|
66
|
+
let u = l.filter((l) => l.path !== e.path);
|
|
67
|
+
if (y?.path === e.path) if (u.length > 0) {
|
|
68
|
+
let d = l.findIndex((l) => l.path === e.path);
|
|
69
|
+
b(u[Math.max(0, d - 1)]);
|
|
70
|
+
} else b(null);
|
|
71
|
+
return u;
|
|
57
72
|
});
|
|
58
|
-
},
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
let
|
|
63
|
-
if (
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
} else
|
|
67
|
-
return
|
|
73
|
+
}, u[13] = y?.path, u[14] = N);
|
|
74
|
+
let P = N, F;
|
|
75
|
+
u[15] === y ? F = u[16] : (F = () => {
|
|
76
|
+
y && v((e) => {
|
|
77
|
+
let l = e.filter((e) => e.path !== y.path);
|
|
78
|
+
if (l.length > 0) {
|
|
79
|
+
let u = e.findIndex((e) => e.path === y.path);
|
|
80
|
+
b(l[Math.max(0, u - 1)]);
|
|
81
|
+
} else b(null);
|
|
82
|
+
return l;
|
|
68
83
|
});
|
|
69
|
-
},
|
|
70
|
-
let
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
let
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
let
|
|
82
|
-
if (
|
|
83
|
-
let
|
|
84
|
-
return
|
|
84
|
+
}, u[15] = y, u[16] = F);
|
|
85
|
+
let I = F, L;
|
|
86
|
+
u[17] === Symbol.for("react.memo_cache_sentinel") ? (L = () => {
|
|
87
|
+
v([]), b(null);
|
|
88
|
+
}, u[17] = L) : L = u[17];
|
|
89
|
+
let R = L, z;
|
|
90
|
+
u[18] === Symbol.for("react.memo_cache_sentinel") ? (z = (e) => {
|
|
91
|
+
v([e]), b(e);
|
|
92
|
+
}, u[18] = z) : z = u[18];
|
|
93
|
+
let B = z, V;
|
|
94
|
+
u[19] === y ? V = u[20] : (V = (e) => {
|
|
95
|
+
v((l) => {
|
|
96
|
+
let u = l.findIndex((l) => l.path === e.path);
|
|
97
|
+
if (u <= 0) return l;
|
|
98
|
+
let d = l.slice(u);
|
|
99
|
+
return y && l.findIndex((e) => e.path === y.path) < u && b(e), d;
|
|
85
100
|
});
|
|
86
|
-
},
|
|
87
|
-
let
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
let
|
|
91
|
-
if (
|
|
92
|
-
let
|
|
93
|
-
return
|
|
101
|
+
}, u[19] = y, u[20] = V);
|
|
102
|
+
let H = V, U;
|
|
103
|
+
u[21] === y ? U = u[22] : (U = (e) => {
|
|
104
|
+
v((l) => {
|
|
105
|
+
let u = l.findIndex((l) => l.path === e.path);
|
|
106
|
+
if (u < 0 || u >= l.length - 1) return l;
|
|
107
|
+
let d = l.slice(0, u + 1);
|
|
108
|
+
return y && l.findIndex((e) => e.path === y.path) > u && b(e), d;
|
|
94
109
|
});
|
|
95
|
-
},
|
|
96
|
-
let
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
let
|
|
103
|
-
|
|
104
|
-
nodes:
|
|
105
|
-
isTreeLoading:
|
|
106
|
-
treeError:
|
|
107
|
-
openFiles:
|
|
108
|
-
selectedFile:
|
|
109
|
-
fileContent:
|
|
110
|
-
isContentLoading:
|
|
111
|
-
expandedFolders:
|
|
112
|
-
toggleFolder:
|
|
113
|
-
selectFile:
|
|
114
|
-
closeFile:
|
|
115
|
-
closeAll:
|
|
116
|
-
closeOthers:
|
|
117
|
-
closeToLeft:
|
|
118
|
-
closeToRight:
|
|
119
|
-
clearSelection:
|
|
120
|
-
refreshTree:
|
|
121
|
-
isFetchingTree:
|
|
122
|
-
},
|
|
123
|
-
let
|
|
124
|
-
return
|
|
125
|
-
value:
|
|
126
|
-
children:
|
|
127
|
-
}),
|
|
110
|
+
}, u[21] = y, u[22] = U);
|
|
111
|
+
let W = U, G;
|
|
112
|
+
u[23] === f ? G = u[24] : (G = () => {
|
|
113
|
+
f.invalidateQueries({ queryKey: ["remote-agent-file-tree"] });
|
|
114
|
+
}, u[23] = f, u[24] = G);
|
|
115
|
+
let K = G, q;
|
|
116
|
+
u[25] === S.data ? q = u[26] : (q = S.data ?? [], u[25] = S.data, u[26] = q);
|
|
117
|
+
let J = S.isLoading && !S.data, Y = O.data ?? null, X = O.isLoading && !!y, Z;
|
|
118
|
+
u[27] !== I || u[28] !== P || u[29] !== H || u[30] !== W || u[31] !== m || u[32] !== _ || u[33] !== K || u[34] !== y || u[35] !== q || u[36] !== J || u[37] !== Y || u[38] !== X || u[39] !== S.error || u[40] !== S.isFetching ? (Z = {
|
|
119
|
+
nodes: q,
|
|
120
|
+
isTreeLoading: J,
|
|
121
|
+
treeError: S.error,
|
|
122
|
+
openFiles: _,
|
|
123
|
+
selectedFile: y,
|
|
124
|
+
fileContent: Y,
|
|
125
|
+
isContentLoading: X,
|
|
126
|
+
expandedFolders: m,
|
|
127
|
+
toggleFolder: A,
|
|
128
|
+
selectFile: M,
|
|
129
|
+
closeFile: P,
|
|
130
|
+
closeAll: R,
|
|
131
|
+
closeOthers: B,
|
|
132
|
+
closeToLeft: H,
|
|
133
|
+
closeToRight: W,
|
|
134
|
+
clearSelection: I,
|
|
135
|
+
refreshTree: K,
|
|
136
|
+
isFetchingTree: S.isFetching
|
|
137
|
+
}, u[27] = I, u[28] = P, u[29] = H, u[30] = W, u[31] = m, u[32] = _, u[33] = K, u[34] = y, u[35] = q, u[36] = J, u[37] = Y, u[38] = X, u[39] = S.error, u[40] = S.isFetching, u[41] = Z) : Z = u[41];
|
|
138
|
+
let Q = Z, $;
|
|
139
|
+
return u[42] !== d || u[43] !== Q ? ($ = /* @__PURE__ */ jsx(RemoteFileExplorerContext.Provider, {
|
|
140
|
+
value: Q,
|
|
141
|
+
children: d
|
|
142
|
+
}), u[42] = d, u[43] = Q, u[44] = $) : $ = u[44], $;
|
|
128
143
|
}
|
|
129
144
|
async function _temp() {
|
|
130
|
-
let e = await
|
|
145
|
+
let e = await fetchWithRefresh(`${getBaseUrl()}/api/v1/files/tree?path=./src`, { credentials: "include" });
|
|
131
146
|
if (!e.ok) {
|
|
132
|
-
let
|
|
133
|
-
throw Error(`Failed to load file tree (${e.status}): ${
|
|
147
|
+
let l = await e.text();
|
|
148
|
+
throw Error(`Failed to load file tree (${e.status}): ${l}`);
|
|
134
149
|
}
|
|
135
150
|
return await e.json();
|
|
136
151
|
}
|
|
@@ -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,
|
|
@@ -13,18 +13,18 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import { Loader2, Star } from "lucide-react";
|
|
14
14
|
import { DialogTitle } from "@radix-ui/react-dialog";
|
|
15
15
|
var CreateWorkspace_default = (ye) => {
|
|
16
|
-
let a = c(87), { types: o, workspace: s, onSuccess: l } = ye, u = useCreateWorkspace(), d = useUpdateWorkspace(), [f, be] = useState(o[0]?.
|
|
16
|
+
let a = c(87), { types: o, workspace: s, onSuccess: l } = ye, u = useCreateWorkspace(), d = useUpdateWorkspace(), [f, be] = useState(o[0]?.className ?? ""), [p, xe] = useState(s?.isFavourite ?? !1), m;
|
|
17
17
|
a[0] === Symbol.for("react.memo_cache_sentinel") ? (m = {}, a[0] = m) : m = a[0];
|
|
18
18
|
let [h, g] = useState(m), _;
|
|
19
|
-
a[1] === o[0]?.
|
|
20
|
-
be(o[0]?.
|
|
21
|
-
}, a[1] = o[0]?.
|
|
19
|
+
a[1] === o[0]?.className ? _ = a[2] : (_ = () => {
|
|
20
|
+
be(o[0]?.className ?? "");
|
|
21
|
+
}, a[1] = o[0]?.className, a[2] = _);
|
|
22
22
|
let v;
|
|
23
23
|
a[3] === o ? v = a[4] : (v = [o], a[3] = o, a[4] = v), useEffect(_, v);
|
|
24
24
|
let y;
|
|
25
25
|
if (a[5] !== o || a[6] !== f) {
|
|
26
26
|
let e;
|
|
27
|
-
a[8] === f ? e = a[9] : (e = (e) => e.
|
|
27
|
+
a[8] === f ? e = a[9] : (e = (e) => e.className === f, a[8] = f, a[9] = e), y = o.find(e), a[5] = o, a[6] = f, a[7] = y;
|
|
28
28
|
} else y = a[7];
|
|
29
29
|
let Se = y, b;
|
|
30
30
|
a[10] === Se?.environments ? b = a[11] : (b = Se?.environments ?? [], a[10] = Se?.environments, a[11] = b);
|
|
@@ -109,7 +109,7 @@ var CreateWorkspace_default = (ye) => {
|
|
|
109
109
|
let t = new FormData(e.currentTarget).get("name");
|
|
110
110
|
f && u.mutate({ workspaceCreateDto: {
|
|
111
111
|
title: t || void 0,
|
|
112
|
-
|
|
112
|
+
className: f,
|
|
113
113
|
isFavourite: p || void 0,
|
|
114
114
|
environments: P()
|
|
115
115
|
} }, { onSuccess: () => {
|
|
@@ -164,14 +164,14 @@ var CreateWorkspace_default = (ye) => {
|
|
|
164
164
|
a[59] !== o || a[60] !== s || a[61] !== f ? (q = !s && o.length > 1 && /* @__PURE__ */ jsxs("div", {
|
|
165
165
|
className: "space-y-2",
|
|
166
166
|
children: [/* @__PURE__ */ jsx(Label, {
|
|
167
|
-
htmlFor: "
|
|
167
|
+
htmlFor: "className",
|
|
168
168
|
children: "Type"
|
|
169
169
|
}), /* @__PURE__ */ jsxs(Select, {
|
|
170
|
-
name: "
|
|
170
|
+
name: "className",
|
|
171
171
|
value: f,
|
|
172
172
|
onValueChange: Ce,
|
|
173
173
|
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
174
|
-
id: "
|
|
174
|
+
id: "className",
|
|
175
175
|
className: "w-full",
|
|
176
176
|
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a type" })
|
|
177
177
|
}), /* @__PURE__ */ jsx(SelectContent, { children: o.map(_temp3) })]
|
|
@@ -227,8 +227,8 @@ function _temp2(e) {
|
|
|
227
227
|
}
|
|
228
228
|
function _temp3(e) {
|
|
229
229
|
return /* @__PURE__ */ jsx(SelectItem, {
|
|
230
|
-
value: e.
|
|
231
|
-
children: e.title ?? e.
|
|
232
|
-
}, e.
|
|
230
|
+
value: e.className,
|
|
231
|
+
children: e.title ?? e.className
|
|
232
|
+
}, e.className);
|
|
233
233
|
}
|
|
234
234
|
export { CreateWorkspace_default as default };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useStudio } from "../../../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useBatchDeleteWorkflows, useChildWorkflows, useFilterWorkflows } from "../../../hooks/useWorkflows.js";
|
|
3
3
|
import { Badge } from "../../../components/ui/badge.js";
|
|
4
4
|
import CustomListView_default from "../../../components/lists/CustomListView.js";
|
|
5
5
|
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
6
6
|
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
7
|
-
import
|
|
7
|
+
import NewWorkflowRunDialog_default from "./NewWorkflowRunDialog.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import React, { useEffect, useState } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useQueryClient } from "@tanstack/react-query";
|
|
12
12
|
import { ChevronDown, ChevronRight, Loader2 } from "lucide-react";
|
|
13
13
|
import { format, formatDistanceToNow, isToday, isYesterday, parseISO } from "date-fns";
|
|
14
|
-
var import_enums = require_enums(),
|
|
15
|
-
let n = c(15), { parentId: i, formatUpdatedTime: a,
|
|
14
|
+
var import_enums = require_enums(), ChildWorkflowList = (e) => {
|
|
15
|
+
let n = c(15), { parentId: i, formatUpdatedTime: a, getWorkflowStateColor: o, onChildClick: s } = e, { data: l, isPending: u } = useChildWorkflows(i, !0);
|
|
16
16
|
if (u) {
|
|
17
17
|
let e;
|
|
18
18
|
return n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
|
|
@@ -21,7 +21,7 @@ var import_enums = require_enums(), ChildPipelineList = (e) => {
|
|
|
21
21
|
}), n[0] = e) : e = n[0], e;
|
|
22
22
|
}
|
|
23
23
|
let d;
|
|
24
|
-
n[1] === l
|
|
24
|
+
n[1] === l ? d = n[2] : (d = l ?? [], n[1] = l, n[2] = d);
|
|
25
25
|
let f = d;
|
|
26
26
|
if (f.length === 0) {
|
|
27
27
|
let e;
|
|
@@ -50,7 +50,7 @@ var import_enums = require_enums(), ChildPipelineList = (e) => {
|
|
|
50
50
|
}),
|
|
51
51
|
/* @__PURE__ */ jsx("p", {
|
|
52
52
|
className: "text-xs text-gray-500",
|
|
53
|
-
children: e.
|
|
53
|
+
children: e.alias
|
|
54
54
|
}),
|
|
55
55
|
/* @__PURE__ */ jsx("p", {
|
|
56
56
|
className: "text-xs text-gray-400",
|
|
@@ -80,14 +80,14 @@ var import_enums = require_enums(), ChildPipelineList = (e) => {
|
|
|
80
80
|
}, s[1] = E) : E = s[1];
|
|
81
81
|
let D = E, O, k;
|
|
82
82
|
s[2] === g ? (O = s[3], k = s[4]) : (O = () => {
|
|
83
|
-
g.invalidateQueries({ queryKey: ["
|
|
83
|
+
g.invalidateQueries({ queryKey: ["workflows"] });
|
|
84
84
|
}, k = [g], s[2] = g, s[3] = O, s[4] = k), useEffect(O, k);
|
|
85
85
|
let A = _temp, j;
|
|
86
86
|
s[5] === u.id ? j = s[6] : (j = {
|
|
87
87
|
workspaceId: u.id,
|
|
88
88
|
parentId: null
|
|
89
89
|
}, s[5] = u.id, s[6] = j);
|
|
90
|
-
let M =
|
|
90
|
+
let M = useFilterWorkflows(void 0, j, "createdAt", "DESC", _, y), N = useBatchDeleteWorkflows(), P;
|
|
91
91
|
s[7] === N ? P = s[8] : (P = (e) => {
|
|
92
92
|
N.mutate(e);
|
|
93
93
|
}, s[7] = N, s[8] = P);
|
|
@@ -101,7 +101,7 @@ var import_enums = require_enums(), ChildPipelineList = (e) => {
|
|
|
101
101
|
}, s[10] = R) : R = s[10];
|
|
102
102
|
let z = R, B;
|
|
103
103
|
s[11] === h ? B = s[12] : (B = (e) => {
|
|
104
|
-
h.
|
|
104
|
+
h.navigateToWorkflow(e);
|
|
105
105
|
}, s[11] = h, s[12] = B);
|
|
106
106
|
let V = B, H = _temp2, U;
|
|
107
107
|
s[13] === M.data?.data ? U = s[14] : (U = M.data?.data ?? [], s[13] = M.data?.data, s[14] = U);
|
|
@@ -120,7 +120,7 @@ var import_enums = require_enums(), ChildPipelineList = (e) => {
|
|
|
120
120
|
}),
|
|
121
121
|
/* @__PURE__ */ jsx("p", {
|
|
122
122
|
className: "mt-1 text-sm text-gray-500",
|
|
123
|
-
children: e.
|
|
123
|
+
children: e.alias
|
|
124
124
|
}),
|
|
125
125
|
e.hasChildren > 0 && /* @__PURE__ */ jsxs("button", {
|
|
126
126
|
onClick: (n) => D(e.id, n),
|
|
@@ -143,10 +143,10 @@ var import_enums = require_enums(), ChildPipelineList = (e) => {
|
|
|
143
143
|
children: A(e.updatedAt)
|
|
144
144
|
})]
|
|
145
145
|
})]
|
|
146
|
-
}), e.hasChildren > 0 && w.has(e.id) && /* @__PURE__ */ jsx(
|
|
146
|
+
}), e.hasChildren > 0 && w.has(e.id) && /* @__PURE__ */ jsx(ChildWorkflowList, {
|
|
147
147
|
parentId: e.id,
|
|
148
148
|
formatUpdatedTime: A,
|
|
149
|
-
|
|
149
|
+
getWorkflowStateColor: H,
|
|
150
150
|
onChildClick: V
|
|
151
151
|
})] }), s[15] = w, s[16] = V, s[17] = K) : K = s[17];
|
|
152
152
|
let q = K, J;
|
|
@@ -157,7 +157,7 @@ var import_enums = require_enums(), ChildPipelineList = (e) => {
|
|
|
157
157
|
children: /* @__PURE__ */ jsx(Loader2, { className: "h-8 w-8 animate-spin" })
|
|
158
158
|
}) : "", s[20] = M.isPending, s[21] = Y);
|
|
159
159
|
let X = M.error ?? null, Z;
|
|
160
|
-
s[22] !== M.isPending || s[23] !== F || s[24] !== V || s[25] !== _ || s[26] !==
|
|
160
|
+
s[22] !== M.isPending || s[23] !== F || s[24] !== V || s[25] !== _ || s[26] !== q || s[27] !== y || s[28] !== X || s[29] !== G || s[30] !== W ? (Z = /* @__PURE__ */ jsx(CustomListView_default, {
|
|
161
161
|
loading: M.isPending,
|
|
162
162
|
error: X,
|
|
163
163
|
items: W,
|
|
@@ -172,9 +172,9 @@ var import_enums = require_enums(), ChildPipelineList = (e) => {
|
|
|
172
172
|
batchDelete: F,
|
|
173
173
|
itemRenderer: q,
|
|
174
174
|
newButtonLabel: "Run"
|
|
175
|
-
}), s[22] = M.isPending, s[23] = F, s[24] = V, s[25] = _, s[26] =
|
|
175
|
+
}), s[22] = M.isPending, s[23] = F, s[24] = V, s[25] = _, s[26] = q, s[27] = y, s[28] = X, s[29] = G, s[30] = W, s[31] = Z) : Z = s[31];
|
|
176
176
|
let Q;
|
|
177
|
-
s[32] !== x || s[33] !== u ? (Q = /* @__PURE__ */ jsx(
|
|
177
|
+
s[32] !== x || s[33] !== u ? (Q = /* @__PURE__ */ jsx(NewWorkflowRunDialog_default, {
|
|
178
178
|
isOpen: x,
|
|
179
179
|
onOpenChange: S,
|
|
180
180
|
workspace: u,
|
|
@@ -194,12 +194,13 @@ function _temp(e) {
|
|
|
194
194
|
}
|
|
195
195
|
function _temp2(e) {
|
|
196
196
|
switch (e) {
|
|
197
|
-
case import_enums.
|
|
198
|
-
case import_enums.
|
|
199
|
-
case import_enums.
|
|
200
|
-
case import_enums.
|
|
201
|
-
case import_enums.
|
|
202
|
-
case import_enums.
|
|
197
|
+
case import_enums.WorkflowState.Completed: return "bg-green-600";
|
|
198
|
+
case import_enums.WorkflowState.Paused: return "bg-yellow-600";
|
|
199
|
+
case import_enums.WorkflowState.Failed: return "bg-red-600";
|
|
200
|
+
case import_enums.WorkflowState.Canceled:
|
|
201
|
+
case import_enums.WorkflowState.Pending:
|
|
202
|
+
case import_enums.WorkflowState.Running:
|
|
203
|
+
default: return "bg-black";
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
206
|
export { ExecutionTimeline_default as default };
|
package/dist/features/workspaces/components/{NewPipelineRunDialog.js → NewWorkflowRunDialog.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Dialog, DialogContent, DialogTitle } from "../../../components/ui/dialog.js";
|
|
2
|
-
import
|
|
2
|
+
import WorkflowRunForm_default from "./WorkflowRunForm.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
var
|
|
5
|
+
var NewWorkflowRunDialog_default = (s) => {
|
|
6
6
|
let l = c(11), { isOpen: u, onOpenChange: d, workspace: f, onSuccess: p } = s, m;
|
|
7
7
|
l[0] !== d || l[1] !== p ? (m = () => {
|
|
8
8
|
p(), d(!1);
|
|
9
9
|
}, l[0] = d, l[1] = p, l[2] = m) : m = l[2];
|
|
10
10
|
let h = m, g;
|
|
11
|
-
l[3] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(DialogTitle, { children: "Run
|
|
11
|
+
l[3] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(DialogTitle, { children: "Run Workflow" }), l[3] = g) : g = l[3];
|
|
12
12
|
let _;
|
|
13
13
|
l[4] !== h || l[5] !== f ? (_ = /* @__PURE__ */ jsxs(DialogContent, {
|
|
14
14
|
className: "max-h-[80vh] min-h-[300px] !max-w-2xl",
|
|
15
15
|
children: [g, /* @__PURE__ */ jsx("div", {
|
|
16
16
|
className: "mt-4 overflow-y-auto",
|
|
17
|
-
children: /* @__PURE__ */ jsx(
|
|
18
|
-
title: "Run
|
|
17
|
+
children: /* @__PURE__ */ jsx(WorkflowRunForm_default, {
|
|
18
|
+
title: "Run Workflow",
|
|
19
19
|
workspace: f,
|
|
20
20
|
onSuccess: h
|
|
21
21
|
})
|
|
@@ -28,4 +28,4 @@ var NewPipelineRunDialog_default = (s) => {
|
|
|
28
28
|
children: _
|
|
29
29
|
}), l[7] = u, l[8] = d, l[9] = _, l[10] = v) : v = l[10], v;
|
|
30
30
|
};
|
|
31
|
-
export {
|
|
31
|
+
export { NewWorkflowRunDialog_default as default };
|