@loopstack/loopstack-studio 0.29.5 → 0.31.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 (122) hide show
  1. package/dist/_virtual/rolldown_runtime.js +3 -1
  2. package/dist/api/config.js +5 -4
  3. package/dist/api/environments.js +5 -1
  4. package/dist/api/processor.js +4 -1
  5. package/dist/app/EnvironmentEmbedRoot.js +22 -30
  6. package/dist/components/ai-elements/code-block.js +4 -4
  7. package/dist/components/dynamic-form/CodeContent.js +1 -1
  8. package/dist/components/dynamic-form/FormBody.js +1 -1
  9. package/dist/components/layout/StudioSidebar.js +116 -131
  10. package/dist/components/lists/ListView.js +46 -46
  11. package/dist/components/motion/FadeIn.js +72 -0
  12. package/dist/components/motion/StreamingText.js +49 -0
  13. package/dist/components/ui/accordion.js +2 -2
  14. package/dist/components/ui-widgets/UiWidget.js +11 -10
  15. package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
  16. package/dist/events/sse-client-events.js +7 -1
  17. package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
  18. package/dist/features/dashboard/AppLauncher.js +84 -0
  19. package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
  20. package/dist/features/documents/DocumentRenderer.js +18 -17
  21. package/dist/features/documents/components/DocumentItem.js +42 -20
  22. package/dist/features/documents/components/DocumentList.js +34 -36
  23. package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
  24. package/dist/features/documents/document-details/DocumentDetails.js +577 -377
  25. package/dist/features/documents/document-details/PromptDetails.js +118 -130
  26. package/dist/features/documents/document-details/document-debug-utils.js +100 -0
  27. package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
  28. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
  29. package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
  30. package/dist/features/documents/renderers/LlmMessage.js +52 -47
  31. package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
  32. package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
  33. package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
  34. package/dist/features/feature-registry/available-features.js +12 -0
  35. package/dist/features/feature-registry/index.js +2 -1
  36. package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
  37. package/dist/features/git/components/GitBranchBadge.js +31 -0
  38. package/dist/features/git/components/GitCommitList.js +46 -0
  39. package/dist/features/git/components/GitRemoteStatus.js +84 -0
  40. package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
  41. package/dist/features/git/git-feature.js +12 -0
  42. package/dist/features/git/hooks/useGit.js +78 -0
  43. package/dist/features/git/index.js +1 -0
  44. package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
  45. package/dist/features/runs/Runs.js +73 -73
  46. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
  47. package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
  48. package/dist/features/workbench/Workbench.js +25 -33
  49. package/dist/features/workbench/WorkflowItem.js +9 -9
  50. package/dist/features/workbench/WorkflowList.js +61 -62
  51. package/dist/features/workbench/components/NewRunDialog.js +237 -209
  52. package/dist/features/workbench/components/RecentRunItem.js +3 -3
  53. package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
  54. package/dist/features/workbench/components/WorkbenchIconSidebar.js +74 -109
  55. package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
  56. package/dist/features/workbench/components/WorkflowForms.js +11 -10
  57. package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
  58. package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
  59. package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
  60. package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
  61. package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
  62. package/dist/features/workbench/index.js +2 -2
  63. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
  64. package/dist/features/workspaces/Workspaces.js +166 -136
  65. package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
  66. package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
  67. package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
  68. package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
  69. package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
  70. package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
  71. package/dist/hooks/index.js +3 -2
  72. package/dist/hooks/query-keys.js +43 -30
  73. package/dist/hooks/useConfig.js +28 -22
  74. package/dist/hooks/useEnvironments.js +27 -2
  75. package/dist/hooks/useProcessor.js +14 -1
  76. package/dist/hooks/useWorkflows.js +4 -4
  77. package/dist/index.d.ts +119 -18
  78. package/dist/index.js +10 -9
  79. package/dist/node_modules/d3/src/index.js +13 -13
  80. package/dist/node_modules/d3-scale/src/continuous.js +16 -16
  81. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
  82. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
  83. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
  84. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
  85. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
  86. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
  87. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
  88. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
  89. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
  90. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
  91. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
  92. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
  93. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
  94. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
  95. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
  96. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
  97. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
  98. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
  99. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
  100. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
  101. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
  102. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
  103. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
  104. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
  105. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
  106. package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
  107. package/dist/node_modules/motion/dist/es/react.js +9 -2
  108. package/dist/pages/DashboardPage.js +20 -74
  109. package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
  110. package/dist/pages/DebugWorkflowsPage.js +76 -106
  111. package/dist/pages/EmbedWorkbenchPage.js +1 -1
  112. package/dist/pages/PreviewWorkbenchPage.js +6 -6
  113. package/dist/pages/WorkbenchPage.js +43 -47
  114. package/dist/pages/WorkflowDebugPage.js +6 -12
  115. package/dist/pages/WorkspacePage.js +40 -66
  116. package/dist/pages/WorkspaceRunsPage.js +24 -31
  117. package/dist/routing/LocalRouter.js +1 -1
  118. package/package.json +2 -2
  119. package/dist/features/dashboard/Dashboard.js +0 -125
  120. package/dist/features/dashboard/RunItem.js +0 -78
  121. package/dist/features/dashboard/RunList.js +0 -32
  122. package/dist/hooks/useDashboard.js +0 -16
