@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.
Files changed (33) hide show
  1. package/dist/api/index.js +4 -1
  2. package/dist/app/EnvironmentEmbedRoot.js +22 -24
  3. package/dist/components/messages/CompletionMessagePaper.js +25 -29
  4. package/dist/events/sse-client-events.js +2 -0
  5. package/dist/features/dashboard/AppLauncher.js +111 -64
  6. package/dist/features/documents/DocumentRenderer.js +42 -42
  7. package/dist/features/feature-registry/FeatureRegistryProvider.js +15 -17
  8. package/dist/features/feature-registry/available-features.js +3 -2
  9. package/dist/features/feature-registry/index.js +1 -1
  10. package/dist/features/file-explorer/api/files.js +8 -3
  11. package/dist/features/file-explorer/components/FileExplorerPanel.js +64 -43
  12. package/dist/features/file-explorer/file-explorer-feature.js +15 -7
  13. package/dist/features/file-explorer/hooks/useFileExplorer.js +31 -29
  14. package/dist/features/file-explorer/index.js +1 -1
  15. package/dist/features/file-explorer/providers/FileExplorerProvider.js +77 -77
  16. package/dist/features/git/components/WorkbenchGitPanel.js +1 -1
  17. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
  18. package/dist/features/workbench/Workbench.js +16 -16
  19. package/dist/features/workbench/components/NewRunDialog.js +1 -1
  20. package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
  21. package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
  22. package/dist/features/workbench/index.js +1 -1
  23. package/dist/features/workspaces/Workspaces.js +1 -1
  24. package/dist/hooks/useSecrets.js +9 -45
  25. package/dist/index.d.ts +27 -13
  26. package/dist/index.js +6 -6
  27. package/dist/loopstack-studio.css +1 -1
  28. package/dist/pages/EmbedWorkbenchPage.js +46 -40
  29. package/dist/pages/WorkbenchPage.js +50 -45
  30. package/dist/pages/WorkspacePage.js +39 -25
  31. package/dist/pages/WorkspaceRunsPage.js +34 -26
  32. package/dist/providers/InvalidationEventsProvider.js +22 -20
  33. 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 d;
