@loopstack/loopstack-studio 0.24.0 → 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 (105) hide show
  1. package/dist/api/config.js +3 -3
  2. package/dist/api/index.js +9 -13
  3. package/dist/api/processor.js +1 -1
  4. package/dist/api/workflows.js +7 -1
  5. package/dist/components/dynamic-form/CodeContent.js +3 -3
  6. package/dist/components/dynamic-form/fields/CodeViewField.js +36 -36
  7. package/dist/components/feedback/LoadingCentered.js +1 -1
  8. package/dist/components/layout/StudioSidebar.js +2 -2
  9. package/dist/components/loopstack-elements/link.js +77 -76
  10. package/dist/components/loopstack-elements/tool.js +171 -0
  11. package/dist/components/ui-widgets/UiActions.js +10 -4
  12. package/dist/components/ui-widgets/UiWidget.js +27 -36
  13. package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +8 -6
  14. package/dist/components/ui-widgets/widgets/SubmitButton.js +8 -6
  15. package/dist/features/code-explorer/components/FileContentViewer.js +87 -112
  16. package/dist/features/dashboard/RunItem.js +1 -1
  17. package/dist/features/debug/components/ConfigFlowViewer.js +2 -2
  18. package/dist/features/debug/components/{PipelineDebugHeader.js → WorkflowDebugHeader.js} +5 -5
  19. package/dist/features/debug/components/{PipelineDebugLegend.js → WorkflowDebugLegend.js} +2 -2
  20. package/dist/features/debug/components/{PipelineFlowViewer.js → WorkflowFlowViewer.js} +9 -9
  21. package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +46 -0
  22. package/dist/features/debug/index.js +2 -2
  23. package/dist/features/debug/lib/flow-utils.js +142 -150
  24. package/dist/features/documents/DocumentRenderer.js +66 -30
  25. package/dist/features/documents/components/DocumentItem.js +2 -2
  26. package/dist/features/documents/components/DocumentList.js +15 -12
  27. package/dist/features/documents/document-details/DocumentDetails.js +4 -4
  28. package/dist/features/documents/renderers/AiMessage.js +1 -1
  29. package/dist/features/documents/renderers/ChoicesRenderer.js +92 -0
  30. package/dist/features/documents/renderers/ClaudeMessage.js +1 -1
  31. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +56 -0
  32. package/dist/features/documents/renderers/DocumentFormRenderer.js +95 -71
  33. package/dist/features/documents/renderers/LinkMessageRenderer.js +8 -10
  34. package/dist/features/documents/renderers/SecretInputRenderer.js +87 -0
  35. package/dist/features/documents/renderers/TextPromptRenderer.js +57 -0
  36. package/dist/features/documents/renderers/useDocumentTransition.js +30 -0
  37. package/dist/features/oauth/OAuthPromptRenderer.js +20 -20
  38. package/dist/features/runs/Runs.js +8 -8
  39. package/dist/features/workbench/Workbench.js +35 -35
  40. package/dist/features/workbench/WorkflowItem.js +10 -9
  41. package/dist/features/workbench/WorkflowList.js +56 -73
  42. package/dist/features/workbench/components/NewRunDialog.js +18 -18
  43. package/dist/features/workbench/components/WorkbenchFilesPanel.js +1 -1
  44. package/dist/features/workbench/components/WorkbenchFloatingPanel.js +33 -72
  45. package/dist/features/workbench/components/WorkbenchFlowPanel.js +27 -29
  46. package/dist/features/workbench/components/WorkbenchIconSidebar.js +30 -42
  47. package/dist/features/workbench/components/WorkbenchPreviewPanel.js +2 -2
  48. package/dist/features/workbench/components/WorkbenchSecretsPanel.js +1 -1
  49. package/dist/features/workbench/components/WorkbenchSettingsModal.js +16 -41
  50. package/dist/features/workbench/components/WorkflowForms.js +14 -13
  51. package/dist/features/workbench/components/WorkflowHistoryItem.js +60 -81
  52. package/dist/features/workbench/components/{PipelineHistoryList.js → WorkflowHistoryList.js} +5 -5
  53. package/dist/features/workbench/components/buttons/WorkflowButtons.js +56 -54
  54. package/dist/features/workbench/hooks/useWorkflowData.js +10 -10
  55. package/dist/features/workbench/hooks/useWorkflowListState.js +8 -45
  56. package/dist/features/workbench/index.js +2 -3
  57. package/dist/features/workbench/providers/ScrollProvider.js +2 -2
  58. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +4 -4
  59. package/dist/features/workspaces/Workspaces.js +1 -1
  60. package/dist/features/workspaces/components/CreateWorkspace.js +12 -12
  61. package/dist/features/workspaces/components/ExecutionTimeline.js +22 -21
  62. package/dist/features/workspaces/components/{NewPipelineRunDialog.js → NewWorkflowRunDialog.js} +6 -6
  63. package/dist/features/workspaces/components/{PipelineForm.js → WorkflowRunForm.js} +31 -31
  64. package/dist/features/workspaces/components/WorkspaceHomePage.js +11 -11
  65. package/dist/features/workspaces/components/{pipeline-form → workflow-form}/ArgumentsView.js +1 -1
  66. package/dist/features/workspaces/components/{pipeline-form → workflow-form}/SelectionView.js +16 -16
  67. package/dist/hooks/index.js +3 -3
  68. package/dist/hooks/query-keys.js +31 -72
  69. package/dist/hooks/useConfig.js +5 -5
  70. package/dist/hooks/useProcessor.js +5 -5
  71. package/dist/hooks/useWorkflows.js +155 -68
  72. package/dist/index.d.ts +127 -128
  73. package/dist/index.js +5 -5
  74. package/dist/packages/contracts/dist/enums/index.js +11 -12
  75. package/dist/packages/contracts/dist/enums/workflow-state.enum.js +1 -1
  76. package/dist/pages/DebugWorkflowDetailsPage.js +8 -8
  77. package/dist/pages/DebugWorkflowsPage.js +10 -10
  78. package/dist/pages/EmbedWorkbenchPage.js +42 -52
  79. package/dist/pages/PreviewWorkbenchPage.js +130 -255
  80. package/dist/pages/RunsListPage.js +1 -1
  81. package/dist/pages/StudioLandingPage.js +13 -13
  82. package/dist/pages/WorkbenchPage.js +6 -6
  83. package/dist/pages/WorkflowDebugPage.js +114 -0
  84. package/dist/pages/WorkspacePage.js +4 -2
  85. package/dist/providers/InvalidationEventsProvider.js +19 -19
  86. package/dist/providers/SseProvider.js +0 -1
  87. package/dist/routing/LocalRouter.js +14 -17
  88. package/package.json +2 -2
  89. package/dist/api/namespaces.js +0 -7
  90. package/dist/api/pipelines.js +0 -13
  91. package/dist/components/ai-elements/tool.js +0 -158
  92. package/dist/components/ui-widgets/widgets/SecretInput.js +0 -42
  93. package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +0 -41
  94. package/dist/features/workbench/NavigationItems.js +0 -52
  95. package/dist/features/workbench/WorkbenchNavigation.js +0 -38
  96. package/dist/features/workbench/components/NavigationItem.js +0 -68
  97. package/dist/features/workbench/hooks/useIntersectionObserver.js +0 -44
  98. package/dist/hooks/useNamespaceTree.js +0 -27
  99. package/dist/hooks/useNamespaces.js +0 -25
  100. package/dist/hooks/usePipelines.js +0 -161
  101. package/dist/packages/contracts/dist/enums/pipeline-state.js +0 -10
  102. package/dist/pages/PipelineDebugPage.js +0 -115
  103. /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/StateNode.js +0 -0
  104. /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/WorkflowTransitionEdge.js +0 -0
  105. /package/dist/features/workspaces/components/{pipeline-form → workflow-form}/HeaderSection.js +0 -0