@@ -1,6 +1,6 @@
1
+ import { useResetEnvironment } from "../../../hooks/useEnvironments.js";
1
2
  import { Button } from "../../../components/ui/button.js";
2
3
  import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
3
- import { useResetEnvironment } from "../../../hooks/useEnvironments.js";
4
4
  import { SidebarPanel } from "./SidebarPanel.js";
5
5
  import { useState } from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -30,18 +30,18 @@ function WorkbenchEnvironmentPanel(d) {
30
30
  className: "flex-1 overflow-y-auto px-4 py-3",
31
31
  children: /* @__PURE__ */ jsxs("div", {
32
32
  className: "space-y-2",
33
- children: [y.map((u) => /* @__PURE__ */ jsxs("div", {
33
+ children: [y.map((e) => /* @__PURE__ */ jsxs("div", {
34
34
  className: "bg-muted/50 rounded-md px-3 py-3",
35
35
  children: [/* @__PURE__ */ jsxs("div", {
36
36
  className: "mb-2",
37
37
  children: [/* @__PURE__ */ jsx("div", {
38
38
  className: "text-sm font-medium",
39
- children: u.envName || u.slotId
39
+ children: e.envName || e.slotId
40
40
  }), /* @__PURE__ */ jsx("div", {
41
41
  className: "text-muted-foreground text-xs",
42
- children: u.type || "remote"
42
+ children: e.type || "remote"
43
43
  })]
44
- }), _ === u.slotId ? /* @__PURE__ */ jsxs("div", {
44
+ }), _ === e.slotId ? /* @__PURE__ */ jsxs("div", {
45
45
  className: "space-y-2",
46
46
  children: [/* @__PURE__ */ jsx("p", {
47
47
  className: "text-destructive text-xs",
@@ -53,7 +53,7 @@ function WorkbenchEnvironmentPanel(d) {
53
53
  variant: "destructive",
54
54
  className: "h-7 text-xs",
55
55
  disabled: g.isPending,
56
- onClick: () => void b(u.slotId),
56
+ onClick: () => void b(e.slotId),
57
57
  children: [g.isPending ? /* @__PURE__ */ jsx(Loader2, { className: "mr-1 h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx(RotateCcw, { className: "mr-1 h-3 w-3" }), "Confirm Reset"]
58
58
  }), /* @__PURE__ */ jsx(Button, {
59
59
  size: "sm",
@@ -68,10 +68,10 @@ function WorkbenchEnvironmentPanel(d) {
68
68
  size: "sm",
69
69
  variant: "outline",
70
70
  className: "h-7 text-xs",
71
- onClick: () => v(u.slotId),
71
+ onClick: () => v(e.slotId),
72
72
  children: [/* @__PURE__ */ jsx(RotateCcw, { className: "mr-1 h-3 w-3" }), "Reset Environment"]
73
73
  })]
74
- }, u.slotId)), y.length === 0 && /* @__PURE__ */ jsx("p", {
74
+ }, e.slotId)), y.length === 0 && /* @__PURE__ */ jsx("p", {
75
75
  className: "text-muted-foreground py-4 text-center text-sm",
76
76
  children: "No remote environments configured."
77
77
  })]
@@ -1,136 +1,101 @@
1
- import { useStudio } from "../../../providers/StudioProvider.js";
2
1
  import { cn } from "../../../lib/utils.js";
3
2
  import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip.js";
3
+ import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
4
4
  import { useFeatureRegistry } from "../../feature-registry/FeatureRegistryProvider.js";
5
5
  import "../../feature-registry/index.js";
6
- import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
7
6
  import { c } from "react/compiler-runtime";
8
7
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { Link, useLocation } from "react-router-dom";
10
- import { Home, MonitorPlay, Play, Server } from "lucide-react";
11
- function IconButton(e) {
12
- let l = c(12), { icon: u, label: f, active: p, disabled: m, onClick: h } = e, g = m ? void 0 : h, _ = m ? "text-muted-foreground/40 cursor-not-allowed" : p ? "bg-foreground text-background hover:cursor-pointer" : "text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground hover:cursor-pointer", v;
13
- l[0] === _ ? v = l[1] : (v = cn("flex h-10 w-10 items-center justify-center rounded-md transition-colors", _), l[0] = _, l[1] = v);
14
- let y;
15
- l[2] !== m || l[3] !== u || l[4] !== g || l[5] !== v ? (y = /* @__PURE__ */ jsx(TooltipTrigger, {
16
- asChild: !0,
17
- children: /* @__PURE__ */ jsx("button", {
18
- onClick: g,
19
- disabled: m,
20
- className: v,
21
- children: u
22
- })
23
- }), l[2] = m, l[3] = u, l[4] = g, l[5] = v, l[6] = y) : y = l[6];
24
- let b;
25
- l[7] === f ? b = l[8] : (b = /* @__PURE__ */ jsx(TooltipContent, {
26
- side: "left",
27
- children: f
28
- }), l[7] = f, l[8] = b);
29
- let x;
30
- return l[9] !== y || l[10] !== b ? (x = /* @__PURE__ */ jsxs(Tooltip, { children: [y, b] }), l[9] = y, l[10] = b, l[11] = x) : x = l[11], x;
31
- }
32
- function IconLink(e) {
33
- let l = c(11), { icon: u, label: p, to: m, active: h } = e, g = h ? "bg-foreground text-background" : "text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground", _;
34
- l[0] === g ? _ = l[1] : (_ = cn("flex h-10 w-10 items-center justify-center rounded-md transition-colors", g), l[0] = g, l[1] = _);
8
+ import { MonitorPlay, Play, Server } from "lucide-react";
9
+ function IconButton(a) {
10
+ let o = c(12), { icon: u, label: d, active: f, disabled: p, onClick: m } = a, h = p ? void 0 : m, g = p ? "text-muted-foreground/40 cursor-not-allowed" : f ? "bg-foreground text-background hover:cursor-pointer" : "text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground hover:cursor-pointer", _;
11
+ o[0] === g ? _ = o[1] : (_ = cn("flex h-10 w-10 items-center justify-center rounded-md transition-colors", g), o[0] = g, o[1] = _);
35
12
  let v;
36
- l[2] !== u || l[3] !== _ || l[4] !== m ? (v = /* @__PURE__ */ jsx(TooltipTrigger, {
13
+ o[2] !== p || o[3] !== u || o[4] !== h || o[5] !== _ ? (v = /* @__PURE__ */ jsx(TooltipTrigger, {
37
14
  asChild: !0,
38
- children: /* @__PURE__ */ jsx(Link, {
39
- to: m,
15
+ children: /* @__PURE__ */ jsx("button", {
16
+ onClick: h,
17
+ disabled: p,
40
18
  className: _,
41
19
  children: u
42
20
  })
43
- }), l[2] = u, l[3] = _, l[4] = m, l[5] = v) : v = l[5];
21
+ }), o[2] = p, o[3] = u, o[4] = h, o[5] = _, o[6] = v) : v = o[6];
44
22
  let y;
45
- l[6] === p ? y = l[7] : (y = /* @__PURE__ */ jsx(TooltipContent, {
23
+ o[7] === d ? y = o[8] : (y = /* @__PURE__ */ jsx(TooltipContent, {
46
24
  side: "left",
47
- children: p
48
- }), l[6] = p, l[7] = y);
25
+ children: d
26
+ }), o[7] = d, o[8] = y);
49
27
  let b;
50
- return l[8] !== v || l[9] !== y ? (b = /* @__PURE__ */ jsxs(Tooltip, { children: [v, y] }), l[8] = v, l[9] = y, l[10] = b) : b = l[10], b;
28
+ return o[9] !== v || o[10] !== y ? (b = /* @__PURE__ */ jsxs(Tooltip, { children: [v, y] }), o[9] = v, o[10] = y, o[11] = b) : b = o[11], b;
51
29
  }
52
30
  function WorkbenchIconSidebar() {
53
- let i = c(65), { previewPanelEnabled: a, activePanel: o, togglePanel: s, environments: f, workspaceId: b } = useWorkbenchLayout(), { router: C } = useStudio(), w = useLocation(), T = useFeatureRegistry(), E;
54
- i[0] === f ? E = i[1] : (E = f?.some(_temp) ?? !1, i[0] = f, i[1] = E);
55
- let D = E, O;
56
- i[2] !== C || i[3] !== b ? (O = C.getWorkspace(b), i[2] = C, i[3] = b, i[4] = O) : O = i[4];
57
- let k = O, A, j, M, N, P, F, I, L;
58
- if (i[5] !== o || i[6] !== T || i[7] !== D || i[8] !== w.pathname || i[9] !== a || i[10] !== s || i[11] !== k) {
59
- let e = T.filter(_temp2).map(_temp3);
60
- P = "border-l bg-background flex w-12 shrink-0 flex-col items-center", i[20] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ jsx("div", { className: "flex h-12 shrink-0 items-center justify-center border-b w-full" }), i[20] = F) : F = i[20];
61
- let l;
62
- i[21] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ jsx(Home, { className: "h-5 w-5" }), i[21] = l) : l = i[21];
63
- let u = w.pathname === k, d;
64
- i[22] !== u || i[23] !== k ? (d = /* @__PURE__ */ jsx(IconLink, {
65
- icon: l,
66
- label: "Workspace",
67
- to: k,
68
- active: u
69
- }), i[22] = u, i[23] = k, i[24] = d) : d = i[24];
70
- let f;
71
- i[25] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ jsx(Play, { className: "h-5 w-5" }), i[25] = f) : f = i[25];
72
- let p = o === "runs", b;
73
- i[26] === s ? b = i[27] : (b = () => s("runs"), i[26] = s, i[27] = b);
74
- let S;
75
- i[28] !== p || i[29] !== b ? (S = /* @__PURE__ */ jsx(IconButton, {
76
- icon: f,
77
- label: "Runs",
78
- active: p,
79
- onClick: b
80
- }), i[28] = p, i[29] = b, i[30] = S) : S = i[30], i[31] !== d || i[32] !== S ? (I = /* @__PURE__ */ jsxs("div", {
31
+ let e = c(53), { previewPanelEnabled: n, activePanel: r, togglePanel: i, environments: m } = useWorkbenchLayout(), v = useFeatureRegistry(), y;
32
+ e[0] === m ? y = e[1] : (y = m?.some(_temp) ?? !1, e[0] = m, e[1] = y);
33
+ let b = y, x, S, C, w, T, E, D, O;
34
+ if (e[2] !== r || e[3] !== v || e[4] !== b || e[5] !== n || e[6] !== i) {
35
+ let a = v.filter(_temp2).map(_temp3);
36
+ T = "border-l bg-background flex w-12 shrink-0 flex-col items-center", e[15] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ jsx("div", { className: "flex h-12 shrink-0 items-center justify-center border-b w-full" }), e[15] = E) : E = e[15];
37
+ let o;
38
+ e[16] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ jsx(Play, { className: "h-5 w-5" }), e[16] = o) : o = e[16];
39
+ let s = r === "runs", l;
40
+ e[17] === i ? l = e[18] : (l = () => i("runs"), e[17] = i, e[18] = l), e[19] !== s || e[20] !== l ? (D = /* @__PURE__ */ jsx("div", {
81
41
  className: "flex flex-col items-center gap-1 py-2",
82
- children: [d, S]
83
- }), i[31] = d, i[32] = S, i[33] = I) : I = i[33], i[34] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ jsx("div", { className: "mx-2 w-6 border-t" }), i[34] = L) : L = i[34], A = "flex flex-col items-center gap-1 py-2";
84
- let C;
85
- i[35] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(MonitorPlay, { className: "h-5 w-5" }), i[35] = C) : C = i[35];
86
- let E = a ? "Environment Preview" : "Preview not available for this environment", O = o === "preview", R = !a, z;
87
- i[36] === s ? z = i[37] : (z = () => s("preview"), i[36] = s, i[37] = z), i[38] !== E || i[39] !== O || i[40] !== R || i[41] !== z ? (j = /* @__PURE__ */ jsx(IconButton, {
88
- icon: C,
89
- label: E,
90
- active: O,
91
- disabled: R,
92
- onClick: z
93
- }), i[38] = E, i[39] = O, i[40] = R, i[41] = z, i[42] = j) : j = i[42];
94
- let B;
95
- i[43] === Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ jsx(Server, { className: "h-5 w-5" }), i[43] = B) : B = i[43];
96
- let V = D ? "Environment Settings" : "Settings not available for this environment", H = o === "environment", U = !D, W;
97
- i[44] === s ? W = i[45] : (W = () => s("environment"), i[44] = s, i[45] = W), i[46] !== V || i[47] !== H || i[48] !== U || i[49] !== W ? (M = /* @__PURE__ */ jsx(IconButton, {
98
- icon: B,
99
- label: V,
100
- active: H,
101
- disabled: U,
102
- onClick: W
103
- }), i[46] = V, i[47] = H, i[48] = U, i[49] = W, i[50] = M) : M = i[50];
104
- let G;
105
- i[51] !== o || i[52] !== s ? (G = (e) => {
106
- let i = e.icon;
42
+ children: /* @__PURE__ */ jsx(IconButton, {
43
+ icon: o,
44
+ label: "Runs",
45
+ active: s,
46
+ onClick: l
47
+ })
48
+ }), e[19] = s, e[20] = l, e[21] = D) : D = e[21], e[22] === Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ jsx("div", { className: "mx-2 w-6 border-t" }), e[22] = O) : O = e[22], x = "flex flex-col items-center gap-1 py-2";
49
+ let m;
50
+ e[23] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ jsx(MonitorPlay, { className: "h-5 w-5" }), e[23] = m) : m = e[23];
51
+ let _ = n ? "Environment Preview" : "Preview not available for this environment", y = r === "preview", k = !n, A;
52
+ e[24] === i ? A = e[25] : (A = () => i("preview"), e[24] = i, e[25] = A), e[26] !== _ || e[27] !== y || e[28] !== k || e[29] !== A ? (S = /* @__PURE__ */ jsx(IconButton, {
53
+ icon: m,
54
+ label: _,
55
+ active: y,
56
+ disabled: k,
57
+ onClick: A
58
+ }), e[26] = _, e[27] = y, e[28] = k, e[29] = A, e[30] = S) : S = e[30];
59
+ let j;
60
+ e[31] === Symbol.for("react.memo_cache_sentinel") ? (j = /* @__PURE__ */ jsx(Server, { className: "h-5 w-5" }), e[31] = j) : j = e[31];
61
+ let M = b ? "Environment Settings" : "Settings not available for this environment", N = r === "environment", P = !b, F;
62
+ e[32] === i ? F = e[33] : (F = () => i("environment"), e[32] = i, e[33] = F), e[34] !== M || e[35] !== N || e[36] !== P || e[37] !== F ? (C = /* @__PURE__ */ jsx(IconButton, {
63
+ icon: j,
64
+ label: M,
65
+ active: N,
66
+ disabled: P,
67
+ onClick: F
68
+ }), e[34] = M, e[35] = N, e[36] = P, e[37] = F, e[38] = C) : C = e[38];
69
+ let I;
70
+ e[39] !== r || e[40] !== i ? (I = (e) => {
71
+ let n = e.icon;
107
72
  return /* @__PURE__ */ jsx(IconButton, {
108
- icon: /* @__PURE__ */ jsx(i, { className: "h-5 w-5" }),
73
+ icon: /* @__PURE__ */ jsx(n, { className: "h-5 w-5" }),
109
74
  label: e.label,
110
- active: o === e.id,
111
- onClick: () => s(e.id)
75
+ active: r === e.id,
76
+ onClick: () => i(e.id)
112
77
  }, e.id);
113
- }, i[51] = o, i[52] = s, i[53] = G) : G = i[53], N = e.map(G), i[5] = o, i[6] = T, i[7] = D, i[8] = w.pathname, i[9] = a, i[10] = s, i[11] = k, i[12] = A, i[13] = j, i[14] = M, i[15] = N, i[16] = P, i[17] = F, i[18] = I, i[19] = L;
114
- } else A = i[12], j = i[13], M = i[14], N = i[15], P = i[16], F = i[17], I = i[18], L = i[19];
115
- let R;
116
- i[54] !== A || i[55] !== j || i[56] !== M || i[57] !== N ? (R = /* @__PURE__ */ jsxs("div", {
117
- className: A,
78
+ }, e[39] = r, e[40] = i, e[41] = I) : I = e[41], w = a.map(I), e[2] = r, e[3] = v, e[4] = b, e[5] = n, e[6] = i, e[7] = x, e[8] = S, e[9] = C, e[10] = w, e[11] = T, e[12] = E, e[13] = D, e[14] = O;
79
+ } else x = e[7], S = e[8], C = e[9], w = e[10], T = e[11], E = e[12], D = e[13], O = e[14];
80
+ let k;
81
+ e[42] !== x || e[43] !== S || e[44] !== C || e[45] !== w ? (k = /* @__PURE__ */ jsxs("div", {
82
+ className: x,
118
83
  children: [
119
- j,
120
- M,
121
- N
84
+ S,
85
+ C,
86
+ w
122
87
  ]
123
- }), i[54] = A, i[55] = j, i[56] = M, i[57] = N, i[58] = R) : R = i[58];
124
- let z;
125
- return i[59] !== R || i[60] !== P || i[61] !== F || i[62] !== I || i[63] !== L ? (z = /* @__PURE__ */ jsxs("div", {
126
- className: P,
88
+ }), e[42] = x, e[43] = S, e[44] = C, e[45] = w, e[46] = k) : k = e[46];
89
+ let A;
90
+ return e[47] !== T || e[48] !== E || e[49] !== D || e[50] !== O || e[51] !== k ? (A = /* @__PURE__ */ jsxs("div", {
91
+ className: T,
127
92
  children: [
128
- F,
129
- I,
130
- L,
131
- R
93
+ E,
94
+ D,
95
+ O,
96
+ k
132
97
  ]
133
- }), i[59] = R, i[60] = P, i[61] = F, i[62] = I, i[63] = L, i[64] = z) : z = i[64], z;
98
+ }), e[47] = T, e[48] = E, e[49] = D, e[50] = O, e[51] = k, e[52] = A) : A = e[52], A;
134
99
  }
135
100
  function _temp3(e) {
136
101
  return e.sidebarPanel;
@@ -1,6 +1,6 @@
1
+ import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
1
2
  import { useFeatureRegistry } from "../../feature-registry/FeatureRegistryProvider.js";
2
3
  import "../../feature-registry/index.js";
3
- import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
4
4
  import { WorkbenchEnvironmentPanel } from "./WorkbenchEnvironmentPanel.js";
5
5
  import { WorkbenchIconSidebar } from "./WorkbenchIconSidebar.js";
6
6
  import { WorkbenchPreviewPanel } from "./WorkbenchPreviewPanel.js";
@@ -49,8 +49,8 @@ function ActivePanelContent() {
49
49
  }
50
50
  }
51
51
  }
52
- function SidebarContent(e) {
53
- let i = c(12), { children: o } = e, { activePanel: s, panelSize: p } = useWorkbenchLayout(), m = `${s ? CONTENT_WIDTH[p] : "w-full"} overflow-hidden`, h;
52
+ function SidebarContent(r) {
53
+ let i = c(12), { children: o } = r, { activePanel: s, panelSize: p } = useWorkbenchLayout(), m = `${s ? CONTENT_WIDTH[p] : "w-full"} overflow-hidden`, h;
54
54
  i[0] !== o || i[1] !== m ? (h = /* @__PURE__ */ jsx("div", {
55
55
  className: m,
56
56
  children: o
@@ -6,18 +6,19 @@ import { c } from "react/compiler-runtime";
6
6
  import React from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  var WorkflowForms_default = (o) => {
9
- let s = c(8), { workflow: l, onSubmit: u } = o, d = useWorkflowConfigByName(l.className ?? void 0).data?.ui, f = d?.widgets ?? d?.actions;
10
- if (!f?.length) return null;
11
- let p;
12
- s[0] === l.availableTransitions ? p = s[1] : (p = l.availableTransitions?.map(_temp) ?? [], s[0] = l.availableTransitions, s[1] = p);
13
- let m = p, h = f, g = l.status === WorkflowState.Completed, _;
14
- 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, {
15
- actions: h,
16
- availableTransitions: m,
9
+ let s = c(9), { workflow: l, onSubmit: u, isLoading: d } = o, f = useWorkflowConfigByName(l.workflowName).data?.ui, p = f?.widgets ?? f?.actions;
10
+ if (!p?.length) return null;
11
+ let m;
12
+ s[0] === l.availableTransitions ? m = s[1] : (m = l.availableTransitions?.map(_temp) ?? [], s[0] = l.availableTransitions, s[1] = m);
13
+ let h = m, g = p, _ = l.status === WorkflowState.Completed, v;
14
+ return s[2] !== h || s[3] !== d || s[4] !== u || s[5] !== g || s[6] !== _ || s[7] !== l.place ? (v = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UiActions_default, {
15
+ actions: g,
16
+ availableTransitions: h,
17
17
  currentPlace: l.place,
18
- disabled: g,
18
+ disabled: _,
19
+ isLoading: d,
19
20
  onSubmit: u
20
- }) }), s[2] = m, s[3] = u, s[4] = h, s[5] = g, s[6] = l.place, s[7] = _) : _ = s[7], _;
21
+ }) }), s[2] = h, s[3] = d, s[4] = u, s[5] = g, s[6] = _, s[7] = l.place, s[8] = v) : v = s[8], v;
21
22
  };
22
23
  function _temp(e) {
23
24
  return e.id;
@@ -7,7 +7,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { ChevronRight, Clock, Loader2, Play } from "lucide-react";
8
8
  import { format } from "date-fns";
9
9
  var WorkflowHistoryItem_default = (m) => {
10
- let h = c(19), { workflowId: g, workflow: _ } = m, v = useWorkflowCheckpoints(g), y = v.data;
10
+ let h = c(17), { workflowId: g, workflow: _ } = m, v = useWorkflowCheckpoints(g), y = v.data;
11
11
  if (v.isLoading) {
12
12
  let e;
13
13
  return h[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("li", {
@@ -24,7 +24,7 @@ var WorkflowHistoryItem_default = (m) => {
24
24
  if (!y?.length) return null;
25
25
  let b;
26
26
  h[1] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ jsx(Play, { className: "text-primary h-3.5 w-3.5 fill-current" }), h[1] = b) : b = h[1];
27
- let x = _.title ?? _.alias, S;
27
+ let x = _.title ?? _.workflowName, S;
28
28
  h[2] === x ? S = h[3] : (S = /* @__PURE__ */ jsx("span", {
29
29
  className: "truncate text-sm",
30
30
  children: x
@@ -44,27 +44,11 @@ var WorkflowHistoryItem_default = (m) => {
44
44
  })
45
45
  }), h[5] = S, h[6] = w);
46
46
  let T;
47
- h[7] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ jsx("div", { className: "from-primary/60 via-primary/30 to-muted/20 absolute top-7 bottom-3 left-1.75 w-0.5 rounded-full bg-linear-to-b" }), h[7] = T) : T = h[7];
47
+ h[7] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ jsx("div", { className: "from-primary/60 via-primary/30 to-muted/20 absolute top-3 bottom-3 left-1.75 w-0.5 rounded-full bg-linear-to-b" }), h[7] = T) : T = h[7];
48
48
  let E;
49
- h[8] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ jsx("div", {
50
- className: "relative z-10 flex shrink-0 items-center justify-center",
51
- children: /* @__PURE__ */ jsx("div", { className: "border-primary/60 bg-primary/20 flex h-4 w-4 items-center justify-center rounded-full border-2" })
52
- }), h[8] = E) : E = h[8];
53
- let D;
54
- h[9] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsxs("div", {
55
- className: "group/entry relative flex gap-3 py-1 pl-0",
56
- children: [E, /* @__PURE__ */ jsx("div", {
57
- className: "flex min-w-0 flex-1 items-center gap-1.5",
58
- children: /* @__PURE__ */ jsx("span", {
59
- className: "bg-muted text-foreground w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium",
60
- children: "start"
61
- })
62
- })]
63
- }), h[9] = D) : D = h[9];
64
- let O;
65
- if (h[10] !== y) {
49
+ if (h[8] !== y) {
66
50
  let e;
67
- h[12] === y.length ? e = h[13] : (e = (e, u) => {
51
+ h[10] === y.length ? e = h[11] : (e = (e, u) => {
68
52
  let d = u === y.length - 1, f = e.place ?? "unknown", p = e.transitionId;
69
53
  return /* @__PURE__ */ jsxs("div", {
70
54
  className: "group/entry relative flex gap-3 py-1 pl-0",
@@ -100,29 +84,25 @@ var WorkflowHistoryItem_default = (m) => {
100
84
  })
101
85
  })]
102
86
  })]
103
- }, e.version);
104
- }, h[12] = y.length, h[13] = e), O = y.map(e), h[10] = y, h[11] = O;
105
- } else O = h[11];
106
- let k;
107
- h[14] === O ? k = h[15] : (k = /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("ul", {
87
+ }, e.id);
88
+ }, h[10] = y.length, h[11] = e), E = y.map(e), h[8] = y, h[9] = E;
89
+ } else E = h[9];
90
+ let D;
91
+ h[12] === E ? D = h[13] : (D = /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("ul", {
108
92
  className: "ml-2 flex min-w-0 flex-col gap-1 pl-0",
109
93
  children: /* @__PURE__ */ jsxs("div", {
110
94
  className: "relative py-2",
111
- children: [
112
- T,
113
- D,
114
- O
115
- ]
95
+ children: [T, E]
116
96
  })
117
- }) }), h[14] = O, h[15] = k);
118
- let A;
119
- return h[16] !== k || h[17] !== w ? (A = /* @__PURE__ */ jsx(Collapsible, {
97
+ }) }), h[12] = E, h[13] = D);
98
+ let O;
99
+ return h[14] !== w || h[15] !== D ? (O = /* @__PURE__ */ jsx(Collapsible, {
120
100
  defaultOpen: !0,
121
101
  className: "group/collapsible",
122
102
  children: /* @__PURE__ */ jsxs("li", {
123
103
  className: "group/menu-item relative list-none",
124
- children: [w, k]
104
+ children: [w, D]
125
105
  })
126
- }), h[16] = k, h[17] = w, h[18] = A) : A = h[18], A;
106
+ }), h[14] = w, h[15] = D, h[16] = O) : O = h[16], O;
127
107
  };
