@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,88 +1,62 @@
1
1
  import { useStudio } from "../providers/StudioProvider.js";
2
- import { useAppConfig } from "../hooks/useConfig.js";
2
+ import { useAppsConfig } from "../hooks/useConfig.js";
3
3
  import { useWorkspace } from "../hooks/useWorkspaces.js";
4
4
  import MainLayout_default from "../components/layout/MainLayout.js";
5
5
  import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
6
6
  import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
7
7
  import { WorkbenchSidebarShell } from "../features/workbench/components/WorkbenchSidebarShell.js";
8
- import WorkspaceHomePage_default from "../features/workspaces/components/WorkspaceHomePage.js";
8
+ import "../features/workspaces/components/WorkspaceHomePage.js";
9
9
  import { useDefaultEnvironmentPreviewUrl } from "../hooks/useEnvironmentPreviewUrl.js";
10
10
  import { c } from "react/compiler-runtime";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  import { useParams } from "react-router-dom";
13
13
  import { Loader2 } from "lucide-react";
14
14
  var WorkspacePage_default = () => {
15
- let _ = c(40), { router: v } = useStudio(), { workspaceId: y } = useParams(), b = useWorkspace(y), x = useAppConfig(), S = useDefaultEnvironmentPreviewUrl(), C = b.data, w;
16
- bb0: {
17
- if (!C || !x.data) {
18
- w = void 0;
19
- break bb0;
20
- }
21
- let t;
22
- if (_[0] !== x.data || _[1] !== C) {
23
- let g;
24
- _[3] === C ? g = _[4] : (g = (t) => t.className === C.className, _[3] = C, _[4] = g), t = x.data.find(g)?.ui?.widgets?.find(_temp), _[0] = x.data, _[1] = C, _[2] = t;
25
- } else t = _[2];
26
- w = t;
27
- }
28
- let T = w, E;
29
- _[5] === v ? E = _[6] : (E = v.getWorkspaces(), _[5] = v, _[6] = E);
30
- let D;
31
- _[7] === E ? D = _[8] : (D = {
15
+ let h = c(30), { router: g } = useStudio(), { workspaceId: _ } = useParams(), v = useWorkspace(_), y = useAppsConfig(), b = useDefaultEnvironmentPreviewUrl(), x = v.data, S;
16
+ h[0] === g ? S = h[1] : (S = g.getWorkspaces(), h[0] = g, h[1] = S);
17
+ let C;
18
+ h[2] === S ? C = h[3] : (C = {
32
19
  label: "Workspaces",
33
- href: E
34
- }, _[7] = E, _[8] = D);
35
- let O = C?.title ?? "", k;
36
- _[9] === O ? k = _[10] : (k = {
37
- label: O,
20
+ href: S
21
+ }, h[2] = S, h[3] = C);
22
+ let w = x?.title ?? "", T;
23
+ h[4] === w ? T = h[5] : (T = {
24
+ label: w,
38
25
  current: !0
39
- }, _[9] = O, _[10] = k);
26
+ }, h[4] = w, h[5] = T);
27
+ let E;
28
+ h[6] !== C || h[7] !== T ? (E = [C, T], h[6] = C, h[7] = T, h[8] = E) : E = h[8];
29
+ let D = E, O = v.isLoading || y.isLoading, k;
30
+ h[9] === O ? k = h[10] : (k = O ? /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin" }) : "", h[9] = O, h[10] = k);
40
31
  let A;
41
- _[11] !== D || _[12] !== k ? (A = [D, k], _[11] = D, _[12] = k, _[13] = A) : A = _[13];
42
- let j = A, M = b.isLoading || x.isLoading, N;
43
- _[14] === C ? N = _[15] : (N = C ? {
44
- volumes: C.volumes,
45
- features: C.features
46
- } : void 0, _[14] = C, _[15] = N);
47
- let P = N, F = C?.environments, I;
48
- _[16] === M ? I = _[17] : (I = M ? /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin" }) : "", _[16] = M, _[17] = I);
49
- let L;
50
- _[18] === b.error ? L = _[19] : (L = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: b.error }), _[18] = b.error, _[19] = L);
51
- let R;
52
- _[20] === x.error ? R = _[21] : (R = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: x.error }), _[20] = x.error, _[21] = R);
53
- let z;
54
- _[22] !== M || _[23] !== T || _[24] !== C ? (z = C && T ? /* @__PURE__ */ jsx(WorkspaceHomePage_default, {
55
- workspace: C,
56
- action: T
57
- }) : C && !M ? /* @__PURE__ */ jsx("div", {
32
+ h[11] === v.error ? A = h[12] : (A = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: v.error }), h[11] = v.error, h[12] = A);
33
+ let j;
34
+ h[13] === y.error ? j = h[14] : (j = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: y.error }), h[13] = y.error, h[14] = j);
35
+ let M;
36
+ h[15] !== O || h[16] !== x ? (M = x && !O ? /* @__PURE__ */ jsx("div", {
58
37
  className: "flex flex-col items-center justify-center py-16",
59
38
  children: /* @__PURE__ */ jsx("p", {
60
39
  className: "text-muted-foreground",
61
40
  children: "No home page configured for this workspace."
62
41
  })
63
- }) : null, _[22] = M, _[23] = T, _[24] = C, _[25] = z) : z = _[25];
64
- let B;
65
- _[26] !== R || _[27] !== z || _[28] !== I || _[29] !== L ? (B = /* @__PURE__ */ jsxs(Fragment, { children: [
66
- I,
67
- L,
68
- R,
69
- z
70
- ] }), _[26] = R, _[27] = z, _[28] = I, _[29] = L, _[30] = B) : B = _[30];
71
- let V;
72
- _[31] !== j || _[32] !== B ? (V = /* @__PURE__ */ jsx(WorkbenchSidebarShell, { children: /* @__PURE__ */ jsx(MainLayout_default, {
73
- breadcrumbsData: j,
74
- children: B
75
- }) }), _[31] = j, _[32] = B, _[33] = V) : V = _[33];
76
- let H;
77
- return _[34] !== S || _[35] !== V || _[36] !== F || _[37] !== P || _[38] !== y ? (H = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
78
- workspaceId: y,
79
- environments: F,
80
- workspaceConfig: P,
81
- getEnvironmentPreviewUrl: S,
82
- children: V
83
- }), _[34] = S, _[35] = V, _[36] = F, _[37] = P, _[38] = y, _[39] = H) : H = _[39], H;
42
+ }) : null, h[15] = O, h[16] = x, h[17] = M) : M = h[17];
43
+ let N;
44
+ h[18] !== k || h[19] !== A || h[20] !== j || h[21] !== M ? (N = /* @__PURE__ */ jsxs(Fragment, { children: [
45
+ k,
46
+ A,
47
+ j,
48
+ M
49
+ ] }), h[18] = k, h[19] = A, h[20] = j, h[21] = M, h[22] = N) : N = h[22];
50
+ let P;
51
+ h[23] !== D || h[24] !== N ? (P = /* @__PURE__ */ jsx(WorkbenchSidebarShell, { children: /* @__PURE__ */ jsx(MainLayout_default, {
52
+ breadcrumbsData: D,
53
+ children: N
54
+ }) }), h[23] = D, h[24] = N, h[25] = P) : P = h[25];
55
+ let F;
56
+ return h[26] !== b || h[27] !== P || h[28] !== _ ? (F = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
57
+ workspaceId: _,
58
+ getEnvironmentPreviewUrl: b,
59
+ children: P
60
+ }), h[26] = b, h[27] = P, h[28] = _, h[29] = F) : F = h[29], F;
84
61
  };
