@loopstack/loopstack-studio 0.22.0 → 0.23.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 (82) hide show
  1. package/dist/app/EnvironmentEmbedRoot.js +20 -18
  2. package/dist/components/feedback/ErrorBoundary.js +43 -0
  3. package/dist/components/{LoadingCentered.js → feedback/LoadingCentered.js} +1 -1
  4. package/dist/components/feedback/index.js +5 -0
  5. package/dist/components/index.js +6 -3
  6. package/dist/components/layout/MainLayout.js +32 -16
  7. package/dist/components/layout/StudioSidebar.js +165 -0
  8. package/dist/components/ui-widgets/widgets/SandboxRun.js +1 -0
  9. package/dist/features/code-explorer/CodeExplorer.js +6 -0
  10. package/dist/features/code-explorer/components/CodeExplorerTree.js +5 -0
  11. package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +6 -0
  12. package/dist/features/code-explorer/components/FileContentViewer.js +1 -0
  13. package/dist/features/code-explorer/components/FileTabsBar.js +1 -1
  14. package/dist/features/code-explorer/index.js +4 -0
  15. package/dist/features/debug/components/ConfigFlowViewer.js +1 -1
  16. package/dist/features/debug/components/PipelineFlowViewer.js +1 -1
  17. package/dist/features/debug/index.js +3 -0
  18. package/dist/features/documents/DocumentRenderer.js +53 -0
  19. package/dist/features/{workbench → documents}/components/DocumentItem.js +1 -1
  20. package/dist/features/{workbench → documents}/components/DocumentMetadataPills.js +2 -2
  21. package/dist/features/{workbench/components → documents}/document-details/DocumentDetails.js +3 -3
  22. package/dist/features/{workbench/components → documents}/document-details/PromptDetails.js +3 -3
  23. package/dist/features/documents/index.js +4 -0
  24. package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessage.js +5 -5
  25. package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentDebugRenderer.js +1 -1
  26. package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentFormRenderer.js +3 -3
  27. package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentMessageRenderer.js +1 -1
  28. package/dist/features/{workbench/components/document-renderer → documents/renderers}/ErrorMessageRenderer.js +1 -1
  29. package/dist/features/{workbench/components/document-renderer → documents/renderers}/LinkMessageRenderer.js +1 -1
  30. package/dist/features/{workbench/components/document-renderer → documents/renderers}/MarkdownMessageRenderer.js +2 -2
  31. package/dist/features/{workbench/components/document-renderer → documents/renderers}/PlainMessageRenderer.js +1 -1
  32. package/dist/features/health/index.js +1 -0
  33. package/dist/features/workbench/NavigationItems.js +29 -29
  34. package/dist/features/workbench/Workbench.js +57 -69
  35. package/dist/features/workbench/WorkflowItem.js +63 -55
  36. package/dist/features/workbench/WorkflowList.js +52 -81
  37. package/dist/features/workbench/components/NewRunDialog.js +2 -1
  38. package/dist/features/workbench/components/WorkbenchFlowPanel.js +5 -4
  39. package/dist/features/workbench/components/WorkflowHistoryItem.js +11 -11
  40. package/dist/features/workbench/components/buttons/WorkflowButtons.js +49 -50
  41. package/dist/features/workbench/hooks/useWorkflowData.js +49 -0
  42. package/dist/features/workbench/hooks/useWorkflowListState.js +50 -0
  43. package/dist/features/workbench/index.js +8 -0
  44. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +2 -3
  45. package/dist/features/workspaces/components/CreateWorkspace.js +1 -1
  46. package/dist/features/workspaces/components/ExecutionTimeline.js +1 -1
  47. package/dist/features/workspaces/components/PipelineForm.js +1 -1
  48. package/dist/features/workspaces/index.js +3 -0
  49. package/dist/hooks/index.js +3 -2
  50. package/dist/hooks/query-keys.js +138 -0
  51. package/dist/hooks/useAuth.js +43 -42
  52. package/dist/hooks/useConfig.js +31 -35
  53. package/dist/hooks/useDashboard.js +9 -13
  54. package/dist/hooks/useDebounce.js +8 -17
  55. package/dist/hooks/useDocuments.js +4 -9
  56. package/dist/hooks/useFiles.js +31 -39
  57. package/dist/hooks/useNamespaces.js +2 -8
  58. package/dist/hooks/usePipelines.js +132 -155
  59. package/dist/hooks/useProcessor.js +11 -14
  60. package/dist/hooks/useWorkflows.js +40 -62
  61. package/dist/hooks/useWorkspaces.js +105 -110
  62. package/dist/index.d.ts +99 -3
  63. package/dist/index.js +14 -7
  64. package/dist/pages/DashboardPage.js +1 -1
  65. package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
  66. package/dist/pages/EmbedWorkbenchPage.js +4 -3
  67. package/dist/pages/PipelineDebugPage.js +6 -5
  68. package/dist/pages/PreviewWorkbenchPage.js +121 -118
  69. package/dist/pages/RunsListPage.js +52 -24
  70. package/dist/pages/StudioLandingPage.js +1 -0
  71. package/dist/pages/WorkbenchPage.js +3 -2
  72. package/dist/pages/WorkspacePage.js +1 -1
  73. package/dist/providers/InvalidationEventsProvider.js +9 -11
  74. package/dist/providers/StudioProvider.js +2 -2
  75. package/dist/routing/LocalRouter.js +12 -8
  76. package/package.json +1 -1
  77. package/dist/features/workbench/components/DocumentRenderer.js +0 -54
  78. /package/dist/components/{content → feedback}/ErrorAlert.js +0 -0
  79. /package/dist/components/{snackbars → feedback}/ErrorSnackbar.js +0 -0
  80. /package/dist/components/{snackbars → feedback}/Snackbar.js +0 -0
  81. /package/dist/features/{workbench → documents}/components/DocumentList.js +0 -0
  82. /package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessageContent.js +0 -0