128
108
  export { WorkflowHistoryItem_default as default };
@@ -5,47 +5,49 @@ import React, { useMemo } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Clock, Loader2 } from "lucide-react";
7
7
  var WorkflowHistoryList_default = (s) => {
8
- let l = c(10), { workflow: u } = s, d = useChildWorkflows(u?.id), f;
8
+ let l = c(13), { workflow: u } = s, d = useChildWorkflows(u?.id), f;
9
9
  l[0] === d.data ? f = l[1] : (f = d.data ?? [], l[0] = d.data, l[1] = f);
10
- let p = f;
10
+ let p = f, m;
11
+ l[2] !== p || l[3] !== u ? (m = u ? [u, ...p] : p, l[2] = p, l[3] = u, l[4] = m) : m = l[4];
12
+ let h = m;
11
13
  if (!u) {
12
14
  let e;
13
- return l[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
15
+ return l[5] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
14
16
  className: "text-muted-foreground flex items-center justify-center py-8 text-sm",
15
17
  children: "No workflow selected"
16
- }), l[2] = e) : e = l[2], e;
18
+ }), l[5] = e) : e = l[5], e;
17
19
  }
18
20
  if (d.isLoading) {
19
21
  let e;
20
- return l[3] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
22
+ return l[6] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
21
23
  className: "flex items-center justify-center py-8",
22
24
  children: /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-5 w-5 animate-spin" })
23
- }), l[3] = e) : e = l[3], e;
25
+ }), l[6] = e) : e = l[6], e;
24
26
  }
