@loopstack/loopstack-studio 0.23.0 → 0.24.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/index.js +12 -10
- package/dist/api/secrets.js +16 -0
- package/dist/components/dynamic-form/ArrayController.js +68 -64
- package/dist/components/dynamic-form/Form.js +56 -27
- package/dist/components/dynamic-form/FormElement.js +1 -1
- package/dist/components/dynamic-form/FormElementHeader.js +2 -2
- package/dist/components/dynamic-form/InputController.js +3 -1
- 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/InputField.js +20 -19
- package/dist/components/dynamic-form/fields/MarkdownViewField.js +20 -0
- 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/layout/MainLayout.js +18 -31
- package/dist/components/layout/StudioSidebar.js +168 -108
- package/dist/components/page/PageBreadcrumbs.js +79 -32
- package/dist/components/ui-widgets/UiWidget.js +36 -27
- package/dist/components/ui-widgets/widgets/SecretInput.js +42 -0
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +80 -4
- package/dist/features/code-explorer/components/FileContentViewer.js +47 -30
- package/dist/features/code-explorer/components/FileTabsBar.js +3 -190
- package/dist/features/code-explorer/components/FileTabsBarBase.js +190 -0
- package/dist/features/code-explorer/index.js +2 -2
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +2 -162
- package/dist/features/code-explorer/utils/fileIcons.js +7 -4
- package/dist/features/debug/components/PipelineFlowViewer.js +46 -45
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +19 -19
- package/dist/features/documents/DocumentRenderer.js +20 -15
- package/dist/features/documents/components/DocumentList.js +5 -1
- package/dist/features/documents/renderers/AiMessage.js +11 -11
- package/dist/features/documents/renderers/ClaudeMessage.js +96 -0
- package/dist/features/documents/renderers/DocumentFormRenderer.js +17 -11
- package/dist/features/workbench/Workbench.js +64 -80
- package/dist/features/workbench/WorkflowItem.js +5 -5
- package/dist/features/workbench/components/RemoteFileTabsBar.js +18 -0
- package/dist/features/workbench/components/RemoteFileTree.js +90 -0
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +67 -0
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +57 -49
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +2 -2
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +48 -28
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +182 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +4 -4
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +160 -0
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +46 -43
- package/dist/features/workspaces/components/PipelineForm.js +1 -1
- package/dist/features/workspaces/components/WorkspaceHomePage.js +93 -0
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/query-keys.js +41 -34
- package/dist/hooks/useFiles.js +1 -43
- package/dist/hooks/useSecrets.js +69 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +3 -2
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
- package/dist/pages/DashboardPage.js +87 -35
- package/dist/pages/EmbedWorkbenchPage.js +43 -39
- package/dist/pages/PipelineDebugPage.js +1 -1
- package/dist/pages/PreviewWorkbenchPage.js +167 -70
- package/dist/pages/WorkspacePage.js +102 -50
- package/dist/pages/WorkspaceRunsPage.js +71 -0
- package/dist/routing/LocalRouter.js +6 -0
- package/dist/types/ai.types.js +13 -0
- package/package.json +2 -3
- 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
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { useWorkspace } from "../../hooks/useWorkspaces.js";
|
|
2
2
|
import PageBreadcrumbs_default from "../../components/page/PageBreadcrumbs.js";
|
|
3
|
-
import { CodeExplorerProvider, useCodeExplorerContext } from "../code-explorer/providers/CodeExplorerProvider.js";
|
|
4
|
-
import { FileContentViewer } from "../code-explorer/components/FileContentViewer.js";
|
|
5
|
-
import { FileTabsBar } from "../code-explorer/components/FileTabsBar.js";
|
|
6
|
-
import "../code-explorer/index.js";
|
|
7
3
|
import { WorkbenchLayoutProvider, useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
8
4
|
import WorkflowList_default from "./WorkflowList.js";
|
|
5
|
+
import { RemoteFileExplorerProvider } from "./providers/RemoteFileExplorerProvider.js";
|
|
6
|
+
import { WorkbenchFilesPanel } from "./components/WorkbenchFilesPanel.js";
|
|
9
7
|
import { ScrollProvider } from "./providers/ScrollProvider.js";
|
|
10
8
|
import { WorkbenchFloatingPanel } from "./components/WorkbenchFloatingPanel.js";
|
|
11
9
|
import { WorkbenchFlowPanel } from "./components/WorkbenchFlowPanel.js";
|
|
@@ -14,110 +12,96 @@ import { WorkbenchPreviewPanel } from "./components/WorkbenchPreviewPanel.js";
|
|
|
14
12
|
import { c } from "react/compiler-runtime";
|
|
15
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
14
|
function WorkbenchContent(t) {
|
|
17
|
-
let i = c(
|
|
18
|
-
i[0] ===
|
|
15
|
+
let i = c(7), { pipeline: a, breadcrumbData: s } = t, l;
|
|
16
|
+
i[0] === s ? l = i[1] : (l = /* @__PURE__ */ jsx("div", {
|
|
19
17
|
className: "border-b flex h-12 shrink-0 items-center",
|
|
20
|
-
children:
|
|
18
|
+
children: s ? /* @__PURE__ */ jsx(PageBreadcrumbs_default, { breadcrumbData: s }) : /* @__PURE__ */ jsx("span", {
|
|
21
19
|
className: "px-3 text-sm font-medium",
|
|
22
20
|
children: "Workflows"
|
|
23
21
|
})
|
|
24
|
-
}), i[0] =
|
|
25
|
-
let
|
|
26
|
-
i[2] ===
|
|
22
|
+
}), i[0] = s, i[1] = l);
|
|
23
|
+
let d;
|
|
24
|
+
i[2] === a ? d = i[3] : (d = /* @__PURE__ */ jsx(ScrollProvider, { children: /* @__PURE__ */ jsx("div", {
|
|
27
25
|
className: "flex-1 overflow-auto",
|
|
28
|
-
children: /* @__PURE__ */ jsx(WorkflowList_default, { pipeline:
|
|
29
|
-
}) }), i[2] =
|
|
30
|
-
let
|
|
31
|
-
i[4] !==
|
|
32
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
33
|
-
children: [y, b]
|
|
34
|
-
}), i[4] = y, i[5] = b, i[6] = x) : x = i[6];
|
|
35
|
-
let S;
|
|
36
|
-
i[7] !== h || i[8] !== v || i[9] !== p.length || i[10] !== m || i[11] !== g ? (S = p.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
37
|
-
className: "w-full md:w-1/2 shrink-0 overflow-hidden flex flex-col",
|
|
38
|
-
children: [/* @__PURE__ */ jsx(FileTabsBar, {}), /* @__PURE__ */ jsx("div", {
|
|
39
|
-
className: "flex-1 overflow-hidden",
|
|
40
|
-
children: /* @__PURE__ */ jsx(FileContentViewer, {
|
|
41
|
-
selectedFile: m,
|
|
42
|
-
content: h,
|
|
43
|
-
workflowConfig: g,
|
|
44
|
-
isLoading: v,
|
|
45
|
-
className: "h-full"
|
|
46
|
-
})
|
|
47
|
-
})]
|
|
48
|
-
}), i[7] = h, i[8] = v, i[9] = p.length, i[10] = m, i[11] = g, i[12] = S) : S = i[12];
|
|
49
|
-
let C;
|
|
50
|
-
return i[13] !== x || i[14] !== S ? (C = /* @__PURE__ */ jsx("div", {
|
|
26
|
+
children: /* @__PURE__ */ jsx(WorkflowList_default, { pipeline: a })
|
|
27
|
+
}) }), i[2] = a, i[3] = d);
|
|
28
|
+
let f;
|
|
29
|
+
return i[4] !== l || i[5] !== d ? (f = /* @__PURE__ */ jsx("div", {
|
|
51
30
|
className: "flex h-full flex-col",
|
|
52
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
53
32
|
className: "flex flex-1 gap-4 overflow-hidden md:flex-row flex-col",
|
|
54
|
-
children:
|
|
33
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
35
|
+
children: [l, d]
|
|
36
|
+
})
|
|
55
37
|
})
|
|
56
|
-
}), i[
|
|
38
|
+
}), i[4] = l, i[5] = d, i[6] = f) : f = i[6], f;
|
|
57
39
|
}
|
|
58
40
|
function WorkbenchInner(t) {
|
|
59
|
-
let r = c(
|
|
60
|
-
r[0] !==
|
|
41
|
+
let r = c(21), { pipeline: i, breadcrumbData: o } = t, { activeSidePanel: s } = useWorkbenchLayout(), u = s ? "w-1/2 overflow-hidden" : "w-full overflow-hidden", _;
|
|
42
|
+
r[0] !== o || r[1] !== i ? (_ = /* @__PURE__ */ jsx(WorkbenchContent, {
|
|
61
43
|
pipeline: i,
|
|
62
|
-
breadcrumbData:
|
|
63
|
-
}), r[0] =
|
|
64
|
-
let
|
|
65
|
-
r[3] !==
|
|
66
|
-
className:
|
|
67
|
-
children:
|
|
68
|
-
}), r[3] =
|
|
69
|
-
let f;
|
|
70
|
-
r[6] === o ? f = r[7] : (f = o === "preview" && /* @__PURE__ */ jsx(WorkbenchPreviewPanel, {}), r[6] = o, r[7] = f);
|
|
44
|
+
breadcrumbData: o
|
|
45
|
+
}), r[0] = o, r[1] = i, r[2] = _) : _ = r[2];
|
|
46
|
+
let v;
|
|
47
|
+
r[3] !== u || r[4] !== _ ? (v = /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: u,
|
|
49
|
+
children: _
|
|
50
|
+
}), r[3] = u, r[4] = _, r[5] = v) : v = r[5];
|
|
71
51
|
let y;
|
|
72
|
-
r[
|
|
52
|
+
r[6] === s ? y = r[7] : (y = s === "preview" && /* @__PURE__ */ jsx(WorkbenchPreviewPanel, {}), r[6] = s, r[7] = y);
|
|
73
53
|
let b;
|
|
74
|
-
r[
|
|
54
|
+
r[8] === s ? b = r[9] : (b = s === "flow" && /* @__PURE__ */ jsx(WorkbenchFlowPanel, {}), r[8] = s, r[9] = b);
|
|
75
55
|
let x;
|
|
76
|
-
r[
|
|
56
|
+
r[10] === s ? x = r[11] : (x = s === "files" && /* @__PURE__ */ jsx(WorkbenchFilesPanel, {}), r[10] = s, r[11] = x);
|
|
57
|
+
let S;
|
|
58
|
+
r[12] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(WorkbenchFloatingPanel, {}), r[12] = S) : S = r[12];
|
|
59
|
+
let C;
|
|
60
|
+
r[13] !== v || r[14] !== y || r[15] !== b || r[16] !== x ? (C = /* @__PURE__ */ jsxs("div", {
|
|
77
61
|
className: "relative flex flex-1 overflow-hidden",
|
|
78
62
|
children: [
|
|
79
|
-
|
|
80
|
-
f,
|
|
63
|
+
v,
|
|
81
64
|
y,
|
|
82
|
-
b
|
|
65
|
+
b,
|
|
66
|
+
x,
|
|
67
|
+
S
|
|
83
68
|
]
|
|
84
|
-
}), r[
|
|
85
|
-
let
|
|
86
|
-
r[
|
|
87
|
-
let
|
|
88
|
-
return r[
|
|
69
|
+
}), r[13] = v, r[14] = y, r[15] = b, r[16] = x, r[17] = C) : C = r[17];
|
|
70
|
+
let w;
|
|
71
|
+
r[18] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ jsx(WorkbenchIconSidebar, {}), r[18] = w) : w = r[18];
|
|
72
|
+
let T;
|
|
73
|
+
return r[19] === C ? T = r[20] : (T = /* @__PURE__ */ jsxs("div", {
|
|
89
74
|
className: "flex h-full w-full",
|
|
90
|
-
children: [
|
|
91
|
-
}), r[
|
|
75
|
+
children: [C, w]
|
|
76
|
+
}), r[19] = C, r[20] = T), T;
|
|
92
77
|
}
|
|
93
78
|
function Workbench(r) {
|
|
94
|
-
let a = c(
|
|
95
|
-
a[0]
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
79
|
+
let a = c(20), { pipeline: o, breadcrumbData: l, previewPanelOpen: u, onPreviewPanelOpenChange: d, isDeveloperMode: f, getPreviewUrl: p, getEnvironmentPreviewUrl: m, environments: h } = r, g = o?.workspaceId, v = useWorkspace(g), y;
|
|
80
|
+
a[0] !== h?.[0]?.slotId || a[1] !== v.data?.features?.fileExplorer?.enabled || a[2] !== v.data?.features?.fileExplorer?.environments ? (y = v.data?.features?.fileExplorer?.enabled && v.data?.features?.fileExplorer?.environments?.includes(h?.[0]?.slotId ?? ""), a[0] = h?.[0]?.slotId, a[1] = v.data?.features?.fileExplorer?.enabled, a[2] = v.data?.features?.fileExplorer?.environments, a[3] = y) : y = a[3];
|
|
81
|
+
let b = y, x;
|
|
82
|
+
a[4] === v.data ? x = a[5] : (x = v.data ? {
|
|
83
|
+
volumes: v.data.volumes,
|
|
84
|
+
features: v.data.features
|
|
85
|
+
} : void 0, a[4] = v.data, a[5] = x);
|
|
86
|
+
let S = x, C = h ?? v.data?.environments, w;
|
|
87
|
+
a[6] !== l || a[7] !== b || a[8] !== o ? (w = b ? /* @__PURE__ */ jsx(RemoteFileExplorerProvider, { children: /* @__PURE__ */ jsx(WorkbenchInner, {
|
|
88
|
+
pipeline: o,
|
|
89
|
+
breadcrumbData: l
|
|
90
|
+
}) }) : /* @__PURE__ */ jsx(WorkbenchInner, {
|
|
101
91
|
pipeline: o,
|
|
102
|
-
breadcrumbData:
|
|
103
|
-
}), a[
|
|
92
|
+
breadcrumbData: l
|
|
93
|
+
}), a[6] = l, a[7] = b, a[8] = o, a[9] = w) : w = a[9];
|
|
104
94
|
let T;
|
|
105
|
-
a[
|
|
106
|
-
pipelineId: C,
|
|
107
|
-
fileExplorerEnabled: v,
|
|
108
|
-
children: w
|
|
109
|
-
}), a[5] = v, a[6] = C, a[7] = w, a[8] = T) : T = a[8];
|
|
110
|
-
let E;
|
|
111
|
-
return a[9] !== m || a[10] !== p || a[11] !== f || a[12] !== d || a[13] !== o || a[14] !== u || a[15] !== S || a[16] !== T || a[17] !== x ? (E = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
95
|
+
return a[10] !== m || a[11] !== p || a[12] !== f || a[13] !== d || a[14] !== o || a[15] !== u || a[16] !== C || a[17] !== w || a[18] !== S ? (T = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
112
96
|
pipeline: o,
|
|
113
97
|
isDeveloperMode: f,
|
|
114
|
-
workspaceConfig:
|
|
98
|
+
workspaceConfig: S,
|
|
115
99
|
getPreviewUrl: p,
|
|
116
100
|
getEnvironmentPreviewUrl: m,
|
|
117
|
-
environments:
|
|
101
|
+
environments: C,
|
|
118
102
|
previewPanelOpen: u,
|
|
119
103
|
onPreviewPanelOpenChange: d,
|
|
120
|
-
children:
|
|
121
|
-
}), a[
|
|
104
|
+
children: w
|
|
105
|
+
}), a[10] = m, a[11] = p, a[12] = f, a[13] = d, a[14] = o, a[15] = u, a[16] = C, a[17] = w, a[18] = S, a[19] = T) : T = a[19], T;
|
|
122
106
|
}
|
|
123
107
|
export { Workbench as default };
|
|
@@ -11,7 +11,7 @@ import React, { useEffect } from "react";
|
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { useParams } from "react-router-dom";
|
|
13
13
|
var WorkflowItem_default = (p) => {
|
|
14
|
-
let m = c(
|
|
14
|
+
let m = c(45), { pipeline: h, workflowId: g, scrollTo: _, settings: v, embed: y } = p, { workflowId: b, clickId: x } = useParams(), S;
|
|
15
15
|
m[0] !== v.showFullMessageHistory || m[1] !== g ? (S = {
|
|
16
16
|
workflowId: g,
|
|
17
17
|
showFullMessageHistory: v.showFullMessageHistory
|
|
@@ -49,15 +49,15 @@ var WorkflowItem_default = (p) => {
|
|
|
49
49
|
let H;
|
|
50
50
|
m[32] === j ? H = m[33] : (H = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: j }), m[32] = j, m[33] = H);
|
|
51
51
|
let U;
|
|
52
|
-
m[34] !==
|
|
52
|
+
m[34] !== M || m[35] !== C ? (U = !!C && /* @__PURE__ */ jsx("div", {
|
|
53
53
|
className: "mt-6",
|
|
54
54
|
children: /* @__PURE__ */ jsx(WorkflowForms_default, {
|
|
55
55
|
workflow: C,
|
|
56
56
|
onSubmit: M
|
|
57
57
|
})
|
|
58
|
-
}), m[34] =
|
|
58
|
+
}), m[34] = M, m[35] = C, m[36] = U) : U = m[36];
|
|
59
59
|
let W;
|
|
60
|
-
return m[
|
|
60
|
+
return m[37] !== V || m[38] !== H || m[39] !== U || m[40] !== I || m[41] !== R || m[42] !== z || m[43] !== B ? (W = /* @__PURE__ */ jsxs("div", {
|
|
61
61
|
className: I,
|
|
62
62
|
children: [
|
|
63
63
|
R,
|
|
@@ -67,6 +67,6 @@ var WorkflowItem_default = (p) => {
|
|
|
67
67
|
H,
|
|
68
68
|
U
|
|
69
69
|
]
|
|
70
|
-
}), m[
|
|
70
|
+
}), m[37] = V, m[38] = H, m[39] = U, m[40] = I, m[41] = R, m[42] = z, m[43] = B, m[44] = W) : W = m[44], W;
|
|
71
71
|
};
|
|
72
72
|
export { WorkflowItem_default as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FileTabsBarBase } from "../../code-explorer/components/FileTabsBarBase.js";
|
|
2
|
+
import { useRemoteFileExplorer } from "../providers/RemoteFileExplorerProvider.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function RemoteFileTabsBar() {
|
|
6
|
+
let i = c(9), { openFiles: a, selectedFile: o, selectFile: s, closeFile: l, closeAll: u, closeOthers: d, closeToLeft: f, closeToRight: p } = useRemoteFileExplorer(), m;
|
|
7
|
+
return i[0] !== u || i[1] !== l || i[2] !== d || i[3] !== f || i[4] !== p || i[5] !== a || i[6] !== s || i[7] !== o ? (m = /* @__PURE__ */ jsx(FileTabsBarBase, {
|
|
8
|
+
openFiles: a,
|
|
9
|
+
selectedFile: o,
|
|
10
|
+
selectFile: s,
|
|
11
|
+
closeFile: l,
|
|
12
|
+
closeAll: u,
|
|
13
|
+
closeOthers: d,
|
|
14
|
+
closeToLeft: f,
|
|
15
|
+
closeToRight: p
|
|
16
|
+
}), i[0] = u, i[1] = l, i[2] = d, i[3] = f, i[4] = p, i[5] = a, i[6] = s, i[7] = o, i[8] = m) : m = i[8], m;
|
|
17
|
+
}
|
|
18
|
+
export { RemoteFileTabsBar };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Button } from "../../../components/ui/button.js";
|
|
2
|
+
import { ScrollArea } from "../../../components/ui/scroll-area.js";
|
|
3
|
+
import { CodeExplorerTreeNode } from "../../code-explorer/components/CodeExplorerTreeNode.js";
|
|
4
|
+
import { useRemoteFileExplorer } from "../providers/RemoteFileExplorerProvider.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { AlertCircle, Loader2, RefreshCw } from "lucide-react";
|
|
8
|
+
var RemoteFileTree_default = () => {
|
|
9
|
+
let d = c(35), { nodes: f, isTreeLoading: p, treeError: m, isFetchingTree: h, expandedFolders: g, toggleFolder: _, selectFile: v, closeFile: y, selectedFile: b, refreshTree: x } = useRemoteFileExplorer();
|
|
10
|
+
if (p) {
|
|
11
|
+
let e;
|
|
12
|
+
return d[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
className: "flex items-center gap-2 p-3 text-sm text-muted-foreground",
|
|
14
|
+
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), "Loading file tree…"]
|
|
15
|
+
}), d[0] = e) : e = d[0], e;
|
|
16
|
+
}
|
|
17
|
+
if (m) {
|
|
18
|
+
let a;
|
|
19
|
+
d[1] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ jsx(AlertCircle, { className: "mt-0.5 h-4 w-4 shrink-0" }), d[1] = a) : a = d[1];
|
|
20
|
+
let o = m instanceof Error ? m.message : String(m), s;
|
|
21
|
+
d[2] === o ? s = d[3] : (s = /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: "flex items-start gap-2 text-sm text-destructive",
|
|
23
|
+
children: [a, /* @__PURE__ */ jsx("span", { children: o })]
|
|
24
|
+
}), d[2] = o, d[3] = s);
|
|
25
|
+
let l;
|
|
26
|
+
d[4] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ jsx(RefreshCw, { className: "mr-1.5 h-3.5 w-3.5" }), d[4] = l) : l = d[4];
|
|
27
|
+
let u;
|
|
28
|
+
d[5] === x ? u = d[6] : (u = /* @__PURE__ */ jsxs(Button, {
|
|
29
|
+
variant: "outline",
|
|
30
|
+
size: "sm",
|
|
31
|
+
onClick: x,
|
|
32
|
+
children: [l, "Retry"]
|
|
33
|
+
}), d[5] = x, d[6] = u);
|
|
34
|
+
let f;
|
|
35
|
+
return d[7] !== s || d[8] !== u ? (f = /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: "space-y-2 p-3",
|
|
37
|
+
children: [s, u]
|
|
38
|
+
}), d[7] = s, d[8] = u, d[9] = f) : f = d[9], f;
|
|
39
|
+
}
|
|
40
|
+
if (f.length === 0) {
|
|
41
|
+
let e;
|
|
42
|
+
return d[10] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("p", {
|
|
43
|
+
className: "px-2 py-4 text-sm text-muted-foreground",
|
|
44
|
+
children: "No files found"
|
|
45
|
+
}), d[10] = e) : e = d[10], e;
|
|
46
|
+
}
|
|
47
|
+
let S = `h-3 w-3 ${h ? "animate-spin" : ""}`, C;
|
|
48
|
+
d[11] === S ? C = d[12] : (C = /* @__PURE__ */ jsx(RefreshCw, { className: S }), d[11] = S, d[12] = C);
|
|
49
|
+
let w;
|
|
50
|
+
d[13] !== h || d[14] !== x || d[15] !== C ? (w = /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: "flex items-center justify-end px-1",
|
|
52
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
53
|
+
variant: "ghost",
|
|
54
|
+
size: "icon",
|
|
55
|
+
className: "h-6 w-6",
|
|
56
|
+
onClick: x,
|
|
57
|
+
disabled: h,
|
|
58
|
+
children: C
|
|
59
|
+
})
|
|
60
|
+
}), d[13] = h, d[14] = x, d[15] = C, d[16] = w) : w = d[16];
|
|
61
|
+
let T;
|
|
62
|
+
if (d[17] !== y || d[18] !== g || d[19] !== f || d[20] !== v || d[21] !== b?.id || d[22] !== _) {
|
|
63
|
+
let e;
|
|
64
|
+
d[24] !== y || d[25] !== g || d[26] !== v || d[27] !== b?.id || d[28] !== _ ? (e = (e) => /* @__PURE__ */ jsx(CodeExplorerTreeNode, {
|
|
65
|
+
node: e,
|
|
66
|
+
depth: 0,
|
|
67
|
+
expandedFolders: g,
|
|
68
|
+
toggleFolder: _,
|
|
69
|
+
onSelectFile: v,
|
|
70
|
+
onCloseFile: y,
|
|
71
|
+
selectedFileId: b?.id
|
|
72
|
+
}, e.id), d[24] = y, d[25] = g, d[26] = v, d[27] = b?.id, d[28] = _, d[29] = e) : e = d[29], T = f.map(e), d[17] = y, d[18] = g, d[19] = f, d[20] = v, d[21] = b?.id, d[22] = _, d[23] = T;
|
|
73
|
+
} else T = d[23];
|
|
74
|
+
let E;
|
|
75
|
+
d[30] === T ? E = d[31] : (E = /* @__PURE__ */ jsx(ScrollArea, {
|
|
76
|
+
className: "h-full w-full",
|
|
77
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
78
|
+
className: "w-full py-1",
|
|
79
|
+
role: "tree",
|
|
80
|
+
"aria-label": "Remote file tree",
|
|
81
|
+
children: T
|
|
82
|
+
})
|
|
83
|
+
}), d[30] = T, d[31] = E);
|
|
84
|
+
let D;
|
|
85
|
+
return d[32] !== w || d[33] !== E ? (D = /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "flex h-full flex-col gap-1.5",
|
|
87
|
+
children: [w, E]
|
|
88
|
+
}), d[32] = w, d[33] = E, d[34] = D) : D = d[34], D;
|
|
89
|
+
};
|
|
90
|
+
export { RemoteFileTree_default as default };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { cn } from "../../../lib/utils.js";
|
|
2
|
+
import { Button } from "../../../components/ui/button.js";
|
|
3
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
|
+
import { FileContentViewer } from "../../code-explorer/components/FileContentViewer.js";
|
|
5
|
+
import "../../code-explorer/index.js";
|
|
6
|
+
import { useOptionalRemoteFileExplorer } from "../providers/RemoteFileExplorerProvider.js";
|
|
7
|
+
import { RemoteFileTabsBar } from "./RemoteFileTabsBar.js";
|
|
8
|
+
import RemoteFileTree_default from "./RemoteFileTree.js";
|
|
9
|
+
import { c } from "react/compiler-runtime";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { X } from "lucide-react";
|
|
12
|
+
function WorkbenchFilesPanel() {
|
|
13
|
+
let p = c(10), { closeSidePanel: m, fileExplorerEnabled: h } = useWorkbenchLayout(), g = useOptionalRemoteFileExplorer();
|
|
14
|
+
if (!h) return null;
|
|
15
|
+
let _;
|
|
16
|
+
p[0] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("span", {
|
|
17
|
+
className: "text-sm font-medium",
|
|
18
|
+
children: "Files"
|
|
19
|
+
}), p[0] = _) : _ = p[0];
|
|
20
|
+
let v;
|
|
21
|
+
p[1] === Symbol.for("react.memo_cache_sentinel") ? (v = cn("h-5 w-5 shrink-0 rounded transition-opacity", "hover:bg-destructive/10 hover:text-destructive"), p[1] = v) : v = p[1];
|
|
22
|
+
let y;
|
|
23
|
+
p[2] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" }), p[2] = y) : y = p[2];
|
|
24
|
+
let b;
|
|
25
|
+
p[3] === m ? b = p[4] : (b = /* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: "border-b flex h-12 shrink-0 items-center justify-between px-3",
|
|
27
|
+
children: [_, /* @__PURE__ */ jsx(Button, {
|
|
28
|
+
variant: "ghost",
|
|
29
|
+
size: "icon",
|
|
30
|
+
className: v,
|
|
31
|
+
onClick: m,
|
|
32
|
+
"aria-label": "Close Files Panel",
|
|
33
|
+
children: y
|
|
34
|
+
})]
|
|
35
|
+
}), p[3] = m, p[4] = b);
|
|
36
|
+
let x;
|
|
37
|
+
p[5] === g ? x = p[6] : (x = /* @__PURE__ */ jsx("div", {
|
|
38
|
+
className: "flex-1 overflow-hidden flex",
|
|
39
|
+
children: g ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
40
|
+
className: "w-64 shrink-0 border-r bg-muted/40",
|
|
41
|
+
children: /* @__PURE__ */ jsx(RemoteFileTree_default, {})
|
|
42
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
43
|
+
className: "flex-1 flex flex-col min-w-0",
|
|
44
|
+
children: [/* @__PURE__ */ jsx(RemoteFileTabsBar, {}), /* @__PURE__ */ jsx("div", {
|
|
45
|
+
className: "flex-1 overflow-hidden p-3 pt-2",
|
|
46
|
+
children: /* @__PURE__ */ jsx(FileContentViewer, {
|
|
47
|
+
selectedFile: g.selectedFile,
|
|
48
|
+
content: g.fileContent,
|
|
49
|
+
isLoading: g.isContentLoading,
|
|
50
|
+
className: "h-full"
|
|
51
|
+
})
|
|
52
|
+
})]
|
|
53
|
+
})] }) : /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: "flex-1 flex items-center justify-center p-4",
|
|
55
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
56
|
+
className: "text-sm text-muted-foreground",
|
|
57
|
+
children: "Remote file explorer is not available for this workspace."
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
}), p[5] = g, p[6] = x);
|
|
61
|
+
let S;
|
|
62
|
+
return p[7] !== b || p[8] !== x ? (S = /* @__PURE__ */ jsxs("div", {
|
|
63
|
+
className: "border-l bg-background flex w-2/3 shrink-0 flex-col",
|
|
64
|
+
children: [b, x]
|
|
65
|
+
}), p[7] = b, p[8] = x, p[9] = S) : S = p[9], S;
|
|
66
|
+
}
|
|
67
|
+
export { WorkbenchFilesPanel };
|
|
@@ -4,85 +4,93 @@ import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
|
4
4
|
import { useNamespaceTree } from "../../../hooks/useNamespaceTree.js";
|
|
5
5
|
import WorkbenchNavigation_default from "../WorkbenchNavigation.js";
|
|
6
6
|
import PipelineHistoryList_default from "./PipelineHistoryList.js";
|
|
7
|
+
import { WorkbenchSecretsPanel } from "./WorkbenchSecretsPanel.js";
|
|
7
8
|
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { X } from "lucide-react";
|
|
10
11
|
var PANEL_TITLES = {
|
|
11
12
|
navigation: "Navigate",
|
|
12
|
-
history: "Run Log"
|
|
13
|
+
history: "Run Log",
|
|
14
|
+
secrets: "Secrets"
|
|
13
15
|
};
|
|
14
16
|
function NavigationContent() {
|
|
15
|
-
let e = c(3), { pipeline:
|
|
16
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
17
|
-
let
|
|
18
|
-
return e[1] ===
|
|
17
|
+
let e = c(3), { pipeline: p } = useWorkbenchLayout(), m;
|
|
18
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (m = { "--sidebar-width": "100%" }, e[0] = m) : m = e[0];
|
|
19
|
+
let h;
|
|
20
|
+
return e[1] === p.id ? h = e[2] : (h = /* @__PURE__ */ jsx(SidebarProvider, {
|
|
19
21
|
defaultOpen: !0,
|
|
20
22
|
className: "min-h-0",
|
|
21
|
-
style:
|
|
23
|
+
style: m,
|
|
22
24
|
children: /* @__PURE__ */ jsx("div", {
|
|
23
25
|
className: "w-full overflow-auto p-2",
|
|
24
|
-
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(NavigationContentInner, { pipelineId:
|
|
26
|
+
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(NavigationContentInner, { pipelineId: p.id }) })
|
|
25
27
|
})
|
|
26
|
-
}), e[1] =
|
|
28
|
+
}), e[1] = p.id, e[2] = h), h;
|
|
27
29
|
}
|
|
28
30
|
function NavigationContentInner(e) {
|
|
29
|
-
let
|
|
30
|
-
if (!
|
|
31
|
+
let u = c(3), { pipelineId: d } = e, f = useNamespaceTree(d);
|
|
32
|
+
if (!f || f.length === 0) {
|
|
31
33
|
let e;
|
|
32
|
-
return
|
|
34
|
+
return u[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
|
|
33
35
|
className: "text-muted-foreground py-4 text-center text-sm",
|
|
34
36
|
children: "No navigation items"
|
|
35
|
-
}),
|
|
37
|
+
}), u[0] = e) : e = u[0], e;
|
|
36
38
|
}
|
|
37
|
-
let
|
|
38
|
-
return
|
|
39
|
-
namespaceTree:
|
|
39
|
+
let h;
|
|
40
|
+
return u[1] === f ? h = u[2] : (h = /* @__PURE__ */ jsx(WorkbenchNavigation_default, {
|
|
41
|
+
namespaceTree: f,
|
|
40
42
|
indent: 0
|
|
41
|
-
}),
|
|
43
|
+
}), u[1] = f, u[2] = h), h;
|
|
42
44
|
}
|
|
43
45
|
function HistoryContent() {
|
|
44
|
-
let e = c(2), { pipeline:
|
|
45
|
-
return e[0] ===
|
|
46
|
+
let e = c(2), { pipeline: u } = useWorkbenchLayout(), d;
|
|
47
|
+
return e[0] === u ? d = e[1] : (d = /* @__PURE__ */ jsx("div", {
|
|
46
48
|
className: "overflow-auto p-2",
|
|
47
|
-
children: /* @__PURE__ */ jsx(PipelineHistoryList_default, { pipeline:
|
|
48
|
-
}), e[0] =
|
|
49
|
+
children: /* @__PURE__ */ jsx(PipelineHistoryList_default, { pipeline: u })
|
|
50
|
+
}), e[0] = u, e[1] = d), d;
|
|
49
51
|
}
|
|
50
52
|
function WorkbenchFloatingPanel() {
|
|
51
|
-
let
|
|
52
|
-
if (!
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
let
|
|
56
|
-
|
|
53
|
+
let u = c(22), { activeFloatingPanel: d, closeFloatingPanel: p } = useWorkbenchLayout();
|
|
54
|
+
if (!d) return null;
|
|
55
|
+
let m;
|
|
56
|
+
u[0] === Symbol.for("react.memo_cache_sentinel") ? (m = cn("border-l bg-background absolute right-0 top-0 bottom-0 z-20 flex w-80 flex-col shadow-lg", "animate-in slide-in-from-right duration-200"), u[0] = m) : m = u[0];
|
|
57
|
+
let h = PANEL_TITLES[d], g;
|
|
58
|
+
u[1] === h ? g = u[2] : (g = /* @__PURE__ */ jsx("span", {
|
|
57
59
|
className: "text-sm font-medium",
|
|
58
|
-
children:
|
|
59
|
-
}),
|
|
60
|
-
let g;
|
|
61
|
-
l[3] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), l[3] = g) : g = l[3];
|
|
60
|
+
children: h
|
|
61
|
+
}), u[1] = h, u[2] = g);
|
|
62
62
|
let _;
|
|
63
|
-
|
|
64
|
-
onClick: f,
|
|
65
|
-
className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
|
|
66
|
-
children: g
|
|
67
|
-
}), l[4] = f, l[5] = _);
|
|
63
|
+
u[3] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), u[3] = _) : _ = u[3];
|
|
68
64
|
let v;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
u[4] === p ? v = u[5] : (v = /* @__PURE__ */ jsx("button", {
|
|
66
|
+
onClick: p,
|
|
67
|
+
className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
|
|
68
|
+
children: _
|
|
69
|
+
}), u[4] = p, u[5] = v);
|
|
73
70
|
let y;
|
|
74
|
-
|
|
71
|
+
u[6] !== g || u[7] !== v ? (y = /* @__PURE__ */ jsxs("div", {
|
|
72
|
+
className: "border-b flex h-12 shrink-0 items-center justify-between px-3",
|
|
73
|
+
children: [g, v]
|
|
74
|
+
}), u[6] = g, u[7] = v, u[8] = y) : y = u[8];
|
|
75
75
|
let b;
|
|
76
|
-
|
|
76
|
+
u[9] === d ? b = u[10] : (b = d === "navigation" && /* @__PURE__ */ jsx(NavigationContent, {}), u[9] = d, u[10] = b);
|
|
77
77
|
let x;
|
|
78
|
-
|
|
79
|
-
className: "flex-1 overflow-hidden",
|
|
80
|
-
children: [y, b]
|
|
81
|
-
}), l[13] = y, l[14] = b, l[15] = x) : x = l[15];
|
|
78
|
+
u[11] === d ? x = u[12] : (x = d === "history" && /* @__PURE__ */ jsx(HistoryContent, {}), u[11] = d, u[12] = x);
|
|
82
79
|
let S;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
u[13] === d ? S = u[14] : (S = d === "secrets" && /* @__PURE__ */ jsx(WorkbenchSecretsPanel, {}), u[13] = d, u[14] = S);
|
|
81
|
+
let C;
|
|
82
|
+
u[15] !== b || u[16] !== x || u[17] !== S ? (C = /* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: "flex-1 overflow-hidden",
|
|
84
|
+
children: [
|
|
85
|
+
b,
|
|
86
|
+
x,
|
|
87
|
+
S
|
|
88
|
+
]
|
|
89
|
+
}), u[15] = b, u[16] = x, u[17] = S, u[18] = C) : C = u[18];
|
|
90
|
+
let w;
|
|
91
|
+
return u[19] !== y || u[20] !== C ? (w = /* @__PURE__ */ jsxs("div", {
|
|
92
|
+
className: m,
|
|
93
|
+
children: [y, C]
|
|
94
|
+
}), u[19] = y, u[20] = C, u[21] = w) : w = u[21], w;
|
|
87
95
|
}
|
|
88
96
|
export { WorkbenchFloatingPanel };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { usePipeline, usePipelineConfigByName } from "../../../hooks/usePipelines.js";
|
|
2
2
|
import { useWorkspace } from "../../../hooks/useWorkspaces.js";
|
|
3
|
-
import { ReactFlowProvider } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
4
3
|
import { useFetchWorkflowsByPipeline } from "../../../hooks/useWorkflows.js";
|
|
4
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
5
|
+
import { ReactFlowProvider } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
5
6
|
import PipelineFlowViewer_default from "../../debug/components/PipelineFlowViewer.js";
|
|
6
7
|
import "../../debug/index.js";
|
|
7
|
-
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { useMemo } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|