85
- function _temp(t) {
86
- return t.widget === "start-form";
87
- }
88
62
  export { WorkspacePage_default as default };
@@ -11,7 +11,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
11
  import { useParams } from "react-router-dom";
12
12
  import { Loader2 } from "lucide-react";
13
13
  var WorkspaceRunsPage_default = () => {
14
- let h = c(38), { router: g } = useStudio(), { workspaceId: _ } = useParams(), v = useWorkspace(_), y = useDefaultEnvironmentPreviewUrl(), b = v.data, x;
14
+ let h = c(34), { router: g } = useStudio(), { workspaceId: _ } = useParams(), v = useWorkspace(_), y = useDefaultEnvironmentPreviewUrl(), b = v.data, x;
15
15
  h[0] === g ? x = h[1] : (x = g.getWorkspaces(), h[0] = g, h[1] = x);
16
16
  let S;
17
17
  h[2] === x ? S = h[3] : (S = {
@@ -36,41 +36,34 @@ var WorkspaceRunsPage_default = () => {
36
36
  T,
37
37
  E
38
38
  ], h[11] = S, h[12] = T, h[13] = D) : D = h[13];
39
- let O = D, k;
40
- h[14] === b ? k = h[15] : (k = b ? {
41
- volumes: b.volumes,
42
- features: b.features
43
- } : void 0, h[14] = b, h[15] = k);
44
- let A = k, j = b?.environments, M = b?.title ?? "", N;
45
- h[16] === M ? N = h[17] : (N = /* @__PURE__ */ jsxs("h1", {
39
+ let O = D, k = b?.title ?? "", A;
40
+ h[14] === k ? A = h[15] : (A = /* @__PURE__ */ jsxs("h1", {
46
41
  className: "mb-4 text-3xl font-bold tracking-tight",
47
- children: [M, " — Runs"]
48
- }), h[16] = M, h[17] = N);
42
+ children: [k, " — Runs"]
43
+ }), h[14] = k, h[15] = A);
44
+ let j;
45
+ h[16] === v.isLoading ? j = h[17] : (j = v.isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin" }) : "", h[16] = v.isLoading, h[17] = j);
46
+ let M;
47
+ h[18] === v.error ? M = h[19] : (M = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: v.error }), h[18] = v.error, h[19] = M);
48
+ let N;
49
+ h[20] === b ? N = h[21] : (N = b ? /* @__PURE__ */ jsx(ExecutionTimeline_default, { workspace: b }) : "", h[20] = b, h[21] = N);
49
50
  let P;
50
- h[18] === v.isLoading ? P = h[19] : (P = v.isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin" }) : "", h[18] = v.isLoading, h[19] = P);
51
+ h[22] !== M || h[23] !== N || h[24] !== A || h[25] !== j ? (P = /* @__PURE__ */ jsxs(Fragment, { children: [
52
+ A,
53
+ j,
54
+ M,
55
+ N
56
+ ] }), h[22] = M, h[23] = N, h[24] = A, h[25] = j, h[26] = P) : P = h[26];
51
57
  let F;
52
- h[20] === v.error ? F = h[21] : (F = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: v.error }), h[20] = v.error, h[21] = F);
53
- let I;
54
- h[22] === b ? I = h[23] : (I = b ? /* @__PURE__ */ jsx(ExecutionTimeline_default, { workspace: b }) : "", h[22] = b, h[23] = I);
55
- let L;
56
- h[24] !== N || h[25] !== P || h[26] !== F || h[27] !== I ? (L = /* @__PURE__ */ jsxs(Fragment, { children: [
57
- N,
58
- P,
59
- F,
60
- I
61
- ] }), h[24] = N, h[25] = P, h[26] = F, h[27] = I, h[28] = L) : L = h[28];
62
- let R;
63
- h[29] !== O || h[30] !== L ? (R = /* @__PURE__ */ jsx(WorkbenchSidebarShell, { children: /* @__PURE__ */ jsx(MainLayout_default, {
58
+ h[27] !== O || h[28] !== P ? (F = /* @__PURE__ */ jsx(WorkbenchSidebarShell, { children: /* @__PURE__ */ jsx(MainLayout_default, {
64
59
  breadcrumbsData: O,
65
- children: L
66
- }) }), h[29] = O, h[30] = L, h[31] = R) : R = h[31];
67
- let z;
68
- return h[32] !== y || h[33] !== R || h[34] !== j || h[35] !== A || h[36] !== _ ? (z = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
60
+ children: P
61
+ }) }), h[27] = O, h[28] = P, h[29] = F) : F = h[29];
62
+ let I;
63
+ return h[30] !== y || h[31] !== F || h[32] !== _ ? (I = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
69
64
  workspaceId: _,
70
- environments: j,
71
- workspaceConfig: A,
72
65
  getEnvironmentPreviewUrl: y,
73
- children: R
74
- }), h[32] = y, h[33] = R, h[34] = j, h[35] = A, h[36] = _, h[37] = z) : z = h[37], z;
66
+ children: F
67
+ }), h[30] = y, h[31] = F, h[32] = _, h[33] = I) : I = h[33], I;
75
68
  };
