@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,5 +1,5 @@
1
- import { usePipelineConfig, useWorkspaceConfig } from "../../../hooks/useConfig.js";
2
- import { useCreatePipeline } from "../../../hooks/usePipelines.js";
1
+ import { useWorkflowConfig, useWorkspaceConfig } from "../../../hooks/useConfig.js";
2
+ import { useCreateWorkflow } from "../../../hooks/useWorkflows.js";
3
3
  import { useFilterWorkspaces } from "../../../hooks/useWorkspaces.js";
4
4
  import { useComponentOverrides } from "../../../providers/ComponentOverridesProvider.js";
5
5
  import { Button } from "../../../components/ui/button.js";
@@ -9,7 +9,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from ".
9
9
  import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
10
10
  import CreateWorkspace_default from "../../workspaces/components/CreateWorkspace.js";
11
11
  import Form_default from "../../../components/dynamic-form/Form.js";
12
- import { useRunPipeline } from "../../../hooks/useProcessor.js";
12
+ import { useRunWorkflow } from "../../../hooks/useProcessor.js";
13
13
  import "../../workspaces/index.js";
14
14
  import { c } from "react/compiler-runtime";
15
15
  import { useCallback, useEffect, useMemo, useState } from "react";
@@ -45,9 +45,9 @@ function NewRunDialogContent(o) {
45
45
  let e;
46
46
  s[6] === v ? e = s[7] : (e = (e) => e.id === v, s[6] = v, s[7] = e), xe = C.find(e), s[3] = v, s[4] = C, s[5] = xe;
47
47
  } else xe = s[5];
48
- let Se = xe, w = usePipelineConfig(Se?.blockName), Ce;
48
+ let Se = xe, w = useWorkflowConfig(Se?.className), Ce;
49
49
  s[8] === w.data ? Ce = s[9] : (Ce = w.data ?? [], s[8] = w.data, s[9] = Ce);