@@ -1,15 +1,16 @@
1
- import { usePipeline, usePipelineConfig } from "../../../hooks/usePipelines.js";
1
+ import { usePipeline, usePipelineConfigByName } from "../../../hooks/usePipelines.js";
2
2
  import { useWorkspace } from "../../../hooks/useWorkspaces.js";
3
- import { useFetchWorkflowsByPipeline } from "../../../hooks/useWorkflows.js";
4
3
  import { ReactFlowProvider } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
5
- import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
4
+ import { useFetchWorkflowsByPipeline } from "../../../hooks/useWorkflows.js";
6
5
  import PipelineFlowViewer_default from "../../debug/components/PipelineFlowViewer.js";
6
+ import "../../debug/index.js";
7
+ import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
7
8
  import { c } from "react/compiler-runtime";
8
9
  import { useMemo } from "react";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
11
  import { X } from "lucide-react";
11
12
  function WorkbenchFlowPanel() {
12
- let f = c(13), { pipeline: p, closeSidePanel: m } = useWorkbenchLayout(), h = usePipeline(p.id), g = useWorkspace(p.workspaceId), _ = useFetchWorkflowsByPipeline(p.id), v = usePipelineConfig(g.data?.blockName, h.data?.blockName), y;
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;
13
14
  f[0] === _.data ? y = f[1] : (y = _.data ?? [], f[0] = _.data, f[1] = y);
14
15
  let b = y, x;
15
16
  f[2] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ jsx("span", {
@@ -1,7 +1,7 @@
1
- import { useWorkflow } from "../../../hooks/useWorkflows.js";
2
1
  import { cn } from "../../../lib/utils.js";
3
2
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
4
3
  import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip.js";
4
+ import { useWorkflow } from "../../../hooks/useWorkflows.js";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import React from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -10,8 +10,8 @@ import { format } from "date-fns";
10
10
  var WorkflowHistoryItem_default = (_) => {
11
11
  let y = c(19), { workflowId: b, workflow: x } = _, S = useWorkflow(b), C = S.data?.history;
12
12
  if (S.isLoading) {
13
- let e;
14
- return y[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("li", {
13
+ let t;
14
+ return y[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ jsx("li", {
15
15
  className: "group/menu-item relative list-none",
16
16
  children: /* @__PURE__ */ jsxs("div", {
17
17
  className: "flex w-full items-center gap-2 rounded-md p-2 text-sm opacity-50",
@@ -20,7 +20,7 @@ var WorkflowHistoryItem_default = (_) => {
20
20
  children: "Loading..."
21
21
  })]
22
22
  })
23
- }), y[0] = e) : e = y[0], e;
23
+ }), y[0] = t) : t = y[0], t;
24
24
  }
25
25
  if (!C?.length) return null;
26
26
  let w;
@@ -64,10 +64,10 @@ var WorkflowHistoryItem_default = (_) => {
64
64
  }), y[9] = j) : j = y[9];