76
69
  export { WorkspaceRunsPage_default as default };
@@ -23,7 +23,7 @@ var LocalRouter = class {
23
23
  return "/runs/action-required";
24
24
  }
25
25
  getDashboard() {
26
- return "/dashboard";
26
+ return "/applications";
27
27
  }
28
28
  async navigateToDashboard() {
29
29
  await this.navigate(this.getDashboard());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loopstack/loopstack-studio",
3
- "version": "0.29.5",
3
+ "version": "0.31.0",
4
4
  "repository": "loopstack-ai/loopstack-studio",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@fontsource/roboto": "^5.2.10",
28
28
  "@hookform/resolvers": "^5.2.2",
29
- "@loopstack/contracts": "^0.31.0",
29
+ "@loopstack/contracts": "^0.32.0",
30
30
  "@radix-ui/react-accordion": "^1.2.12",
31
31
  "@radix-ui/react-alert-dialog": "^1.1.15",
32
32
  "@radix-ui/react-avatar": "^1.1.11",
@@ -1,125 +0,0 @@
1
- import { useStudio } from "../../providers/StudioProvider.js";
2
- import { Card, CardContent, CardHeader, CardTitle } from "../../components/ui/card.js";
3
- import RunList_default from "./RunList.js";
4
- import { c } from "react/compiler-runtime";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { Link } from "react-router-dom";
7
- function Dashboard(f) {
8
- let p = c(43), { dashboardStats: m } = f, { router: h } = useStudio();
9
- if (!m) {
10
- let t;
11
- return p[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ jsx("div", {
12
- className: "p-4",
13
- children: "No data available"
14
- }), p[0] = t) : t = p[0], t;
15
- }
16
- let g;
17
- p[1] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, {
18
- className: "text-lg",
19
- children: "Quick Links"
20
- }) }), p[1] = g) : g = p[1];
21
- let _;
22
- p[2] === h ? _ = p[3] : (_ = h.getWorkspaces(), p[2] = h, p[3] = _);
23
- let v;
24
- p[4] === _ ? v = p[5] : (v = /* @__PURE__ */ jsx(CardContent, {
25
- className: "space-y-3",
26
- children: /* @__PURE__ */ jsx(Link, {
27
- to: _,
28
- className: "text-primary hover:text-primary/80 hover:bg-muted block rounded p-2 text-sm font-medium transition-colors",
29
- children: "My Workspaces"
30
- })
31
- }), p[4] = _, p[5] = v);
32
- let y;
33
- p[6] === h ? y = p[7] : (y = h.getDebugWorkflows(), p[6] = h, p[7] = y);
34
- let b;
35
- p[8] === y ? b = p[9] : (b = /* @__PURE__ */ jsx(CardContent, {
36
- className: "space-y-3",
37
- children: /* @__PURE__ */ jsx(Link, {
38
- to: y,
39
- className: "text-primary hover:text-primary/80 hover:bg-muted block rounded p-2 text-sm font-medium transition-colors",
40
- children: "Debug Workflows"
41
- })
42
- }), p[8] = y, p[9] = b);
43
- let x;
44
- p[10] !== v || p[11] !== b ? (x = /* @__PURE__ */ jsx("div", {
45
- className: "md:col-span-1",
46
- children: /* @__PURE__ */ jsxs(Card, {
47
- className: "h-full",
48
- children: [
49
- g,
50
- v,
51
- b
52
- ]
53
- })
54
- }), p[10] = v, p[11] = b, p[12] = x) : x = p[12];
55
- let S;
56
- p[13] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, {
57
- className: "text-lg",
58
- children: "Executions"
59
- }) }), p[13] = S) : S = p[13];
60
- let C;
61
- p[14] === m.totalAutomationRuns ? C = p[15] : (C = /* @__PURE__ */ jsxs(Card, { children: [S, /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("p", {
62
- className: "text-3xl font-bold",
63
- children: m.totalAutomationRuns
64
- }) })] }), p[14] = m.totalAutomationRuns, p[15] = C);
65
- let w;
66
- p[16] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, {
67
- className: "text-lg",
68
- children: "Completed"
69
- }) }), p[16] = w) : w = p[16];
70
- let T;
71
- p[17] === m.completedRuns ? T = p[18] : (T = /* @__PURE__ */ jsxs(Card, { children: [w, /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("p", {
72
- className: "text-3xl font-bold text-green-600",
73
- children: m.completedRuns
74
- }) })] }), p[17] = m.completedRuns, p[18] = T);
75
- let E;
76
- p[19] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, {
77
- className: "text-lg",
78
- children: "Failed"
79
- }) }), p[19] = E) : E = p[19];
80
- let D;
81
- p[20] === m.errorRuns ? D = p[21] : (D = /* @__PURE__ */ jsxs(Card, { children: [E, /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("p", {
82
- className: "text-destructive text-3xl font-bold",
83
- children: m.errorRuns
84
- }) })] }), p[20] = m.errorRuns, p[21] = D);
85
- let O;
86
- p[22] !== T || p[23] !== D || p[24] !== C ? (O = /* @__PURE__ */ jsxs("div", {
87
- className: "grid grid-cols-1 gap-4 md:col-span-3 md:grid-cols-3",
88
- children: [
89
- C,
90
- T,
91
- D
92
- ]
93
- }), p[22] = T, p[23] = D, p[24] = C, p[25] = O) : O = p[25];
94
- let k;
95
- p[26] !== O || p[27] !== x ? (k = /* @__PURE__ */ jsxs("div", {
96
- className: "mb-8 grid grid-cols-1 gap-6 md:grid-cols-4",
97
- children: [x, O]
98
- }), p[26] = O, p[27] = x, p[28] = k) : k = p[28];
99
- let A;
100
- p[29] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Recently Completed" }) }), p[29] = A) : A = p[29];
101
- let j;
102
- p[30] !== m.recentRuns || p[31] !== h ? (j = /* @__PURE__ */ jsxs(Card, { children: [A, /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(RunList_default, {
103
- type: "runs",
104
- runs: m.recentRuns,
105
- router: h,
106
- emptyMessage: "No recent runs."
107
- }) })] }), p[30] = m.recentRuns, p[31] = h, p[32] = j) : j = p[32];
108
- let M;
109
- p[33] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Recently Failed" }) }), p[33] = M) : M = p[33];
110
- let N;
111
- p[34] !== m.recentErrors || p[35] !== h ? (N = /* @__PURE__ */ jsxs(Card, { children: [M, /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(RunList_default, {
112
- type: "errors",
113
- runs: m.recentErrors,
114
- router: h,
115
- emptyMessage: "No recent errors."
116
- }) })] }), p[34] = m.recentErrors, p[35] = h, p[36] = N) : N = p[36];
117
- let P;
118
- p[37] !== j || p[38] !== N ? (P = /* @__PURE__ */ jsxs("div", {
119
- className: "grid grid-cols-1 gap-6 md:grid-cols-2",
120
- children: [j, N]
121
- }), p[37] = j, p[38] = N, p[39] = P) : P = p[39];
122
- let F;
123
- return p[40] !== k || p[41] !== P ? (F = /* @__PURE__ */ jsxs(Fragment, { children: [k, P] }), p[40] = k, p[41] = P, p[42] = F) : F = p[42], F;
124
- }
125
- export { Dashboard as default };
@@ -1,78 +0,0 @@
1
- import { Badge } from "../../components/ui/badge.js";
2
- import { c } from "react/compiler-runtime";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Link } from "react-router-dom";
5
- function RunItem(a) {
6
- let o = c(27), { run: s, router: l } = a, u;
7
- o[0] === Symbol.for("react.memo_cache_sentinel") ? (u = {
8
- completed: "bg-green-50 text-green-900 border-green-200",
9
- failed: "bg-destructive/10 text-destructive border-destructive/20",
10
- canceled: "bg-orange-50 text-orange-900 border-orange-200",
11
- running: "bg-blue-50 text-blue-900 border-blue-200",
12
- paused: "bg-yellow-50 text-yellow-900 border-yellow-200",
13
- pending: "bg-muted text-muted-foreground border-border"
14
- }, o[0] = u) : u = o[0];
15
- let d = u[s.status] || "bg-muted text-muted-foreground border-border", f;
16
- o[1] !== l || o[2] !== s.id ? (f = l.getWorkflow(s.id), o[1] = l, o[2] = s.id, o[3] = f) : f = o[3];
17
- let p = s.id, m = s.run ?? s.index ?? "?", h = s.title ? `(${s.title})` : "", g;
18
- o[4] !== m || o[5] !== h ? (g = /* @__PURE__ */ jsxs("h3", {
19
- className: "text-foreground group-hover:text-primary truncate font-semibold transition-colors",
20
- children: [
21
- "Run #",
22
- m,
23
- " ",
24
- h
25
- ]
26
- }), o[4] = m, o[5] = h, o[6] = g) : g = o[6];
27
- let _ = `rounded-full border px-2 py-1 text-xs whitespace-nowrap ${d}`, v;
28
- o[7] !== s.status || o[8] !== _ ? (v = /* @__PURE__ */ jsx(Badge, {
29
- className: _,
30
- children: s.status
31
- }), o[7] = s.status, o[8] = _, o[9] = v) : v = o[9];
32
- let y;
33
- o[10] === s.updatedAt ? y = o[11] : (y = new Date(s.updatedAt).toLocaleString(), o[10] = s.updatedAt, o[11] = y);
34
- let b;
35
- o[12] === y ? b = o[13] : (b = /* @__PURE__ */ jsx("span", {
36
- className: "text-muted-foreground text-xs",
37
- children: y
38
- }), o[12] = y, o[13] = b);
39
- let x;
40
- o[14] !== b || o[15] !== v ? (x = /* @__PURE__ */ jsxs("div", {
41
- className: "mt-2 flex flex-wrap items-center gap-2",
42
- children: [v, b]
43
- }), o[14] = b, o[15] = v, o[16] = x) : x = o[16];
44
- let S;
45
- o[17] !== x || o[18] !== g ? (S = /* @__PURE__ */ jsxs("div", {
46
- className: "min-w-0 flex-1 pr-2",
47
- children: [g, x]
48
- }), o[17] = x, o[18] = g, o[19] = S) : S = o[19];
49
- let C;
50
- o[20] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx("div", {
51
- className: "ml-3 opacity-0 transition-opacity group-hover:opacity-100",
52
- children: /* @__PURE__ */ jsx("svg", {
53
- className: "text-muted-foreground h-4 w-4",
54
- fill: "none",
55
- stroke: "currentColor",
56
- viewBox: "0 0 24 24",
57
- children: /* @__PURE__ */ jsx("path", {
58
- strokeLinecap: "round",
59
- strokeLinejoin: "round",
60
- strokeWidth: 2,
61
- d: "M9 5l7 7-7 7"
62
- })
63
- })
64
- }), o[20] = C) : C = o[20];
65
- let w;
66
- o[21] === S ? w = o[22] : (w = /* @__PURE__ */ jsxs("div", {
67
- className: "flex min-w-0 items-start justify-between",
68
- children: [S, C]
69
- }), o[21] = S, o[22] = w);
70
- let T;
71
- return o[23] !== s.id || o[24] !== w || o[25] !== f ? (T = /* @__PURE__ */ jsx(Link, {
72
- to: f,
73
- className: "bg-card border-border hover:border-primary/50 group block w-full overflow-hidden rounded-lg border p-4 transition-all duration-200 hover:shadow-md",
74
- children: w
75
- }, p), o[23] = s.id, o[24] = w, o[25] = f, o[26] = T) : T = o[26], T;
76
- }
77
- var RunItem_default = RunItem;
78
- export { RunItem_default as default };
@@ -1,32 +0,0 @@
1
- import { ScrollArea } from "../../components/ui/scroll-area.js";
2
- import RunItem_default from "./RunItem.js";
3
- import { c } from "react/compiler-runtime";
4
- import { jsx } from "react/jsx-runtime";
5
- function RunsList(i) {
6
- let a = c(11), { type: o, runs: s, router: l, emptyMessage: u } = i;
7
- if (s.length === 0) {
8
- let e;
9
- return a[0] === u ? e = a[1] : (e = /* @__PURE__ */ jsx("p", {
10
- className: "text-muted-foreground",
11
- children: u
12
- }), a[0] = u, a[1] = e), e;
13
- }
14
- let d;
15
- if (a[2] !== l || a[3] !== s || a[4] !== o) {
16
- let e;
17
- a[6] !== l || a[7] !== o ? (e = (e) => /* @__PURE__ */ jsx(RunItem_default, {
18
- run: e,
19
- router: l
20
- }, `${o}-${e.id}`), a[6] = l, a[7] = o, a[8] = e) : e = a[8], d = s.map(e), a[2] = l, a[3] = s, a[4] = o, a[5] = d;
21
- } else d = a[5];
22
- let f;
23
- return a[9] === d ? f = a[10] : (f = /* @__PURE__ */ jsx(ScrollArea, {
24
- className: "h-75 w-full",
25
- children: /* @__PURE__ */ jsx("div", {
26
- className: "space-y-2 pr-2",
27
- children: d
28
- })
29
- }), a[9] = d, a[10] = f), f;
30
- }
31
- var RunList_default = RunsList;
32
- export { RunList_default as default };
@@ -1,16 +0,0 @@
1
- import { getDashboardStatsCacheKey } from "./query-keys.js";
2
- import { useApiClient } from "./useApi.js";
3
- import { c } from "react/compiler-runtime";
4
- import { useQuery } from "@tanstack/react-query";
5
- function useDashboardStats() {
6
- let i = c(7), { envKey: a, api: o } = useApiClient(), s;
7
- i[0] === a ? s = i[1] : (s = getDashboardStatsCacheKey(a), i[0] = a, i[1] = s);
8
- let l;
9
- i[2] === o ? l = i[3] : (l = () => o.dashboard.getStats(), i[2] = o, i[3] = l);
10
- let u;
11
- return i[4] !== s || i[5] !== l ? (u = {
12
- queryKey: s,
13
- queryFn: l
14
- }, i[4] = s, i[5] = l, i[6] = u) : u = i[6], useQuery(u);
15
- }
16
- export { useDashboardStats };