@loopstack/loopstack-studio 0.33.0 → 0.34.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 +4 -1
- package/dist/app/EnvironmentEmbedRoot.js +22 -24
- package/dist/components/messages/CompletionMessagePaper.js +25 -29
- package/dist/events/sse-client-events.js +2 -0
- package/dist/features/dashboard/AppLauncher.js +111 -64
- package/dist/features/documents/DocumentRenderer.js +42 -42
- package/dist/features/feature-registry/FeatureRegistryProvider.js +15 -17
- package/dist/features/feature-registry/available-features.js +3 -2
- package/dist/features/feature-registry/index.js +1 -1
- package/dist/features/file-explorer/api/files.js +8 -3
- package/dist/features/file-explorer/components/FileExplorerPanel.js +64 -43
- package/dist/features/file-explorer/file-explorer-feature.js +15 -7
- package/dist/features/file-explorer/hooks/useFileExplorer.js +31 -29
- package/dist/features/file-explorer/index.js +1 -1
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +77 -77
- package/dist/features/git/components/WorkbenchGitPanel.js +1 -1
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/workbench/Workbench.js +16 -16
- package/dist/features/workbench/components/NewRunDialog.js +1 -1
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/index.js +1 -1
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/hooks/useSecrets.js +9 -45
- package/dist/index.d.ts +27 -13
- package/dist/index.js +6 -6
- package/dist/loopstack-studio.css +1 -1
- package/dist/pages/EmbedWorkbenchPage.js +46 -40
- package/dist/pages/WorkbenchPage.js +50 -45
- package/dist/pages/WorkspacePage.js +39 -25
- package/dist/pages/WorkspaceRunsPage.js +34 -26
- package/dist/providers/InvalidationEventsProvider.js +22 -20
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FileContentViewer } from "../../code-explorer/components/FileContentViewer.js";
|
|
2
2
|
import "../../code-explorer/index.js";
|
|
3
|
+
import { useFeatureConfig } from "../../feature-registry/FeatureRegistryProvider.js";
|
|
4
|
+
import "../../feature-registry/index.js";
|
|
3
5
|
import { useWorkbenchLayout } from "../../workbench/providers/WorkbenchLayoutProvider.js";
|
|
4
|
-
import "../../workbench/index.js";
|
|
5
6
|
import { SidebarPanel } from "../../workbench/components/SidebarPanel.js";
|
|
7
|
+
import "../../workbench/index.js";
|
|
6
8
|
import { FileExplorerProvider, useOptionalFileExplorer } from "../providers/FileExplorerProvider.js";
|
|
7
9
|
import { FileTabsBar } from "./FileTabsBar.js";
|
|
8
10
|
import { FileTree } from "./FileTree.js";
|
|
9
|
-
import { useFeatureConfig } from "../../feature-registry/FeatureRegistryProvider.js";
|
|
10
|
-
import "../../feature-registry/index.js";
|
|
11
11
|
import { c } from "react/compiler-runtime";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Files } from "lucide-react";
|
|
@@ -28,14 +28,14 @@ function FileExplorerContent() {
|
|
|
28
28
|
className: "w-52 shrink-0 overflow-auto border-r bg-muted/40",
|
|
29
29
|
children: /* @__PURE__ */ jsx(FileTree, {})
|
|
30
30
|
}), i[1] = o) : o = i[1];
|
|
31
|
-
let
|
|
32
|
-
i[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
31
|
+
let s;
|
|
32
|
+
i[2] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ jsx(FileTabsBar, {}), i[2] = s) : s = i[2];
|
|
33
33
|
let p;
|
|
34
34
|
return i[3] !== a.fileContent || i[4] !== a.isContentLoading || i[5] !== a.selectedFile ? (p = /* @__PURE__ */ jsxs("div", {
|
|
35
35
|
className: "flex h-full",
|
|
36
36
|
children: [o, /* @__PURE__ */ jsxs("div", {
|
|
37
37
|
className: "flex min-w-0 flex-1 flex-col",
|
|
38
|
-
children: [
|
|
38
|
+
children: [s, /* @__PURE__ */ jsx("div", {
|
|
39
39
|
className: "flex-1 overflow-hidden p-3 pt-2",
|
|
40
40
|
children: /* @__PURE__ */ jsx(FileContentViewer, {
|
|
41
41
|
selectedFile: a.selectedFile,
|
|
@@ -48,52 +48,73 @@ function FileExplorerContent() {
|
|
|
48
48
|
}), i[3] = a.fileContent, i[4] = a.isContentLoading, i[5] = a.selectedFile, i[6] = p) : p = i[6], p;
|
|
49
49
|
}
|
|
50
50
|
function FileExplorerPanel(e) {
|
|
51
|
-
let
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
let
|
|
56
|
-
if (!
|
|
51
|
+
let l = c(26), { variant: u, featureId: d, title: f, description: m, workspaceId: h } = e, { closePanel: g, panelSize: _, setPanelSize: v, environments: y } = useWorkbenchLayout(), b = useFeatureConfig(d), x;
|
|
52
|
+
l[0] === b?.config?.environments ? x = l[1] : (x = b?.config?.environments ?? [], l[0] = b?.config?.environments, l[1] = x);
|
|
53
|
+
let S = x, C = y?.[0]?.slotId ?? "", w;
|
|
54
|
+
l[2] !== S || l[3] !== C ? (w = S.length === 0 || S.includes(C), l[2] = S, l[3] = C, l[4] = w) : w = l[4];
|
|
55
|
+
let T = w;
|
|
56
|
+
if (!T) {
|
|
57
57
|
let e;
|
|
58
|
-
|
|
58
|
+
l[5] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(Files, { className: "h-4 w-4" }), l[5] = e) : e = l[5];
|
|
59
59
|
let i;
|
|
60
|
-
|
|
60
|
+
l[6] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ jsx("div", {
|
|
61
61
|
className: "flex flex-1 items-center justify-center p-4",
|
|
62
62
|
children: /* @__PURE__ */ jsx("p", {
|
|
63
63
|
className: "text-muted-foreground text-sm",
|
|
64
64
|
children: "File explorer is not available for this environment."
|
|
65
65
|
})
|
|
66
|
-
}),
|
|
67
|
-
let
|
|
68
|
-
return
|
|
66
|
+
}), l[6] = i) : i = l[6];
|
|
67
|
+
let a;
|
|
68
|
+
return l[7] !== g || l[8] !== m || l[9] !== _ || l[10] !== v || l[11] !== f ? (a = /* @__PURE__ */ jsx(SidebarPanel, {
|
|
69
69
|
icon: e,
|
|
70
|
-
title:
|
|
71
|
-
description:
|
|
72
|
-
size:
|
|
73
|
-
onSizeChange:
|
|
74
|
-
onClose:
|
|
70
|
+
title: f,
|
|
71
|
+
description: m,
|
|
72
|
+
size: _,
|
|
73
|
+
onSizeChange: v,
|
|
74
|
+
onClose: g,
|
|
75
75
|
children: i
|
|
76
|
-
}),
|
|
76
|
+
}), l[7] = g, l[8] = m, l[9] = _, l[10] = v, l[11] = f, l[12] = a) : a = l[12], a;
|
|
77
77
|
}
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
let
|
|
81
|
-
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
78
|
+
let E;
|
|
79
|
+
l[13] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ jsx(Files, { className: "h-4 w-4" }), l[13] = E) : E = l[13];
|
|
80
|
+
let D;
|
|
81
|
+
l[14] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsx(FileExplorerContent, {}), l[14] = D) : D = l[14];
|
|
82
|
+
let O;
|
|
83
|
+
l[15] !== T || l[16] !== u || l[17] !== h ? (O = /* @__PURE__ */ jsx(FileExplorerProvider, {
|
|
84
|
+
variant: u,
|
|
85
|
+
workspaceId: h,
|
|
86
|
+
enabled: T,
|
|
87
|
+
children: D
|
|
88
|
+
}), l[15] = T, l[16] = u, l[17] = h, l[18] = O) : O = l[18];
|
|
89
|
+
let k;
|
|
90
|
+
return l[19] !== g || l[20] !== m || l[21] !== _ || l[22] !== v || l[23] !== O || l[24] !== f ? (k = /* @__PURE__ */ jsx(SidebarPanel, {
|
|
91
|
+
icon: E,
|
|
92
|
+
title: f,
|
|
93
|
+
description: m,
|
|
94
|
+
size: _,
|
|
95
|
+
onSizeChange: v,
|
|
96
|
+
onClose: g,
|
|
97
|
+
children: O
|
|
98
|
+
}), l[19] = g, l[20] = m, l[21] = _, l[22] = v, l[23] = O, l[24] = f, l[25] = k) : k = l[25], k;
|
|
99
|
+
}
|
|
100
|
+
function LocalFileExplorerPanel(e) {
|
|
101
|
+
let i = c(2), { workspaceId: a } = e, o;
|
|
102
|
+
return i[0] === a ? o = i[1] : (o = /* @__PURE__ */ jsx(FileExplorerPanel, {
|
|
103
|
+
variant: "local",
|
|
104
|
+
featureId: "localFileExplorer",
|
|
91
105
|
title: "Files",
|
|
92
|
-
description: "Browse and view files.",
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
description: "Browse and view local project files.",
|
|
107
|
+
workspaceId: a
|
|
108
|
+
}), i[0] = a, i[1] = o), o;
|
|
109
|
+
}
|
|
110
|
+
function RemoteFileExplorerPanel(e) {
|
|
111
|
+
let i = c(2), { workspaceId: a } = e, o;
|
|
112
|
+
return i[0] === a ? o = i[1] : (o = /* @__PURE__ */ jsx(FileExplorerPanel, {
|
|
113
|
+
variant: "remote",
|
|
114
|
+
featureId: "remoteFileExplorer",
|
|
115
|
+
title: "Remote Files",
|
|
116
|
+
description: "Browse and view files on the remote workspace.",
|
|
117
|
+
workspaceId: a
|
|
118
|
+
}), i[0] = a, i[1] = o), o;
|
|
98
119
|
}
|
|
99
|
-
export {
|
|
120
|
+
export { LocalFileExplorerPanel, RemoteFileExplorerPanel };
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Files } from "lucide-react";
|
|
3
|
-
const
|
|
4
|
-
id: "file-explorer",
|
|
1
|
+
import { LocalFileExplorerPanel, RemoteFileExplorerPanel } from "./components/FileExplorerPanel.js";
|
|
2
|
+
import { Cloud, Files } from "lucide-react";
|
|
3
|
+
const localFileExplorerFeature = {
|
|
4
|
+
id: "local-file-explorer",
|
|
5
5
|
sidebarPanel: {
|
|
6
|
-
id: "files",
|
|
6
|
+
id: "local-files",
|
|
7
7
|
label: "Files",
|
|
8
8
|
icon: Files,
|
|
9
|
-
component:
|
|
9
|
+
component: LocalFileExplorerPanel
|
|
10
|
+
}
|
|
11
|
+
}, remoteFileExplorerFeature = {
|
|
12
|
+
id: "remote-file-explorer",
|
|
13
|
+
sidebarPanel: {
|
|
14
|
+
id: "remote-files",
|
|
15
|
+
label: "Remote Files",
|
|
16
|
+
icon: Cloud,
|
|
17
|
+
component: RemoteFileExplorerPanel
|
|
10
18
|
}
|
|
11
19
|
};
|
|
12
|
-
export {
|
|
20
|
+
export { localFileExplorerFeature, remoteFileExplorerFeature };
|
|
@@ -1,44 +1,46 @@
|
|
|
1
1
|
import { useApiClient } from "../../../hooks/useApi.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
|
-
function useFileTree(r, i) {
|
|
5
|
-
let a = c(10), o = i === void 0 ? !0 : i, { envKey: s, api: l } = useApiClient(), u;
|
|
6
|
-
a[0] !== s || a[1] !== r ? (u = [
|
|
7
|
-
"file-explorer-tree",
|
|
8
|
-
s,
|
|
9
|
-
r
|
|
10
|
-
], a[0] = s, a[1] = r, a[2] = u) : u = a[2];
|
|
11
|
-
let d;
|
|
12
|
-
a[3] !== l || a[4] !== r ? (d = () => l.files.getTree({ workspaceId: r }), a[3] = l, a[4] = r, a[5] = d) : d = a[5];
|
|
13
|
-
let f = !!r && o, p;
|
|
14
|
-
return a[6] !== u || a[7] !== d || a[8] !== f ? (p = {
|
|
15
|
-
queryKey: u,
|
|
16
|
-
queryFn: d,
|
|
17
|
-
enabled: f,
|
|
18
|
-
staleTime: 3e4,
|
|
19
|
-
retry: !1
|
|
20
|
-
}, a[6] = u, a[7] = d, a[8] = f, a[9] = p) : p = a[9], useQuery(p);
|
|
21
|
-
}
|
|
22
|
-
function useFileContent(r, i, a) {
|
|
4
|
+
function useFileTree(r, i, a) {
|
|
23
5
|
let o = c(12), s = a === void 0 ? !0 : a, { envKey: l, api: u } = useApiClient(), d;
|
|
24
|
-
o[0] !== l || o[1] !==
|
|
25
|
-
"file-explorer-
|
|
26
|
-
l,
|
|
6
|
+
o[0] !== l || o[1] !== r || o[2] !== i ? (d = [
|
|
7
|
+
"file-explorer-tree",
|
|
27
8
|
r,
|
|
9
|
+
l,
|
|
28
10
|
i
|
|
29
|
-
], o[0] = l, o[1] =
|
|
11
|
+
], o[0] = l, o[1] = r, o[2] = i, o[3] = d) : d = o[3];
|
|
30
12
|
let f;
|
|
31
|
-
o[4] !== u || o[5] !==
|
|
32
|
-
|
|
33
|
-
path: i
|
|
34
|
-
}), o[4] = u, o[5] = i, o[6] = r, o[7] = f) : f = o[7];
|
|
35
|
-
let p = !!r && !!i && s, m;
|
|
13
|
+
o[4] !== u || o[5] !== r || o[6] !== i ? (f = () => u.files[r].getTree({ workspaceId: i }), o[4] = u, o[5] = r, o[6] = i, o[7] = f) : f = o[7];
|
|
14
|
+
let p = !!i && s, m;
|
|
36
15
|
return o[8] !== d || o[9] !== f || o[10] !== p ? (m = {
|
|
37
16
|
queryKey: d,
|
|
38
17
|
queryFn: f,
|
|
39
18
|
enabled: p,
|
|
40
|
-
staleTime:
|
|
19
|
+
staleTime: 3e4,
|
|
41
20
|
retry: !1
|
|
42
21
|
}, o[8] = d, o[9] = f, o[10] = p, o[11] = m) : m = o[11], useQuery(m);
|
|
43
22
|
}
|
|
23
|
+
function useFileContent(r, i, a, o) {
|
|
24
|
+
let s = c(14), l = o === void 0 ? !0 : o, { envKey: u, api: d } = useApiClient(), f;
|
|
25
|
+
s[0] !== u || s[1] !== a || s[2] !== r || s[3] !== i ? (f = [
|
|
26
|
+
"file-explorer-content",
|
|
27
|
+
r,
|
|
28
|
+
u,
|
|
29
|
+
i,
|
|
30
|
+
a
|
|
31
|
+
], s[0] = u, s[1] = a, s[2] = r, s[3] = i, s[4] = f) : f = s[4];
|
|
32
|
+
let p;
|
|
33
|
+
s[5] !== d || s[6] !== a || s[7] !== r || s[8] !== i ? (p = () => d.files[r].readFile({
|
|
34
|
+
workspaceId: i,
|
|
35
|
+
path: a
|
|
36
|
+
}), s[5] = d, s[6] = a, s[7] = r, s[8] = i, s[9] = p) : p = s[9];
|
|
37
|
+
let m = !!i && !!a && l, h;
|
|
38
|
+
return s[10] !== f || s[11] !== p || s[12] !== m ? (h = {
|
|
39
|
+
queryKey: f,
|
|
40
|
+
queryFn: p,
|
|
41
|
+
enabled: m,
|
|
42
|
+
staleTime: 15e3,
|
|
43
|
+
retry: !1
|
|
44
|
+
}, s[10] = f, s[11] = p, s[12] = m, s[13] = h) : h = s[13], useQuery(h);
|
|
45
|
+
}
|
|
44
46
|
export { useFileContent, useFileTree };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FileExplorerProvider, useFileExplorer, useOptionalFileExplorer } from "./providers/FileExplorerProvider.js";
|
|
2
|
-
import {
|
|
2
|
+
import { localFileExplorerFeature, remoteFileExplorerFeature } from "./file-explorer-feature.js";
|
|
@@ -5,101 +5,101 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
var FileExplorerContext = createContext(null);
|
|
7
7
|
function FileExplorerProvider(s) {
|
|
8
|
-
let l = c(36), {
|
|
9
|
-
l[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
10
|
-
let [
|
|
11
|
-
l[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
12
|
-
let [
|
|
13
|
-
l[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
14
|
-
|
|
8
|
+
let l = c(36), { variant: u, workspaceId: d, enabled: f, children: p } = s, m = f === void 0 ? !0 : f, h = useQueryClient(), g;
|
|
9
|
+
l[0] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ new Set(), l[0] = g) : g = l[0];
|
|
10
|
+
let [_, v] = useState(g), y;
|
|
11
|
+
l[1] === Symbol.for("react.memo_cache_sentinel") ? (y = [], l[1] = y) : y = l[1];
|
|
12
|
+
let [b, x] = useState(y), [S, C] = useState(null), w = useFileTree(u, d, m), T = useFileContent(u, d, S?.type === "file" ? S.path : void 0, m), E;
|
|
13
|
+
l[2] === Symbol.for("react.memo_cache_sentinel") ? (E = (e) => {
|
|
14
|
+
v((a) => {
|
|
15
15
|
let o = new Set(a);
|
|
16
16
|
return o.has(e) ? o.delete(e) : o.add(e), o;
|
|
17
17
|
});
|
|
18
|
-
}, l[2] =
|
|
19
|
-
let
|
|
20
|
-
l[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
21
|
-
e.type === "file" && (
|
|
22
|
-
}, l[3] =
|
|
23
|
-
let
|
|
24
|
-
l[4] ===
|
|
25
|
-
|
|
18
|
+
}, l[2] = E) : E = l[2];
|
|
19
|
+
let D = E, O;
|
|
20
|
+
l[3] === Symbol.for("react.memo_cache_sentinel") ? (O = (e) => {
|
|
21
|
+
e.type === "file" && (C(e), x((a) => a.some((a) => a.path === e.path) ? a : [...a, e]));
|
|
22
|
+
}, l[3] = O) : O = l[3];
|
|
23
|
+
let k = O, A;
|
|
24
|
+
l[4] === S?.path ? A = l[5] : (A = (e) => {
|
|
25
|
+
x((a) => {
|
|
26
26
|
let o = a.filter((a) => a.path !== e.path);
|
|
27
|
-
if (
|
|
27
|
+
if (S?.path === e.path) if (o.length > 0) {
|
|
28
28
|
let s = a.findIndex((a) => a.path === e.path);
|
|
29
|
-
|
|
30
|
-
} else
|
|
29
|
+
C(o[Math.max(0, s - 1)]);
|
|
30
|
+
} else C(null);
|
|
31
31
|
return o;
|
|
32
32
|
});
|
|
33
|
-
}, l[4] =
|
|
34
|
-
let
|
|
35
|
-
l[6] ===
|
|
36
|
-
|
|
37
|
-
let a = e.filter((e) => e.path !==
|
|
33
|
+
}, l[4] = S?.path, l[5] = A);
|
|
34
|
+
let j = A, M;
|
|
35
|
+
l[6] === S ? M = l[7] : (M = () => {
|
|
36
|
+
S && x((e) => {
|
|
37
|
+
let a = e.filter((e) => e.path !== S.path);
|
|
38
38
|
if (a.length > 0) {
|
|
39
|
-
let o = e.findIndex((e) => e.path ===
|
|
40
|
-
|
|
41
|
-
} else
|
|
39
|
+
let o = e.findIndex((e) => e.path === S.path);
|
|
40
|
+
C(a[Math.max(0, o - 1)]);
|
|
41
|
+
} else C(null);
|
|
42
42
|
return a;
|
|
43
43
|
});
|
|
44
|
-
}, l[6] =
|
|
45
|
-
let
|
|
46
|
-
l[8] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
47
|
-
|
|
48
|
-
}, l[8] =
|
|
49
|
-
let
|
|
50
|
-
l[9] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
51
|
-
|
|
52
|
-
}, l[9] =
|
|
53
|
-
let
|
|
54
|
-
l[10] ===
|
|
55
|
-
|
|
44
|
+
}, l[6] = S, l[7] = M);
|
|
45
|
+
let N = M, P;
|
|
46
|
+
l[8] === Symbol.for("react.memo_cache_sentinel") ? (P = () => {
|
|
47
|
+
x([]), C(null);
|
|
48
|
+
}, l[8] = P) : P = l[8];
|
|
49
|
+
let F = P, I;
|
|
50
|
+
l[9] === Symbol.for("react.memo_cache_sentinel") ? (I = (e) => {
|
|
51
|
+
x([e]), C(e);
|
|
52
|
+
}, l[9] = I) : I = l[9];
|
|
53
|
+
let L = I, R;
|
|
54
|
+
l[10] === S ? R = l[11] : (R = (e) => {
|
|
55
|
+
x((a) => {
|
|
56
56
|
let o = a.findIndex((a) => a.path === e.path);
|
|
57
57
|
if (o <= 0) return a;
|
|
58
58
|
let s = a.slice(o);
|
|
59
|
-
return
|
|
59
|
+
return S && a.findIndex((e) => e.path === S.path) < o && C(e), s;
|
|
60
60
|
});
|
|
61
|
-
}, l[10] =
|
|
62
|
-
let
|
|
63
|
-
l[12] ===
|
|
64
|
-
|
|
61
|
+
}, l[10] = S, l[11] = R);
|
|
62
|
+
let z = R, B;
|
|
63
|
+
l[12] === S ? B = l[13] : (B = (e) => {
|
|
64
|
+
x((a) => {
|
|
65
65
|
let o = a.findIndex((a) => a.path === e.path);
|
|
66
66
|
if (o < 0 || o >= a.length - 1) return a;
|
|
67
67
|
let s = a.slice(0, o + 1);
|
|
68
|
-
return
|
|
68
|
+
return S && a.findIndex((e) => e.path === S.path) > o && C(e), s;
|
|
69
69
|
});
|
|
70
|
-
}, l[12] =
|
|
71
|
-
let
|
|
72
|
-
l[14] ===
|
|
73
|
-
|
|
74
|
-
}, l[14] =
|
|
75
|
-
let
|
|
76
|
-
l[16] ===
|
|
77
|
-
let
|
|
78
|
-
l[18] !==
|
|
79
|
-
nodes:
|
|
80
|
-
isTreeLoading:
|
|
81
|
-
treeError:
|
|
82
|
-
isFetchingTree:
|
|
83
|
-
openFiles:
|
|
84
|
-
selectedFile:
|
|
85
|
-
fileContent:
|
|
86
|
-
isContentLoading:
|
|
87
|
-
expandedFolders:
|
|
88
|
-
toggleFolder:
|
|
89
|
-
selectFile:
|
|
90
|
-
closeFile:
|
|
91
|
-
closeAll:
|
|
92
|
-
closeOthers:
|
|
93
|
-
closeToLeft:
|
|
94
|
-
closeToRight:
|
|
95
|
-
clearSelection:
|
|
96
|
-
refreshTree:
|
|
97
|
-
}, l[18] =
|
|
98
|
-
let
|
|
99
|
-
return l[33] !==
|
|
100
|
-
value:
|
|
101
|
-
children:
|
|
102
|
-
}), l[33] =
|
|
70
|
+
}, l[12] = S, l[13] = B);
|
|
71
|
+
let V = B, H;
|
|
72
|
+
l[14] === h ? H = l[15] : (H = () => {
|
|
73
|
+
h.invalidateQueries({ queryKey: ["file-explorer-tree"] });
|
|
74
|
+
}, l[14] = h, l[15] = H);
|
|
75
|
+
let U = H, W;
|
|
76
|
+
l[16] === w.data ? W = l[17] : (W = w.data ?? [], l[16] = w.data, l[17] = W);
|
|
77
|
+
let G = w.isLoading && !w.data, K = T.data?.content ?? null, q = T.isLoading && !!S, J;
|
|
78
|
+
l[18] !== N || l[19] !== j || l[20] !== z || l[21] !== V || l[22] !== _ || l[23] !== b || l[24] !== U || l[25] !== S || l[26] !== W || l[27] !== G || l[28] !== K || l[29] !== q || l[30] !== w.error || l[31] !== w.isFetching ? (J = {
|
|
79
|
+
nodes: W,
|
|
80
|
+
isTreeLoading: G,
|
|
81
|
+
treeError: w.error,
|
|
82
|
+
isFetchingTree: w.isFetching,
|
|
83
|
+
openFiles: b,
|
|
84
|
+
selectedFile: S,
|
|
85
|
+
fileContent: K,
|
|
86
|
+
isContentLoading: q,
|
|
87
|
+
expandedFolders: _,
|
|
88
|
+
toggleFolder: D,
|
|
89
|
+
selectFile: k,
|
|
90
|
+
closeFile: j,
|
|
91
|
+
closeAll: F,
|
|
92
|
+
closeOthers: L,
|
|
93
|
+
closeToLeft: z,
|
|
94
|
+
closeToRight: V,
|
|
95
|
+
clearSelection: N,
|
|
96
|
+
refreshTree: U
|
|
97
|
+
}, l[18] = N, l[19] = j, l[20] = z, l[21] = V, l[22] = _, l[23] = b, l[24] = U, l[25] = S, l[26] = W, l[27] = G, l[28] = K, l[29] = q, l[30] = w.error, l[31] = w.isFetching, l[32] = J) : J = l[32];
|
|
98
|
+
let Y = J, X;
|
|
99
|
+
return l[33] !== p || l[34] !== Y ? (X = /* @__PURE__ */ jsx(FileExplorerContext.Provider, {
|
|
100
|
+
value: Y,
|
|
101
|
+
children: p
|
|
102
|
+
}), l[33] = p, l[34] = Y, l[35] = X) : X = l[35], X;
|
|
103
103
|
}
|
|
104
104
|
function useFileExplorer() {
|
|
105
105
|
let e = useContext(FileExplorerContext);
|
|
@@ -2,8 +2,8 @@ import { useStudio } from "../../../providers/StudioProvider.js";
|
|
|
2
2
|
import { useCreateWorkflow } from "../../../hooks/useWorkflows.js";
|
|
3
3
|
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
4
4
|
import { useWorkbenchLayout } from "../../workbench/providers/WorkbenchLayoutProvider.js";
|
|
5
|
-
import "../../workbench/index.js";
|
|
6
5
|
import { SidebarPanel } from "../../workbench/components/SidebarPanel.js";
|
|
6
|
+
import "../../workbench/index.js";
|
|
7
7
|
import { useGitInvalidation, useGitLog, useGitRemote, useGitStatus, useRemoveGitRemote } from "../hooks/useGit.js";
|
|
8
8
|
import { GitBranchBadge } from "./GitBranchBadge.js";
|
|
9
9
|
import { GitCommitList } from "./GitCommitList.js";
|
|
@@ -2,8 +2,8 @@ import { Button } from "../../../components/ui/button.js";
|
|
|
2
2
|
import { Input } from "../../../components/ui/input.js";
|
|
3
3
|
import { Label } from "../../../components/ui/label.js";
|
|
4
4
|
import { useWorkbenchLayout } from "../../workbench/providers/WorkbenchLayoutProvider.js";
|
|
5
|
-
import "../../workbench/index.js";
|
|
6
5
|
import { SidebarPanel } from "../../workbench/components/SidebarPanel.js";
|
|
6
|
+
import "../../workbench/index.js";
|
|
7
7
|
import { useCreateSecret, useDeleteSecret, useUpdateSecret, useWorkspaceSecrets } from "../../../hooks/useSecrets.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { useState } from "react";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import PageBreadcrumbs_default from "../../components/page/PageBreadcrumbs.js";
|
|
2
2
|
import WorkflowList_default from "./WorkflowList.js";
|
|
3
|
-
import { ScrollProvider } from "./providers/ScrollProvider.js";
|
|
4
3
|
import { WorkbenchLayoutProvider } from "./providers/WorkbenchLayoutProvider.js";
|
|
5
4
|
import { WorkbenchSidebarShell } from "./components/WorkbenchSidebarShell.js";
|
|
5
|
+
import { ScrollProvider } from "./providers/ScrollProvider.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
function WorkbenchContent(
|
|
9
|
-
let
|
|
10
|
-
|
|
8
|
+
function WorkbenchContent(i) {
|
|
9
|
+
let a = c(7), { workflow: l, breadcrumbData: u } = i, d;
|
|
10
|
+
a[0] === u ? d = a[1] : (d = /* @__PURE__ */ jsx("div", {
|
|
11
11
|
className: "border-b flex h-12 shrink-0 items-center",
|
|
12
12
|
children: u ? /* @__PURE__ */ jsx(PageBreadcrumbs_default, { breadcrumbData: u }) : /* @__PURE__ */ jsx("span", {
|
|
13
13
|
className: "px-3 text-sm font-medium",
|
|
14
14
|
children: "Workflows"
|
|
15
15
|
})
|
|
16
|
-
}),
|
|
16
|
+
}), a[0] = u, a[1] = d);
|
|
17
17
|
let f;
|
|
18
|
-
|
|
18
|
+
a[2] === l ? f = a[3] : (f = /* @__PURE__ */ jsx(ScrollProvider, { children: /* @__PURE__ */ jsx("div", {
|
|
19
19
|
className: "flex-1 overflow-auto",
|
|
20
20
|
children: /* @__PURE__ */ jsx(WorkflowList_default, { workflow: l })
|
|
21
|
-
}) }),
|
|
21
|
+
}) }), a[2] = l, a[3] = f);
|
|
22
22
|
let p;
|
|
23
|
-
return
|
|
23
|
+
return a[4] !== d || a[5] !== f ? (p = /* @__PURE__ */ jsx("div", {
|
|
24
24
|
className: "flex h-full flex-col",
|
|
25
25
|
children: /* @__PURE__ */ jsx("div", {
|
|
26
26
|
className: "flex flex-1 gap-4 overflow-hidden md:flex-row flex-col",
|
|
@@ -29,21 +29,21 @@ function WorkbenchContent(a) {
|
|
|
29
29
|
children: [d, f]
|
|
30
30
|
})
|
|
31
31
|
})
|
|
32
|
-
}),
|
|
32
|
+
}), a[4] = d, a[5] = f, a[6] = p) : p = a[6], p;
|
|
33
33
|
}
|
|
34
34
|
function Workbench(e) {
|
|
35
|
-
let r = c(9), { workflow:
|
|
36
|
-
r[0] !== s || r[1] !==
|
|
37
|
-
workflow:
|
|
35
|
+
let r = c(9), { workflow: o, breadcrumbData: s, getPreviewUrl: u, getEnvironmentPreviewUrl: d } = e, f = o?.workspaceId, p;
|
|
36
|
+
r[0] !== s || r[1] !== o ? (p = /* @__PURE__ */ jsx(WorkbenchSidebarShell, { children: /* @__PURE__ */ jsx(WorkbenchContent, {
|
|
37
|
+
workflow: o,
|
|
38
38
|
breadcrumbData: s
|
|
39
|
-
}) }), r[0] = s, r[1] =
|
|
39
|
+
}) }), r[0] = s, r[1] = o, r[2] = p) : p = r[2];
|
|
40
40
|
let m;
|
|
41
|
-
return r[3] !== d || r[4] !== u || r[5] !== p || r[6] !==
|
|
41
|
+
return r[3] !== d || r[4] !== u || r[5] !== p || r[6] !== o || r[7] !== f ? (m = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
42
42
|
workspaceId: f,
|
|
43
|
-
workflow:
|
|
43
|
+
workflow: o,
|
|
44
44
|
getPreviewUrl: u,
|
|
45
45
|
getEnvironmentPreviewUrl: d,
|
|
46
46
|
children: p
|
|
47
|
-
}), r[3] = d, r[4] = u, r[5] = p, r[6] =
|
|
47
|
+
}), r[3] = d, r[4] = u, r[5] = p, r[6] = o, r[7] = f, r[8] = m) : m = r[8], m;
|
|
48
48
|
}
|
|
49
49
|
export { Workbench as default };
|
|
@@ -6,9 +6,9 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../co
|
|
|
6
6
|
import { Dialog, DialogContent, DialogTitle } from "../../../components/ui/dialog.js";
|
|
7
7
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select.js";
|
|
8
8
|
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
9
|
-
import CreateWorkspace_default from "../../workspaces/components/CreateWorkspace.js";
|
|
10
9
|
import { useStartWorkflow } from "../../../hooks/useProcessor.js";
|
|
11
10
|
import Form_default from "../../../components/dynamic-form/Form.js";
|
|
11
|
+
import CreateWorkspace_default from "../../workspaces/components/CreateWorkspace.js";
|
|
12
12
|
import "../../workspaces/index.js";
|
|
13
13
|
import { c } from "react/compiler-runtime";
|
|
14
14
|
import { useEffect, useMemo, useState } from "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.js";
|
|
2
2
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip.js";
|
|
3
|
-
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
3
|
import { useFeatureRegistry } from "../../feature-registry/FeatureRegistryProvider.js";
|
|
5
4
|
import "../../feature-registry/index.js";
|
|
5
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { MonitorPlay, Play, Server } from "lucide-react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
2
1
|
import { useFeatureRegistry } from "../../feature-registry/FeatureRegistryProvider.js";
|
|
3
2
|
import "../../feature-registry/index.js";
|
|
3
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
4
|
import { WorkbenchEnvironmentPanel } from "./WorkbenchEnvironmentPanel.js";
|
|
5
5
|
import { WorkbenchIconSidebar } from "./WorkbenchIconSidebar.js";
|
|
6
6
|
import { WorkbenchPreviewPanel } from "./WorkbenchPreviewPanel.js";
|
|
@@ -49,8 +49,8 @@ function ActivePanelContent() {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function SidebarContent(
|
|
53
|
-
let i = c(12), { children: o } =
|
|
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
54
|
i[0] !== o || i[1] !== m ? (h = /* @__PURE__ */ jsx("div", {
|
|
55
55
|
className: m,
|
|
56
56
|
children: o
|
|
@@ -3,10 +3,10 @@ import WorkflowHistoryList_default from "./components/WorkflowHistoryList.js";
|
|
|
3
3
|
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
4
4
|
import WorkflowList_default from "./WorkflowList.js";
|
|
5
5
|
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
6
|
+
import { WorkbenchSidebarShell } from "./components/WorkbenchSidebarShell.js";
|
|
6
7
|
import Workbench from "./Workbench.js";
|
|
7
8
|
import { NewRunDialog } from "./components/NewRunDialog.js";
|
|
8
9
|
import "./hooks/useEmbedBridge.js";
|
|
9
10
|
import "./components/PreviewWorkbench.js";
|
|
10
11
|
import { RecentRunItem } from "./components/RecentRunItem.js";
|
|
11
12
|
import "./components/PreviewEmptyState.js";
|
|
12
|
-
import { WorkbenchSidebarShell } from "./components/WorkbenchSidebarShell.js";
|
|
@@ -6,8 +6,8 @@ import { Badge } from "../../components/ui/badge.js";
|
|
|
6
6
|
import { Dialog, DialogContent } from "../../components/ui/dialog.js";
|
|
7
7
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../components/ui/tooltip.js";
|
|
8
8
|
import ListView_default from "../../components/lists/ListView.js";
|
|
9
|
-
import CreateWorkspace_default from "./components/CreateWorkspace.js";
|
|
10
9
|
import { useDebounce } from "../../hooks/useDebounce.js";
|
|
10
|
+
import CreateWorkspace_default from "./components/CreateWorkspace.js";
|
|
11
11
|
import { c } from "react/compiler-runtime";
|
|
12
12
|
import { useEffect, useMemo, useState } from "react";
|
|
13
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|