65
65
  let M;
66
66
  if (y[10] !== C) {
67
- let e;
68
- y[12] === C.length ? e = y[13] : (e = (e, p) => {
69
- console.log(e);
70
- let m = e.data?.transition, h = Object.keys(e.data?.tools ?? {}), g = p === C.length - 1, _ = e.data?.place ?? m?.to ?? "unknown", v = m?.id;
67
+ let f;
68
+ y[12] === C.length ? f = y[13] : (f = (f, p) => {
69
+ console.log(f);
70
+ let m = f.data?.transition, h = Object.keys(f.data?.tools ?? {}), g = p === C.length - 1, _ = f.data?.place ?? m?.to ?? "unknown", v = m?.id;
71
71
  return /* @__PURE__ */ jsxs("div", {
72
72
  className: "group/entry relative flex gap-3 py-1 pl-0",
73
73
  children: [/* @__PURE__ */ jsx("div", {
@@ -116,13 +116,13 @@ var WorkflowHistoryItem_default = (_) => {
116
116
  className: "flex items-center gap-0.5",
117
117
  children: [/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }), /* @__PURE__ */ jsx("span", {
118
118
  className: "tabular-nums",
119
- children: format(new Date(e.timestamp), "HH:mm:ss")
119
+ children: format(new Date(f.timestamp), "HH:mm:ss")
120
120
  })]
121
121
  })]
122
122
  })]
123
123
  })]
124
- }, e.version);
125
- }, y[12] = C.length, y[13] = e), M = C.map(e), y[10] = C, y[11] = M;
124
+ }, f.version);
125
+ }, y[12] = C.length, y[13] = f), M = C.map(f), y[10] = C, y[11] = M;
126
126
  } else M = y[11];
127
127
  let N;