32
- i[2] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ jsx(FileTabsBar, {}), i[2] = d) : d = i[2];
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: [d, /* @__PURE__ */ jsx("div", {
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 s = c(21), { workspaceId: l } = e, { closePanel: u, panelSize: f, setPanelSize: m, environments: h } = useWorkbenchLayout(), g = useFeatureConfig("fileExplorer"), _;
52
- s[0] === g?.config?.environments ? _ = s[1] : (_ = g?.config?.environments ?? [], s[0] = g?.config?.environments, s[1] = _);
53
- let v = _, y = h?.[0]?.slotId ?? "", b;
54
- s[2] !== v || s[3] !== y ? (b = v.length === 0 || v.includes(y), s[2] = v, s[3] = y, s[4] = b) : b = s[4];
55
- let x = b;
56
- if (!x) {
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
- s[5] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(Files, { className: "h-4 w-4" }), s[5] = e) : e = s[5];
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
- s[6] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ jsx("div", {
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
- }), s[6] = i) : i = s[6];
67
- let o;
68
- return s[7] !== u || s[8] !== f || s[9] !== m ? (o = /* @__PURE__ */ jsx(SidebarPanel, {
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: "Files",
71
- description: "Browse remote files.",
72
- size: f,
73
- onSizeChange: m,
74
- onClose: u,
70
+ title: f,
71
+ description: m,
72
+ size: _,
73
+ onSizeChange: v,
74
+ onClose: g,
75
75
  children: i
76
- }), s[7] = u, s[8] = f, s[9] = m, s[10] = o) : o = s[10], o;
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 S;
79
- s[11] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(Files, { className: "h-4 w-4" }), s[11] = S) : S = s[11];
80
- let C;
81
- s[12] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(FileExplorerContent, {}), s[12] = C) : C = s[12];
82
- let w;
83
- s[13] !== x || s[14] !== l ? (w = /* @__PURE__ */ jsx(FileExplorerProvider, {
84
- workspaceId: l,
85
- enabled: x,
86
- children: C
87
- }), s[13] = x, s[14] = l, s[15] = w) : w = s[15];
88
- let T;
89
- return s[16] !== u || s[17] !== f || s[18] !== m || s[19] !== w ? (T = /* @__PURE__ */ jsx(SidebarPanel, {
90
- icon: S,
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
- size: f,
94
- onSizeChange: m,
95
- onClose: u,
96
- children: w
97
- }), s[16] = u, s[17] = f, s[18] = m, s[19] = w, s[20] = T) : T = s[20], T;
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 { FileExplorerPanel };
120
+ export { LocalFileExplorerPanel, RemoteFileExplorerPanel };
@@ -1,12 +1,20 @@
1
- import { FileExplorerPanel } from "./components/FileExplorerPanel.js";
2
- import { Files } from "lucide-react";
3
- const fileExplorerFeature = {
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: FileExplorerPanel
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 { fileExplorerFeature };
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] !== i || o[2] !== r ? (d = [
25
- "file-explorer-content",
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] = i, o[2] = r, o[3] = d) : d = o[3];
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] !== i || o[6] !== r ? (f = () => u.files.readFile({
32
- workspaceId: r,
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: 15e3,
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 { fileExplorerFeature } from "./file-explorer-feature.js";
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), { workspaceId: u, enabled: d, children: f } = s, p = d === void 0 ? !0 : d, m = useQueryClient(), h;
9
- l[0] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ new Set(), l[0] = h) : h = l[0];
10
- let [g, _] = useState(h), v;
11
- l[1] === Symbol.for("react.memo_cache_sentinel") ? (v = [], l[1] = v) : v = l[1];
12
- let [y, b] = useState(v), [x, S] = useState(null), C = useFileTree(u, p), w = useFileContent(u, x?.type === "file" ? x.path : void 0, p), T;
13
- l[2] === Symbol.for("react.memo_cache_sentinel") ? (T = (e) => {
14
- _((a) => {
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] = T) : T = l[2];
19
- let E = T, D;
20
- l[3] === Symbol.for("react.memo_cache_sentinel") ? (D = (e) => {
21
- e.type === "file" && (S(e), b((a) => a.some((a) => a.path === e.path) ? a : [...a, e]));
22
- }, l[3] = D) : D = l[3];
23
- let O = D, k;
24
- l[4] === x?.path ? k = l[5] : (k = (e) => {
25
- b((a) => {
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 (x?.path === e.path) if (o.length > 0) {
27
+ if (S?.path === e.path) if (o.length > 0) {
28
28
  let s = a.findIndex((a) => a.path === e.path);
29
- S(o[Math.max(0, s - 1)]);
30
- } else S(null);
29
+ C(o[Math.max(0, s - 1)]);
30
+ } else C(null);
31
31
  return o;
32
32
  });
33
- }, l[4] = x?.path, l[5] = k);
34
- let A = k, j;
35
- l[6] === x ? j = l[7] : (j = () => {
36
- x && b((e) => {
37
- let a = e.filter((e) => e.path !== x.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 === x.path);
40
- S(a[Math.max(0, o - 1)]);
41
- } else S(null);
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] = x, l[7] = j);
45
- let M = j, N;
46
- l[8] === Symbol.for("react.memo_cache_sentinel") ? (N = () => {
47
- b([]), S(null);
48
- }, l[8] = N) : N = l[8];
49
- let P = N, F;
50
- l[9] === Symbol.for("react.memo_cache_sentinel") ? (F = (e) => {
51
- b([e]), S(e);
52
- }, l[9] = F) : F = l[9];
53
- let I = F, L;
54
- l[10] === x ? L = l[11] : (L = (e) => {
55
- b((a) => {
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 x && a.findIndex((e) => e.path === x.path) < o && S(e), s;
59
+ return S && a.findIndex((e) => e.path === S.path) < o && C(e), s;
60
60
  });
61
- }, l[10] = x, l[11] = L);
62
- let R = L, z;
63
- l[12] === x ? z = l[13] : (z = (e) => {
64
- b((a) => {
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 x && a.findIndex((e) => e.path === x.path) > o && S(e), s;
68
+ return S && a.findIndex((e) => e.path === S.path) > o && C(e), s;
69
69
  });
70
- }, l[12] = x, l[13] = z);
71
- let B = z, V;
72
- l[14] === m ? V = l[15] : (V = () => {
73
- m.invalidateQueries({ queryKey: ["file-explorer-tree"] });
74
- }, l[14] = m, l[15] = V);
75
- let H = V, U;
76
- l[16] === C.data ? U = l[17] : (U = C.data ?? [], l[16] = C.data, l[17] = U);
77
- let W = C.isLoading && !C.data, G = w.data?.content ?? null, K = w.isLoading && !!x, q;
78
- l[18] !== M || l[19] !== A || l[20] !== R || l[21] !== B || l[22] !== g || l[23] !== y || l[24] !== H || l[25] !== x || l[26] !== U || l[27] !== W || l[28] !== G || l[29] !== K || l[30] !== C.error || l[31] !== C.isFetching ? (q = {
79
- nodes: U,
80
- isTreeLoading: W,
81
- treeError: C.error,
82
- isFetchingTree: C.isFetching,
83
- openFiles: y,
84
- selectedFile: x,
85
- fileContent: G,
86
- isContentLoading: K,
87
- expandedFolders: g,
88
- toggleFolder: E,
89
- selectFile: O,
90
- closeFile: A,
91
- closeAll: P,
92
- closeOthers: I,
93
- closeToLeft: R,
94
- closeToRight: B,
95
- clearSelection: M,
96
- refreshTree: H
97
- }, l[18] = M, l[19] = A, l[20] = R, l[21] = B, l[22] = g, l[23] = y, l[24] = H, l[25] = x, l[26] = U, l[27] = W, l[28] = G, l[29] = K, l[30] = C.error, l[31] = C.isFetching, l[32] = q) : q = l[32];
98
- let J = q, Y;
99
- return l[33] !== f || l[34] !== J ? (Y = /* @__PURE__ */ jsx(FileExplorerContext.Provider, {
100
- value: J,
101
- children: f
102
- }), l[33] = f, l[34] = J, l[35] = Y) : Y = l[35], Y;
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(a) {
9
- let o = c(7), { workflow: l, breadcrumbData: u } = a, d;
10
- o[0] === u ? d = o[1] : (d = /* @__PURE__ */ jsx("div", {
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
- }), o[0] = u, o[1] = d);
16
+ }), a[0] = u, a[1] = d);
17
17
  let f;
18
- o[2] === l ? f = o[3] : (f = /* @__PURE__ */ jsx(ScrollProvider, { children: /* @__PURE__ */ jsx("div", {
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
- }) }), o[2] = l, o[3] = f);
21
+ }) }), a[2] = l, a[3] = f);
22
22
  let p;
23
- return o[4] !== d || o[5] !== f ? (p = /* @__PURE__ */ jsx("div", {
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
- }), o[4] = d, o[5] = f, o[6] = p) : p = o[6], p;
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: i, breadcrumbData: s, getPreviewUrl: u, getEnvironmentPreviewUrl: d } = e, f = i?.workspaceId, p;
36
- r[0] !== s || r[1] !== i ? (p = /* @__PURE__ */ jsx(WorkbenchSidebarShell, { children: /* @__PURE__ */ jsx(WorkbenchContent, {
37
- workflow: i,
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] = i, r[2] = p) : p = r[2];
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] !== i || r[7] !== f ? (m = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
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: i,
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] = i, r[7] = f, r[8] = m) : m = r[8], m;
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(r) {
53
- let i = c(12), { children: o } = r, { activePanel: s, panelSize: p } = useWorkbenchLayout(), m = `${s ? CONTENT_WIDTH[p] : "w-full"} overflow-hidden`, h;
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";