@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,58 +1,110 @@
1
1
  import { useStudio } from "../providers/StudioProvider.js";
2
- import { Alert } from "../components/ui/alert.js";
2
+ import { Button } from "../components/ui/button.js";
3
+ import { Alert, AlertDescription, AlertTitle } from "../components/ui/alert.js";
3
4
  import MainLayout_default from "../components/layout/MainLayout.js";
4
5
  import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
5
6
  import Dashboard from "../features/dashboard/Dashboard.js";
6
7
  import { useDashboardStats } from "../hooks/useDashboard.js";
7
8
  import { c } from "react/compiler-runtime";
8
9
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { Home } from "lucide-react";
10
+ import { Home, TriangleAlert } from "lucide-react";
10
11
  function DashboardPage() {
11
- let d = c(17), { environment: f } = useStudio(), { data: p, isLoading: m, error: h } = useDashboardStats();
12
- if (m) {
12
+ let h = c(38), { environment: g } = useStudio(), { data: _, isLoading: v, error: y, refetch: b, isRefetching: x } = useDashboardStats();
13
+ if (v) {
13
14
  let e;
14
- return d[0] === m ? e = d[1] : (e = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: m }), d[0] = m, d[1] = e), e;
15
+ return h[0] === v ? e = h[1] : (e = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: v }), h[0] = v, h[1] = e), e;
15
16
  }
16
- if (h) {
17
+ if (y) {
17
18
  let e;
18
- return d[2] === h.message ? e = d[3] : (e = /* @__PURE__ */ jsxs(Alert, {
19
- className: "w-full p-4 text-red-500",
20
- children: ["Error loading dashboard: ", h.message]
21
- }), d[2] = h.message, d[3] = e), e;
19
+ h[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), h[2] = e) : e = h[2];
20
+ let d;
21
+ h[3] === g.name ? d = h[4] : (d = {
22
+ label: g.name,
23
+ href: "#",
24
+ icon: e
25
+ }, h[3] = g.name, h[4] = d);
26
+ let f;
27
+ h[5] === Symbol.for("react.memo_cache_sentinel") ? (f = {
28
+ label: "Dashboard",
29
+ current: !0
30
+ }, h[5] = f) : f = h[5];
31
+ let p;
32
+ h[6] === d ? p = h[7] : (p = [d, f], h[6] = d, h[7] = p);
33
+ let m = p, _;
34
+ h[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("h1", {
35
+ className: "mb-4 text-3xl font-bold tracking-tight",
36
+ children: "Dashboard"
37
+ }), h[8] = _) : _ = h[8];
38
+ let v, S;
39
+ h[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ jsx(TriangleAlert, {}), S = /* @__PURE__ */ jsx(AlertTitle, { children: "Dashboard konnte nicht geladen werden" }), h[9] = v, h[10] = S) : (v = h[9], S = h[10]);
40
+ let C;
41
+ h[11] === y.message ? C = h[12] : (C = /* @__PURE__ */ jsxs("p", {
42
+ className: "wrap-break-word",
43
+ children: ["Bitte versuch’s nochmal. ", y.message]
44
+ }), h[11] = y.message, h[12] = C);
45
+ let w;
46
+ h[13] === b ? w = h[14] : (w = () => void b(), h[13] = b, h[14] = w);
47
+ let T = x ? "Lade neu…" : "Neu versuchen", E;
48
+ h[15] !== x || h[16] !== w || h[17] !== T ? (E = /* @__PURE__ */ jsx("div", {
49
+ className: "mt-3 flex flex-wrap gap-2",
50
+ children: /* @__PURE__ */ jsx(Button, {
51
+ variant: "destructive",
52
+ onClick: w,
53
+ disabled: x,
54
+ children: T
55
+ })
56
+ }), h[15] = x, h[16] = w, h[17] = T, h[18] = E) : E = h[18];
57
+ let D;
58
+ h[19] !== E || h[20] !== C ? (D = /* @__PURE__ */ jsx("div", {
59
+ className: "mx-auto w-full max-w-2xl",
60
+ children: /* @__PURE__ */ jsxs(Alert, {
61
+ variant: "destructive",
62
+ children: [
63
+ v,
64
+ S,
65
+ /* @__PURE__ */ jsxs(AlertDescription, { children: [C, E] })
66
+ ]
67
+ })
68
+ }), h[19] = E, h[20] = C, h[21] = D) : D = h[21];
69
+ let O;
70
+ return h[22] !== m || h[23] !== D ? (O = /* @__PURE__ */ jsxs(MainLayout_default, {
71
+ breadcrumbsData: m,
72
+ children: [_, D]
73
+ }), h[22] = m, h[23] = D, h[24] = O) : O = h[24], O;
22
74
  }
