@loopstack/loopstack-studio 0.22.0 → 0.23.1

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 (98) hide show
  1. package/dist/app/EnvironmentEmbedRoot.js +20 -18
  2. package/dist/components/dynamic-form/Form.js +50 -27
  3. package/dist/components/dynamic-form/InputController.js +3 -1
  4. package/dist/components/dynamic-form/fields/MarkdownViewField.js +20 -0
  5. package/dist/components/feedback/ErrorBoundary.js +43 -0
  6. package/dist/components/{LoadingCentered.js → feedback/LoadingCentered.js} +1 -1
  7. package/dist/components/feedback/index.js +5 -0
  8. package/dist/components/index.js +6 -3
  9. package/dist/components/layout/MainLayout.js +32 -16
  10. package/dist/components/layout/StudioSidebar.js +165 -0
  11. package/dist/components/ui-widgets/widgets/SandboxRun.js +1 -0
  12. package/dist/features/code-explorer/CodeExplorer.js +6 -0
  13. package/dist/features/code-explorer/components/CodeExplorerTree.js +5 -0
  14. package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +82 -0
  15. package/dist/features/code-explorer/components/FileContentViewer.js +1 -0
  16. package/dist/features/code-explorer/components/FileTabsBar.js +3 -190
  17. package/dist/features/code-explorer/components/FileTabsBarBase.js +190 -0
  18. package/dist/features/code-explorer/index.js +4 -0
  19. package/dist/features/code-explorer/providers/CodeExplorerProvider.js +2 -162
  20. package/dist/features/code-explorer/utils/fileIcons.js +7 -4
  21. package/dist/features/debug/components/ConfigFlowViewer.js +1 -1
  22. package/dist/features/debug/components/PipelineFlowViewer.js +47 -46
  23. package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +19 -19
  24. package/dist/features/debug/index.js +3 -0
  25. package/dist/features/documents/DocumentRenderer.js +58 -0
  26. package/dist/features/{workbench → documents}/components/DocumentItem.js +1 -1
  27. package/dist/features/{workbench → documents}/components/DocumentMetadataPills.js +2 -2
  28. package/dist/features/{workbench/components → documents}/document-details/DocumentDetails.js +3 -3
  29. package/dist/features/{workbench/components → documents}/document-details/PromptDetails.js +3 -3
  30. package/dist/features/documents/index.js +4 -0
  31. package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessage.js +5 -5
  32. package/dist/features/documents/renderers/ClaudeMessage.js +96 -0
  33. package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentDebugRenderer.js +1 -1
  34. package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentFormRenderer.js +3 -3
  35. package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentMessageRenderer.js +1 -1
  36. package/dist/features/{workbench/components/document-renderer → documents/renderers}/ErrorMessageRenderer.js +1 -1
  37. package/dist/features/{workbench/components/document-renderer → documents/renderers}/LinkMessageRenderer.js +1 -1
  38. package/dist/features/{workbench/components/document-renderer → documents/renderers}/MarkdownMessageRenderer.js +2 -2
  39. package/dist/features/{workbench/components/document-renderer → documents/renderers}/PlainMessageRenderer.js +1 -1
  40. package/dist/features/health/index.js +1 -0
  41. package/dist/features/workbench/NavigationItems.js +29 -29
  42. package/dist/features/workbench/Workbench.js +71 -99
  43. package/dist/features/workbench/WorkflowItem.js +63 -55
  44. package/dist/features/workbench/WorkflowList.js +52 -81
  45. package/dist/features/workbench/components/NewRunDialog.js +2 -1
  46. package/dist/features/workbench/components/RemoteFileTabsBar.js +18 -0
  47. package/dist/features/workbench/components/RemoteFileTree.js +90 -0
  48. package/dist/features/workbench/components/WorkbenchFilesPanel.js +60 -0
  49. package/dist/features/workbench/components/WorkbenchFlowPanel.js +4 -3
  50. package/dist/features/workbench/components/WorkbenchIconSidebar.js +37 -29
  51. package/dist/features/workbench/components/WorkflowHistoryItem.js +11 -11
  52. package/dist/features/workbench/components/buttons/WorkflowButtons.js +49 -50
  53. package/dist/features/workbench/hooks/useWorkflowData.js +49 -0
  54. package/dist/features/workbench/hooks/useWorkflowListState.js +50 -0
  55. package/dist/features/workbench/index.js +8 -0
  56. package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +145 -0
  57. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +47 -45
  58. package/dist/features/workspaces/components/CreateWorkspace.js +1 -1
  59. package/dist/features/workspaces/components/ExecutionTimeline.js +1 -1
  60. package/dist/features/workspaces/components/PipelineForm.js +2 -2
  61. package/dist/features/workspaces/components/WorkspaceHomePage.js +93 -0
  62. package/dist/features/workspaces/index.js +3 -0
  63. package/dist/hooks/index.js +3 -2
  64. package/dist/hooks/query-keys.js +138 -0
  65. package/dist/hooks/useAuth.js +43 -42
  66. package/dist/hooks/useConfig.js +31 -35
  67. package/dist/hooks/useDashboard.js +9 -13
  68. package/dist/hooks/useDebounce.js +8 -17
  69. package/dist/hooks/useDocuments.js +4 -9
  70. package/dist/hooks/useFiles.js +1 -51
  71. package/dist/hooks/useNamespaces.js +2 -8
  72. package/dist/hooks/usePipelines.js +132 -155
  73. package/dist/hooks/useProcessor.js +11 -14
  74. package/dist/hooks/useWorkflows.js +40 -62
  75. package/dist/hooks/useWorkspaces.js +105 -110
  76. package/dist/index.d.ts +105 -3
  77. package/dist/index.js +15 -7
  78. package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
  79. package/dist/pages/DashboardPage.js +1 -1
  80. package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
  81. package/dist/pages/EmbedWorkbenchPage.js +4 -3
  82. package/dist/pages/PipelineDebugPage.js +6 -5
  83. package/dist/pages/PreviewWorkbenchPage.js +228 -128
  84. package/dist/pages/RunsListPage.js +52 -24
  85. package/dist/pages/StudioLandingPage.js +1 -0
  86. package/dist/pages/WorkbenchPage.js +3 -2
  87. package/dist/pages/WorkspacePage.js +103 -51
  88. package/dist/pages/WorkspaceRunsPage.js +71 -0
  89. package/dist/providers/InvalidationEventsProvider.js +9 -11
  90. package/dist/providers/StudioProvider.js +2 -2
  91. package/dist/routing/LocalRouter.js +18 -8
  92. package/package.json +2 -2
  93. package/dist/features/workbench/components/DocumentRenderer.js +0 -54
  94. /package/dist/components/{content → feedback}/ErrorAlert.js +0 -0
  95. /package/dist/components/{snackbars → feedback}/ErrorSnackbar.js +0 -0
  96. /package/dist/components/{snackbars → feedback}/Snackbar.js +0 -0
  97. /package/dist/features/{workbench → documents}/components/DocumentList.js +0 -0
  98. /package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessageContent.js +0 -0
