@loopstack/loopstack-studio 0.23.1 → 0.25.0

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