23
- if (!p) {
75
+ if (!_) {
24
76
  let e;
25
- return d[4] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
77
+ return h[25] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
26
78
  className: "p-4",
27
79
  children: "No data available"
28
- }), d[4] = e) : e = d[4], e;
80
+ }), h[25] = e) : e = h[25], e;
29
81
  }
30
- let g;
31
- d[5] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), d[5] = g) : g = d[5];
32
- let _;
33
- d[6] === f.name ? _ = d[7] : (_ = {
34
- label: f.name,
82
+ let S;
83
+ h[26] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), h[26] = S) : S = h[26];
84
+ let C;
85
+ h[27] === g.name ? C = h[28] : (C = {
86
+ label: g.name,
35
87
  href: "#",
36
- icon: g
37
- }, d[6] = f.name, d[7] = _);
38
- let v;
39
- d[8] === Symbol.for("react.memo_cache_sentinel") ? (v = {
88
+ icon: S
89
+ }, h[27] = g.name, h[28] = C);
90
+ let w;
91
+ h[29] === Symbol.for("react.memo_cache_sentinel") ? (w = {
40
92
  label: "Dashboard",
41
93
  current: !0
42
- }, d[8] = v) : v = d[8];
43
- let y;
44
- d[9] === _ ? y = d[10] : (y = [_, v], d[9] = _, d[10] = y);
45
- let b = y, x;
46
- d[11] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ jsx("h1", {
94
+ }, h[29] = w) : w = h[29];
95
+ let T;
96
+ h[30] === C ? T = h[31] : (T = [C, w], h[30] = C, h[31] = T);
97
+ let E = T, D;
98
+ h[32] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsx("h1", {
47
99
  className: "mb-4 text-3xl font-bold tracking-tight",
48
100
  children: "Dashboard"
49
- }), d[11] = x) : x = d[11];
50
- let S;
51
- d[12] === p ? S = d[13] : (S = /* @__PURE__ */ jsx(Dashboard, { dashboardStats: p }), d[12] = p, d[13] = S);
52
- let C;
53
- return d[14] !== b || d[15] !== S ? (C = /* @__PURE__ */ jsxs(MainLayout_default, {
54
- breadcrumbsData: b,
55
- children: [x, S]
56
- }), d[14] = b, d[15] = S, d[16] = C) : C = d[16], C;
101
+ }), h[32] = D) : D = h[32];
102
+ let O;
103
+ h[33] === _ ? O = h[34] : (O = /* @__PURE__ */ jsx(Dashboard, { dashboardStats: _ }), h[33] = _, h[34] = O);
104
+ let k;
105
+ return h[35] !== E || h[36] !== O ? (k = /* @__PURE__ */ jsxs(MainLayout_default, {
106
+ breadcrumbsData: E,
107
+ children: [D, O]
108
+ }), h[35] = E, h[36] = O, h[37] = k) : k = h[37], k;
57
109
  }
58
110
  export { DashboardPage as default };
@@ -1,5 +1,5 @@
1
1
  import { useStudio } from "../providers/StudioProvider.js";
2
- import { usePipelineConfigByName, usePipelineSource } from "../hooks/usePipelines.js";
2
+ import { useWorkflowConfigByName, useWorkflowSource } from "../hooks/useWorkflows.js";
3
3
  import MainLayout_default from "../components/layout/MainLayout.js";
4
4
  import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
5
5
  import ConfigFlowViewer_default from "../features/debug/components/ConfigFlowViewer.js";
@@ -28,7 +28,7 @@ function DebugWorkflowDetailsPage() {
28
28
  let m;
29
29
  h[3] === g ? m = h[4] : (m = ["default", g], h[3] = g, h[4] = m), v = m;
30
30
  }
31
- let [y, b] = v, { data: x, isLoading: S } = usePipelineConfigByName(y, b), { data: C, isLoading: w } = usePipelineSource(y, b), T = S || w, E;
31
+ let [y, b] = v, { data: x, isLoading: S } = useWorkflowConfigByName(b), { data: C, isLoading: w } = useWorkflowSource(b), T = S || w, E;
32
32
  h[5] === _ ? E = h[6] : (E = _.getDashboard(), h[5] = _, h[6] = E);
33
33
  let D;