@@ -2,30 +2,30 @@ import { usePipeline } from "../../../hooks/usePipelines.js";
2
2
  import { Background, BackgroundVariant, Controls, index, useEdgesState, useNodesState, useReactFlow } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
3
3
  /* empty css */
4
4
  import StateNode_default from "./pipeline-flow/StateNode.js";
5
- import WorkflowTransitionEdge_default from "./pipeline-flow/WorkflowTransitionEdge.js";
6
5
  import WorkflowGraph_default from "./pipeline-flow/WorkflowGraph.js";
6
+ import WorkflowTransitionEdge_default from "./pipeline-flow/WorkflowTransitionEdge.js";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import React, { useCallback, useEffect, useRef, useState } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { Loader2 } from "lucide-react";
11
11
  var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransition: WorkflowTransitionEdge_default }, PipelineFlowViewer_default = (b) => {
12
- let x = c(28), { pipelineId: S, workflows: C, pipelineConfig: w } = b, { data: T } = usePipeline(S), E;
13
- x[0] === Symbol.for("react.memo_cache_sentinel") ? (E = [], x[0] = E) : E = x[0];
14
- let [D, O, k] = useNodesState(E), A;
15
- x[1] === Symbol.for("react.memo_cache_sentinel") ? (A = [], x[1] = A) : A = x[1];
16
- let [j, M, N] = useEdgesState(A), { fitView: P } = useReactFlow(), F = useRef(!1), I;
17
- x[2] === Symbol.for("react.memo_cache_sentinel") ? (I = {}, x[2] = I) : I = x[2];
18
- let [L, R] = useState(I), z;
19
- x[3] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ new Map(), x[3] = z) : z = x[3];
20
- let B = useRef(z), V = Object.values(L).some(_temp), H;
21
- x[4] === Symbol.for("react.memo_cache_sentinel") ? (H = (e, m) => {
22
- R((h) => h[e] === m ? h : {
12
+ let x = c(29), { pipelineId: S, workflows: C, pipelineConfig: w, direction: T } = b, E = T === void 0 ? "LR" : T, { data: D } = usePipeline(S), O;
13
+ x[0] === Symbol.for("react.memo_cache_sentinel") ? (O = [], x[0] = O) : O = x[0];
14
+ let [k, A, j] = useNodesState(O), M;
15
+ x[1] === Symbol.for("react.memo_cache_sentinel") ? (M = [], x[1] = M) : M = x[1];
16
+ let [N, P, F] = useEdgesState(M), { fitView: I } = useReactFlow(), L = useRef(!1), R;
17
+ x[2] === Symbol.for("react.memo_cache_sentinel") ? (R = {}, x[2] = R) : R = x[2];
18
+ let [z, B] = useState(R), V;
19
+ x[3] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ new Map(), x[3] = V) : V = x[3];
20
+ let H = useRef(V), U = Object.values(z).some(_temp), W;
21
+ x[4] === Symbol.for("react.memo_cache_sentinel") ? (W = (e, m) => {
22
+ B((h) => h[e] === m ? h : {
23
23
  ...h,
24
24
  [e]: m
25
25
  });
26
- }, x[4] = H) : H = x[4];
27
- let U = H, W;
28
- x[5] !== M || x[6] !== O || x[7] !== C ? (W = (e, m, h) => {
26
+ }, x[4] = W) : W = x[4];
27
+ let G = W, K;
28
+ x[5] !== P || x[6] !== A || x[7] !== C ? (K = (e, m, h) => {
29
29
  let g = C.findIndex((m) => m.id === e) * 250, _ = m.map((e) => ({
30
30
  ...e,
31
31
  position: {
@@ -33,56 +33,57 @@ var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransiti
33
33
  y: e.position.y + g
34
34
  }
35
35
  }));
36
- B.current.set(e, {
36
+ H.current.set(e, {
37
37
  nodes: _,
38
38
  edges: h
39
39
  });
40
40
  let v = [], y = [];
41
- B.current.forEach((e) => {
41
+ H.current.forEach((e) => {
42
42
  let { nodes: m, edges: h } = e;
43
43
  v.push(...m), y.push(...h);
44
- }), O(v), M(y);
45
- }, x[5] = M, x[6] = O, x[7] = C, x[8] = W) : W = x[8];
46
- let G = W, K, q;
47
- if (x[9] !== P || x[10] !== V || x[11] !== D.length ? (K = () => {
48
- if (!V && D.length > 0 && !F.current) {
49
- F.current = !0;
44
+ }), A(v), P(y);
45
+ }, x[5] = P, x[6] = A, x[7] = C, x[8] = K) : K = x[8];
46
+ let q = K, J, Y;
47
+ if (x[9] !== I || x[10] !== U || x[11] !== k.length ? (J = () => {
48
+ if (!U && k.length > 0 && !L.current) {
49
+ L.current = !0;
50
50
  let e = setTimeout(() => {
51
- P({ padding: .2 });
51
+ I({ padding: .2 });
52
52
  }, 150);
53
53
  return () => clearTimeout(e);
54
54
  }
55
- }, q = [
56
- V,
57
- D.length,
58
- P
59
- ], x[9] = P, x[10] = V, x[11] = D.length, x[12] = K, x[13] = q) : (K = x[12], q = x[13]), useEffect(K, q), V && D.length === 0) {
55
+ }, Y = [
56
+ U,
57
+ k.length,
58
+ I
59
+ ], x[9] = I, x[10] = U, x[11] = k.length, x[12] = J, x[13] = Y) : (J = x[12], Y = x[13]), useEffect(J, Y), U && k.length === 0) {
60
60
  let e;
61
61
  return x[14] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
62
62
  className: "flex h-full items-center justify-center",
63
63
  children: /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-8 w-8 animate-spin" })
64
64
  }), x[14] = e) : e = x[14], e;
65
65
  }
66
- let J;
67
- x[15] !== G || x[16] !== T || x[17] !== w || x[18] !== C ? (J = T && C.map((e) => /* @__PURE__ */ jsx(WorkflowGraph_default, {
68
- pipeline: T,
66
+ let X;
67
+ x[15] !== E || x[16] !== q || x[17] !== D || x[18] !== w || x[19] !== C ? (X = D && C.map((e) => /* @__PURE__ */ jsx(WorkflowGraph_default, {
68
+ pipeline: D,
69
69
  workflow: e,
70
70
  pipelineConfig: w,
71
- onGraphReady: G,
72
- onLoadingChange: U
73
- }, e.id)), x[15] = G, x[16] = T, x[17] = w, x[18] = C, x[19] = J) : J = x[19];
74
- let Y;
75
- x[20] !== j || x[21] !== D || x[22] !== N || x[23] !== k ? (Y = D.length === 0 ? /* @__PURE__ */ jsx("div", {
71
+ onGraphReady: q,
72
+ onLoadingChange: G,
73
+ direction: E
74
+ }, e.id)), x[15] = E, x[16] = q, x[17] = D, x[18] = w, x[19] = C, x[20] = X) : X = x[20];
75
+ let Z;
76
+ x[21] !== N || x[22] !== k || x[23] !== F || x[24] !== j ? (Z = k.length === 0 ? /* @__PURE__ */ jsx("div", {
76
77
  className: "text-muted-foreground flex h-full items-center justify-center",
77
78
  children: /* @__PURE__ */ jsx("p", {
78
79
  className: "font-medium",
79
80
  children: "No workflow transitions available"
80
81
  })
81
82
  }) : /* @__PURE__ */ jsxs(index, {
82
- nodes: D,
83
- edges: j,
84
- onNodesChange: k,
85
- onEdgesChange: N,
83
+ nodes: k,
84
+ edges: N,
85
+ onNodesChange: j,
86
+ onEdgesChange: F,
86
87
  nodeTypes,
87
88
  edgeTypes,
88
89
  fitView: !0,
@@ -96,12 +97,12 @@ var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransiti
96
97
  size: 1,
97
98
  className: "opacity-[0.15]"
98
99
  }), /* @__PURE__ */ jsx(Controls, { className: "bg-card border-border rounded-lg border shadow-md" })]
99
- }), x[20] = j, x[21] = D, x[22] = N, x[23] = k, x[24] = Y) : Y = x[24];
100
- let X;
101
- return x[25] !== Y || x[26] !== J ? (X = /* @__PURE__ */ jsxs("div", {
100
+ }), x[21] = N, x[22] = k, x[23] = F, x[24] = j, x[25] = Z) : Z = x[25];
101
+ let Q;
102
+ return x[26] !== X || x[27] !== Z ? (Q = /* @__PURE__ */ jsxs("div", {
102
103
  className: "h-full w-full",
103
- children: [J, Y]
104
- }), x[25] = Y, x[26] = J, x[27] = X) : X = x[27], X;
104
+ children: [X, Z]
105
+ }), x[26] = X, x[27] = Z, x[28] = Q) : Q = x[28], Q;
105
106
  };
