@loopstack/loopstack-studio 0.25.2 → 0.26.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/environments.js +4 -0
- package/dist/api/index.js +13 -9
- package/dist/app/EnvironmentEmbedRoot.js +29 -19
- package/dist/components/data-table/DataList.js +93 -91
- package/dist/components/data-table/DataTable.js +128 -126
- package/dist/components/feedback/Snackbar.js +1 -1
- package/dist/components/layout/StudioSidebar.js +124 -131
- package/dist/components/ui/sidebar.js +2 -2
- package/dist/components/ui/slider.js +37 -26
- package/dist/components/ui-widgets/widgets/SandboxRun.js +16 -14
- package/dist/features/code-explorer/components/CodeExplorerTree.js +1 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +1 -1
- package/dist/features/dashboard/RunItem.js +39 -37
- package/dist/features/debug/lib/flow-utils.js +1 -1
- package/dist/features/documents/DocumentRenderer.js +59 -58
- package/dist/features/documents/renderers/useDocumentTransition.js +29 -24
- package/dist/features/feature-registry/FeatureRegistryProvider.js +17 -0
- package/dist/features/feature-registry/index.js +1 -0
- package/dist/features/file-explorer/api/files.js +7 -0
- package/dist/features/file-explorer/components/FileExplorerPanel.js +95 -0
- package/dist/features/{workbench/components/RemoteFileTabsBar.js → file-explorer/components/FileTabsBar.js} +4 -4
- package/dist/features/{workbench/components/RemoteFileTree.js → file-explorer/components/FileTree.js} +6 -6
- package/dist/features/file-explorer/file-explorer-feature.js +12 -0
- package/dist/features/file-explorer/hooks/useFileExplorer.js +44 -0
- package/dist/features/file-explorer/index.js +2 -0
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +112 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +162 -132
- package/dist/features/runs/Runs.js +1 -1
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +178 -0
- package/dist/features/secrets/index.js +1 -0
- package/dist/features/{documents → secrets}/renderers/SecretInputRenderer.js +17 -17
- package/dist/features/secrets/secrets-feature.js +14 -0
- package/dist/features/workbench/Workbench.js +32 -82
- package/dist/features/workbench/WorkflowList.js +109 -46
- package/dist/features/workbench/components/SidebarPanel.js +155 -0
- package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +82 -0
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +128 -60
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +127 -114
- package/dist/features/workbench/components/WorkbenchRunsPanel.js +32 -0
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +80 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +3 -3
- package/dist/features/workbench/index.js +3 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +60 -62
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/features/workspaces/components/EnvironmentSlotSelector.js +68 -51
- package/dist/features/workspaces/components/WorkflowRunForm.js +1 -1
- package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
- package/dist/hooks/useEnvironmentPreviewUrl.js +13 -0
- package/dist/hooks/useEnvironments.js +8 -0
- package/dist/hooks/useWorkflows.js +28 -26
- package/dist/hooks/useWorkspaces.js +28 -26
- package/dist/index.d.ts +98 -7
- package/dist/index.js +8 -1
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/@shikijs/core/dist/index.js +105 -643
- package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +135 -122
- package/dist/node_modules/@shikijs/langs/dist/bird2.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/cobol.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/css.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/dart.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/go.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/kusto.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/php.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/ruby.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/typespec.js +1 -1
- package/dist/node_modules/@shikijs/primitive/dist/index.js +538 -0
- package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +1 -1
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
- package/dist/node_modules/shiki/dist/bundle-full.js +6 -5
- package/dist/node_modules/shiki/dist/chunk-CtajNgzt.js +15 -0
- package/dist/node_modules/shiki/dist/engine-oniguruma.js +5 -0
- package/dist/node_modules/shiki/dist/{langs.js → langs-bundle-full-DfKZStlK.js} +1 -1
- package/dist/node_modules/shiki/dist/themes.js +1 -1
- package/dist/pages/DashboardPage.js +54 -79
- package/dist/pages/DebugWorkflowDetailsPage.js +41 -55
- package/dist/pages/DebugWorkflowsPage.js +151 -112
- package/dist/pages/EmbedWorkbenchPage.js +2 -1
- package/dist/pages/PreviewWorkbenchPage.js +77 -59
- package/dist/pages/RunsListPage.js +27 -41
- package/dist/pages/RunsPage.js +21 -36
- package/dist/pages/WorkbenchPage.js +48 -70
- package/dist/pages/WorkflowDebugPage.js +65 -79
- package/dist/pages/WorkspacePage.js +59 -86
- package/dist/pages/WorkspaceRunsPage.js +59 -54
- package/dist/pages/WorkspacesPage.js +11 -27
- package/dist/providers/StudioPreferencesProvider.js +54 -0
- package/package.json +29 -29
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +0 -67
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +0 -57
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +0 -47
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +0 -182
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +0 -160
- /package/dist/{node_modules → frontend/studio/node_modules}/@dagrejs/dagre/dist/dagre.esm.js +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { useFeatureRegistry } from "../../feature-registry/FeatureRegistryProvider.js";
|
|
2
|
+
import "../../feature-registry/index.js";
|
|
3
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
|
+
import { WorkbenchEnvironmentPanel } from "./WorkbenchEnvironmentPanel.js";
|
|
5
|
+
import { WorkbenchIconSidebar } from "./WorkbenchIconSidebar.js";
|
|
6
|
+
import { WorkbenchPreviewPanel } from "./WorkbenchPreviewPanel.js";
|
|
7
|
+
import { WorkbenchRunsPanel } from "./WorkbenchRunsPanel.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var PANEL_WIDTH = {
|
|
11
|
+
small: "w-80",
|
|
12
|
+
medium: "w-1/2",
|
|
13
|
+
large: "w-2/3"
|
|
14
|
+
}, CONTENT_WIDTH = {
|
|
15
|
+
small: "w-full",
|
|
16
|
+
medium: "w-1/2",
|
|
17
|
+
large: "w-1/3"
|
|
18
|
+
};
|
|
19
|
+
function ActivePanelContent() {
|
|
20
|
+
let a = c(13), { activePanel: l, workspaceId: u, environments: d } = useWorkbenchLayout(), f = useFeatureRegistry();
|
|
21
|
+
switch (l) {
|
|
22
|
+
case "runs": {
|
|
23
|
+
let e;
|
|
24
|
+
return a[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(WorkbenchRunsPanel, {}), a[0] = e) : e = a[0], e;
|
|
25
|
+
}
|
|
26
|
+
case "preview": {
|
|
27
|
+
let e;
|
|
28
|
+
return a[1] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(WorkbenchPreviewPanel, {}), a[1] = e) : e = a[1], e;
|
|
29
|
+
}
|
|
30
|
+
case "environment": {
|
|
31
|
+
let e;
|
|
32
|
+
return a[2] !== d || a[3] !== u ? (e = /* @__PURE__ */ jsx(WorkbenchEnvironmentPanel, {
|
|
33
|
+
workspaceId: u,
|
|
34
|
+
environments: d
|
|
35
|
+
}), a[2] = d, a[3] = u, a[4] = e) : e = a[4], e;
|
|
36
|
+
}
|
|
37
|
+
default: {
|
|
38
|
+
let e;
|
|
39
|
+
if (a[5] !== l || a[6] !== f) {
|
|
40
|
+
let r;
|
|
41
|
+
a[8] === l ? r = a[9] : (r = (e) => e.sidebarPanel?.id === l, a[8] = l, a[9] = r), e = f.find(r), a[5] = l, a[6] = f, a[7] = e;
|
|
42
|
+
} else e = a[7];
|
|
43
|
+
let r = e;
|
|
44
|
+
if (r?.sidebarPanel) {
|
|
45
|
+
let e = r.sidebarPanel.component, i;
|
|
46
|
+
return a[10] !== e || a[11] !== u ? (i = /* @__PURE__ */ jsx(e, { workspaceId: u }), a[10] = e, a[11] = u, a[12] = i) : i = a[12], i;
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function SidebarContent(e) {
|
|
53
|
+
let i = c(12), { children: o } = e, { activePanel: s, panelSize: p } = useWorkbenchLayout(), m = `${s ? CONTENT_WIDTH[p] : "w-full"} overflow-hidden`, h;
|
|
54
|
+
i[0] !== o || i[1] !== m ? (h = /* @__PURE__ */ jsx("div", {
|
|
55
|
+
className: m,
|
|
56
|
+
children: o
|
|
57
|
+
}), i[0] = o, i[1] = m, i[2] = h) : h = i[2];
|
|
58
|
+
let g;
|
|
59
|
+
i[3] !== s || i[4] !== p ? (g = s && /* @__PURE__ */ jsx("div", {
|
|
60
|
+
className: `${PANEL_WIDTH[p]} shrink-0 overflow-hidden`,
|
|
61
|
+
children: /* @__PURE__ */ jsx(ActivePanelContent, {})
|
|
62
|
+
}), i[3] = s, i[4] = p, i[5] = g) : g = i[5];
|
|
63
|
+
let _;
|
|
64
|
+
i[6] !== h || i[7] !== g ? (_ = /* @__PURE__ */ jsxs("div", {
|
|
65
|
+
className: "flex flex-1 overflow-hidden",
|
|
66
|
+
children: [h, g]
|
|
67
|
+
}), i[6] = h, i[7] = g, i[8] = _) : _ = i[8];
|
|
68
|
+
let v;
|
|
69
|
+
i[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ jsx(WorkbenchIconSidebar, {}), i[9] = v) : v = i[9];
|
|
70
|
+
let y;
|
|
71
|
+
return i[10] === _ ? y = i[11] : (y = /* @__PURE__ */ jsxs("div", {
|
|
72
|
+
className: "flex h-full w-full",
|
|
73
|
+
children: [_, v]
|
|
74
|
+
}), i[10] = _, i[11] = y), y;
|
|
75
|
+
}
|
|
76
|
+
function WorkbenchSidebarShell(e) {
|
|
77
|
+
let r = c(2), { children: i } = e, a;
|
|
78
|
+
return r[0] === i ? a = r[1] : (a = /* @__PURE__ */ jsx(SidebarContent, { children: i }), r[0] = i, r[1] = a), a;
|
|
79
|
+
}
|
|
80
|
+
export { WorkbenchSidebarShell };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
2
|
-
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
3
2
|
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
3
|
+
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
4
4
|
import { useFilterDocuments } from "../../../hooks/useDocuments.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(21), { workflowId: s, showFullMessageHistory: l } =
|
|
8
|
+
function useWorkflowData(r) {
|
|
9
|
+
let o = c(21), { workflowId: s, showFullMessageHistory: l } = r, 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;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
2
|
+
import { WorkbenchSidebarShell } from "./components/WorkbenchSidebarShell.js";
|
|
1
3
|
import WorkflowItem_default from "./WorkflowItem.js";
|
|
4
|
+
import WorkflowHistoryList_default from "./components/WorkflowHistoryList.js";
|
|
2
5
|
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
3
6
|
import WorkflowList_default from "./WorkflowList.js";
|
|
4
|
-
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
5
|
-
import WorkflowHistoryList_default from "./components/WorkflowHistoryList.js";
|
|
6
7
|
import Workbench from "./Workbench.js";
|
|
7
8
|
import { NewRunDialog } from "./components/NewRunDialog.js";
|
|
@@ -1,79 +1,77 @@
|
|
|
1
|
+
import { useOptionalStudioPreferences } from "../../../providers/StudioPreferencesProvider.js";
|
|
1
2
|
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
var WorkbenchLayoutContext = createContext(null);
|
|
5
|
-
function WorkbenchLayoutProvider(
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
function WorkbenchLayoutProvider(o) {
|
|
7
|
+
let s = c(36), { children: l, workspaceId: u, workflow: d, workspaceConfig: f, getPreviewUrl: p, getEnvironmentPreviewUrl: m, environments: h } = o, g = useOptionalStudioPreferences(), [_, v] = useState(null), y;
|
|
8
|
+
s[0] === Symbol.for("react.memo_cache_sentinel") ? (y = {}, s[0] = y) : y = s[0];
|
|
9
|
+
let [b, x] = useState(y), S = g ? g.preferences.activePanel : _, C = g ? g.preferences.panelSizes : b, [w, T] = useState(null), [E, D] = useState(""), O = f?.features?.previewPanel?.enabled ?? !1, k;
|
|
10
|
+
s[1] === h ? k = s[2] : (k = h === void 0 || h.some(_temp), s[1] = h, s[2] = k);
|
|
11
|
+
let A = O && k, j;
|
|
12
|
+
s[3] === Symbol.for("react.memo_cache_sentinel") ? (j = {
|
|
13
|
+
runs: "medium",
|
|
14
|
+
preview: "medium",
|
|
15
|
+
files: "medium",
|
|
16
|
+
environment: "small"
|
|
17
|
+
}, s[3] = j) : j = s[3];
|
|
18
|
+
let M = j, N = S ? C[S] ?? M[S] ?? "small" : "small", P;
|
|
19
|
+
s[4] === g ? P = s[5] : (P = (t) => {
|
|
20
|
+
g ? g.setPreference("activePanel", t) : v(t);
|
|
21
|
+
}, s[4] = g, s[5] = P);
|
|
22
|
+
let F = P, I;
|
|
23
|
+
s[6] !== S || s[7] !== F ? (I = (t) => {
|
|
24
|
+
F(S === t ? null : t);
|
|
25
|
+
}, s[6] = S, s[7] = F, s[8] = I) : I = s[8];
|
|
14
26
|
let L = I, R;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
27
|
+
s[9] === F ? R = s[10] : (R = () => {
|
|
28
|
+
F(null);
|
|
29
|
+
}, s[9] = F, s[10] = R);
|
|
18
30
|
let z = R, B;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
31
|
+
s[11] !== S || s[12] !== C || s[13] !== g ? (B = (t) => {
|
|
32
|
+
if (!S) return;
|
|
33
|
+
let a = {
|
|
34
|
+
...C,
|
|
35
|
+
[S]: t
|
|
36
|
+
};
|
|
37
|
+
g ? g.setPreference("panelSizes", a) : x(a);
|
|
38
|
+
}, s[11] = S, s[12] = C, s[13] = g, s[14] = B) : B = s[14];
|
|
22
39
|
let V = B, H;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, o[12] = k, o[13] = L, o[14] = H) : H = o[14];
|
|
40
|
+
s[15] === F ? H = s[16] : (H = (t) => {
|
|
41
|
+
D(t), F("preview");
|
|
42
|
+
}, s[15] = F, s[16] = H);
|
|
27
43
|
let U = H, W;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
workflow: l,
|
|
42
|
-
previewPanelEnabled: M,
|
|
43
|
-
fileExplorerEnabled: X,
|
|
44
|
-
isDeveloperMode: _,
|
|
45
|
-
workspaceConfig: d,
|
|
46
|
-
getPreviewUrl: f,
|
|
47
|
-
getEnvironmentPreviewUrl: p,
|
|
48
|
-
environments: m,
|
|
49
|
-
activeFloatingPanel: v,
|
|
50
|
-
toggleFloatingPanel: z,
|
|
51
|
-
closeFloatingPanel: V,
|
|
52
|
-
activeSidePanel: k,
|
|
53
|
-
toggleSidePanel: U,
|
|
54
|
-
closeSidePanel: G,
|
|
44
|
+
s[17] !== S || s[18] !== w || s[19] !== z || s[20] !== h || s[21] !== m || s[22] !== p || s[23] !== U || s[24] !== N || s[25] !== A || s[26] !== E || s[27] !== V || s[28] !== L || s[29] !== d || s[30] !== f || s[31] !== u ? (W = {
|
|
45
|
+
workspaceId: u,
|
|
46
|
+
workflow: d,
|
|
47
|
+
previewPanelEnabled: A,
|
|
48
|
+
workspaceConfig: f,
|
|
49
|
+
getPreviewUrl: p,
|
|
50
|
+
getEnvironmentPreviewUrl: m,
|
|
51
|
+
environments: h,
|
|
52
|
+
activePanel: S,
|
|
53
|
+
panelSize: N,
|
|
54
|
+
togglePanel: L,
|
|
55
|
+
closePanel: z,
|
|
56
|
+
setPanelSize: V,
|
|
55
57
|
selectedSlotId: E,
|
|
56
58
|
setSelectedSlotId: D,
|
|
57
|
-
openPreviewWithEnvironment:
|
|
58
|
-
previewPanelOpen: F,
|
|
59
|
-
togglePreviewPanel: Y,
|
|
60
|
-
activePreviewTab: S,
|
|
61
|
-
setActivePreviewTab: C,
|
|
59
|
+
openPreviewWithEnvironment: U,
|
|
62
60
|
activeSectionId: w,
|
|
63
61
|
setActiveSectionId: T
|
|
64
|
-
},
|
|
65
|
-
let
|
|
66
|
-
return
|
|
67
|
-
value:
|
|
68
|
-
children:
|
|
69
|
-
}),
|
|
62
|
+
}, s[17] = S, s[18] = w, s[19] = z, s[20] = h, s[21] = m, s[22] = p, s[23] = U, s[24] = N, s[25] = A, s[26] = E, s[27] = V, s[28] = L, s[29] = d, s[30] = f, s[31] = u, s[32] = W) : W = s[32];
|
|
63
|
+
let G = W, K;
|
|
64
|
+
return s[33] !== l || s[34] !== G ? (K = /* @__PURE__ */ jsx(WorkbenchLayoutContext.Provider, {
|
|
65
|
+
value: G,
|
|
66
|
+
children: l
|
|
67
|
+
}), s[33] = l, s[34] = G, s[35] = K) : K = s[35], K;
|
|
70
68
|
}
|
|
71
|
-
function _temp(
|
|
72
|
-
return !!
|
|
69
|
+
function _temp(t) {
|
|
70
|
+
return !!t.connectionUrl && (!!t.workerId || t.local);
|
|
73
71
|
}
|
|
74
72
|
function useWorkbenchLayout() {
|
|
75
|
-
let
|
|
76
|
-
if (!
|
|
77
|
-
return
|
|
73
|
+
let t = useContext(WorkbenchLayoutContext);
|
|
74
|
+
if (!t) throw Error("useWorkbenchLayout must be used within a WorkbenchLayoutProvider");
|
|
75
|
+
return t;
|
|
78
76
|
}
|
|
79
77
|
export { WorkbenchLayoutProvider, useWorkbenchLayout };
|
|
@@ -1,63 +1,80 @@
|
|
|
1
1
|
import { Button } from "../../../components/ui/button.js";
|
|
2
2
|
import { Label } from "../../../components/ui/label.js";
|
|
3
3
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { useMemo } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Info, Loader2, Plus } from "lucide-react";
|
|
7
|
-
function EnvironmentSlotSelector(
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
function EnvironmentSlotSelector(h) {
|
|
9
|
+
let g = c(25), { slot: _, environments: v, selectedEnvironmentId: y, onSelect: b, onCreateEnvironment: x, isCreating: S, error: C } = h, w;
|
|
10
|
+
if (g[0] !== v || g[1] !== _.type) {
|
|
11
|
+
let e;
|
|
12
|
+
g[3] === _.type ? e = g[4] : (e = (e) => _.type ? e.type === _.type : !0, g[3] = _.type, g[4] = e), w = v.filter(e), g[0] = v, g[1] = _.type, g[2] = w;
|
|
13
|
+
} else w = g[2];
|
|
14
|
+
let T = w, E = T.length > 0, D = _.title ?? _.id, O;
|
|
15
|
+
g[5] === _.optional ? O = g[6] : (O = _.optional && /* @__PURE__ */ jsx("span", {
|
|
16
|
+
className: "text-muted-foreground ml-1 font-normal",
|
|
17
|
+
children: "(optional)"
|
|
18
|
+
}), g[5] = _.optional, g[6] = O);
|
|
19
|
+
let k;
|
|
20
|
+
g[7] !== D || g[8] !== O ? (k = /* @__PURE__ */ jsxs(Label, { children: [D, O] }), g[7] = D, g[8] = O, g[9] = k) : k = g[9];
|
|
21
|
+
let A;
|
|
22
|
+
g[10] !== C || g[11] !== E || g[12] !== S || g[13] !== T || g[14] !== x || g[15] !== b || g[16] !== y || g[17] !== _.optional ? (A = E ? /* @__PURE__ */ jsxs(Select, {
|
|
23
|
+
value: y,
|
|
24
|
+
onValueChange: b,
|
|
25
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
26
|
+
className: "w-full",
|
|
27
|
+
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select an environment" })
|
|
28
|
+
}), /* @__PURE__ */ jsxs(SelectContent, { children: [_.optional && /* @__PURE__ */ jsx(SelectItem, {
|
|
29
|
+
value: "__none__",
|
|
30
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: "text-muted-foreground",
|
|
32
|
+
children: "None"
|
|
33
|
+
})
|
|
34
|
+
}), T.map(_temp)] })]
|
|
35
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: `flex items-center gap-3 rounded-md border border-dashed bg-background p-3 ${C ? "border-destructive" : ""}`,
|
|
11
37
|
children: [
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
x ? /* @__PURE__ */ jsxs(Select, {
|
|
17
|
-
value: h,
|
|
18
|
-
onValueChange: g,
|
|
19
|
-
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
20
|
-
className: "w-full",
|
|
21
|
-
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select an environment" })
|
|
22
|
-
}), /* @__PURE__ */ jsxs(SelectContent, { children: [p.optional && /* @__PURE__ */ jsx(SelectItem, {
|
|
23
|
-
value: "__none__",
|
|
24
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
25
|
-
className: "text-muted-foreground",
|
|
26
|
-
children: "None"
|
|
27
|
-
})
|
|
28
|
-
}), b.map((e) => /* @__PURE__ */ jsx(SelectItem, {
|
|
29
|
-
value: e.id,
|
|
30
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
31
|
-
className: "flex items-center gap-2",
|
|
32
|
-
children: [e.name, e.local && /* @__PURE__ */ jsx("span", {
|
|
33
|
-
className: "bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] font-medium",
|
|
34
|
-
children: "Local"
|
|
35
|
-
})]
|
|
36
|
-
})
|
|
37
|
-
}, e.id))] })]
|
|
38
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
39
|
-
className: `flex items-center gap-3 rounded-md border border-dashed bg-background p-3 ${y ? "border-destructive" : ""}`,
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsx(Info, { className: `h-4 w-4 shrink-0 ${y ? "text-destructive" : "text-muted-foreground"}` }),
|
|
42
|
-
/* @__PURE__ */ jsx("p", {
|
|
43
|
-
className: `text-sm flex-1 ${y ? "text-destructive" : "text-muted-foreground"}`,
|
|
44
|
-
children: "No matching environment available."
|
|
45
|
-
}),
|
|
46
|
-
_ && /* @__PURE__ */ jsxs(Button, {
|
|
47
|
-
type: "button",
|
|
48
|
-
size: "sm",
|
|
49
|
-
variant: "outline",
|
|
50
|
-
disabled: v,
|
|
51
|
-
onClick: () => _(),
|
|
52
|
-
children: [v ? /* @__PURE__ */ jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx(Plus, { className: "mr-1.5 h-3.5 w-3.5" }), "Create"]
|
|
53
|
-
})
|
|
54
|
-
]
|
|
38
|
+
/* @__PURE__ */ jsx(Info, { className: `h-4 w-4 shrink-0 ${C ? "text-destructive" : "text-muted-foreground"}` }),
|
|
39
|
+
/* @__PURE__ */ jsx("p", {
|
|
40
|
+
className: `text-sm flex-1 ${C ? "text-destructive" : "text-muted-foreground"}`,
|
|
41
|
+
children: "No matching environment available."
|
|
55
42
|
}),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
x && /* @__PURE__ */ jsxs(Button, {
|
|
44
|
+
type: "button",
|
|
45
|
+
size: "sm",
|
|
46
|
+
variant: "outline",
|
|
47
|
+
disabled: S,
|
|
48
|
+
onClick: () => x(),
|
|
49
|
+
children: [S ? /* @__PURE__ */ jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx(Plus, { className: "mr-1.5 h-3.5 w-3.5" }), "Create"]
|
|
59
50
|
})
|
|
60
51
|
]
|
|
61
|
-
});
|
|
52
|
+
}), g[10] = C, g[11] = E, g[12] = S, g[13] = T, g[14] = x, g[15] = b, g[16] = y, g[17] = _.optional, g[18] = A) : A = g[18];
|
|
53
|
+
let j;
|
|
54
|
+
g[19] === C ? j = g[20] : (j = C && /* @__PURE__ */ jsx("p", {
|
|
55
|
+
className: "text-sm text-destructive",
|
|
56
|
+
children: C
|
|
57
|
+
}), g[19] = C, g[20] = j);
|
|
58
|
+
let M;
|
|
59
|
+
return g[21] !== k || g[22] !== A || g[23] !== j ? (M = /* @__PURE__ */ jsxs("div", {
|
|
60
|
+
className: "space-y-2",
|
|
61
|
+
children: [
|
|
62
|
+
k,
|
|
63
|
+
A,
|
|
64
|
+
j
|
|
65
|
+
]
|
|
66
|
+
}), g[21] = k, g[22] = A, g[23] = j, g[24] = M) : M = g[24], M;
|
|
67
|
+
}
|
|
68
|
+
function _temp(e) {
|
|
69
|
+
return /* @__PURE__ */ jsx(SelectItem, {
|
|
70
|
+
value: e.id,
|
|
71
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
72
|
+
className: "flex items-center gap-2",
|
|
73
|
+
children: [e.name, e.local && /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] font-medium",
|
|
75
|
+
children: "Local"
|
|
76
|
+
})]
|
|
77
|
+
})
|
|
78
|
+
}, e.id);
|
|
62
79
|
}
|
|
63
80
|
export { EnvironmentSlotSelector };
|
|
@@ -2,9 +2,9 @@ import { useStudio } from "../../../providers/StudioProvider.js";
|
|
|
2
2
|
import { useWorkflowConfig } from "../../../hooks/useConfig.js";
|
|
3
3
|
import { useCreateWorkflow } from "../../../hooks/useWorkflows.js";
|
|
4
4
|
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
5
|
-
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
6
5
|
import ArgumentsView_default from "./workflow-form/ArgumentsView.js";
|
|
7
6
|
import SelectionView_default from "./workflow-form/SelectionView.js";
|
|
7
|
+
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { useEffect, useMemo, useState } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -79,7 +79,7 @@ var WorkspaceHomePage_default = (p) => {
|
|
|
79
79
|
}), m[28] = k, m[29] = P, m[30] = B, m[31] = V) : V = m[31];
|
|
80
80
|
let H;
|
|
81
81
|
return m[32] !== V || m[33] !== F || m[34] !== I || m[35] !== L || m[36] !== R || m[37] !== z ? (H = /* @__PURE__ */ jsxs("div", {
|
|
82
|
-
className: "mx-auto flex min-h-[
|
|
82
|
+
className: "mx-auto flex min-h-[80vh] max-w-2xl flex-col items-center justify-center",
|
|
83
83
|
children: [
|
|
84
84
|
F,
|
|
85
85
|
I,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
function useDefaultEnvironmentPreviewUrl() {
|
|
3
|
+
return _temp;
|
|
4
|
+
}
|
|
5
|
+
function _temp(e, t) {
|
|
6
|
+
if (!e.connectionUrl) return "";
|
|
7
|
+
let n = new URLSearchParams({
|
|
8
|
+
url: e.connectionUrl,
|
|
9
|
+
name: e.envName || e.workerId || ""
|
|
10
|
+
});
|
|
11
|
+
return t ? `/embed/env/preview/workflows/${t}?${n}` : `/embed/env/preview?${n}`;
|
|
12
|
+
}
|
|
13
|
+
export { useDefaultEnvironmentPreviewUrl };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useApiClient } from "./useApi.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useMutation } from "@tanstack/react-query";
|
|
4
|
+
function useResetEnvironment() {
|
|
5
|
+
let r = c(2), { api: i } = useApiClient(), a;
|
|
6
|
+
return r[0] === i ? a = r[1] : (a = { mutationFn: (e) => i.environments.resetEnvironment(e) }, r[0] = i, r[1] = a), useMutation(a);
|
|
7
|
+
}
|
|
8
|
+
export { useResetEnvironment };
|
|
@@ -15,46 +15,48 @@ function useWorkflow(e) {
|
|
|
15
15
|
}, i[6] = s, i[7] = u, i[8] = d, i[9] = f) : f = i[9], useQuery(f);
|
|
16
16
|
}
|
|
17
17
|
function useFilterWorkflows(e, r, i, a, s, u) {
|
|
18
|
-
let d = c(
|
|
19
|
-
d[0]
|
|
20
|
-
let
|
|
21
|
-
d[
|
|
22
|
-
let S;
|
|
23
|
-
d[5]
|
|
18
|
+
let d = c(32), f = i === void 0 ? "id" : i, p = a === void 0 ? "DESC" : a, m = s === void 0 ? 0 : s, h = u === void 0 ? 10 : u, { envKey: g, api: _ } = useApiClient(), v;
|
|
19
|
+
d[0] === r ? v = d[1] : (v = Object.keys(r), d[0] = r, d[1] = v);
|
|
20
|
+
let y = v.length > 0, b;
|
|
21
|
+
d[2] !== r || d[3] !== y ? (b = y ? JSON.stringify(r) : void 0, d[2] = r, d[3] = y, d[4] = b) : b = d[4];
|
|
22
|
+
let x = b, S;
|
|
23
|
+
d[5] === x ? S = d[6] : (S = x && { filter: x }, d[5] = x, d[6] = S);
|
|
24
|
+
let C;
|
|
25
|
+
d[7] !== p || d[8] !== f ? (C = JSON.stringify([{
|
|
24
26
|
field: f,
|
|
25
27
|
order: p
|
|
26
|
-
}]), d[
|
|
27
|
-
let
|
|
28
|
-
d[
|
|
28
|
+
}]), d[7] = p, d[8] = f, d[9] = C) : C = d[9];
|
|
29
|
+
let w;
|
|
30
|
+
d[10] === e ? w = d[11] : (w = e && {
|
|
29
31
|
search: e,
|
|
30
32
|
searchColumns: JSON.stringify(["title", "model"])
|
|
31
|
-
}, d[
|
|
32
|
-
let
|
|
33
|
-
d[
|
|
34
|
-
...
|
|
35
|
-
sortBy:
|
|
33
|
+
}, d[10] = e, d[11] = w);
|
|
34
|
+
let T;
|
|
35
|
+
d[12] !== h || d[13] !== m || d[14] !== S || d[15] !== C || d[16] !== w ? (T = {
|
|
36
|
+
...S,
|
|
37
|
+
sortBy: C,
|
|
36
38
|
page: m,
|
|
37
39
|
limit: h,
|
|
38
|
-
...
|
|
39
|
-
}, d[
|
|
40
|
-
let
|
|
41
|
-
d[
|
|
40
|
+
...w
|
|
41
|
+
}, d[12] = h, d[13] = m, d[14] = S, d[15] = C, d[16] = w, d[17] = T) : T = d[17];
|
|
42
|
+
let E = T, D;
|
|
43
|
+
d[18] !== g || d[19] !== x || d[20] !== h || d[21] !== p || d[22] !== m || d[23] !== e || d[24] !== f ? (D = [
|
|
42
44
|
...getWorkflowsCacheKey(g),
|
|
43
45
|
"list",
|
|
44
46
|
e ?? "",
|
|
45
|
-
|
|
47
|
+
x ?? "",
|
|
46
48
|
f,
|
|
47
49
|
p,
|
|
48
50
|
m,
|
|
49
51
|
h
|
|
50
|
-
], d[
|
|
51
|
-
let D;
|
|
52
|
-
d[24] !== _ || d[25] !== T ? (D = () => _.workflows.getAll(T), d[24] = _, d[25] = T, d[26] = D) : D = d[26];
|
|
52
|
+
], d[18] = g, d[19] = x, d[20] = h, d[21] = p, d[22] = m, d[23] = e, d[24] = f, d[25] = D) : D = d[25];
|
|
53
53
|
let O;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
d[26] !== _ || d[27] !== E ? (O = () => _.workflows.getAll(E), d[26] = _, d[27] = E, d[28] = O) : O = d[28];
|
|
55
|
+
let k;
|
|
56
|
+
return d[29] !== D || d[30] !== O ? (k = {
|
|
57
|
+
queryKey: D,
|
|
58
|
+
queryFn: O
|
|
59
|
+
}, d[29] = D, d[30] = O, d[31] = k) : k = d[31], useQuery(k);
|
|
58
60
|
}
|
|
59
61
|
function useCreateWorkflow() {
|
|
60
62
|
let e = c(8), { envKey: r, api: i } = useApiClient(), a = useQueryClient(), l;
|
|
@@ -15,46 +15,48 @@ function useWorkspace(t) {
|
|
|
15
15
|
}, i[6] = l, i[7] = u, i[8] = d, i[9] = f) : f = i[9], useQuery(f);
|
|
16
16
|
}
|
|
17
17
|
function useFilterWorkspaces(e, i, o, s, l, u) {
|
|
18
|
-
let d = c(
|
|
19
|
-
d[0]
|
|
20
|
-
let
|
|
21
|
-
d[
|
|
22
|
-
let S;
|
|
23
|
-
d[5]
|
|
18
|
+
let d = c(32), f = o === void 0 ? "id" : o, p = s === void 0 ? "DESC" : s, m = l === void 0 ? 0 : l, h = u === void 0 ? 10 : u, { envKey: g, api: _ } = useApiClient(), v;
|
|
19
|
+
d[0] === i ? v = d[1] : (v = Object.keys(i), d[0] = i, d[1] = v);
|
|
20
|
+
let y = v.length > 0, b;
|
|
21
|
+
d[2] !== i || d[3] !== y ? (b = y ? JSON.stringify(i) : void 0, d[2] = i, d[3] = y, d[4] = b) : b = d[4];
|
|
22
|
+
let x = b, S;
|
|
23
|
+
d[5] === x ? S = d[6] : (S = x && { filter: x }, d[5] = x, d[6] = S);
|
|
24
|
+
let C;
|
|
25
|
+
d[7] !== p || d[8] !== f ? (C = JSON.stringify([{
|
|
24
26
|
field: f,
|
|
25
27
|
order: p
|
|
26
|
-
}]), d[
|
|
27
|
-
let
|
|
28
|
-
d[
|
|
28
|
+
}]), d[7] = p, d[8] = f, d[9] = C) : C = d[9];
|
|
29
|
+
let w;
|
|
30
|
+
d[10] === e ? w = d[11] : (w = e && {
|
|
29
31
|
search: e,
|
|
30
32
|
searchColumns: JSON.stringify(["title"])
|
|
31
|
-
}, d[
|
|
32
|
-
let
|
|
33
|
-
d[
|
|
34
|
-
...
|
|
35
|
-
sortBy:
|
|
33
|
+
}, d[10] = e, d[11] = w);
|
|
34
|
+
let T;
|
|
35
|
+
d[12] !== h || d[13] !== m || d[14] !== S || d[15] !== C || d[16] !== w ? (T = {
|
|
36
|
+
...S,
|
|
37
|
+
sortBy: C,
|
|
36
38
|
page: m,
|
|
37
39
|
limit: h,
|
|
38
|
-
...
|
|
39
|
-
}, d[
|
|
40
|
-
let
|
|
41
|
-
d[
|
|
40
|
+
...w
|
|
41
|
+
}, d[12] = h, d[13] = m, d[14] = S, d[15] = C, d[16] = w, d[17] = T) : T = d[17];
|
|
42
|
+
let E = T, D;
|
|
43
|
+
d[18] !== g || d[19] !== x || d[20] !== h || d[21] !== p || d[22] !== m || d[23] !== e || d[24] !== f ? (D = [
|
|
42
44
|
...getWorkspacesCacheKey(g),
|
|
43
45
|
"list",
|
|
44
46
|
e ?? "",
|
|
45
|
-
|
|
47
|
+
x ?? "",
|
|
46
48
|
f,
|
|
47
49
|
p,
|
|
48
50
|
m,
|
|
49
51
|
h
|
|
50
|
-
], d[
|
|
51
|
-
let D;
|
|
52
|
-
d[24] !== _ || d[25] !== T ? (D = () => _.workspaces.getAll(T), d[24] = _, d[25] = T, d[26] = D) : D = d[26];
|
|
52
|
+
], d[18] = g, d[19] = x, d[20] = h, d[21] = p, d[22] = m, d[23] = e, d[24] = f, d[25] = D) : D = d[25];
|
|
53
53
|
let O;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
d[26] !== _ || d[27] !== E ? (O = () => _.workspaces.getAll(E), d[26] = _, d[27] = E, d[28] = O) : O = d[28];
|
|
55
|
+
let k;
|
|
56
|
+
return d[29] !== D || d[30] !== O ? (k = {
|
|
57
|
+
queryKey: D,
|
|
58
|
+
queryFn: O
|
|
59
|
+
}, d[29] = D, d[30] = O, d[31] = k) : k = d[31], useQuery(k);
|
|
58
60
|
}
|
|
59
61
|
function useCreateWorkspace() {
|
|
60
62
|
let e = c(8), { envKey: a, api: s } = useApiClient(), l = useQueryClient(), u;
|