@@ -1,96 +1,57 @@
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";
7
3
  import { WorkbenchSecretsPanel } from "./WorkbenchSecretsPanel.js";
4
+ import WorkflowHistoryList_default from "./WorkflowHistoryList.js";
8
5
  import { c } from "react/compiler-runtime";
9
6
  import { jsx, jsxs } from "react/jsx-runtime";
10
7
  import { X } from "lucide-react";
11
8
  var PANEL_TITLES = {
12
- navigation: "Navigate",
13
9
  history: "Run Log",
14
10
  secrets: "Secrets"
15
11
  };
16
- function NavigationContent() {
17
- let e = c(3), { pipeline: p } = useWorkbenchLayout(), m;
18
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (m = { "--sidebar-width": "100%" }, e[0] = m) : m = e[0];
19
- let h;
20
- return e[1] === p.id ? h = e[2] : (h = /* @__PURE__ */ jsx(SidebarProvider, {
21
- defaultOpen: !0,
22
- className: "min-h-0",
23
- style: m,
24
- children: /* @__PURE__ */ jsx("div", {
25
- className: "w-full overflow-auto p-2",
26
- children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(NavigationContentInner, { pipelineId: p.id }) })
27
- })
28
- }), e[1] = p.id, e[2] = h), h;
29
- }
30
- function NavigationContentInner(e) {
31
- let u = c(3), { pipelineId: d } = e, f = useNamespaceTree(d);
32
- if (!f || f.length === 0) {
33
- let e;
34
- return u[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
35
- className: "text-muted-foreground py-4 text-center text-sm",
36
- children: "No navigation items"
37
- }), u[0] = e) : e = u[0], e;
38
- }
39
- let h;
40
- return u[1] === f ? h = u[2] : (h = /* @__PURE__ */ jsx(WorkbenchNavigation_default, {
41
- namespaceTree: f,
42
- indent: 0
43
- }), u[1] = f, u[2] = h), h;
44
- }
45
12
  function HistoryContent() {
46
- let e = c(2), { pipeline: u } = useWorkbenchLayout(), d;
47
- return e[0] === u ? d = e[1] : (d = /* @__PURE__ */ jsx("div", {
13
+ let e = c(2), { workflow: s } = useWorkbenchLayout(), u;
14
+ return e[0] === s ? u = e[1] : (u = /* @__PURE__ */ jsx("div", {
48
15
  className: "overflow-auto p-2",
49
- children: /* @__PURE__ */ jsx(PipelineHistoryList_default, { pipeline: u })
50
- }), e[0] = u, e[1] = d), d;
16
+ children: /* @__PURE__ */ jsx(WorkflowHistoryList_default, { workflow: s })
17
+ }), e[0] = s, e[1] = u), u;
51
18
  }