106
107
  function _temp(e) {
107
108
  return e;
@@ -6,36 +6,36 @@ function countTransitions(e) {
6
6
  return e ? getTransitions(e).length : 0;
7
7
  }
8
8
  var WorkflowGraph_default = (s) => {
9
- let l = c(17), { pipeline: u, workflow: d, pipelineConfig: f, onGraphReady: p, onLoadingChange: m } = s, h = useWorkflow(d.id), g = h.data, _ = useRef(null), v, y;
10
- l[0] !== h.isLoading || l[1] !== m || l[2] !== d.id ? (v = () => {
11
- m(d.id, h.isLoading);
12
- }, y = [
9
+ let l = c(18), { pipeline: u, workflow: d, pipelineConfig: f, onGraphReady: p, onLoadingChange: m, direction: h } = s, g = h === void 0 ? "LR" : h, _ = useWorkflow(d.id), v = _.data, y = useRef(null), b, x;
10
+ l[0] !== _.isLoading || l[1] !== m || l[2] !== d.id ? (b = () => {
11
+ m(d.id, _.isLoading);
12
+ }, x = [
13
13
  d.id,
14
- h.isLoading,
14
+ _.isLoading,
15
15
  m
16
- ], l[0] = h.isLoading, l[1] = m, l[2] = d.id, l[3] = v, l[4] = y) : (v = l[3], y = l[4]), useEffect(v, y);
17
- let b;
18
- l[5] !== p || l[6] !== u || l[7] !== f || l[8] !== d.id || l[9] !== g ? (b = () => {
16
+ ], l[0] = _.isLoading, l[1] = m, l[2] = d.id, l[3] = b, l[4] = x) : (b = l[3], x = l[4]), useEffect(b, x);
17
+ let S;
18
+ l[5] !== g || l[6] !== p || l[7] !== u || l[8] !== f || l[9] !== d.id || l[10] !== v ? (S = () => {
19
19
  let e = f ? getTransitions(f) : [], o = JSON.stringify({
20
20
  p: countTransitions(u),
21
- w: countTransitions(g),
21
+ w: countTransitions(v),
22
22
  c: e.length,
23
- history: g?.history?.length,
24
- place: g?.place
23
+ history: v?.history?.length,
24
+ place: v?.place
25
25
  });
26
- if (o !== _.current) {
27
- _.current = o;
28
- let { nodes: a, edges: s } = buildWorkflowGraph(u, g, d.id, e, "LR");
26
+ if (o !== y.current) {
27
+ y.current = o;
28
+ let { nodes: a, edges: s } = buildWorkflowGraph(u, v, d.id, e, g);
29
29
  p(d.id, a, s);
30
30
  }
31
- }, l[5] = p, l[6] = u, l[7] = f, l[8] = d.id, l[9] = g, l[10] = b) : b = l[10];
32
- let x;
33
- return l[11] !== p || l[12] !== u || l[13] !== f || l[14] !== d || l[15] !== g ? (x = [
31
+ }, l[5] = g, l[6] = p, l[7] = u, l[8] = f, l[9] = d.id, l[10] = v, l[11] = S) : S = l[11];
32
+ let C;
33
+ return l[12] !== p || l[13] !== u || l[14] !== f || l[15] !== d || l[16] !== v ? (C = [
34
34
  u,
35
35
  d,
36
- g,
36
+ v,
37
37
  f,
38
38
  p
39
- ], l[11] = p, l[12] = u, l[13] = f, l[14] = d, l[15] = g, l[16] = x) : x = l[16], useEffect(b, x), null;
39
+ ], l[12] = p, l[13] = u, l[14] = f, l[15] = d, l[16] = v, l[17] = C) : C = l[17], useEffect(S, C), null;
40
40
  };
41
41
  export { WorkflowGraph_default as default };
@@ -0,0 +1,3 @@
1
+ import PipelineFlowViewer_default from "./components/PipelineFlowViewer.js";
2
+ import PipelineDebugHeader_default from "./components/PipelineDebugHeader.js";
3
+ import ConfigFlowViewer_default from "./components/ConfigFlowViewer.js";
@@ -0,0 +1,58 @@
1
+ import CompletionMessagePaper_default from "../../components/messages/CompletionMessagePaper.js";
2
+ import OAuthPromptRenderer_default from "../oauth/OAuthPromptRenderer.js";
3
+ import "../oauth/index.js";
4
+ import AiMessage_default from "./renderers/AiMessage.js";
5
+ import ClaudeMessage_default from "./renderers/ClaudeMessage.js";
6
+ import DocumentDebugRenderer_default from "./renderers/DocumentDebugRenderer.js";
7
+ import DocumentFormRenderer_default from "./renderers/DocumentFormRenderer.js";
8
+ import DocumentMessageRenderer_default from "./renderers/DocumentMessageRenderer.js";
9
+ import ErrorMessageRenderer_default from "./renderers/ErrorMessageRenderer.js";
10
+ import LinkMessageRenderer_default from "./renderers/LinkMessageRenderer.js";
11
+ import MarkdownMessageRenderer_default from "./renderers/MarkdownMessageRenderer.js";
12
+ import PlainMessageRenderer_default from "./renderers/PlainMessageRenderer.js";
13
+ import { c } from "react/compiler-runtime";
14
+ import React from "react";
15
+ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
16
+ var rendererRegistry = new Map([
17
+ ["ai-message", ({ document: e, isLastItem: p }) => /* @__PURE__ */ jsx(AiMessage_default, {
18
+ document: e,
19
+ isLastItem: p
20
+ })],
21
+ ["claude-message", ({ document: e, isLastItem: p }) => /* @__PURE__ */ jsx(ClaudeMessage_default, {
22
+ document: e,
23
+ isLastItem: p
24
+ })],
25
+ ["debug", ({ document: e }) => /* @__PURE__ */ jsx("div", {
26
+ className: "mb-4 flex",
27
+ children: /* @__PURE__ */ jsx(DocumentDebugRenderer_default, { document: e })
28
+ })],
29
+ ["object-form", ({ pipeline: p, workflow: m, document: h, isActive: g }) => /* @__PURE__ */ jsx(CompletionMessagePaper_default, {
30
+ role: "document",
31
+ fullWidth: !0,
32
+ timestamp: new Date(h.createdAt),
33
+ children: /* @__PURE__ */ jsx(DocumentFormRenderer_default, {
34
+ pipeline: p,
35
+ workflow: m,
36
+ document: h,
37
+ enabled: g,
38
+ viewOnly: !g
39
+ })
40
+ })],
41
+ ["message", ({ document: e }) => /* @__PURE__ */ jsx(DocumentMessageRenderer_default, { document: e })],
42
+ ["error", ({ document: e }) => /* @__PURE__ */ jsx(ErrorMessageRenderer_default, { document: e })],
43
+ ["plain", ({ document: e }) => /* @__PURE__ */ jsx(PlainMessageRenderer_default, { document: e })],
44
+ ["markdown", ({ document: e }) => /* @__PURE__ */ jsx(MarkdownMessageRenderer_default, { document: e })],
45
+ ["link", ({ document: e }) => /* @__PURE__ */ jsx(LinkMessageRenderer_default, { document: e })],
46
+ ["oauth-prompt", ({ pipeline: e, workflow: m, document: h, isActive: g }) => /* @__PURE__ */ jsx(OAuthPromptRenderer_default, {
47
+ pipeline: e,
48
+ workflow: m,
49
+ document: h,
50
+ isActive: g
51
+ })]
52
+ ]), DocumentRenderer_default = (e) => {
53
+ let p = c(5), m = e.document.ui?.form?.widget ?? "object-form", h;
54
+ p[0] === m ? h = p[1] : (h = rendererRegistry.get(m), p[0] = m, p[1] = h);
55
+ let g = h, _;
56
+ return p[2] !== g || p[3] !== e ? (_ = /* @__PURE__ */ jsx("div", { children: g ? /* @__PURE__ */ jsx(g, { ...e }) : /* @__PURE__ */ jsx(Fragment$1, { children: "unknown document type" }) }), p[2] = g, p[3] = e, p[4] = _) : _ = p[4], _;
57
+ };
58
+ export { DocumentRenderer_default as default };
@@ -1,5 +1,5 @@
1
+ import DocumentRenderer_default from "../DocumentRenderer.js";
1
2
  import DocumentMetadataPills_default from "./DocumentMetadataPills.js";
2
- import DocumentRenderer_default from "./DocumentRenderer.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import React from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import { Badge } from "../../../components/ui/badge.js";
2
2
  import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../../../components/ui/dialog.js";
3
- import DocumentDetails_default from "./document-details/DocumentDetails.js";
4
- import PromptDetails_default from "./document-details/PromptDetails.js";
3
+ import DocumentDetails_default from "../document-details/DocumentDetails.js";
4
+ import PromptDetails_default from "../document-details/PromptDetails.js";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import { useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../../components/ui/accordion.js";
2
- import { Badge } from "../../../../components/ui/badge.js";
3
- import { Card, CardContent } from "../../../../components/ui/card.js";
1
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../components/ui/accordion.js";
2
+ import { Badge } from "../../../components/ui/badge.js";
3
+ import { Card, CardContent } from "../../../components/ui/card.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import React from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../../components/ui/accordion.js";
2
- import { Card, CardContent, CardHeader, CardTitle } from "../../../../components/ui/card.js";
3
- import CompletionMessagePaper_default from "../../../../components/messages/CompletionMessagePaper.js";
1
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../components/ui/accordion.js";
2
+ import { Card, CardContent, CardHeader, CardTitle } from "../../../components/ui/card.js";
3
+ import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import React from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -0,0 +1,4 @@
1
+ import DocumentRenderer_default from "./DocumentRenderer.js";
2
+ import DocumentMetadataPills_default from "./components/DocumentMetadataPills.js";
3
+ import DocumentItem_default from "./components/DocumentItem.js";
4
+ import DocumentList_default from "./components/DocumentList.js";
@@ -1,8 +1,8 @@
1
- import { getToolOrDynamicToolName, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart } from "../../../../node_modules/ai/dist/index.js";
2
- import { Message, MessageAction, MessageActions, MessageContent, MessageResponse } from "../../../../components/ai-elements/message.js";
3
- import { Reasoning, ReasoningContent, ReasoningTrigger } from "../../../../components/ai-elements/reasoning.js";
4
- import { Source, Sources, SourcesContent, SourcesTrigger } from "../../../../components/ai-elements/sources.js";
5
- import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "../../../../components/ai-elements/tool.js";
1
+ import { getToolOrDynamicToolName, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart } from "../../../node_modules/ai/dist/index.js";
2
+ import { Message, MessageAction, MessageActions, MessageContent, MessageResponse } from "../../../components/ai-elements/message.js";
3
+ import { Reasoning, ReasoningContent, ReasoningTrigger } from "../../../components/ai-elements/reasoning.js";
4
+ import { Source, Sources, SourcesContent, SourcesTrigger } from "../../../components/ai-elements/sources.js";
5
+ import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "../../../components/ai-elements/tool.js";
6
6
  import { c } from "react/compiler-runtime";
7
7
  import { Fragment } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -0,0 +1,96 @@
1
+ import { Message, MessageAction, MessageActions, MessageContent, MessageResponse } from "../../../components/ai-elements/message.js";
2
+ import { Reasoning, ReasoningContent, ReasoningTrigger } from "../../../components/ai-elements/reasoning.js";
3
+ import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "../../../components/ai-elements/tool.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import { Fragment } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { CopyIcon } from "lucide-react";
8
+ var ClaudeMessage_default = (y) => {
9
+ let b = c(19), { document: x } = y, S = x.content, C = S.id ?? x.id, w, T, E;
10
+ if (b[0] !== S.content || b[1] !== S.role || b[2] !== S.toolResults || b[3] !== C) {
11
+ E = Symbol.for("react.early_return_sentinel");
12
+ bb0: {
13
+ let _ = /* @__PURE__ */ new Map();
14
+ if (S.toolResults) for (let n of S.toolResults) _.set(n.tool_use_id, n);
15
+ if (typeof S.content == "string") {
16
+ let m;
17
+ b[7] === S.content ? m = b[8] : (m = /* @__PURE__ */ jsx(MessageContent, { children: /* @__PURE__ */ jsx(MessageResponse, { children: S.content }) }), b[7] = S.content, b[8] = m);
18
+ let h;
19
+ b[9] !== S.content || b[10] !== S.role ? (h = S.role === "assistant" && /* @__PURE__ */ jsx(MessageActions, { children: /* @__PURE__ */ jsx(MessageAction, {
20
+ onClick: () => void navigator.clipboard.writeText(S.content),
21
+ label: "Copy",
22
+ children: /* @__PURE__ */ jsx(CopyIcon, { className: "size-3" })
23
+ }) }), b[9] = S.content, b[10] = S.role, b[11] = h) : h = b[11];
24
+ let g;
25
+ b[12] !== S.role || b[13] !== m || b[14] !== h ? (g = /* @__PURE__ */ jsxs(Message, {
26
+ from: S.role,
27
+ children: [m, h]
28
+ }), b[12] = S.role, b[13] = m, b[14] = h, b[15] = g) : g = b[15], E = g;
29
+ break bb0;
30
+ }
31
+ let y = S.content;
32
+ w = Fragment, T = y.map((v, y) => {
33
+ switch (v.type) {
34
+ case "text": return /* @__PURE__ */ jsxs(Message, {
35
+ from: S.role,
36
+ children: [/* @__PURE__ */ jsx(MessageContent, { children: /* @__PURE__ */ jsx(MessageResponse, { children: v.text }) }), S.role === "assistant" && /* @__PURE__ */ jsx(MessageActions, { children: /* @__PURE__ */ jsx(MessageAction, {
37
+ onClick: () => void navigator.clipboard.writeText(v.text),
38
+ label: "Copy",
39
+ children: /* @__PURE__ */ jsx(CopyIcon, { className: "size-3" })
40
+ }) })]
41
+ }, `${C}-${y}`);
42
+ case "thinking": return /* @__PURE__ */ jsxs(Reasoning, {
43
+ className: "w-full",
44
+ isStreaming: !1,
45
+ children: [/* @__PURE__ */ jsx(ReasoningTrigger, {}), /* @__PURE__ */ jsx(ReasoningContent, { children: v.thinking })]
46
+ }, `${C}-${y}`);
47
+ case "tool_use": {
48
+ let f = _.get(v.id), p;
49
+ if (f) try {
50
+ p = JSON.parse(f.content);
51
+ } catch {
52
+ p = f.content;
53
+ }
54
+ return /* @__PURE__ */ jsx(Message, {
55
+ from: "assistant",
56
+ children: /* @__PURE__ */ jsxs(Tool, { children: [/* @__PURE__ */ jsx(ToolHeader, {
57
+ state: f ? f.is_error ? "output-error" : "output-available" : "input-available",
58
+ title: v.name,
59
+ type: "tool-call"
60
+ }), /* @__PURE__ */ jsxs(ToolContent, { children: [/* @__PURE__ */ jsx(ToolInput, { input: v.input }), f && /* @__PURE__ */ jsx(ToolOutput, {
61
+ output: p,
62
+ errorText: f.is_error ? f.content : ""
63
+ })] })] })
64
+ }, `${C}-${y}`);
65
+ }
66
+ case "tool_result": {
67
+ if (_.size > 0) return null;
68
+ let f;
69
+ try {
70
+ f = JSON.parse(v.content);
71
+ } catch {
72
+ f = v.content;
73
+ }
74
+ return /* @__PURE__ */ jsx(Message, {
75
+ from: "assistant",
76
+ children: /* @__PURE__ */ jsxs(Tool, { children: [/* @__PURE__ */ jsx(ToolHeader, {
77
+ state: v.is_error ? "output-error" : "output-available",
78
+ title: "Tool Result",
79
+ type: "tool-result"
80
+ }), /* @__PURE__ */ jsx(ToolContent, { children: /* @__PURE__ */ jsx(ToolOutput, {
81
+ output: f,
82
+ errorText: v.is_error ? v.content : ""
83
+ }) })] })
84
+ }, `${C}-${y}`);
85
+ }
86
+ default: return null;
87
+ }
88
+ });
89
+ }
90
+ b[0] = S.content, b[1] = S.role, b[2] = S.toolResults, b[3] = C, b[4] = w, b[5] = T, b[6] = E;
91
+ } else w = b[4], T = b[5], E = b[6];
92
+ if (E !== Symbol.for("react.early_return_sentinel")) return E;
93
+ let D;
94
+ return b[16] !== w || b[17] !== T ? (D = /* @__PURE__ */ jsx(w, { children: T }), b[16] = w, b[17] = T, b[18] = D) : D = b[18], D;
95
+ };
96
+ export { ClaudeMessage_default as default };
@@ -1,4 +1,4 @@
1
- import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/ui/collapsible.js";
1
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import React from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import Form_default from "../../../../components/dynamic-form/Form.js";
2
- import { useRunPipeline } from "../../../../hooks/useProcessor.js";
3
- import UiActions_default from "../../../../components/ui-widgets/UiActions.js";
1
+ import Form_default from "../../../components/dynamic-form/Form.js";
2
+ import { useRunPipeline } from "../../../hooks/useProcessor.js";
3
+ import UiActions_default from "../../../components/ui-widgets/UiActions.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import React, { useEffect } from "react";
6
6
  import { jsx } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import CompletionMessagePaper_default from "../../../../components/messages/CompletionMessagePaper.js";
1
+ import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
2
2
  import AiMessageContent_default from "./AiMessageContent.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import React from "react";
@@ -1,4 +1,4 @@
1
- import { Alert, AlertDescription } from "../../../../components/ui/alert.js";
1
+ import { Alert, AlertDescription } from "../../../components/ui/alert.js";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import React from "react";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import link_default from "../../../../components/loopstack-elements/link.js";
1
+ import link_default from "../../../components/loopstack-elements/link.js";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import React from "react";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import CompletionMessagePaper_default from "../../../../components/messages/CompletionMessagePaper.js";
2
- import MarkdownContent_default from "../../../../components/dynamic-form/MarkdownContent.js";
1
+ import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
2
+ import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import React from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import CompletionMessagePaper_default from "../../../../components/messages/CompletionMessagePaper.js";
1
+ import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import React from "react";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -0,0 +1 @@
1
+ import LocalHealthCheck_default from "./LocalHealthCheck.js";
@@ -1,52 +1,52 @@
1
1
  import { useStudio } from "../../providers/StudioProvider.js";
2
- import { useFetchWorkflowsByNamespace } from "../../hooks/useWorkflows.js";
3
2
  import { Skeleton } from "../../components/ui/skeleton.js";
4
3
  import { SidebarMenuSubItem } from "../../components/ui/sidebar.js";
5
- import { WorkbenchContextProvider } from "./providers/WorkbenchLayoutProvider.js";
4
+ import { useFetchWorkflowsByNamespace } from "../../hooks/useWorkflows.js";
5
+ import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
6
6
  import NavigationItem_default from "./components/NavigationItem.js";
7
7
  import { useScroll } from "./providers/ScrollProvider.js";
8
8
  import { c } from "react/compiler-runtime";
9
- import React, { useContext } from "react";
9
+ import React from "react";
10
10
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
11
  import { useParams } from "react-router-dom";
12
- var NavigationItems_default = (m) => {
13
- let h = c(17), { namespace: g } = m, { router: _ } = useStudio(), { pipelineId: v, clickId: y } = useParams(), b = useContext(WorkbenchContextProvider), x = useFetchWorkflowsByNamespace(g.id), { setScrollTo: S } = useScroll(), C;
14
- h[0] !== y || h[1] !== v || h[2] !== _ || h[3] !== S ? (C = (e) => {
15
- S(!0), v && _.navigateToWorkflow(v, e, y);
16
- }, h[0] = y, h[1] = v, h[2] = _, h[3] = S, h[4] = C) : C = h[4];
17
- let w = C;
18
- if (x.isPending) {
12
+ var NavigationItems_default = (p) => {
13
+ let m = c(17), { namespace: h } = p, { router: g } = useStudio(), { pipelineId: _, clickId: v } = useParams(), { activeSectionId: y } = useWorkbenchLayout(), b = useFetchWorkflowsByNamespace(h.id), { setScrollTo: x } = useScroll(), S;
14
+ m[0] !== v || m[1] !== _ || m[2] !== g || m[3] !== x ? (S = (e) => {
15
+ x(!0), _ && g.navigateToWorkflow(_, e, v);
16
+ }, m[0] = v, m[1] = _, m[2] = g, m[3] = x, m[4] = S) : S = m[4];
17
+ let C = S;
18
+ if (b.isPending) {
19
19
  let e;
20
- h[5] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
20
+ m[5] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
21
21
  className: "flex items-center gap-2 p-2",
22
22
  children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" })]
23
- }) }), h[5] = e) : e = h[5];
24
- let f;
25
- h[6] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
23
+ }) }), m[5] = e) : e = m[5];
24
+ let d;
25
+ m[6] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
26
26
  className: "flex items-center gap-2 p-2",