128
128
  y[14] === M ? N = y[15] : (N = /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("ul", {
@@ -1,48 +1,47 @@
1
- import { useStudio } from "../../../../providers/StudioProvider.js";
2
- import { useDeleteWorkflow, useWorkflow } from "../../../../hooks/useWorkflows.js";
3
1
  import { Button } from "../../../../components/ui/button.js";
4
2
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../../../../components/ui/alert-dialog.js";
5
3
  import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../components/ui/tooltip.js";
6
4
  import { useRunPipeline } from "../../../../hooks/useProcessor.js";
5
+ import { useDeleteWorkflow, useWorkflow } from "../../../../hooks/useWorkflows.js";
7
6
  import { c } from "react/compiler-runtime";
8
7
  import React from "react";
9
8
  import { jsx, jsxs } from "react/jsx-runtime";
10
9
  import { LockOpen, Repeat } from "lucide-react";
11
- var WorkflowButtons_default = (T) => {
12
- let E = c(36), { pipeline: D, workflowId: O } = T, { router: k } = useStudio(), A = useWorkflow(O).data, j = useDeleteWorkflow(), M = useRunPipeline(), N;
13
- E[0] !== D.id || E[1] !== M ? (N = () => {
14
- M.mutate({
15
- pipelineId: D.id,
10
+ var WorkflowButtons_default = (w) => {
11
+ let T = c(34), { pipeline: E, workflowId: D } = w, O = useWorkflow(D).data, k = useDeleteWorkflow(), A = useRunPipeline(), j;
12
+ T[0] !== E.id || T[1] !== A ? (j = () => {
13
+ A.mutate({
14
+ pipelineId: E.id,
16
15
  runPipelinePayloadDto: {},
17
16
  force: !1
18
17
  });
19
- }, E[0] = D.id, E[1] = M, E[2] = N) : N = E[2];
20
- let P = N, F;
21
- E[3] !== D.id || E[4] !== M || E[5] !== O ? (F = () => {
22
- M.mutate({
23
- pipelineId: D.id,
18
+ }, T[0] = E.id, T[1] = A, T[2] = j) : j = T[2];
19
+ let M = j, N;
20
+ T[3] !== E.id || T[4] !== A || T[5] !== D ? (N = () => {
21
+ A.mutate({
22
+ pipelineId: E.id,
24
23
  runPipelinePayloadDto: { transition: {
25
24
  name: "unlock",
26
- workflowId: O
25
+ workflowId: D
27
26
  } },
28
27
  force: !1
29
28
  });
30
- }, E[3] = D.id, E[4] = M, E[5] = O, E[6] = F) : F = E[6];
31
- let I = F, L;
32
- E[7] !== j || E[8] !== P || E[9] !== D.id || E[10] !== k || E[11] !== A ? (L = () => {
33
- if (A) try {
34
- j.mutate(A), P(), k.navigateToPipeline(D.id);
29
+ }, T[3] = E.id, T[4] = A, T[5] = D, T[6] = N) : N = T[6];
30
+ let P = N, F;
31
+ T[7] !== k || T[8] !== M || T[9] !== O ? (F = () => {
32
+ if (O) try {
33
+ k.mutate(O), M();
35
34
  } catch (t) {
36
- let w = t;
37
- console.error("Mutation failed:", w);
35
+ let C = t;
36
+ console.error("Mutation failed:", C);
38
37
  }
39
- }, E[7] = j, E[8] = P, E[9] = D.id, E[10] = k, E[11] = A, E[12] = L) : L = E[12];
40
- let R = L;
41
- if (!A) return null;
42
- let z;
43
- E[13] === j.isPending ? z = E[14] : (z = j.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(Repeat, { className: "h-3.5 w-3.5" }), E[13] = j.isPending, E[14] = z);
44
- let B;
45
- E[15] !== j.isPending || E[16] !== z ? (B = /* @__PURE__ */ jsx(TooltipTrigger, {
38
+ }, T[7] = k, T[8] = M, T[9] = O, T[10] = F) : F = T[10];
39
+ let I = F;
40
+ if (!O) return null;
41
+ let L;
42
+ T[11] === k.isPending ? L = T[12] : (L = k.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(Repeat, { className: "h-3.5 w-3.5" }), T[11] = k.isPending, T[12] = L);
43
+ let R;
44
+ T[13] !== k.isPending || T[14] !== L ? (R = /* @__PURE__ */ jsx(TooltipTrigger, {
46
45
  asChild: !0,
47
46
  children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
48
47
  asChild: !0,
@@ -50,28 +49,28 @@ var WorkflowButtons_default = (T) => {
50
49
  variant: "ghost",
51
50
  size: "icon",
52
51
  className: "h-7 w-7",
53
- disabled: j.isPending,
54
- children: z
52
+ disabled: k.isPending,
53
+ children: L
55
54
  })
56
55
  })
57
- }), E[15] = j.isPending, E[16] = z, E[17] = B) : B = E[17];
56
+ }), T[13] = k.isPending, T[14] = L, T[15] = R) : R = T[15];
57
+ let z;
58
+ T[16] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ jsx(TooltipContent, { children: "Repeat" }), T[16] = z) : z = T[16];
59
+ let B;
60
+ T[17] === R ? B = T[18] : (B = /* @__PURE__ */ jsxs(Tooltip, { children: [R, z] }), T[17] = R, T[18] = B);
58
61
  let V;
59
- E[18] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ jsx(TooltipContent, { children: "Repeat" }), E[18] = V) : V = E[18];
62
+ T[19] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Repeat workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This will delete the current workflow run and re-trigger the pipeline." })] }), T[19] = V) : V = T[19];
60
63
  let H;
61
- E[19] === B ? H = E[20] : (H = /* @__PURE__ */ jsxs(Tooltip, { children: [B, V] }), E[19] = B, E[20] = H);
64
+ T[20] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), T[20] = H) : H = T[20];
62
65
  let U;
63
- E[21] === Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Repeat workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This will delete the current workflow run and re-trigger the pipeline." })] }), E[21] = U) : U = E[21];
66
+ T[21] === I ? U = T[22] : (U = /* @__PURE__ */ jsxs(AlertDialogContent, { children: [V, /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [H, /* @__PURE__ */ jsx(AlertDialogAction, {
67
+ onClick: I,
68
+ children: "Repeat"
69
+ })] })] }), T[21] = I, T[22] = U);
64
70
  let W;
65
- E[22] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), E[22] = W) : W = E[22];
71
+ T[23] !== U || T[24] !== B ? (W = /* @__PURE__ */ jsxs(AlertDialog, { children: [B, U] }), T[23] = U, T[24] = B, T[25] = W) : W = T[25];
66
72
  let G;