52
19
  function WorkbenchFloatingPanel() {
53
- let u = c(22), { activeFloatingPanel: d, closeFloatingPanel: p } = useWorkbenchLayout();
20
+ let l = c(19), { activeFloatingPanel: d, closeFloatingPanel: f } = useWorkbenchLayout();
54
21
  if (!d) return null;
55
- let m;
56
- u[0] === Symbol.for("react.memo_cache_sentinel") ? (m = 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"), u[0] = m) : m = u[0];
57
- let h = PANEL_TITLES[d], g;
58
- u[1] === h ? g = u[2] : (g = /* @__PURE__ */ jsx("span", {
22
+ let p;
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];
24
+ let m = PANEL_TITLES[d], h;
25
+ l[1] === m ? h = l[2] : (h = /* @__PURE__ */ jsx("span", {
59
26
  className: "text-sm font-medium",
60
- children: h
61
- }), u[1] = h, u[2] = g);
27
+ children: m
28
+ }), l[1] = m, l[2] = h);
29
+ let g;
30
+ l[3] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), l[3] = g) : g = l[3];
62
31
  let _;
63
- u[3] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), u[3] = _) : _ = u[3];
64
- let v;
65
- u[4] === p ? v = u[5] : (v = /* @__PURE__ */ jsx("button", {
66
- onClick: p,
32
+ l[4] === f ? _ = l[5] : (_ = /* @__PURE__ */ jsx("button", {
33
+ onClick: f,
67
34
  className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
68
- children: _
69
- }), u[4] = p, u[5] = v);
70
- let y;
71
- u[6] !== g || u[7] !== v ? (y = /* @__PURE__ */ jsxs("div", {
35
+ children: g
36
+ }), l[4] = f, l[5] = _);
37
+ let v;
38
+ l[6] !== h || l[7] !== _ ? (v = /* @__PURE__ */ jsxs("div", {
72
39
  className: "border-b flex h-12 shrink-0 items-center justify-between px-3",
73
- children: [g, v]
74
- }), u[6] = g, u[7] = v, u[8] = y) : y = u[8];
40
+ children: [h, _]
41
+ }), l[6] = h, l[7] = _, l[8] = v) : v = l[8];
42
+ let 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
- u[9] === d ? b = u[10] : (b = d === "navigation" && /* @__PURE__ */ jsx(NavigationContent, {}), u[9] = d, u[10] = 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
- u[11] === d ? x = u[12] : (x = d === "history" && /* @__PURE__ */ jsx(HistoryContent, {}), u[11] = d, u[12] = x);
79
- let S;
80
- u[13] === d ? S = u[14] : (S = d === "secrets" && /* @__PURE__ */ jsx(WorkbenchSecretsPanel, {}), u[13] = d, u[14] = S);
81
- let C;
82
- u[15] !== b || u[16] !== x || u[17] !== S ? (C = /* @__PURE__ */ jsxs("div", {
47
+ l[13] !== y || l[14] !== b ? (x = /* @__PURE__ */ jsxs("div", {
83
48
  className: "flex-1 overflow-hidden",
84
- children: [
85
- b,
86
- x,
87
- S
88
- ]
89
- }), u[15] = b, u[16] = x, u[17] = S, u[18] = C) : C = u[18];
90
- let w;
91
- return u[19] !== y || u[20] !== C ? (w = /* @__PURE__ */ jsxs("div", {
92
- className: m,
93
- children: [y, C]
94
- }), u[19] = y, u[20] = C, u[21] = w) : w = u[21], w;
49
+ children: [y, b]
50
+ }), l[13] = y, l[14] = b, l[15] = x) : x = l[15];
51
+ let S;
52
+ return l[16] !== v || l[17] !== x ? (S = /* @__PURE__ */ jsxs("div", {
53
+ className: p,
54
+ children: [v, x]
55
+ }), l[16] = v, l[17] = x, l[18] = S) : S = l[18], S;
95
56
  }