50
- let T = Ce, E = useCreatePipeline(), D = useRunPipeline(), O = E.isPending || D.isPending, k;
50
+ let T = Ce, E = useCreateWorkflow(), D = useRunWorkflow(), O = E.isPending || D.isPending, k;
51
51
  s[10] === Symbol.for("react.memo_cache_sentinel") ? (k = {
52
52
  defaultValues: {},
53
53
  mode: "onChange"
@@ -59,9 +59,9 @@ function NewRunDialogContent(o) {
59
59
  break bb0;
60
60
  }
61
61
  let e;
62
- if (s[11] !== T || s[12] !== y) {
62
+ if (s[11] !== y || s[12] !== T) {
63
63
  let t;
64
- s[14] === y ? t = s[15] : (t = (e) => e.blockName === y, s[14] = y, s[15] = t), e = T.find(t), s[11] = T, s[12] = y, s[13] = e;
64
+ s[14] === y ? t = s[15] : (t = (e) => e.alias === y, s[14] = y, s[15] = t), e = T.find(t), s[11] = y, s[12] = T, s[13] = e;
65
65
  } else e = s[13];
66
66
  we = e;
67
67
  }
@@ -72,9 +72,9 @@ function NewRunDialogContent(o) {
72
72
  let P;
73
73
  s[20] !== v || s[21] !== C ? (P = [C, v], s[20] = v, s[21] = C, s[22] = P) : P = s[22], useEffect(N, P);
74
74
  let F, Te;
75
- s[23] !== T || s[24] !== y ? (Te = () => {
76
- T.length > 0 && !T.find((e) => e.blockName === y) && he(T[0].blockName);
77
- }, F = [T, y], s[23] = T, s[24] = y, s[25] = F, s[26] = Te) : (F = s[25], Te = s[26]), useEffect(Te, F);
75
+ s[23] !== y || s[24] !== T ? (Te = () => {
76
+ T.length > 0 && !T.find((e) => e.alias === y) && he(T[0].alias);
77
+ }, F = [T, y], s[23] = y, s[24] = T, s[25] = F, s[26] = Te) : (F = s[25], Te = s[26]), useEffect(Te, F);
78
78
  let Ee;
79
79
  s[27] !== E || s[28] !== A || s[29] !== l || s[30] !== D ? (Ee = () => {
80
80
  l || (f("workspace"), g(!1), me(""), he(""), A.reset({}), E.reset(), D.reset());
@@ -99,16 +99,16 @@ function NewRunDialogContent(o) {
99
99
  ], s[37] = M, s[38] = y, s[39] = j, s[40] = Me, s[41] = I) : (Me = s[40], I = s[41]), useEffect(Me, I);
100
100
  let Ne;
101
101
  s[42] !== E || s[43] !== u || s[44] !== D || s[45] !== y || s[46] !== v ? (Ne = (e, t) => {
102
- !v || !y || E.mutate({ pipelineCreateDto: {
103
- blockName: y,
102
+ !v || !y || E.mutate({ workflowCreateDto: {
103
+ alias: y,
104
104
  title: null,
105
105
  workspaceId: v,
106
106
  transition: e ?? null,
107
107
  args: t ?? {}
108
108
  } }, { onSuccess: (e) => {
109
109
  D.mutate({
110
- pipelineId: e.id,
111
- runPipelinePayloadDto: {},
110
+ workflowId: e.id,
111
+ runWorkflowPayloadDto: {},
112
112
  force: !0
113
113
  }, { onSuccess: () => u(e.id) });
114
114
  } });
@@ -167,7 +167,7 @@ function NewRunDialogContent(o) {
167
167
  children: V
168
168
  }), s[64] = S.isLoading, s[65] = He, s[66] = Ue, s[67] = We, s[68] = V, s[69] = H) : H = s[69];
169
169
  let U;
170
- s[70] !== L || s[71] !== T || s[72] !== y ? (U = L ? T.find((e) => e.blockName === y)?.title ?? y : void 0, s[70] = L, s[71] = T, s[72] = y, s[73] = U) : U = s[73];
170
+ s[70] !== L || s[71] !== y || s[72] !== T ? (U = L ? T.find((e) => e.alias === y)?.title ?? y : void 0, s[70] = L, s[71] = y, s[72] = T, s[73] = U) : U = s[73];
171
171
  let Ke = d === "automation", qe = L && d !== "automation", Je = w.isLoading, W;
172
172
  s[74] === R ? W = s[75] : (W = () => R && ze("automation"), s[74] = R, s[75] = W);
173
173
  let Ye;
@@ -257,20 +257,20 @@ function NewRunDialogContent(o) {
257
257
  }
258
258
  function _temp2(e) {
259
259
  return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
260
- value: e.blockName,
260
+ value: e.alias,
261
261
  className: "focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-pointer flex-col gap-0.5 rounded-sm py-2 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
262
262
  children: [
263
263
  /* @__PURE__ */ jsx("span", {
264
264
  className: "absolute right-2 top-2.5 flex size-3.5 items-center justify-center",
265
265
  children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
266
266
  }),
267
- /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children: e.title ?? e.blockName }),
267
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children: e.title ?? e.alias }),
268
268
  e.description && /* @__PURE__ */ jsx("span", {
269
269
  className: "text-muted-foreground text-xs leading-snug",
270
270
  children: e.description
271
271
  })
272
272
  ]
273
- }, e.blockName);
273
+ }, e.alias);
274
274
  }