67
- E[23] === R ? G = E[24] : (G = /* @__PURE__ */ jsxs(AlertDialogContent, { children: [U, /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [W, /* @__PURE__ */ jsx(AlertDialogAction, {
68
- onClick: R,
69
- children: "Repeat"
70
- })] })] }), E[23] = R, E[24] = G);
71
- let K;
72
- E[25] !== G || E[26] !== H ? (K = /* @__PURE__ */ jsxs(AlertDialog, { children: [H, G] }), E[25] = G, E[26] = H, E[27] = K) : K = E[27];
73
- let q;
74
- E[28] !== I || E[29] !== M.isPending || E[30] !== A.availableTransitions || E[31] !== A.place ? (q = A.place === "end" && A.availableTransitions?.find(_temp2) && /* @__PURE__ */ jsxs(AlertDialog, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
73
+ T[26] !== P || T[27] !== A.isPending || T[28] !== O.availableTransitions || T[29] !== O.place ? (G = O.place === "end" && O.availableTransitions?.find(_temp2) && /* @__PURE__ */ jsxs(AlertDialog, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
75
74
  asChild: !0,
76
75
  children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
77
76
  asChild: !0,
@@ -79,20 +78,20 @@ var WorkflowButtons_default = (T) => {
79
78
  variant: "ghost",
80
79
  size: "icon",
81
80
  className: "h-7 w-7",
82
- disabled: M.isPending,
83
- children: M.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(LockOpen, { className: "h-3.5 w-3.5" })
81
+ disabled: A.isPending,
82
+ children: A.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(LockOpen, { className: "h-3.5 w-3.5" })
84
83
  })
85
84
  })
86
85
  }), /* @__PURE__ */ jsx(TooltipContent, { children: "Unlock Step" })] }), /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Unlock workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "Are you sure you want to unlock this workflow?" })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx(AlertDialogAction, {
87
- onClick: I,
86
+ onClick: P,
88
87
  children: "Unlock"
89
- })] })] })] }), E[28] = I, E[29] = M.isPending, E[30] = A.availableTransitions, E[31] = A.place, E[32] = q) : q = E[32];
90
- let J;
91
- return E[33] !== K || E[34] !== q ? (J = /* @__PURE__ */ jsxs("div", {
88
+ })] })] })] }), T[26] = P, T[27] = A.isPending, T[28] = O.availableTransitions, T[29] = O.place, T[30] = G) : G = T[30];
89
+ let K;
90
+ return T[31] !== W || T[32] !== G ? (K = /* @__PURE__ */ jsxs("div", {
92
91
  className: "flex items-center",
93
92
  onClick: _temp,
94
- children: [K, q]
95
- }), E[33] = K, E[34] = q, E[35] = J) : J = E[35], J;
93
+ children: [W, G]
94
+ }), T[31] = W, T[32] = G, T[33] = K) : K = T[33], K;
96
95
  };