25
27
  if (d.error) {
26
28
  let e;
27
- return l[4] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
29
+ return l[7] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
28
30
  className: "text-destructive px-2 py-4 text-sm",
29
31
  children: "Failed to load history"
30
- }), l[4] = e) : e = l[4], e;
32
+ }), l[7] = e) : e = l[7], e;
31
33
  }
32
- if (p.length === 0) {
34
+ if (h.length === 0) {
33
35
  let e;
34
- return l[5] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsxs("div", {
36
+ return l[8] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsxs("div", {
35
37
  className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-8",
36
38
  children: [/* @__PURE__ */ jsx(Clock, { className: "h-6 w-6" }), /* @__PURE__ */ jsx("span", {
37
39
  className: "text-sm",
38
40
  children: "No workflow history"
39
41
  })]
40
- }), l[5] = e) : e = l[5], e;
42
+ }), l[8] = e) : e = l[8], e;
41
43
  }
42
- let m;
43
- l[6] === p ? m = l[7] : (m = p.map(_temp), l[6] = p, l[7] = m);
44
- let h;
45
- return l[8] === m ? h = l[9] : (h = /* @__PURE__ */ jsx("div", {
44
+ let g;
45
+ l[9] === h ? g = l[10] : (g = h.map(_temp), l[9] = h, l[10] = g);
46
+ let _;
47
+ return l[11] === g ? _ = l[12] : (_ = /* @__PURE__ */ jsx("div", {
46
48
  className: "flex flex-col gap-1 py-2",
47
- children: m
48
- }), l[8] = m, l[9] = h), h;
49
+ children: g
50
+ }), l[11] = g, l[12] = _), _;
49
51
  };