96
57
  export { WorkbenchFloatingPanel };
@@ -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, KeyRound, 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);
@@ -25,64 +25,52 @@ function IconButton(s) {
25
25
  return l[8] !== g || l[9] !== _ ? (v = /* @__PURE__ */ jsxs(Tooltip, { children: [g, _] }), l[8] = g, l[9] = _, l[10] = v) : v = l[10], v;
26
26
  }
27
27
  function WorkbenchIconSidebar() {
28
- let e = c(32), { previewPanelEnabled: i, fileExplorerEnabled: a, isDeveloperMode: o, activeFloatingPanel: _, toggleFloatingPanel: v, activeSidePanel: y, toggleSidePanel: b } = useWorkbenchLayout(), x;
29
- e[0] !== y || e[1] !== i || e[2] !== b ? (x = i && /* @__PURE__ */ jsx(IconButton, {
28
+ let e = c(25), { previewPanelEnabled: i, fileExplorerEnabled: a, isDeveloperMode: o, activeFloatingPanel: g, toggleFloatingPanel: _, activeSidePanel: v, toggleSidePanel: y } = useWorkbenchLayout(), b;
29
+ e[0] !== v || e[1] !== i || e[2] !== y ? (b = i && /* @__PURE__ */ jsx(IconButton, {
30
30
  icon: /* @__PURE__ */ jsx(MonitorPlay, { className: "h-5 w-5" }),
31
31
  label: "Preview",
32
- active: y === "preview",
33
- onClick: () => b("preview")
34
- }), e[0] = y, e[1] = i, e[2] = b, e[3] = x) : x = e[3];
35
- let S;
36
- e[4] !== _ || e[5] !== y || e[6] !== o || e[7] !== v || e[8] !== b ? (S = o && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconButton, {
32
+ active: v === "preview",
33
+ onClick: () => y("preview")
34
+ }), e[0] = v, e[1] = i, e[2] = y, e[3] = b) : b = e[3];
35
+ let x;
36
+ e[4] !== g || e[5] !== v || e[6] !== o || e[7] !== _ || e[8] !== y ? (x = o && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconButton, {
37
37
  icon: /* @__PURE__ */ jsx(Workflow, { className: "h-5 w-5" }),
38
38
  label: "Graph",
39
- active: y === "flow",
40
- onClick: () => b("flow")
39
+ active: v === "flow",
40
+ onClick: () => y("flow")
41
41
  }), /* @__PURE__ */ jsx(IconButton, {
42
42
  icon: /* @__PURE__ */ jsx(ListOrdered, { className: "h-5 w-5" }),
43
43
  label: "Run Log",
44
- active: _ === "history",
45
- onClick: () => v("history")
46
- })] }), e[4] = _, e[5] = y, e[6] = o, e[7] = v, e[8] = b, e[9] = S) : S = e[9];
44
+ active: g === "history",
45
+ onClick: () => _("history")
46
+ })] }), e[4] = g, e[5] = v, e[6] = o, e[7] = _, e[8] = y, e[9] = x) : x = e[9];
47
+ let S;
48
+ e[10] !== v || e[11] !== a || e[12] !== y ? (S = a && /* @__PURE__ */ jsx(IconButton, {
49
+ icon: /* @__PURE__ */ jsx(Files, { className: "h-5 w-5" }),
50
+ label: "Files",
51
+ active: v === "files",
52
+ onClick: () => y("files")
53
+ }), e[10] = v, e[11] = a, e[12] = y, e[13] = S) : S = e[13];
47
54
  let C;