97
96
  function _temp(t) {
98
97
  return t.stopPropagation();
@@ -0,0 +1,49 @@
1
+ import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
2
+ import { useRunPipeline } from "../../../hooks/useProcessor.js";
3
+ import { useWorkflow } from "../../../hooks/useWorkflows.js";
4
+ import { useFilterDocuments } from "../../../hooks/useDocuments.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { useCallback, useMemo } from "react";
7
+ var import_enums = require_enums();
8
+ function useWorkflowData(e) {
9
+ let o = c(22), { workflowId: s, showFullMessageHistory: l } = e, u = useWorkflow(s), d = useFilterDocuments(s), f = useRunPipeline(), p;
10
+ o[0] !== u.data?.place || o[1] !== l ? (p = (e) => {
11
+ let r = e.meta, i = e.ui, a = r?.hidden || i?.hidden || !!r?.hideAtPlaces?.includes(u.data?.place ?? "");
12
+ return !l && e.tags?.includes("internal") && (a = !0), !a;
13
+ }, o[0] = u.data?.place, o[1] = l, o[2] = p) : p = o[2];
14
+ let m = p, h;
15
+ bb0: {
16
+ if (!d.data) {
17
+ let e;
18
+ o[3] === Symbol.for("react.memo_cache_sentinel") ? (e = [], o[3] = e) : e = o[3], h = e;
19
+ break bb0;
20
+ }
21
+ let e;
22
+ o[4] !== d.data || o[5] !== m ? (e = d.data.filter(m), o[4] = d.data, o[5] = m, o[6] = e) : e = o[6], h = e;
23
+ }
24
+ let g = h, _;
25
+ o[7] !== u.data || o[8] !== f || o[9] !== s ? (_ = (e, r) => {
26
+ f.mutate({
27
+ pipelineId: u.data.pipelineId,
28
+ runPipelinePayloadDto: { transition: {
29
+ id: e,
30
+ workflowId: s,
31
+ payload: r
32
+ } }
33
+ });
34
+ }, o[7] = u.data, o[8] = f, o[9] = s, o[10] = _) : _ = o[10];
35
+ let v = _, y = f.isPending || u.data?.status === import_enums.WorkflowState.Running, b = u.data?.errorMessage, x;
36
+ return o[11] !== g || o[12] !== d.error || o[13] !== d.isLoading || o[14] !== d.isSuccess || o[15] !== u.data || o[16] !== u.isLoading || o[17] !== u.isSuccess || o[18] !== v || o[19] !== y || o[20] !== b ? (x = {
37
+ workflow: u.data,
38
+ workflowLoading: u.isLoading,
39
+ workflowReady: u.isSuccess,
40
+ workflowError: b,
41
+ documents: g,
42
+ documentsLoading: d.isLoading,
43
+ documentsReady: d.isSuccess,
44
+ documentsError: d.error,
45
+ isLoading: y,
46
+ handleRun: v
47
+ }, o[11] = g, o[12] = d.error, o[13] = d.isLoading, o[14] = d.isSuccess, o[15] = u.data, o[16] = u.isLoading, o[17] = u.isSuccess, o[18] = v, o[19] = y, o[20] = b, o[21] = x) : x = o[21], x;
48
+ }
49
+ export { useWorkflowData };
@@ -0,0 +1,50 @@
1
+ import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
2
+ import { useScrollToBottom } from "./useAutoScrollBottom.js";
3
+ import { useIntersectionObserver } from "./useIntersectionObserver.js";
4
+ import { useScrollToListItem } from "./useScrollToListItem.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { useEffect, useState } from "react";
7
+ function useWorkflowListState(s) {
8
+ let l = c(19), u;
9
+ l[0] === Symbol.for("react.memo_cache_sentinel") ? (u = {}, l[0] = u) : u = l[0];
10
+ let [d, f] = useState(u), { activeId: p, observe: m } = useIntersectionObserver("0px 0px 0px 0px"), { listRef: h, scrollTo: g } = useScrollToListItem(), { canScrollDown: _, scrollToBottom: v } = useScrollToBottom(), { activeSectionId: y, setActiveSectionId: b } = useWorkbenchLayout(), x, S;
11
+ l[1] !== p || l[2] !== y || l[3] !== b ? (x = () => {
12
+ y !== p && (b(p), p && f((e) => ({
13
+ ...e,
14
+ [p]: !0
15
+ })));
16
+ }, S = [
17
+ p,
18
+ y,
19
+ b
20
+ ], l[1] = p, l[2] = y, l[3] = b, l[4] = x, l[5] = S) : (x = l[4], S = l[5]), useEffect(x, S);
21
+ let C, w;
22
+ l[6] !== p || l[7] !== s ? (C = () => {
23
+ if (s && s.length > 0) {
24
+ let e = s[s.length - 1], o = `section-${e.index}-${e.id}`;
25
+ f({
26
+ [o]: !0,
27
+ ...p && p !== o ? { [p]: !0 } : {}
28
+ });
29
+ }
30
+ }, w = [s, p], l[6] = p, l[7] = s, l[8] = C, l[9] = w) : (C = l[8], w = l[9]), useEffect(C, w);
31
+ let T;
32
+ l[10] === Symbol.for("react.memo_cache_sentinel") ? (T = (e) => {
33
+ f((o) => ({
34
+ ...o,
35
+ [e]: !o[e]
36
+ }));
37
+ }, l[10] = T) : T = l[10];
38
+ let E = T, D;
39
+ return l[11] !== p || l[12] !== _ || l[13] !== d || l[14] !== h || l[15] !== m || l[16] !== g || l[17] !== v ? (D = {
40
+ activeId: p,
41
+ expandedSections: d,
42
+ observe: m,
43
+ listRef: h,
44
+ scrollTo: g,
45
+ canScrollDown: _,
46
+ scrollToBottom: v,
47
+ toggleSection: E
48
+ }, l[11] = p, l[12] = _, l[13] = d, l[14] = h, l[15] = m, l[16] = g, l[17] = v, l[18] = D) : D = l[18], D;
49
+ }
50
+ export { useWorkflowListState };
@@ -0,0 +1,8 @@
1
+ import WorkflowItem_default from "./WorkflowItem.js";
2
+ import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
3
+ import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
4
+ import WorkflowList_default from "./WorkflowList.js";
5
+ import WorkbenchNavigation_default from "./WorkbenchNavigation.js";
6
+ import PipelineHistoryList_default from "./components/PipelineHistoryList.js";
7
+ import Workbench from "./Workbench.js";
8
+ import { NewRunDialog } from "./components/NewRunDialog.js";
@@ -66,12 +66,11 @@ function WorkbenchLayoutProvider(a) {
66
66
  }), o[36] = s, o[37] = Y, o[38] = X) : X = o[38], X;