50
52
  function _temp(e) {
51
53
  return /* @__PURE__ */ jsx(WorkflowHistoryItem_default, {
@@ -10,9 +10,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { LockOpen, Repeat } from "lucide-react";
11
11
  var WorkflowButtons_default = (T) => {
12
12
  let E = c(34), { workflow: D, workflowId: O } = T, { router: k } = useStudio(), A = useWorkflow(O).data, j = useCreateWorkflow(), M = useRunWorkflow(), N = j.isPending || M.isPending, P;
13
- E[0] !== j || E[1] !== k || E[2] !== M || E[3] !== D.alias || E[4] !== D.args || E[5] !== D.workspaceId ? (P = () => {
13
+ E[0] !== j || E[1] !== k || E[2] !== M || E[3] !== D.args || E[4] !== D.workflowName || E[5] !== D.workspaceId ? (P = () => {
14
14
  j.mutate({ workflowCreateDto: {
15
- alias: D.alias,
15
+ workflowName: D.workflowName,
16
16
  title: null,
17
17
  workspaceId: D.workspaceId,
18
18
  transition: null,
@@ -26,7 +26,7 @@ var WorkflowButtons_default = (T) => {
26
26
  k.navigateToWorkflow(t.id);
27
27
  } });
28
28
  } });
29
- }, E[0] = j, E[1] = k, E[2] = M, E[3] = D.alias, E[4] = D.args, E[5] = D.workspaceId, E[6] = P) : P = E[6];
29
+ }, E[0] = j, E[1] = k, E[2] = M, E[3] = D.args, E[4] = D.workflowName, E[5] = D.workspaceId, E[6] = P) : P = E[6];
30
30
  let F = P, I;
31
31
  E[7] !== M || E[8] !== D.id || E[9] !== O ? (I = () => {
32
32
  M.mutate({