34
34
  h[7] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), h[7] = D) : D = h[7];
@@ -45,7 +45,7 @@ function DebugWorkflowDetailsPage() {
45
45
  label: "Debug Workflows",
46
46
  href: k
47
47
  }, h[12] = k, h[13] = A);
48
- let j = x?.title || x?.blockName || b || "Workflow Details", M;
48
+ let j = x?.title || x?.alias || b || "Workflow Details", M;
49
49
  h[14] === j ? M = h[15] : (M = {
50
50
  label: j,
51
51
  current: !0
@@ -57,7 +57,7 @@ function DebugWorkflowDetailsPage() {
57
57
  M
58
58
  ], h[16] = O, h[17] = A, h[18] = M, h[19] = N) : N = h[19];
59
59
  let P = N, F;
60
- h[20] !== T || h[21] !== b || h[22] !== C || h[23] !== x || h[24] !== y ? (F = T ? /* @__PURE__ */ jsxs("div", {
60
+ h[20] !== T || h[21] !== C || h[22] !== b || h[23] !== x || h[24] !== y ? (F = T ? /* @__PURE__ */ jsxs("div", {
61
61
  className: "flex items-center space-x-2",
62
62
  children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ jsx("span", { children: "Loading..." })]
63
63
  }) : x ? /* @__PURE__ */ jsxs("div", {
@@ -65,7 +65,7 @@ function DebugWorkflowDetailsPage() {
65
65
  children: [
66
66
  /* @__PURE__ */ jsx("h1", {
67
67
  className: "text-3xl font-bold tracking-tight",
68
- children: x.title || x.blockName
68
+ children: x.title || x.alias
69
69
  }),
70
70
  /* @__PURE__ */ jsx("p", {
71
71
  className: "text-muted-foreground",
@@ -81,7 +81,7 @@ function DebugWorkflowDetailsPage() {
81
81
  }), /* @__PURE__ */ jsx("div", {
82
82
  className: "flex-1 overflow-auto bg-[#1e1e1e]",
83
83
  children: /* @__PURE__ */ jsx(Prism, {
84
- language: C?.raw ? "yaml" : "json",
84
+ language: C?.raw ? "typescript" : "json",
85
85
  style: vscDarkPlus,
86
86
  customStyle: {
87
87
  margin: 0,
@@ -108,10 +108,10 @@ function DebugWorkflowDetailsPage() {
108
108
  }) : /* @__PURE__ */ jsxs("div", { children: [
109
109
  "Workflow Type not found (Workspace: ",
110
110
  y,
111
- ", Pipeline: ",
111
+ ", Workflow: ",
112
112
  b,
113
113
  ")"
114
- ] }), h[20] = T, h[21] = b, h[22] = C, h[23] = x, h[24] = y, h[25] = F) : F = h[25];
114
+ ] }), h[20] = T, h[21] = C, h[22] = b, h[23] = x, h[24] = y, h[25] = F) : F = h[25];
115
115
  let I;
116
116
  return h[26] !== P || h[27] !== F ? (I = /* @__PURE__ */ jsx(MainLayout_default, {
117
117
  breadcrumbsData: P,
@@ -11,14 +11,14 @@ import { Home } from "lucide-react";
11
11
  function DebugWorkflowsPage() {
12
12
  let { router: f } = useStudio(), { envKey: p, api: m } = useApiClient(), { data: h, isLoading: g } = useWorkspaceConfig(), _ = useQueries({ queries: (h ?? []).map((e) => ({
13
13
  queryKey: [
14
- "pipeline-types",
15
- e.blockName,
14
+ "workflowTypes",
15
+ e.className,
16
16
  p
17
17
  ],
18
18
  queryFn: async () => {
19
- let c = await m.config.getPipelineTypesByWorkspace({ workspaceBlockName: e.blockName });
19
+ let c = await m.config.getWorkflowTypesByWorkspace({ workspaceBlockName: e.className });
20
20
  return {
21
- workspaceBlockName: e.blockName,
21
+ workspaceBlockName: e.className,
22
22
  types: c
23
23
  };
24
24
  },
@@ -28,14 +28,14 @@ function DebugWorkflowsPage() {
28
28
  let { workspaceBlockName: c, types: l } = e.data;
29
29
  return (l ?? []).map((e) => ({
30
30
  ...e,
31
- id: `${c}::${e.blockName}`,
31
+ id: `${c}::${e.alias}`,
32
32
  workspaceBlockName: c
33
33
  }));
34
- }), [_, y]), [x, S] = useState(""), [C, w] = useState("blockName"), [T, E] = useState("ASC"), [D, O] = useState(0), [k, A] = useState(10), j = useMemo(() => {
34
+ }), [_, y]), [x, S] = useState(""), [C, w] = useState("alias"), [T, E] = useState("ASC"), [D, O] = useState(0), [k, A] = useState(10), j = useMemo(() => {
35
35
  let e = b;
36
36
  if (x) {
37
37
  let c = x.toLowerCase();
38
- e = e.filter((e) => e.blockName?.toLowerCase().includes(c) || e.title?.toLowerCase().includes(c) || e.description?.toLowerCase().includes(c) || e.workspaceBlockName.toLowerCase().includes(c));
38
+ e = e.filter((e) => e.alias?.toLowerCase().includes(c) || e.title?.toLowerCase().includes(c) || e.description?.toLowerCase().includes(c) || e.workspaceBlockName.toLowerCase().includes(c));
39
39
  }
40
40
  return e = [...e].sort((e, c) => {
41
41
  let l = C, u = (e[l] || "").toLowerCase(), d = (c[l] || "").toLowerCase();
@@ -70,8 +70,8 @@ function DebugWorkflowsPage() {
70
70
  data: M,
71
71
  columns: [
72
72
  {
73
- id: "blockName",
74
- label: "Type ID (Block Name)",
73
+ id: "alias",
74
+ label: "Type ID (Alias)",
75
75
  sortable: !0,
76
76
  minWidth: 200,
77
77
  format: (e) => /* @__PURE__ */ jsx("span", {
@@ -83,7 +83,7 @@ function DebugWorkflowsPage() {
83
83
  id: "title",
84
84
  label: "Title",
85
85
  sortable: !0,
86
- format: (e, c) => /* @__PURE__ */ jsx("span", { children: String(e || c.blockName || "N/A") })
86
+ format: (e, c) => /* @__PURE__ */ jsx("span", { children: String(e || c.alias || "N/A") })
87
87
  },
88
88
  {
89
89
  id: "workspaceBlockName",
@@ -1,9 +1,9 @@
1
- import { usePipeline } from "../hooks/usePipelines.js";
1
+ import { useWorkflow } from "../hooks/useWorkflows.js";
2
2
  import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
3
3
  import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
4
4
  import { require_enums } from "../packages/contracts/dist/enums/index.js";
5
- import { useFetchWorkflowsByPipeline } from "../hooks/useWorkflows.js";
6
5
  import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
6
+ import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
7
7
  import "../features/workbench/index.js";
8
8
  import { requireParam } from "../lib/requireParam.js";
9
9
  import { c } from "react/compiler-runtime";
@@ -12,64 +12,58 @@ import { jsx, jsxs } from "react/jsx-runtime";
12
12
  import { useParams } from "react-router-dom";
13
13
  var import_enums = require_enums(), EMBED_MESSAGE_TYPE = "loopstack:embed:workflow-completed", EMBED_RESIZE_MESSAGE_TYPE = "loopstack:embed:resize";
14
14
  function EmbedWorkbenchPage() {
15
- let _ = c(24), v = useParams(), y;
16
- _[0] === v ? y = _[1] : (y = requireParam(v, "pipelineId"), _[0] = v, _[1] = y);
17
- let b = y, x = useRef(null), S = usePipeline(b), C = useFetchWorkflowsByPipeline(b), w = useRef(!1), T, E;
18
- _[2] !== C.data || _[3] !== b ? (T = () => {
19
- !C.data || w.current || C.data.length > 0 && C.data.every(_temp) && window.parent !== window && (w.current = !0, window.parent.postMessage({
15
+ let _ = c(20), v = useParams(), y;
16
+ _[0] === v ? y = _[1] : (y = requireParam(v, "workflowId"), _[0] = v, _[1] = y);
17
+ let b = y, x = useRef(null), S = useWorkflow(b), C = useRef(!1), w, T;
18
+ _[2] !== S.data || _[3] !== b ? (w = () => {
19
+ !S.data || C.current || S.data.status === import_enums.WorkflowState.Completed && window.parent !== window && (C.current = !0, window.parent.postMessage({
20
20
  type: EMBED_MESSAGE_TYPE,
21
- pipelineId: b
21
+ workflowId: b
22
22
  }, window.location.origin));
23
- }, E = [C.data, b], _[2] = C.data, _[3] = b, _[4] = T, _[5] = E) : (T = _[4], E = _[5]), useEffect(T, E);
24
- let D, O;
25
- _[6] === b ? (D = _[7], O = _[8]) : (D = () => {
23
+ }, T = [S.data, b], _[2] = S.data, _[3] = b, _[4] = w, _[5] = T) : (w = _[4], T = _[5]), useEffect(w, T);
24
+ let E, D;
25
+ _[6] === b ? (E = _[7], D = _[8]) : (E = () => {
26
26
  if (window.parent === window || !x.current) return;
27
27
  let t = new ResizeObserver(() => {
28
28
  if (!x.current) return;
29
29
  let t = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);
30
30
  window.parent.postMessage({
31
31
  type: EMBED_RESIZE_MESSAGE_TYPE,
32
- pipelineId: b,
32
+ workflowId: b,
33
33
  height: t
34
34
  }, window.location.origin);
35
35
  });
36
36
  return t.observe(x.current), () => t.disconnect();
37
- }, O = [b], _[6] = b, _[7] = D, _[8] = O), useEffect(D, O);
38
- let k = _temp2, A;
39
- _[9] === Symbol.for("react.memo_cache_sentinel") ? (A = {
37
+ }, D = [b], _[6] = b, _[7] = E, _[8] = D), useEffect(E, D);
38
+ let O = _temp, k;
39
+ _[9] === Symbol.for("react.memo_cache_sentinel") ? (k = {
40
40
  enableDebugMode: !1,
41
41
  showFullMessageHistory: !1
42
- }, _[9] = A) : A = _[9];
43
- let j = A, M;
44
- _[10] === S.error ? M = _[11] : (M = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), _[10] = S.error, _[11] = M);
42
+ }, _[9] = k) : k = _[9];
43
+ let A = k, j;
44
+ _[10] === S.error ? j = _[11] : (j = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), _[10] = S.error, _[11] = j);
45
+ let M;
46
+ _[12] === S.data ? M = _[13] : (M = S.data ? /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
47
+ workflow: S.data,
48
+ children: /* @__PURE__ */ jsx(WorkflowItem_default, {
49
+ workflow: S.data,
50
+ workflowId: S.data.id,
51
+ scrollTo: O,
52
+ settings: A,
53
+ embed: !0
54
+ })
55
+ }) : null, _[12] = S.data, _[13] = M);
45
56
  let N;
46
- _[12] === C.error ? N = _[13] : (N = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: C.error }), _[12] = C.error, _[13] = N);
47
- let P = S.isLoading || C.isLoading, F;
48
- _[14] !== S.data || _[15] !== C.data ? (F = S.data && C.data ? C.data.map((t) => /* @__PURE__ */ jsx(WorkflowItem_default, {
49
- pipeline: S.data,
50
- workflowId: t.id,
51
- scrollTo: k,
52
- settings: j,
53
- embed: !0
54
- }, t.id)) : null, _[14] = S.data, _[15] = C.data, _[16] = F) : F = _[16];
55
- let I;
56
- _[17] !== P || _[18] !== F ? (I = /* @__PURE__ */ jsx(LoadingCentered_default, {
57
- loading: P,
58
- children: F
59
- }), _[17] = P, _[18] = F, _[19] = I) : I = _[19];
60
- let L;
61
- return _[20] !== I || _[21] !== M || _[22] !== N ? (L = /* @__PURE__ */ jsxs("div", {
57
+ _[14] !== S.isLoading || _[15] !== M ? (N = /* @__PURE__ */ jsx(LoadingCentered_default, {
58
+ loading: S.isLoading,
59
+ children: M
60
+ }), _[14] = S.isLoading, _[15] = M, _[16] = N) : N = _[16];
61
+ let P;
62
+ return _[17] !== j || _[18] !== N ? (P = /* @__PURE__ */ jsxs("div", {
62
63
  ref: x,
63
- className: "overflow-hidden px-6 py-4",
64
- children: [
65
- M,
66
- N,
67
- I
68
- ]
69
- }), _[20] = I, _[21] = M, _[22] = N, _[23] = L) : L = _[23], L;
70
- }
71
- function _temp2() {}
72
- function _temp(t) {
73
- return t.status === import_enums.WorkflowState.Completed;
64
+ className: "overflow-hidden pl-3 py-4",
65
+ children: [j, N]
66
+ }), _[17] = j, _[18] = N, _[19] = P) : P = _[19], P;
74
67
  }
68
+ function _temp() {}
75
69
  export { EmbedWorkbenchPage as default };