@loopstack/loopstack-studio 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/api/config.js +3 -3
  2. package/dist/api/index.js +9 -13
  3. package/dist/api/processor.js +1 -1
  4. package/dist/api/workflows.js +7 -1
  5. package/dist/components/dynamic-form/CodeContent.js +3 -3
  6. package/dist/components/dynamic-form/fields/CodeViewField.js +36 -36
  7. package/dist/components/feedback/LoadingCentered.js +1 -1
  8. package/dist/components/layout/StudioSidebar.js +2 -2
  9. package/dist/components/loopstack-elements/link.js +77 -76
  10. package/dist/components/loopstack-elements/tool.js +171 -0
  11. package/dist/components/ui-widgets/UiActions.js +10 -4
  12. package/dist/components/ui-widgets/UiWidget.js +27 -36
  13. package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +8 -6
  14. package/dist/components/ui-widgets/widgets/SubmitButton.js +8 -6
  15. package/dist/features/code-explorer/components/FileContentViewer.js +87 -112
  16. package/dist/features/dashboard/RunItem.js +1 -1
  17. package/dist/features/debug/components/ConfigFlowViewer.js +2 -2
  18. package/dist/features/debug/components/{PipelineDebugHeader.js → WorkflowDebugHeader.js} +5 -5
  19. package/dist/features/debug/components/{PipelineDebugLegend.js → WorkflowDebugLegend.js} +2 -2
  20. package/dist/features/debug/components/{PipelineFlowViewer.js → WorkflowFlowViewer.js} +9 -9
  21. package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +46 -0
  22. package/dist/features/debug/index.js +2 -2
  23. package/dist/features/debug/lib/flow-utils.js +142 -150
  24. package/dist/features/documents/DocumentRenderer.js +66 -30
  25. package/dist/features/documents/components/DocumentItem.js +2 -2
  26. package/dist/features/documents/components/DocumentList.js +15 -12
  27. package/dist/features/documents/document-details/DocumentDetails.js +4 -4
  28. package/dist/features/documents/renderers/AiMessage.js +1 -1
  29. package/dist/features/documents/renderers/ChoicesRenderer.js +92 -0
  30. package/dist/features/documents/renderers/ClaudeMessage.js +1 -1
  31. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +56 -0
  32. package/dist/features/documents/renderers/DocumentFormRenderer.js +95 -71
  33. package/dist/features/documents/renderers/LinkMessageRenderer.js +8 -10
  34. package/dist/features/documents/renderers/SecretInputRenderer.js +87 -0
  35. package/dist/features/documents/renderers/TextPromptRenderer.js +57 -0
  36. package/dist/features/documents/renderers/useDocumentTransition.js +30 -0
  37. package/dist/features/oauth/OAuthPromptRenderer.js +20 -20
  38. package/dist/features/runs/Runs.js +8 -8
  39. package/dist/features/workbench/Workbench.js +35 -35
  40. package/dist/features/workbench/WorkflowItem.js +10 -9
  41. package/dist/features/workbench/WorkflowList.js +56 -73
  42. package/dist/features/workbench/components/NewRunDialog.js +18 -18
  43. package/dist/features/workbench/components/WorkbenchFilesPanel.js +1 -1
  44. package/dist/features/workbench/components/WorkbenchFloatingPanel.js +33 -72
  45. package/dist/features/workbench/components/WorkbenchFlowPanel.js +27 -29
  46. package/dist/features/workbench/components/WorkbenchIconSidebar.js +30 -42
  47. package/dist/features/workbench/components/WorkbenchPreviewPanel.js +2 -2
  48. package/dist/features/workbench/components/WorkbenchSecretsPanel.js +1 -1
  49. package/dist/features/workbench/components/WorkbenchSettingsModal.js +16 -41
  50. package/dist/features/workbench/components/WorkflowForms.js +14 -13
  51. package/dist/features/workbench/components/WorkflowHistoryItem.js +60 -81
  52. package/dist/features/workbench/components/{PipelineHistoryList.js → WorkflowHistoryList.js} +5 -5
  53. package/dist/features/workbench/components/buttons/WorkflowButtons.js +56 -54
  54. package/dist/features/workbench/hooks/useWorkflowData.js +10 -10
  55. package/dist/features/workbench/hooks/useWorkflowListState.js +8 -45
  56. package/dist/features/workbench/index.js +2 -3
  57. package/dist/features/workbench/providers/ScrollProvider.js +2 -2
  58. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +4 -4
  59. package/dist/features/workspaces/Workspaces.js +1 -1
  60. package/dist/features/workspaces/components/CreateWorkspace.js +12 -12
  61. package/dist/features/workspaces/components/ExecutionTimeline.js +22 -21
  62. package/dist/features/workspaces/components/{NewPipelineRunDialog.js → NewWorkflowRunDialog.js} +6 -6
  63. package/dist/features/workspaces/components/{PipelineForm.js → WorkflowRunForm.js} +31 -31
  64. package/dist/features/workspaces/components/WorkspaceHomePage.js +11 -11
  65. package/dist/features/workspaces/components/{pipeline-form → workflow-form}/ArgumentsView.js +1 -1
  66. package/dist/features/workspaces/components/{pipeline-form → workflow-form}/SelectionView.js +16 -16
  67. package/dist/hooks/index.js +3 -3
  68. package/dist/hooks/query-keys.js +31 -72
  69. package/dist/hooks/useConfig.js +5 -5
  70. package/dist/hooks/useProcessor.js +5 -5
  71. package/dist/hooks/useWorkflows.js +155 -68
  72. package/dist/index.d.ts +127 -128
  73. package/dist/index.js +5 -5
  74. package/dist/packages/contracts/dist/enums/index.js +11 -12
  75. package/dist/packages/contracts/dist/enums/workflow-state.enum.js +1 -1
  76. package/dist/pages/DebugWorkflowDetailsPage.js +8 -8
  77. package/dist/pages/DebugWorkflowsPage.js +10 -10
  78. package/dist/pages/EmbedWorkbenchPage.js +42 -52
  79. package/dist/pages/PreviewWorkbenchPage.js +130 -255
  80. package/dist/pages/RunsListPage.js +1 -1
  81. package/dist/pages/StudioLandingPage.js +13 -13
  82. package/dist/pages/WorkbenchPage.js +6 -6
  83. package/dist/pages/WorkflowDebugPage.js +114 -0
  84. package/dist/pages/WorkspacePage.js +4 -2
  85. package/dist/providers/InvalidationEventsProvider.js +19 -19
  86. package/dist/providers/SseProvider.js +0 -1
  87. package/dist/routing/LocalRouter.js +14 -17
  88. package/package.json +2 -2
  89. package/dist/api/namespaces.js +0 -7
  90. package/dist/api/pipelines.js +0 -13
  91. package/dist/components/ai-elements/tool.js +0 -158
  92. package/dist/components/ui-widgets/widgets/SecretInput.js +0 -42
  93. package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +0 -41
  94. package/dist/features/workbench/NavigationItems.js +0 -52
  95. package/dist/features/workbench/WorkbenchNavigation.js +0 -38
  96. package/dist/features/workbench/components/NavigationItem.js +0 -68
  97. package/dist/features/workbench/hooks/useIntersectionObserver.js +0 -44
  98. package/dist/hooks/useNamespaceTree.js +0 -27
  99. package/dist/hooks/useNamespaces.js +0 -25
  100. package/dist/hooks/usePipelines.js +0 -161
  101. package/dist/packages/contracts/dist/enums/pipeline-state.js +0 -10
  102. package/dist/pages/PipelineDebugPage.js +0 -115
  103. /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/StateNode.js +0 -0
  104. /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/WorkflowTransitionEdge.js +0 -0
  105. /package/dist/features/workspaces/components/{pipeline-form → workflow-form}/HeaderSection.js +0 -0