67
67
  }
68
68
  function _temp(t) {
69
- return !!t.connectionUrl && !!t.workerId;
69
+ return !!t.connectionUrl && (!!t.workerId || t.local);
70
70
  }
71
71
  function useWorkbenchLayout() {
72
72
  let t = useContext(WorkbenchLayoutContext);
73
73
  if (!t) throw Error("useWorkbenchLayout must be used within a WorkbenchLayoutProvider");
74
74
  return t;
75
75
  }
76
- const WorkbenchContextProvider = createContext(null);
77
- export { WorkbenchContextProvider, WorkbenchLayoutProvider, useWorkbenchLayout };
76
+ export { WorkbenchLayoutProvider, useWorkbenchLayout };
@@ -5,7 +5,7 @@ import { DialogHeader } from "../../../components/ui/dialog.js";
5
5
  import { Input } from "../../../components/ui/input.js";
6
6
  import { Label } from "../../../components/ui/label.js";
7
7
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select.js";
8
- import ErrorSnackbar_default from "../../../components/snackbars/ErrorSnackbar.js";
8
+ import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
9
9
  import { EnvironmentSlotSelector } from "./EnvironmentSlotSelector.js";
10
10
  import { c } from "react/compiler-runtime";
11
11
  import { useCallback, useEffect, useMemo, useState } from "react";
@@ -2,7 +2,7 @@ import { useStudio } from "../../../providers/StudioProvider.js";
2
2
  import { useBatchDeletePipeline, useChildPipelines, useFilterPipelines } from "../../../hooks/usePipelines.js";
3
3
  import { Badge } from "../../../components/ui/badge.js";
4
4
  import CustomListView_default from "../../../components/lists/CustomListView.js";
5
- import ErrorSnackbar_default from "../../../components/snackbars/ErrorSnackbar.js";
5
+ import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
6
6
  import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
7
7
  import NewPipelineRunDialog_default from "./NewPipelineRunDialog.js";
8
8
  import { c } from "react/compiler-runtime";
@@ -1,7 +1,7 @@
1
1
  import { useStudio } from "../../../providers/StudioProvider.js";
2
2
  import { usePipelineConfig } from "../../../hooks/useConfig.js";
3
3
  import { useCreatePipeline } from "../../../hooks/usePipelines.js";
4
- import ErrorSnackbar_default from "../../../components/snackbars/ErrorSnackbar.js";
4
+ import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
5
5
  import ArgumentsView_default from "./pipeline-form/ArgumentsView.js";
6
6
  import SelectionView_default from "./pipeline-form/SelectionView.js";
7
7
  import { useRunPipeline } from "../../../hooks/useProcessor.js";