27
27
  children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" })]
28
- }) }), h[6] = f) : f = h[6];
29
- let p;
30
- return h[7] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ jsxs(Fragment$1, { children: [
28
+ }) }), m[6] = d) : d = m[6];
29
+ let f;
30
+ return m[7] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ jsxs(Fragment$1, { children: [
31
31
  e,
32
- f,
32
+ d,
33
33
  /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
34
34
  className: "flex items-center gap-2 p-2",
35
35
  children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" })]
36
36
  }) })
37
- ] }), h[7] = p) : p = h[7], p;
37
+ ] }), m[7] = f) : f = m[7], f;
38
38
  }
39
- if (!v || !x.data?.length) return null;
40
- let T;
41
- if (h[8] !== x.data || h[9] !== w || h[10] !== b?.state) {
39
+ if (!_ || !b.data?.length) return null;
40
+ let w;
41
+ if (m[8] !== y || m[9] !== b.data || m[10] !== C) {
42
42
  let e;
43
- h[12] !== w || h[13] !== b?.state ? (e = (e) => /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx(NavigationItem_default, {
43
+ m[12] !== y || m[13] !== C ? (e = (e) => /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx(NavigationItem_default, {
44
44
  workflow: e,
45
- isSelected: b?.state.activeSectionId?.endsWith(e.id) ?? !1,
46
- navigateTo: w
47
- }) }, `wf-${e.id}`), h[12] = w, h[13] = b?.state, h[14] = e) : e = h[14], T = x.data.map(e), h[8] = x.data, h[9] = w, h[10] = b?.state, h[11] = T;
48
- } else T = h[11];
49
- let E;
50
- return h[15] === T ? E = h[16] : (E = /* @__PURE__ */ jsx(Fragment$1, { children: T }), h[15] = T, h[16] = E), E;
45
+ isSelected: y?.endsWith(e.id) ?? !1,
46
+ navigateTo: C
47
+ }) }, `wf-${e.id}`), m[12] = y, m[13] = C, m[14] = e) : e = m[14], w = b.data.map(e), m[8] = y, m[9] = b.data, m[10] = C, m[11] = w;
48
+ } else w = m[11];
49
+ let T;
50
+ return m[15] === w ? T = m[16] : (T = /* @__PURE__ */ jsx(Fragment$1, { children: w }), m[15] = w, m[16] = T), T;
51
51
  };
52
52
  export { NavigationItems_default as default };