48
- e[10] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(Navigation, { className: "h-5 w-5" }), e[10] = C) : C = e[10];
49
- let w = _ === "navigation", T;
50
- e[11] === v ? T = e[12] : (T = () => v("navigation"), e[11] = v, e[12] = T);
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);
51
58
  let E;
52
- e[13] !== w || e[14] !== T ? (E = /* @__PURE__ */ jsx(IconButton, {
59
+ e[17] !== w || e[18] !== T ? (E = /* @__PURE__ */ jsx(IconButton, {
53
60
  icon: C,
54
- label: "Navigate",
61
+ label: "Secrets",
55
62
  active: w,
56
63
  onClick: T
57
- }), e[13] = w, e[14] = T, e[15] = E) : E = e[15];
64
+ }), e[17] = w, e[18] = T, e[19] = E) : E = e[19];
58
65
  let D;
59
- e[16] !== y || e[17] !== a || e[18] !== b ? (D = a && /* @__PURE__ */ jsx(IconButton, {
60
- icon: /* @__PURE__ */ jsx(Files, { className: "h-5 w-5" }),
61
- label: "Files",
62
- active: y === "files",
63
- onClick: () => b("files")
64
- }), e[16] = y, e[17] = a, e[18] = b, e[19] = D) : D = e[19];
65
- let O;
66
- e[20] === Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ jsx(KeyRound, { className: "h-5 w-5" }), e[20] = O) : O = e[20];
67
- let k = _ === "secrets", A;
68
- e[21] === v ? A = e[22] : (A = () => v("secrets"), e[21] = v, e[22] = A);
69
- let j;
70
- e[23] !== k || e[24] !== A ? (j = /* @__PURE__ */ jsx(IconButton, {
71
- icon: O,
72
- label: "Secrets",
73
- active: k,
74
- onClick: A
75
- }), e[23] = k, e[24] = A, e[25] = j) : j = e[25];
76
- let M;
77
- return e[26] !== x || e[27] !== S || e[28] !== j || e[29] !== E || e[30] !== D ? (M = /* @__PURE__ */ jsxs("div", {
66
+ return e[20] !== b || e[21] !== x || e[22] !== S || e[23] !== E ? (D = /* @__PURE__ */ jsxs("div", {
78
67
  className: "border-l bg-background flex w-12 shrink-0 flex-col items-center gap-1 py-2",
79
68
  children: [
69
+ b,
80
70
  x,
81
71
  S,
82
- E,
83
- D,
84
- j
72
+ E
85
73
  ]
86
- }), e[26] = x, e[27] = S, e[28] = j, e[29] = E, e[30] = D, e[31] = M) : M = e[31], M;
74
+ }), e[20] = b, e[21] = x, e[22] = S, e[23] = E, e[24] = D) : D = e[24], D;
87
75
  }