275
275
  function _temp(e) {
276
276
  return /* @__PURE__ */ jsx(SelectItem, {
@@ -1,35 +1,42 @@
1
- import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { Button } from "../../../components/ui/button.js";
2
3
  import { FileContentViewer } from "../../code-explorer/components/FileContentViewer.js";
3
4
  import "../../code-explorer/index.js";
4
5
  import { useOptionalRemoteFileExplorer } from "../providers/RemoteFileExplorerProvider.js";
6
+ import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
5
7
  import { RemoteFileTabsBar } from "./RemoteFileTabsBar.js";
6
8
  import RemoteFileTree_default from "./RemoteFileTree.js";
7
9
  import { c } from "react/compiler-runtime";
8
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
11
  import { X } from "lucide-react";
10
12
  function WorkbenchFilesPanel() {
11
- let d = c(9), { closeSidePanel: f, fileExplorerEnabled: p } = useWorkbenchLayout(), m = useOptionalRemoteFileExplorer();
12
- if (!p) return null;
13
- let h;
14
- d[0] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ jsx("span", {
13
+ let p = c(10), { closeSidePanel: m, fileExplorerEnabled: h } = useWorkbenchLayout(), g = useOptionalRemoteFileExplorer();
14
+ if (!h) return null;
15
+ let _;
16
+ p[0] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("span", {
15
17
  className: "text-sm font-medium",
16
18
  children: "Files"
17
- }), d[0] = h) : h = d[0];
18
- let g;
19
- d[1] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), d[1] = g) : g = d[1];
20
- let _;
21
- d[2] === f ? _ = d[3] : (_ = /* @__PURE__ */ jsxs("div", {
19
+ }), p[0] = _) : _ = p[0];
20
+ let v;
21
+ p[1] === Symbol.for("react.memo_cache_sentinel") ? (v = cn("h-5 w-5 shrink-0 rounded transition-opacity", "hover:bg-destructive/10 hover:text-destructive"), p[1] = v) : v = p[1];
22
+ let y;
23
+ p[2] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" }), p[2] = y) : y = p[2];
24
+ let b;
25
+ p[3] === m ? b = p[4] : (b = /* @__PURE__ */ jsxs("div", {
22
26
  className: "border-b flex h-12 shrink-0 items-center justify-between px-3",
23
- children: [h, /* @__PURE__ */ jsx("button", {
24
- onClick: f,
25
- className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
26
- children: g
27
+ children: [_, /* @__PURE__ */ jsx(Button, {
28
+ variant: "ghost",
29
+ size: "icon",
30
+ className: v,
31
+ onClick: m,
32
+ "aria-label": "Close Files Panel",
33
+ children: y
27
34
  })]
28
- }), d[2] = f, d[3] = _);
29
- let v;
30
- d[4] === m ? v = d[5] : (v = /* @__PURE__ */ jsx("div", {
35
+ }), p[3] = m, p[4] = b);
36
+ let x;
37
+ p[5] === g ? x = p[6] : (x = /* @__PURE__ */ jsx("div", {
31
38
  className: "flex-1 overflow-hidden flex",
32
- children: m ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
39
+ children: g ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
33
40
  className: "w-64 shrink-0 border-r bg-muted/40",
34
41
  children: /* @__PURE__ */ jsx(RemoteFileTree_default, {})
35
42
  }), /* @__PURE__ */ jsxs("div", {
@@ -37,9 +44,9 @@ function WorkbenchFilesPanel() {
37
44
  children: [/* @__PURE__ */ jsx(RemoteFileTabsBar, {}), /* @__PURE__ */ jsx("div", {
38
45
  className: "flex-1 overflow-hidden p-3 pt-2",
39
46
  children: /* @__PURE__ */ jsx(FileContentViewer, {
40
- selectedFile: m.selectedFile,
41
- content: m.fileContent,
42
- isLoading: m.isContentLoading,
47
+ selectedFile: g.selectedFile,
48
+ content: g.fileContent,
49
+ isLoading: g.isContentLoading,
43
50
  className: "h-full"
44
51
  })
45
52
  })]
@@ -50,11 +57,11 @@ function WorkbenchFilesPanel() {
50
57
  children: "Remote file explorer is not available for this workspace."
51
58
  })
52
59
  })
53
- }), d[4] = m, d[5] = v);
54
- let y;
55
- return d[6] !== _ || d[7] !== v ? (y = /* @__PURE__ */ jsxs("div", {
60
+ }), p[5] = g, p[6] = x);
61
+ let S;
62
+ return p[7] !== b || p[8] !== x ? (S = /* @__PURE__ */ jsxs("div", {
56
63
  className: "border-l bg-background flex w-2/3 shrink-0 flex-col",
57
- children: [_, v]
58
- }), d[6] = _, d[7] = v, d[8] = y) : y = d[8], y;
64
+ children: [b, x]
65
+ }), p[7] = b, p[8] = x, p[9] = S) : S = p[9], S;
59
66
  }
60
67
  export { WorkbenchFilesPanel };
@@ -1,58 +1,27 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
- import { SidebarMenu, SidebarProvider } from "../../../components/ui/sidebar.js";
3
2
  import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
4
- import { useNamespaceTree } from "../../../hooks/useNamespaceTree.js";
5
- import WorkbenchNavigation_default from "../WorkbenchNavigation.js";
6
- import PipelineHistoryList_default from "./PipelineHistoryList.js";
3
+ import { WorkbenchSecretsPanel } from "./WorkbenchSecretsPanel.js";
4
+ import WorkflowHistoryList_default from "./WorkflowHistoryList.js";
7
5
  import { c } from "react/compiler-runtime";
8
6
  import { jsx, jsxs } from "react/jsx-runtime";
9
7
  import { X } from "lucide-react";
10
8
  var PANEL_TITLES = {
11
- navigation: "Navigate",
12
- history: "Run Log"
9
+ history: "Run Log",
10
+ secrets: "Secrets"
13
11
  };