@@ -1,8 +1,7 @@
1
- import { usePipeline } from "../hooks/usePipelines.js";
1
+ import { useWorkflow } from "../hooks/useWorkflows.js";
2
2
  import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
3
3
  import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
4
4
  import { require_enums } from "../packages/contracts/dist/enums/index.js";
5
- import { useFetchWorkflowsByPipeline } from "../hooks/useWorkflows.js";
6
5
  import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
7
6
  import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
8
7
  import "../features/workbench/index.js";
@@ -13,67 +12,58 @@ import { jsx, jsxs } from "react/jsx-runtime";
13
12
  import { useParams } from "react-router-dom";
14
13
  var import_enums = require_enums(), EMBED_MESSAGE_TYPE = "loopstack:embed:workflow-completed", EMBED_RESIZE_MESSAGE_TYPE = "loopstack:embed:resize";
15
14
  function EmbedWorkbenchPage() {
16
- let v = c(24), y = useParams(), b;
17
- v[0] === y ? b = v[1] : (b = requireParam(y, "pipelineId"), v[0] = y, v[1] = b);
18
- let x = b, S = useRef(null), C = usePipeline(x), w = useFetchWorkflowsByPipeline(x), T = useRef(!1), E, D;
19
- v[2] !== w.data || v[3] !== x ? (E = () => {
20
- !w.data || T.current || w.data.length > 0 && w.data.every(_temp) && window.parent !== window && (T.current = !0, window.parent.postMessage({
15
+ let _ = c(20), v = useParams(), y;
16
+ _[0] === v ? y = _[1] : (y = requireParam(v, "workflowId"), _[0] = v, _[1] = y);
17
+ let b = y, x = useRef(null), S = useWorkflow(b), C = useRef(!1), w, T;
18
+ _[2] !== S.data || _[3] !== b ? (w = () => {
19
+ !S.data || C.current || S.data.status === import_enums.WorkflowState.Completed && window.parent !== window && (C.current = !0, window.parent.postMessage({
21
20
  type: EMBED_MESSAGE_TYPE,
22
- pipelineId: x
21
+ workflowId: b
23
22
  }, window.location.origin));
24
- }, D = [w.data, x], v[2] = w.data, v[3] = x, v[4] = E, v[5] = D) : (E = v[4], D = v[5]), useEffect(E, D);
25
- let O, k;
26
- v[6] === x ? (O = v[7], k = v[8]) : (O = () => {
27
- if (window.parent === window || !S.current) return;
23
+ }, T = [S.data, b], _[2] = S.data, _[3] = b, _[4] = w, _[5] = T) : (w = _[4], T = _[5]), useEffect(w, T);
24
+ let E, D;
25
+ _[6] === b ? (E = _[7], D = _[8]) : (E = () => {
26
+ if (window.parent === window || !x.current) return;
28
27
  let t = new ResizeObserver(() => {
29
- if (!S.current) return;
28
+ if (!x.current) return;
30
29
  let t = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);
31
30
  window.parent.postMessage({
32
31
  type: EMBED_RESIZE_MESSAGE_TYPE,
33
- pipelineId: x,
32
+ workflowId: b,
34
33
  height: t
35
34
  }, window.location.origin);
36
35
  });
37
- return t.observe(S.current), () => t.disconnect();
38
- }, k = [x], v[6] = x, v[7] = O, v[8] = k), useEffect(O, k);
39
- let A = _temp2, j;
40
- v[9] === Symbol.for("react.memo_cache_sentinel") ? (j = {
36
+ return t.observe(x.current), () => t.disconnect();
37
+ }, D = [b], _[6] = b, _[7] = E, _[8] = D), useEffect(E, D);
38
+ let O = _temp, k;
39
+ _[9] === Symbol.for("react.memo_cache_sentinel") ? (k = {
41
40
  enableDebugMode: !1,
42
41
  showFullMessageHistory: !1
43
- }, v[9] = j) : j = v[9];
44
- let M = j, N;
45
- v[10] === C.error ? N = v[11] : (N = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: C.error }), v[10] = C.error, v[11] = N);
46
- let P;
47
- v[12] === w.error ? P = v[13] : (P = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: w.error }), v[12] = w.error, v[13] = P);
48
- let F = C.isLoading || w.isLoading, I;
49
- v[14] !== C.data || v[15] !== w.data ? (I = C.data && w.data ? /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
50
- pipeline: C.data,
51
- children: w.data.map((t) => /* @__PURE__ */ jsx(WorkflowItem_default, {
52
- pipeline: C.data,
53
- workflowId: t.id,
54
- scrollTo: A,
55
- settings: M,
42
+ }, _[9] = k) : k = _[9];
43
+ let A = k, j;
44
+ _[10] === S.error ? j = _[11] : (j = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), _[10] = S.error, _[11] = j);
45
+ let M;
46
+ _[12] === S.data ? M = _[13] : (M = S.data ? /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
47
+ workflow: S.data,
48
+ children: /* @__PURE__ */ jsx(WorkflowItem_default, {
49
+ workflow: S.data,
50
+ workflowId: S.data.id,
51
+ scrollTo: O,
52
+ settings: A,
56
53
  embed: !0
57
- }, t.id))
58
- }) : null, v[14] = C.data, v[15] = w.data, v[16] = I) : I = v[16];
59
- let L;
60
- v[17] !== F || v[18] !== I ? (L = /* @__PURE__ */ jsx(LoadingCentered_default, {
61
- loading: F,
62
- children: I
63
- }), v[17] = F, v[18] = I, v[19] = L) : L = v[19];
64
- let R;
65
- return v[20] !== L || v[21] !== N || v[22] !== P ? (R = /* @__PURE__ */ jsxs("div", {
66
- ref: S,
67
- className: "overflow-hidden px-6 py-4",
68
- children: [
69
- N,
70
- P,
71
- L
72
- ]
73
- }), v[20] = L, v[21] = N, v[22] = P, v[23] = R) : R = v[23], R;
74
- }
75
- function _temp2() {}
76
- function _temp(t) {
77
- return t.status === import_enums.WorkflowState.Completed;
54
+ })
55
+ }) : null, _[12] = S.data, _[13] = M);
56
+ let N;
57
+ _[14] !== S.isLoading || _[15] !== M ? (N = /* @__PURE__ */ jsx(LoadingCentered_default, {
58
+ loading: S.isLoading,
59
+ children: M
60
+ }), _[14] = S.isLoading, _[15] = M, _[16] = N) : N = _[16];
61
+ let P;
62
+ return _[17] !== j || _[18] !== N ? (P = /* @__PURE__ */ jsxs("div", {
63
+ ref: x,
64
+ className: "overflow-hidden pl-3 py-4",
65
+ children: [j, N]
66
+ }), _[17] = j, _[18] = N, _[19] = P) : P = _[19], P;
78
67
  }
68
+ function _temp() {}
79
69
  export { EmbedWorkbenchPage as default };