88
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",
@@ -8,7 +8,7 @@ import { useState } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { KeyRound, Loader2, Plus, Trash2 } from "lucide-react";
10
10
  function WorkbenchSecretsPanel() {
11
- let _ = c(46), { pipeline: 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;
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
12
  _[0] !== S || _[1] !== T || _[2] !== D || _[3] !== y ? (N = async () => {
13
13
  !y || !T.trim() || !D.trim() || (await S.mutateAsync({
14
14
  workspaceId: y,
@@ -6,7 +6,7 @@ import { c } from "react/compiler-runtime";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { Settings } from "lucide-react";
8
8
  var WorkbenchSettingsModal_default = (p) => {
9
- let m = c(24), { settings: h, onSettingsChange: g, open: _, onOpenChange: v } = p, y;
9
+ let m = c(15), { settings: h, onSettingsChange: g, open: _, onOpenChange: v } = p, y;
10
10
  m[0] !== g || m[1] !== h ? (y = (e, f) => {
11
11
  g({
12
12
  ...h,
@@ -40,50 +40,25 @@ var WorkbenchSettingsModal_default = (p) => {
40
40
  let w;
41
41
  m[6] === b ? w = m[7] : (w = (e) => b("enableDebugMode", e), m[6] = b, m[7] = w);
42
42
  let T;
43
- m[8] !== h.enableDebugMode || m[9] !== w ? (T = /* @__PURE__ */ jsxs("div", {
44
- className: "flex items-center justify-between space-x-2",
45
- children: [C, /* @__PURE__ */ jsx(Switch, {
46
- id: "debug-mode",
47
- checked: h.enableDebugMode,
48
- onCheckedChange: w
49
- })]
50
- }), m[8] = h.enableDebugMode, m[9] = w, m[10] = T) : T = m[10];
51
- let E;
52
- m[11] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ jsxs("div", {
53
- className: "flex-1",
54
- children: [/* @__PURE__ */ jsx(Label, {
55
- htmlFor: "message-history",
56
- className: "text-sm font-medium",
57
- children: "Full Message History"
58
- }), /* @__PURE__ */ jsx("p", {
59
- className: "text-muted-foreground text-sm",
60
- children: "Show all internal messages and prompts"
61
- })]
62
- }), m[11] = E) : E = m[11];
63
- let D;
64
- m[12] === b ? D = m[13] : (D = (e) => b("showFullMessageHistory", e), m[12] = b, m[13] = D);
65
- let O;
66
- m[14] !== h.showFullMessageHistory || m[15] !== D ? (O = /* @__PURE__ */ jsxs("div", {
67
- className: "flex items-center justify-between space-x-2",
68
- children: [E, /* @__PURE__ */ jsx(Switch, {
69
- id: "message-history",
70
- checked: h.showFullMessageHistory,
71
- onCheckedChange: D
72
- })]
73
- }), m[14] = h.showFullMessageHistory, m[15] = D, m[16] = O) : O = m[16];
74
- let k;
75
- m[17] !== T || m[18] !== O ? (k = /* @__PURE__ */ jsxs(DialogContent, {
43
+ m[8] !== h.enableDebugMode || m[9] !== w ? (T = /* @__PURE__ */ jsxs(DialogContent, {
76
44
  className: "sm:max-w-md",
77
- children: [S, /* @__PURE__ */ jsxs("div", {
45
+ children: [S, /* @__PURE__ */ jsx("div", {
78
46
  className: "flex flex-col gap-4 p-4",
79
- children: [T, O]
47
+ children: /* @__PURE__ */ jsxs("div", {
48
+ className: "flex items-center justify-between space-x-2",
49
+ children: [C, /* @__PURE__ */ jsx(Switch, {
50
+ id: "debug-mode",
51
+ checked: h.enableDebugMode,
52
+ onCheckedChange: w
53
+ })]
54
+ })
80
55
  })]
81
- }), m[17] = T, m[18] = O, m[19] = k) : k = m[19];
82
- let A;
83
- return m[20] !== v || m[21] !== _ || m[22] !== k ? (A = /* @__PURE__ */ jsxs(Dialog, {
56
+ }), m[8] = h.enableDebugMode, m[9] = w, m[10] = T) : T = m[10];
57
+ let E;
58
+ return m[11] !== v || m[12] !== _ || m[13] !== T ? (E = /* @__PURE__ */ jsxs(Dialog, {
84
59
  open: _,
85
60
  onOpenChange: v,
86
- children: [x, k]
87
- }), m[20] = v, m[21] = _, m[22] = k, m[23] = A) : A = m[23], A;
61
+ children: [x, T]
62
+ }), m[11] = v, m[12] = _, m[13] = T, m[14] = E) : E = m[14], E;
88
63
  };
89
64
  export { WorkbenchSettingsModal_default as default };
@@ -1,21 +1,22 @@
1
+ import { useWorkflowConfigByName } from "../../../hooks/useWorkflows.js";
1
2
  import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
2
3
  import UiActions_default from "../../../components/ui-widgets/UiActions.js";
3
4
  import { c } from "react/compiler-runtime";
4
5
  import React from "react";
5
6
  import { jsx } from "react/jsx-runtime";
6
- var import_enums = require_enums(), WorkflowForms_default = (e) => {
7
- let o = c(8), { workflow: s, onSubmit: l } = e, u = s.ui?.actions;
8
- if (!u?.length) return null;
9
- let d;
10
- o[0] === s.availableTransitions ? d = o[1] : (d = s.availableTransitions?.map(_temp) ?? [], o[0] = s.availableTransitions, o[1] = d);
11
- let f = d, p = u, m = s.status === import_enums.WorkflowState.Completed, h;
12
- return o[2] !== f || o[3] !== l || o[4] !== p || o[5] !== m || o[6] !== s.place ? (h = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UiActions_default, {
13
- actions: p,
14
- availableTransitions: f,
15
- currentPlace: s.place,
16
- disabled: m,
17
- onSubmit: l
18
- }) }), o[2] = f, o[3] = l, o[4] = p, o[5] = m, o[6] = s.place, o[7] = h) : h = o[7], h;
7
+ var import_enums = require_enums(), WorkflowForms_default = (o) => {
8
+ let s = c(8), { workflow: l, onSubmit: u } = o, d = useWorkflowConfigByName(l.className ?? void 0).data?.ui, f = d?.widgets ?? d?.actions;
9
+ if (!f?.length) return null;
10
+ let p;
11
+ s[0] === l.availableTransitions ? p = s[1] : (p = l.availableTransitions?.map(_temp) ?? [], s[0] = l.availableTransitions, s[1] = p);
12
+ let m = p, h = f, g = l.status === import_enums.WorkflowState.Completed, _;
13
+ return s[2] !== m || s[3] !== u || s[4] !== h || s[5] !== g || s[6] !== l.place ? (_ = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UiActions_default, {
14
+ actions: h,
15
+ availableTransitions: m,
16
+ currentPlace: l.place,
17
+ disabled: g,
18
+ onSubmit: u
19
+ }) }), s[2] = m, s[3] = u, s[4] = h, s[5] = g, s[6] = l.place, s[7] = _) : _ = s[7], _;
19
20
  };
20
21
  function _temp(e) {
21
22
  return e.id;