14
- function NavigationContent() {
15
- let e = c(3), { pipeline: f } = useWorkbenchLayout(), p;
16
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (p = { "--sidebar-width": "100%" }, e[0] = p) : p = e[0];
17
- let m;
18
- return e[1] === f.id ? m = e[2] : (m = /* @__PURE__ */ jsx(SidebarProvider, {
19
- defaultOpen: !0,
20
- className: "min-h-0",
21
- style: p,
22
- children: /* @__PURE__ */ jsx("div", {
23
- className: "w-full overflow-auto p-2",
24
- children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(NavigationContentInner, { pipelineId: f.id }) })
25
- })
26
- }), e[1] = f.id, e[2] = m), m;
27
- }
28
- function NavigationContentInner(e) {
29
- let l = c(3), { pipelineId: u } = e, d = useNamespaceTree(u);
30
- if (!d || d.length === 0) {
31
- let e;
32
- return l[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
33
- className: "text-muted-foreground py-4 text-center text-sm",
34
- children: "No navigation items"
35
- }), l[0] = e) : e = l[0], e;
36
- }
37
- let m;
38
- return l[1] === d ? m = l[2] : (m = /* @__PURE__ */ jsx(WorkbenchNavigation_default, {
39
- namespaceTree: d,
40
- indent: 0
41
- }), l[1] = d, l[2] = m), m;
42
- }
43
12
  function HistoryContent() {
44
- let e = c(2), { pipeline: l } = useWorkbenchLayout(), u;
45
- return e[0] === l ? u = e[1] : (u = /* @__PURE__ */ jsx("div", {
13
+ let e = c(2), { workflow: s } = useWorkbenchLayout(), u;
14
+ return e[0] === s ? u = e[1] : (u = /* @__PURE__ */ jsx("div", {
46
15
  className: "overflow-auto p-2",
47
- children: /* @__PURE__ */ jsx(PipelineHistoryList_default, { pipeline: l })
48
- }), e[0] = l, e[1] = u), u;
16
+ children: /* @__PURE__ */ jsx(WorkflowHistoryList_default, { workflow: s })
17
+ }), e[0] = s, e[1] = u), u;
49
18
  }
50
19
  function WorkbenchFloatingPanel() {
51
- let l = c(19), { activeFloatingPanel: u, closeFloatingPanel: f } = useWorkbenchLayout();
52
- if (!u) return null;
20
+ let l = c(19), { activeFloatingPanel: d, closeFloatingPanel: f } = useWorkbenchLayout();
21
+ if (!d) return null;
53
22
  let p;
54
23
  l[0] === Symbol.for("react.memo_cache_sentinel") ? (p = cn("border-l bg-background absolute right-0 top-0 bottom-0 z-20 flex w-80 flex-col shadow-lg", "animate-in slide-in-from-right duration-200"), l[0] = p) : p = l[0];
55
- let m = PANEL_TITLES[u], h;
24
+ let m = PANEL_TITLES[d], h;
56
25
  l[1] === m ? h = l[2] : (h = /* @__PURE__ */ jsx("span", {
57
26
  className: "text-sm font-medium",
58
27
  children: m
@@ -71,9 +40,9 @@ function WorkbenchFloatingPanel() {
71
40
  children: [h, _]
72
41
  }), l[6] = h, l[7] = _, l[8] = v) : v = l[8];
73
42
  let y;
74
- l[9] === u ? y = l[10] : (y = u === "navigation" && /* @__PURE__ */ jsx(NavigationContent, {}), l[9] = u, l[10] = y);
43
+ l[9] === d ? y = l[10] : (y = d === "history" && /* @__PURE__ */ jsx(HistoryContent, {}), l[9] = d, l[10] = y);
75
44
  let b;
76
- l[11] === u ? b = l[12] : (b = u === "history" && /* @__PURE__ */ jsx(HistoryContent, {}), l[11] = u, l[12] = b);
45
+ l[11] === d ? b = l[12] : (b = d === "secrets" && /* @__PURE__ */ jsx(WorkbenchSecretsPanel, {}), l[11] = d, l[12] = b);
77
46
  let x;
78
47
  l[13] !== y || l[14] !== b ? (x = /* @__PURE__ */ jsxs("div", {
79
48
  className: "flex-1 overflow-hidden",
@@ -1,49 +1,47 @@
1
- import { usePipeline, usePipelineConfigByName } from "../../../hooks/usePipelines.js";
2
- import { useWorkspace } from "../../../hooks/useWorkspaces.js";
3
- import { useFetchWorkflowsByPipeline } from "../../../hooks/useWorkflows.js";
4
- import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
1
+ import { useChildWorkflows, useWorkflow, useWorkflowConfigByName } from "../../../hooks/useWorkflows.js";
5
2
  import { ReactFlowProvider } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
6
- import PipelineFlowViewer_default from "../../debug/components/PipelineFlowViewer.js";
3
+ import WorkflowFlowViewer_default from "../../debug/components/WorkflowFlowViewer.js";
7
4
  import "../../debug/index.js";
5
+ import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
8
6
  import { c } from "react/compiler-runtime";
9
7
  import { useMemo } from "react";
10
8
  import { jsx, jsxs } from "react/jsx-runtime";
11
9
  import { X } from "lucide-react";
12
10
  function WorkbenchFlowPanel() {
13
- let f = c(13), { pipeline: p, closeSidePanel: m } = useWorkbenchLayout(), h = usePipeline(p.id), g = useWorkspace(p.workspaceId), _ = useFetchWorkflowsByPipeline(p.id), v = usePipelineConfigByName(g.data?.blockName, h.data?.blockName), y;
14
- f[0] === _.data ? y = f[1] : (y = _.data ?? [], f[0] = _.data, f[1] = y);
15
- let b = y, x;
16
- f[2] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ jsx("span", {
11
+ let d = c(13), { workflow: f, closeSidePanel: p } = useWorkbenchLayout(), m = useWorkflow(f.id), h = useChildWorkflows(f.id), g = useWorkflowConfigByName(m.data?.className ?? void 0), _;
12
+ d[0] === h.data ? _ = d[1] : (_ = h.data ?? [], d[0] = h.data, d[1] = _);
13
+ let v = _, y;
14
+ d[2] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ jsx("span", {
17
15
  className: "text-sm font-medium",
18
16
  children: "Graph"
19
- }), f[2] = x) : x = f[2];
20
- let S;
21
- f[3] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), f[3] = S) : S = f[3];
22
- let C;
23
- f[4] === m ? C = f[5] : (C = /* @__PURE__ */ jsxs("div", {
17
+ }), d[2] = y) : y = d[2];
18
+ let b;
19
+ d[3] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), d[3] = b) : b = d[3];
20
+ let x;
21
+ d[4] === p ? x = d[5] : (x = /* @__PURE__ */ jsxs("div", {
24
22
  className: "border-b flex h-12 shrink-0 items-center justify-between px-3",
25
- children: [x, /* @__PURE__ */ jsx("button", {
26
- onClick: m,
23
+ children: [y, /* @__PURE__ */ jsx("button", {
24
+ onClick: p,
27
25
  className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
28
- children: S
26
+ children: b
29
27
  })]
30
- }), f[4] = m, f[5] = C);
31
- let w;
32
- f[6] !== v || f[7] !== p.id || f[8] !== b ? (w = /* @__PURE__ */ jsx("div", {
28
+ }), d[4] = p, d[5] = x);
29
+ let S;
30
+ d[6] !== v || d[7] !== g || d[8] !== f.id ? (S = /* @__PURE__ */ jsx("div", {
33
31
  className: "flex-1 overflow-hidden",
34
- children: b.length > 0 ? /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(PipelineFlowViewer_default, {
35
- pipelineId: p.id,
36
- workflows: b,
37
- pipelineConfig: v.data
32
+ children: v.length > 0 ? /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(WorkflowFlowViewer_default, {
33
+ workflowId: f.id,
34
+ workflows: v,
35
+ workflowConfig: g.data
38
36
  }) }) : /* @__PURE__ */ jsx("div", {
39
37
  className: "text-muted-foreground flex h-full items-center justify-center text-sm",
40
38
  children: "No workflows found"
41
39
  })
42
- }), f[6] = v, f[7] = p.id, f[8] = b, f[9] = w) : w = f[9];
43
- let T;
44
- return f[10] !== C || f[11] !== w ? (T = /* @__PURE__ */ jsxs("div", {
40
+ }), d[6] = v, d[7] = g, d[8] = f.id, d[9] = S) : S = d[9];
41
+ let C;
42
+ return d[10] !== x || d[11] !== S ? (C = /* @__PURE__ */ jsxs("div", {
45
43
  className: "border-l bg-background flex w-1/2 shrink-0 flex-col",
46
- children: [C, w]
47
- }), f[10] = C, f[11] = w, f[12] = T) : T = f[12], T;
44
+ children: [x, S]
45
+ }), d[10] = x, d[11] = S, d[12] = C) : C = d[12], C;
48
46
  }
49
47
  export { WorkbenchFlowPanel };
@@ -3,7 +3,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/
3
3
  import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { Files, ListOrdered, MonitorPlay, Navigation, Workflow } from "lucide-react";
6
+ import { Files, KeyRound, ListOrdered, MonitorPlay, Workflow } from "lucide-react";
7
7
  function IconButton(s) {
8
8
  let l = c(11), { icon: u, label: d, active: f, onClick: p } = s, m = f ? "bg-foreground text-background" : "text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground", h;
9
9
  l[0] === m ? h = l[1] : (h = cn("flex h-10 w-10 items-center justify-center rounded-md transition-colors hover:cursor-pointer", m), l[0] = m, l[1] = h);
@@ -45,32 +45,32 @@ function WorkbenchIconSidebar() {
45
45
  onClick: () => _("history")
46
46
  })] }), e[4] = g, e[5] = v, e[6] = o, e[7] = _, e[8] = y, e[9] = x) : x = e[9];
47
47
  let S;
48
- e[10] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(Navigation, { className: "h-5 w-5" }), e[10] = S) : S = e[10];
49
- let C = g === "navigation", w;
50
- e[11] === _ ? w = e[12] : (w = () => _("navigation"), e[11] = _, e[12] = w);
51
- let T;
52
- e[13] !== C || e[14] !== w ? (T = /* @__PURE__ */ jsx(IconButton, {
53
- icon: S,
54
- label: "Navigate",
55
- active: C,
56
- onClick: w
57
- }), e[13] = C, e[14] = w, e[15] = T) : T = e[15];
58
- let E;
59
- e[16] !== v || e[17] !== a || e[18] !== y ? (E = a && /* @__PURE__ */ jsx(IconButton, {
48
+ e[10] !== v || e[11] !== a || e[12] !== y ? (S = a && /* @__PURE__ */ jsx(IconButton, {
60
49
  icon: /* @__PURE__ */ jsx(Files, { className: "h-5 w-5" }),
61
50
  label: "Files",
62
51
  active: v === "files",
63
52
  onClick: () => y("files")
64
- }), e[16] = v, e[17] = a, e[18] = y, e[19] = E) : E = e[19];
53
+ }), e[10] = v, e[11] = a, e[12] = y, e[13] = S) : S = e[13];
54
+ let C;
55
+ e[14] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(KeyRound, { className: "h-5 w-5" }), e[14] = C) : C = e[14];
56
+ let w = g === "secrets", T;
57
+ e[15] === _ ? T = e[16] : (T = () => _("secrets"), e[15] = _, e[16] = T);
58
+ let E;
59
+ e[17] !== w || e[18] !== T ? (E = /* @__PURE__ */ jsx(IconButton, {
60
+ icon: C,
61
+ label: "Secrets",
62
+ active: w,
63
+ onClick: T
64
+ }), e[17] = w, e[18] = T, e[19] = E) : E = e[19];
65
65
  let D;
66
- return e[20] !== b || e[21] !== x || e[22] !== T || e[23] !== E ? (D = /* @__PURE__ */ jsxs("div", {
66
+ return e[20] !== b || e[21] !== x || e[22] !== S || e[23] !== E ? (D = /* @__PURE__ */ jsxs("div", {
67
67
  className: "border-l bg-background flex w-12 shrink-0 flex-col items-center gap-1 py-2",
68
68
  children: [
69
69
  b,
70
70
  x,
71
- T,
71
+ S,
72
72
  E
73
73
  ]
74
- }), e[20] = b, e[21] = x, e[22] = T, e[23] = E, e[24] = D) : D = e[24], D;
74
+ }), e[20] = b, e[21] = x, e[22] = S, e[23] = E, e[24] = D) : D = e[24], D;
75
75
  }
76
76
  export { WorkbenchIconSidebar };
@@ -26,7 +26,7 @@ function WorkbenchPreviewPanel() {
26
26
  if (e.origin !== window.location.origin) return;
27
27
  let _ = e.data;
28
28
  if (_?.type !== EMBED_NEW_RUN_MESSAGE_TYPE) return;
29
- let v = _?.pipelineId;
29
+ let v = _?.workflowId;
30
30
  typeof v == "string" && D(v);
31
31
  };
32
32
  return window.addEventListener("message", e), () => window.removeEventListener("message", e);
@@ -117,7 +117,7 @@ function WorkbenchPreviewPanel() {
117
117
  ref: w,
118
118
  src: k,
119
119
  className: "bg-background h-full w-full rounded-lg",
120
- title: "Pipeline preview"
120
+ title: "Workflow preview"
121
121
  })
122
122
  }) : /* @__PURE__ */ jsx("div", {
123
123
  className: "text-zinc-400 flex flex-1 items-center justify-center text-sm",
@@ -0,0 +1,182 @@
1
+ import { Button } from "../../../components/ui/button.js";
2
+ import { Input } from "../../../components/ui/input.js";
3
+ import { Label } from "../../../components/ui/label.js";
4
+ import { useCreateSecret, useDeleteSecret, useUpdateSecret, useWorkspaceSecrets } from "../../../hooks/useSecrets.js";
5
+ import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
6
+ import { c } from "react/compiler-runtime";
7
+ import { useState } from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { KeyRound, Loader2, Plus, Trash2 } from "lucide-react";
10
+ function WorkbenchSecretsPanel() {
11
+ let _ = c(46), { workflow: v } = useWorkbenchLayout(), y = v?.workspaceId, { data: b, isLoading: x } = useWorkspaceSecrets(y), S = useCreateSecret(), C = useUpdateSecret(), w = useDeleteSecret(), [T, E] = useState(""), [D, O] = useState(""), [k, A] = useState(null), [j, M] = useState(""), N;
12
+ _[0] !== S || _[1] !== T || _[2] !== D || _[3] !== y ? (N = async () => {
13
+ !y || !T.trim() || !D.trim() || (await S.mutateAsync({
14
+ workspaceId: y,
15
+ key: T.trim(),
16
+ value: D
17
+ }), E(""), O(""));
18
+ }, _[0] = S, _[1] = T, _[2] = D, _[3] = y, _[4] = N) : N = _[4];
19
+ let P = N, F;
20
+ _[5] !== j || _[6] !== C || _[7] !== y ? (F = async (n) => {
21
+ !y || !j || (await C.mutateAsync({
22
+ workspaceId: y,
23
+ id: n,
24
+ value: j
25
+ }), A(null), M(""));
26
+ }, _[5] = j, _[6] = C, _[7] = y, _[8] = F) : F = _[8];
27
+ let I = F, L;
28
+ _[9] !== w || _[10] !== y ? (L = async (n) => {
29
+ y && await w.mutateAsync({
30
+ workspaceId: y,
31
+ id: n
32
+ });
33
+ }, _[9] = w, _[10] = y, _[11] = L) : L = _[11];
34
+ let R = L, z;
35
+ _[12] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ jsxs("div", {
36
+ className: "border-b px-4 py-3",
37
+ children: [/* @__PURE__ */ jsxs("div", {
38
+ className: "flex items-center gap-2",
39
+ children: [/* @__PURE__ */ jsx(KeyRound, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("h3", {
40
+ className: "text-sm font-medium",
41
+ children: "Secrets"
42
+ })]
43
+ }), /* @__PURE__ */ jsx("p", {
44
+ className: "text-muted-foreground mt-1 text-xs",
45
+ children: "Manage environment variables for this workspace."
46
+ })]
47
+ }), _[12] = z) : z = _[12];
48
+ let B;
49
+ _[13] !== j || _[14] !== k || _[15] !== R || _[16] !== I || _[17] !== x || _[18] !== b ? (B = /* @__PURE__ */ jsx("div", {
50
+ className: "flex-1 overflow-y-auto px-4 py-3",
51
+ children: x ? /* @__PURE__ */ jsxs("div", {
52
+ className: "flex items-center gap-2 py-4",
53
+ children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ jsx("span", {
54
+ className: "text-muted-foreground text-sm",
55
+ children: "Loading..."
56
+ })]
57
+ }) : /* @__PURE__ */ jsxs("div", {
58
+ className: "space-y-2",
59
+ children: [b?.map((g) => /* @__PURE__ */ jsxs("div", {
60
+ className: "bg-muted/50 flex items-center gap-2 rounded-md px-3 py-2",
61
+ children: [/* @__PURE__ */ jsxs("div", {
62
+ className: "flex-1",
63
+ children: [/* @__PURE__ */ jsx("div", {
64
+ className: "font-mono text-sm",
65
+ children: g.key
66
+ }), /* @__PURE__ */ jsx("div", {
67
+ className: "text-muted-foreground text-xs",
68
+ children: g.hasValue ? "Value set" : "No value"
69
+ })]
70
+ }), k === g.id ? /* @__PURE__ */ jsxs("div", {
71
+ className: "flex items-center gap-1",
72
+ children: [
73
+ /* @__PURE__ */ jsx(Input, {
74
+ type: "password",
75
+ value: j,
76
+ onChange: (n) => M(n.target.value),
77
+ placeholder: "New value",
78
+ className: "h-7 w-32 text-xs"
79
+ }),
80
+ /* @__PURE__ */ jsx(Button, {
81
+ size: "sm",
82
+ variant: "outline",
83
+ className: "h-7 text-xs",
84
+ onClick: () => void I(g.id),
85
+ children: "Save"
86
+ }),
87
+ /* @__PURE__ */ jsx(Button, {
88
+ size: "sm",
89
+ variant: "ghost",
90
+ className: "h-7 text-xs",
91
+ onClick: () => {
92
+ A(null), M("");
93
+ },
94
+ children: "Cancel"
95
+ })
96
+ ]
97
+ }) : /* @__PURE__ */ jsxs("div", {
98
+ className: "flex items-center gap-1",
99
+ children: [/* @__PURE__ */ jsx(Button, {
100
+ size: "sm",
101
+ variant: "ghost",
102
+ className: "h-7 text-xs",
103
+ onClick: () => {
104
+ A(g.id), M("");
105
+ },
106
+ children: "Update"
107
+ }), /* @__PURE__ */ jsx(Button, {
108
+ size: "sm",
109
+ variant: "ghost",
110
+ className: "h-7",
111
+ onClick: () => void R(g.id),
112
+ children: /* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3" })
113
+ })]
114
+ })]
115
+ }, g.id)), b?.length === 0 && /* @__PURE__ */ jsx("p", {
116
+ className: "text-muted-foreground py-4 text-center text-sm",
117
+ children: "No secrets yet."
118
+ })]
119
+ })
120
+ }), _[13] = j, _[14] = k, _[15] = R, _[16] = I, _[17] = x, _[18] = b, _[19] = B) : B = _[19];
121
+ let V;
122
+ _[20] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ jsx(Label, {
123
+ className: "text-xs",
124
+ children: "Add Secret"
125
+ }), _[20] = V) : V = _[20];
126
+ let H;
127
+ _[21] === Symbol.for("react.memo_cache_sentinel") ? (H = (n) => E(n.target.value), _[21] = H) : H = _[21];
128
+ let U;
129
+ _[22] === T ? U = _[23] : (U = /* @__PURE__ */ jsx(Input, {
130
+ value: T,
131
+ onChange: H,
132
+ placeholder: "KEY_NAME",
133
+ className: "font-mono text-sm"
134
+ }), _[22] = T, _[23] = U);
135
+ let W;
136
+ _[24] === Symbol.for("react.memo_cache_sentinel") ? (W = (n) => O(n.target.value), _[24] = W) : W = _[24];
137
+ let G;
138
+ _[25] === D ? G = _[26] : (G = /* @__PURE__ */ jsx(Input, {
139
+ type: "password",
140
+ value: D,
141
+ onChange: W,
142
+ placeholder: "Value",
143
+ className: "text-sm"
144
+ }), _[25] = D, _[26] = G);
145
+ let K;
146
+ _[27] !== S.isPending || _[28] !== T || _[29] !== D ? (K = !T.trim() || !D.trim() || S.isPending, _[27] = S.isPending, _[28] = T, _[29] = D, _[30] = K) : K = _[30];
147
+ let q;
148
+ _[31] === P ? q = _[32] : (q = () => void P(), _[31] = P, _[32] = q);
149
+ let J;
150
+ _[33] === S.isPending ? J = _[34] : (J = S.isPending ? /* @__PURE__ */ jsx(Loader2, { className: "mr-1 h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx(Plus, { className: "mr-1 h-3 w-3" }), _[33] = S.isPending, _[34] = J);
151
+ let Y;
152
+ _[35] !== K || _[36] !== q || _[37] !== J ? (Y = /* @__PURE__ */ jsxs(Button, {
153
+ size: "sm",
154
+ className: "w-full",
155
+ disabled: K,
156
+ onClick: q,
157
+ children: [J, "Add Secret"]
158
+ }), _[35] = K, _[36] = q, _[37] = J, _[38] = Y) : Y = _[38];
159
+ let X;
160
+ _[39] !== Y || _[40] !== U || _[41] !== G ? (X = /* @__PURE__ */ jsx("div", {
161
+ className: "border-t px-4 py-3",
162
+ children: /* @__PURE__ */ jsxs("div", {
163
+ className: "space-y-2",
164
+ children: [
165
+ V,
166
+ U,
167
+ G,
168
+ Y
169
+ ]
170
+ })
171
+ }), _[39] = Y, _[40] = U, _[41] = G, _[42] = X) : X = _[42];
172
+ let Z;
173
+ return _[43] !== X || _[44] !== B ? (Z = /* @__PURE__ */ jsxs("div", {
174
+ className: "flex h-full flex-col",
175
+ children: [
176
+ z,
177
+ B,
178
+ X
179
+ ]
180
+ }), _[43] = X, _[44] = B, _[45] = Z) : Z = _[45], Z;
181
+ }
182
+ export { WorkbenchSecretsPanel };