@@ -0,0 +1,3 @@
1
+ import { EnvironmentSlotSelector } from "./components/EnvironmentSlotSelector.js";
2
+ import CreateWorkspace_default from "./components/CreateWorkspace.js";
3
+ import Workspaces_default from "./Workspaces.js";
@@ -1,5 +1,6 @@
1
+ import { getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
1
2
  import { useApiClient } from "./useApi.js";
2
3
  import { useIsMobile } from "./use-mobile.js";
3
- import { useAvailableEnvironments, useWorkspaceConfig } from "./useConfig.js";
4
- import { useBatchDeletePipeline, useChildPipelines, useCreatePipeline, useDeletePipeline, useFilterPipelines, usePipeline, usePipelineConfig, usePipelineSource, useUpdatePipeline } from "./usePipelines.js";
4
+ import { useAvailableEnvironments, usePipelineConfig, useWorkspaceConfig } from "./useConfig.js";
5
+ import { useBatchDeletePipeline, useChildPipelines, useCreatePipeline, useDeletePipeline, useFilterPipelines, usePipeline, usePipelineConfigByName, usePipelineSource, useUpdatePipeline } from "./usePipelines.js";
5
6
  import { useBatchDeleteWorkspaces, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace, useUpdateWorkspace, useWorkspace } from "./useWorkspaces.js";
@@ -0,0 +1,138 @@
1
+ function getMeCacheKey(e) {
2
+ return ["me", e];
3
+ }
4
+ function getHealthCacheKey(e) {
5
+ return ["health", e];
6
+ }
7
+ function getWorkspaceTypesCacheKey(e) {
8
+ return ["workspace-types", e];
9
+ }
10
+ function getPipelineTypesCacheKey(e, x) {
11
+ return [
12
+ "pipeline-types",
13
+ e,
14
+ x
15
+ ];
16
+ }
17
+ function getAvailableEnvironmentsCacheKey(e) {
18
+ return ["available-environments", e];
19
+ }
20
+ function getDashboardStatsCacheKey(e) {
21
+ return [
22
+ "dashboard",
23
+ "stats",
24
+ e
25
+ ];
26
+ }
27
+ function getPipelineCacheKey(e, x) {
28
+ return [
29
+ "pipeline",
30
+ e,
31
+ x
32
+ ];
33
+ }
34
+ function getPipelinesCacheKey(e) {
35
+ return ["pipelines", e];
36
+ }
37
+ function getPipelinesChildrenCacheKey(e, x) {
38
+ return [
39
+ "pipelines",
40
+ "children",
41
+ e,
42
+ x
43
+ ];
44
+ }
45
+ function getPipelineConfigCacheKey(e, x, S) {
46
+ return [
47
+ "pipelineConfig",
48
+ e,
49
+ x,
50
+ S
51
+ ];
52
+ }
53
+ function getPipelineSourceCacheKey(e, x, S) {
54
+ return [
55
+ "pipelineSource",
56
+ e,
57
+ x,
58
+ S
59
+ ];
60
+ }
61
+ function getWorkspaceCacheKey(e, x) {
62
+ return [
63
+ "workspace",
64
+ e,
65
+ x
66
+ ];
67
+ }
68
+ function getWorkspacesCacheKey(e) {
69
+ return ["workspaces", e];
70
+ }
71
+ function getWorkflowCacheKey(e, x) {
72
+ return [
73
+ "workflow",
74
+ e,
75
+ x
76
+ ];
77
+ }
78
+ function getWorkflowsCacheKey(e, x) {
79
+ return [
80
+ "workflows",
81
+ e,
82
+ x
83
+ ];
84
+ }
85
+ function getWorkflowsByPipelineCacheKey(e, x) {
86
+ return [
87
+ "workflows-by-pipeline",
88
+ e,
89
+ x
90
+ ];
91
+ }
92
+ function getAllWorkflowsCacheKey(e) {
93
+ return ["all-workflows", e];
94
+ }
95
+ function getNamespaceCacheKey(e, x) {
96
+ return [
97
+ "namespace",
98
+ e,
99
+ x
100
+ ];
101
+ }
102
+ function getNamespacesByPipelineCacheKey(e, x) {
103
+ return [
104
+ "namespaces",
105
+ e,
106
+ x
107
+ ];
108
+ }
109
+ function getDocumentCacheKey(e, x) {
110
+ return [
111
+ "document",
112
+ e,
113
+ x
114
+ ];
115
+ }
116
+ function getDocumentsCacheKey(e, x) {
117
+ return [
118
+ "documents",
119
+ e,
120
+ x
121
+ ];
122
+ }
123
+ function getFileTreeCacheKey(e, x) {
124
+ return [
125
+ "fileTree",
126
+ e,
127
+ x
128
+ ];
129
+ }
130
+ function getFileContentCacheKey(e, x, S) {
131
+ return [
132
+ "fileContent",
133
+ e,
134
+ x,
135
+ S
136
+ ];
137
+ }
138
+ export { getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };