@loopstack/loopstack-studio 0.29.4 → 0.30.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.
- package/dist/_virtual/rolldown_runtime.js +3 -1
- package/dist/api/config.js +5 -4
- package/dist/api/environments.js +5 -1
- package/dist/api/processor.js +4 -1
- package/dist/app/EnvironmentEmbedRoot.js +22 -30
- package/dist/components/ai-elements/code-block.js +4 -4
- package/dist/components/dynamic-form/CodeContent.js +1 -1
- package/dist/components/dynamic-form/Form.js +31 -51
- package/dist/components/dynamic-form/FormBody.js +1 -1
- package/dist/components/motion/FadeIn.js +72 -0
- package/dist/components/motion/StreamingText.js +49 -0
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui-widgets/UiWidget.js +11 -10
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
- package/dist/events/sse-client-events.js +7 -1
- package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
- package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
- package/dist/features/documents/DocumentRenderer.js +18 -17
- package/dist/features/documents/components/DocumentItem.js +42 -20
- package/dist/features/documents/components/DocumentList.js +34 -36
- package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
- package/dist/features/documents/document-details/DocumentDetails.js +577 -377
- package/dist/features/documents/document-details/PromptDetails.js +118 -130
- package/dist/features/documents/document-details/document-debug-utils.js +100 -0
- package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
- package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
- package/dist/features/documents/renderers/LlmMessage.js +52 -47
- package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
- package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
- package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
- package/dist/features/feature-registry/available-features.js +12 -0
- package/dist/features/feature-registry/index.js +2 -1
- package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
- package/dist/features/git/components/GitBranchBadge.js +31 -0
- package/dist/features/git/components/GitCommitList.js +46 -0
- package/dist/features/git/components/GitRemoteStatus.js +84 -0
- package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
- package/dist/features/git/git-feature.js +12 -0
- package/dist/features/git/hooks/useGit.js +78 -0
- package/dist/features/git/index.js +1 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
- package/dist/features/runs/Runs.js +4 -4
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
- package/dist/features/workbench/Workbench.js +25 -33
- package/dist/features/workbench/WorkflowItem.js +9 -9
- package/dist/features/workbench/WorkflowList.js +61 -62
- package/dist/features/workbench/components/NewRunDialog.js +237 -209
- package/dist/features/workbench/components/RecentRunItem.js +3 -3
- package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/components/WorkflowForms.js +11 -10
- package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
- package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
- package/dist/features/workbench/index.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
- package/dist/features/workspaces/Workspaces.js +134 -125
- package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
- package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
- package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
- package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
- package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/query-keys.js +43 -30
- package/dist/hooks/useConfig.js +28 -22
- package/dist/hooks/useEnvironments.js +27 -2
- package/dist/hooks/useProcessor.js +14 -1
- package/dist/hooks/useWorkflows.js +4 -4
- package/dist/index.d.ts +116 -15
- package/dist/index.js +9 -8
- package/dist/node_modules/d3/src/index.js +13 -13
- package/dist/node_modules/d3-scale/src/continuous.js +16 -16
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
- package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
- package/dist/node_modules/motion/dist/es/react.js +9 -2
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +76 -106
- package/dist/pages/EmbedWorkbenchPage.js +1 -1
- package/dist/pages/PreviewWorkbenchPage.js +6 -6
- package/dist/pages/WorkbenchPage.js +43 -47
- package/dist/pages/WorkflowDebugPage.js +6 -12
- package/dist/pages/WorkspacePage.js +40 -66
- package/dist/pages/WorkspaceRunsPage.js +24 -31
- package/package.json +2 -2
|
@@ -1,168 +1,138 @@
|
|
|
1
1
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import { useAppConfig } from "../hooks/useConfig.js";
|
|
2
|
+
import { useAppsConfig } from "../hooks/useConfig.js";
|
|
4
3
|
import { Badge } from "../components/ui/badge.js";
|
|
5
4
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
6
5
|
import { DataTable } from "../components/data-table/DataTable.js";
|
|
7
6
|
import { c } from "react/compiler-runtime";
|
|
8
7
|
import { useMemo, useState } from "react";
|
|
9
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { useQueries } from "@tanstack/react-query";
|
|
11
9
|
function DebugWorkflowsPage() {
|
|
12
|
-
let
|
|
13
|
-
f[0] === _ ? y = f[1] : (y = _ ?? [], f[0] = _, f[1] = y);
|
|
14
|
-
let b;
|
|
15
|
-
if (f[2] !== g || f[3] !== _?.length || f[4] !== h || f[5] !== y) {
|
|
16
|
-
let e;
|
|
17
|
-
f[7] !== g || f[8] !== _?.length || f[9] !== h ? (e = (e) => ({
|
|
18
|
-
queryKey: [
|
|
19
|
-
"workflowTypes",
|
|
20
|
-
e.className,
|
|
21
|
-
h
|
|
22
|
-
],
|
|
23
|
-
queryFn: async () => {
|
|
24
|
-
let u = await g.config.getWorkflowTypesByApp({ appBlockName: e.className });
|
|
25
|
-
return {
|
|
26
|
-
appBlockName: e.className,
|
|
27
|
-
types: u
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
enabled: !!_?.length
|
|
31
|
-
}), f[7] = g, f[8] = _?.length, f[9] = h, f[10] = e) : e = f[10], b = y.map(e), f[2] = g, f[3] = _?.length, f[4] = h, f[5] = y, f[6] = b;
|
|
32
|
-
} else b = f[6];
|
|
33
|
-
let x;
|
|
34
|
-
f[11] === b ? x = f[12] : (x = { queries: b }, f[11] = b, f[12] = x);
|
|
35
|
-
let S = useQueries(x), C;
|
|
36
|
-
f[13] === S ? C = f[14] : (C = S.some(_temp), f[13] = S, f[14] = C);
|
|
37
|
-
let w = v || C, T;
|
|
10
|
+
let p = c(35), { router: g } = useStudio(), { data: _, isLoading: v } = useAppsConfig(), y;
|
|
38
11
|
bb0: {
|
|
39
|
-
if (
|
|
12
|
+
if (!_) {
|
|
40
13
|
let e;
|
|
41
|
-
|
|
14
|
+
p[0] === Symbol.for("react.memo_cache_sentinel") ? (e = [], p[0] = e) : e = p[0], y = e;
|
|
42
15
|
break bb0;
|
|
43
16
|
}
|
|
44
17
|
let e;
|
|
45
|
-
|
|
18
|
+
p[1] === _ ? e = p[2] : (e = _.flatMap(_temp), p[1] = _, p[2] = e), y = e;
|
|
46
19
|
}
|
|
47
|
-
let
|
|
48
|
-
if (
|
|
49
|
-
if (
|
|
50
|
-
let e =
|
|
51
|
-
|
|
20
|
+
let b = y, [x, S] = useState(""), [C, w] = useState("workflowName"), [T, E] = useState("ASC"), [D, O] = useState(0), [k, A] = useState(10), j, M;
|
|
21
|
+
if (p[3] !== b || p[4] !== x || p[5] !== C || p[6] !== T) {
|
|
22
|
+
if (j = b, x) {
|
|
23
|
+
let e = x.toLowerCase();
|
|
24
|
+
j = j.filter((f) => f.workflowName?.toLowerCase().includes(e) || f.title?.toLowerCase().includes(e) || f.description?.toLowerCase().includes(e) || f.appBlockName.toLowerCase().includes(e));
|
|
52
25
|
}
|
|
53
26
|
let e;
|
|
54
|
-
|
|
55
|
-
let
|
|
56
|
-
return
|
|
57
|
-
},
|
|
58
|
-
} else
|
|
59
|
-
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
let
|
|
63
|
-
|
|
27
|
+
p[9] !== C || p[10] !== T ? (e = (e, f) => {
|
|
28
|
+
let p = C, m = (e[p] || "").toLowerCase(), h = (f[p] || "").toLowerCase();
|
|
29
|
+
return m < h ? T === "ASC" ? -1 : 1 : m > h ? T === "ASC" ? 1 : -1 : 0;
|
|
30
|
+
}, p[9] = C, p[10] = T, p[11] = e) : e = p[11], M = [...j].sort(e), p[3] = b, p[4] = x, p[5] = C, p[6] = T, p[7] = j, p[8] = M;
|
|
31
|
+
} else j = p[7], M = p[8];
|
|
32
|
+
j = M;
|
|
33
|
+
let N = j, P = D * k, F;
|
|
34
|
+
p[12] !== N || p[13] !== k || p[14] !== P ? (F = N.slice(P, P + k), p[12] = N, p[13] = k, p[14] = P, p[15] = F) : F = p[15];
|
|
35
|
+
let I = F, L;
|
|
36
|
+
p[16] === Symbol.for("react.memo_cache_sentinel") ? (L = [
|
|
64
37
|
{
|
|
65
|
-
id: "
|
|
38
|
+
id: "workflowName",
|
|
66
39
|
label: "Type ID (Alias)",
|
|
67
40
|
sortable: !0,
|
|
68
41
|
minWidth: 200,
|
|
69
|
-
format:
|
|
42
|
+
format: _temp2
|
|
70
43
|
},
|
|
71
44
|
{
|
|
72
45
|
id: "title",
|
|
73
46
|
label: "Title",
|
|
74
47
|
sortable: !0,
|
|
75
|
-
format:
|
|
48
|
+
format: _temp3
|
|
76
49
|
},
|
|
77
50
|
{
|
|
78
51
|
id: "appBlockName",
|
|
79
52
|
label: "App Type",
|
|
80
53
|
sortable: !0,
|
|
81
|
-
format:
|
|
54
|
+
format: _temp4
|
|
82
55
|
},
|
|
83
56
|
{
|
|
84
57
|
id: "description",
|
|
85
58
|
label: "Description",
|
|
86
59
|
sortable: !0,
|
|
87
|
-
format:
|
|
60
|
+
format: _temp5
|
|
88
61
|
}
|
|
89
|
-
],
|
|
90
|
-
let
|
|
91
|
-
|
|
62
|
+
], p[16] = L) : L = p[16];
|
|
63
|
+
let R = L, z;
|
|
64
|
+
p[17] === Symbol.for("react.memo_cache_sentinel") ? (z = [{
|
|
92
65
|
label: "Debug Workflows",
|
|
93
66
|
current: !0
|
|
94
|
-
}],
|
|
95
|
-
let
|
|
96
|
-
|
|
67
|
+
}], p[17] = z) : z = p[17];
|
|
68
|
+
let B = z, V;
|
|
69
|
+
p[18] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ jsx("h1", {
|
|
97
70
|
className: "mb-4 text-3xl font-bold tracking-tight",
|
|
98
71
|
children: "Workflow Types"
|
|
99
|
-
}),
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
let
|
|
111
|
-
return
|
|
112
|
-
breadcrumbsData:
|
|
113
|
-
children: [
|
|
114
|
-
data:
|
|
115
|
-
columns:
|
|
116
|
-
loading:
|
|
117
|
-
totalItems:
|
|
118
|
-
searchTerm:
|
|
119
|
-
onSearchChange:
|
|
120
|
-
page:
|
|
121
|
-
pageSize:
|
|
122
|
-
onPageChange:
|
|
123
|
-
onPageSizeChange:
|
|
124
|
-
sortBy:
|
|
125
|
-
sortOrder:
|
|
126
|
-
onSortChange:
|
|
127
|
-
filters:
|
|
128
|
-
onFiltersChange:
|
|
72
|
+
}), p[18] = V) : V = p[18];
|
|
73
|
+
let H, U;
|
|
74
|
+
p[19] === Symbol.for("react.memo_cache_sentinel") ? (H = (e) => O(e), U = (e) => {
|
|
75
|
+
A(e), O(0);
|
|
76
|
+
}, p[19] = H, p[20] = U) : (H = p[19], U = p[20]);
|
|
77
|
+
let W, G;
|
|
78
|
+
p[21] === Symbol.for("react.memo_cache_sentinel") ? (W = (e, f) => {
|
|
79
|
+
w(e), E(f);
|
|
80
|
+
}, G = {}, p[21] = W, p[22] = G) : (W = p[21], G = p[22]);
|
|
81
|
+
let K;
|
|
82
|
+
p[23] === g ? K = p[24] : (K = (e) => void g.navigateToDebugWorkflow(e.id), p[23] = g, p[24] = K);
|
|
83
|
+
let q;
|
|
84
|
+
return p[25] !== N.length || p[26] !== v || p[27] !== D || p[28] !== k || p[29] !== I || p[30] !== x || p[31] !== C || p[32] !== T || p[33] !== K ? (q = /* @__PURE__ */ jsxs(MainLayout_default, {
|
|
85
|
+
breadcrumbsData: B,
|
|
86
|
+
children: [V, /* @__PURE__ */ jsx(DataTable, {
|
|
87
|
+
data: I,
|
|
88
|
+
columns: R,
|
|
89
|
+
loading: v,
|
|
90
|
+
totalItems: N.length,
|
|
91
|
+
searchTerm: x,
|
|
92
|
+
onSearchChange: S,
|
|
93
|
+
page: D,
|
|
94
|
+
pageSize: k,
|
|
95
|
+
onPageChange: H,
|
|
96
|
+
onPageSizeChange: U,
|
|
97
|
+
sortBy: C,
|
|
98
|
+
sortOrder: T,
|
|
99
|
+
onSortChange: W,
|
|
100
|
+
filters: G,
|
|
101
|
+
onFiltersChange: _temp6,
|
|
129
102
|
enableBatchActions: !1,
|
|
130
|
-
onRowClick:
|
|
103
|
+
onRowClick: K
|
|
131
104
|
})]
|
|
132
|
-
}),
|
|
105
|
+
}), p[25] = N.length, p[26] = v, p[27] = D, p[28] = k, p[29] = I, p[30] = x, p[31] = C, p[32] = T, p[33] = K, p[34] = q) : q = p[34], q;
|
|
133
106
|
}
|
|
134
|
-
function
|
|
135
|
-
function
|
|
107
|
+
function _temp6() {}
|
|
108
|
+
function _temp5(e) {
|
|
136
109
|
return /* @__PURE__ */ jsx("span", {
|
|
137
110
|
className: "text-muted-foreground max-w-xs truncate block",
|
|
138
111
|
children: String(e || "-")
|
|
139
112
|
});
|
|
140
113
|
}
|
|
141
|
-
function
|
|
114
|
+
function _temp4(e) {
|
|
142
115
|
return /* @__PURE__ */ jsx(Badge, {
|
|
143
116
|
variant: "outline",
|
|
144
117
|
children: String(e)
|
|
145
118
|
});
|
|
146
119
|
}
|
|
147
|
-
function
|
|
148
|
-
return /* @__PURE__ */ jsx("span", { children: String(e ||
|
|
120
|
+
function _temp3(e, f) {
|
|
121
|
+
return /* @__PURE__ */ jsx("span", { children: String(e || f.workflowName || "N/A") });
|
|
149
122
|
}
|
|
150
|
-
function
|
|
123
|
+
function _temp2(e) {
|
|
151
124
|
return /* @__PURE__ */ jsx("span", {
|
|
152
125
|
className: "font-medium",
|
|
153
126
|
children: String(e)
|
|
154
127
|
});
|
|
155
128
|
}
|
|
156
|
-
function _temp2(e) {
|
|
157
|
-
if (!e.data) return [];
|
|
158
|
-
let { appBlockName: u, types: d } = e.data;
|
|
159
|
-
return (d ?? []).map((e) => ({
|
|
160
|
-
...e,
|
|
161
|
-
id: `${u}::${e.alias}`,
|
|
162
|
-
appBlockName: u
|
|
163
|
-
}));
|
|
164
|
-
}
|
|
165
129
|
function _temp(e) {
|
|
166
|
-
return e.
|
|
130
|
+
return e.workflows.map((f) => ({
|
|
131
|
+
id: `${e.appName}::${f.workflowName}`,
|
|
132
|
+
workflowName: f.workflowName,
|
|
133
|
+
title: f.title,
|
|
134
|
+
description: f.description,
|
|
135
|
+
appBlockName: e.appName
|
|
136
|
+
}));
|
|
167
137
|
}
|
|
168
138
|
export { DebugWorkflowsPage as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
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
|
-
import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
|
|
5
4
|
import { WorkflowState } from "../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
6
5
|
import "../packages/contracts/dist/enums/index.js";
|
|
7
6
|
import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
|
|
7
|
+
import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
|
|
8
8
|
import "../features/workbench/index.js";
|
|
9
9
|
import { requireParam } from "../lib/requireParam.js";
|
|
10
10
|
import { c } from "react/compiler-runtime";
|
|
@@ -3,11 +3,11 @@ import { useFilterWorkflows, useWorkflow, useWorkflowConfigByName } from "../hoo
|
|
|
3
3
|
import { Button } from "../components/ui/button.js";
|
|
4
4
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
5
5
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
6
|
-
import { WorkflowState } from "../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
7
|
-
import "../packages/contracts/dist/enums/index.js";
|
|
8
6
|
import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
|
|
9
7
|
import WorkflowFlowViewer_default from "../features/debug/components/WorkflowFlowViewer.js";
|
|
10
8
|
import "../features/debug/index.js";
|
|
9
|
+
import { WorkflowState } from "../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
10
|
+
import "../packages/contracts/dist/enums/index.js";
|
|
11
11
|
import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
|
|
12
12
|
import WorkflowHistoryList_default from "../features/workbench/components/WorkflowHistoryList.js";
|
|
13
13
|
import { NewRunDialog } from "../features/workbench/components/NewRunDialog.js";
|
|
@@ -45,7 +45,7 @@ function PreviewWorkbenchPage() {
|
|
|
45
45
|
}), e[3] = t, e[4] = o), o;
|
|
46
46
|
}
|
|
47
47
|
function PreviewWorkbenchContent(e) {
|
|
48
|
-
let t = c(49), { workflowId: m, onNewRunSuccess: h } = e, _ = useRef(null), [y, b] = useState("output"), [x, S] = useState(!1), w = useWorkflow(m), T = useRef(!1), O = useWorkflowConfigByName(w.data?.
|
|
48
|
+
let t = c(49), { workflowId: m, onNewRunSuccess: h } = e, _ = useRef(null), [y, b] = useState("output"), [x, S] = useState(!1), w = useWorkflow(m), T = useRef(!1), O = useWorkflowConfigByName(w.data?.workflowName), A, j;
|
|
49
49
|
t[0] !== w.data || t[1] !== m ? (A = () => {
|
|
50
50
|
!w.data || T.current || w.data.status === WorkflowState.Completed && window.parent !== window && (T.current = !0, window.parent.postMessage({
|
|
51
51
|
type: EMBED_MESSAGE_TYPE,
|
|
@@ -273,15 +273,15 @@ function RecentRunItem(e) {
|
|
|
273
273
|
let t = c(17), { workflow: n, onClick: r } = e, i = `h-1.5 w-1.5 shrink-0 rounded-full ${STATUS_DOT_COLORS[n.status] ?? "bg-muted-foreground"}`, a;
|
|
274
274
|
t[0] === i ? a = t[1] : (a = /* @__PURE__ */ jsx("span", { className: i }), t[0] = i, t[1] = a);
|
|
275
275
|
let o;
|
|
276
|
-
t[2] !== n.
|
|
276
|
+
t[2] !== n.run || t[3] !== n.workflowName ? (o = /* @__PURE__ */ jsxs("span", {
|
|
277
277
|
className: "truncate text-sm font-medium",
|
|
278
278
|
children: [
|
|
279
279
|
"Run #",
|
|
280
280
|
n.run,
|
|
281
281
|
" · ",
|
|
282
|
-
n.
|
|
282
|
+
n.workflowName
|
|
283
283
|
]
|
|
284
|
-
}), t[2] = n.
|
|
284
|
+
}), t[2] = n.run, t[3] = n.workflowName, t[4] = o) : o = t[4];
|
|
285
285
|
let s;
|
|
286
286
|
t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ jsxs("div", {
|
|
287
287
|
className: "flex items-center gap-2",
|
|
@@ -3,68 +3,64 @@ import { useWorkflow } from "../hooks/useWorkflows.js";
|
|
|
3
3
|
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
4
4
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
5
5
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
6
|
-
import { useDefaultEnvironmentPreviewUrl } from "../hooks/useEnvironmentPreviewUrl.js";
|
|
7
6
|
import Workbench from "../features/workbench/Workbench.js";
|
|
8
7
|
import "../features/workbench/index.js";
|
|
8
|
+
import { useDefaultEnvironmentPreviewUrl } from "../hooks/useEnvironmentPreviewUrl.js";
|
|
9
9
|
import { requireParam } from "../lib/requireParam.js";
|
|
10
10
|
import { c } from "react/compiler-runtime";
|
|
11
|
-
import { useMemo } from "react";
|
|
12
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { useParams } from "react-router-dom";
|
|
14
13
|
function WorkbenchPage(p) {
|
|
15
|
-
let m = c(
|
|
14
|
+
let m = c(35), h;
|
|
16
15
|
m[0] === p ? h = m[1] : (h = p === void 0 ? {} : p, m[0] = p, m[1] = h);
|
|
17
|
-
let { getPreviewUrl: g, getEnvironmentPreviewUrl: _
|
|
18
|
-
m[2] ===
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
let
|
|
22
|
-
m[
|
|
23
|
-
let k;
|
|
24
|
-
m[6] === O ? k = m[7] : (k = {
|
|
16
|
+
let { getPreviewUrl: g, getEnvironmentPreviewUrl: _ } = h, { router: v } = useStudio(), y = useParams(), b;
|
|
17
|
+
m[2] === y ? b = m[3] : (b = requireParam(y, "workflowId"), m[2] = y, m[3] = b);
|
|
18
|
+
let x = useWorkflow(b), S = x.data?.workspaceId, C = useWorkspace(S), w = useDefaultEnvironmentPreviewUrl(), T = _ ?? w, E;
|
|
19
|
+
m[4] === v ? E = m[5] : (E = v.getWorkspaces(), m[4] = v, m[5] = E);
|
|
20
|
+
let D;
|
|
21
|
+
m[6] === E ? D = m[7] : (D = {
|
|
25
22
|
label: "Workspaces",
|
|
26
|
-
href:
|
|
27
|
-
}, m[6] =
|
|
28
|
-
let
|
|
29
|
-
m[8] !==
|
|
30
|
-
let
|
|
31
|
-
m[11] !==
|
|
32
|
-
label:
|
|
33
|
-
href:
|
|
34
|
-
}, m[11] =
|
|
35
|
-
let
|
|
36
|
-
m[14] ===
|
|
37
|
-
let
|
|
38
|
-
m[16] !==
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
], m[16] =
|
|
43
|
-
let
|
|
44
|
-
m[20] ===
|
|
45
|
-
let
|
|
46
|
-
m[22] !==
|
|
47
|
-
workflow:
|
|
48
|
-
breadcrumbData:
|
|
23
|
+
href: E
|
|
24
|
+
}, m[6] = E, m[7] = D);
|
|
25
|
+
let O = C.data?.title ?? "", k;
|
|
26
|
+
m[8] !== v || m[9] !== S ? (k = S ? v.getWorkspace(S) : void 0, m[8] = v, m[9] = S, m[10] = k) : k = m[10];
|
|
27
|
+
let A;
|
|
28
|
+
m[11] !== O || m[12] !== k ? (A = {
|
|
29
|
+
label: O,
|
|
30
|
+
href: k
|
|
31
|
+
}, m[11] = O, m[12] = k, m[13] = A) : A = m[13];
|
|
32
|
+
let j = `Run #${x.data?.run}${x.data?.title ? ` (${x.data.title})` : ""}`, M;
|
|
33
|
+
m[14] === j ? M = m[15] : (M = { label: j }, m[14] = j, m[15] = M);
|
|
34
|
+
let N;
|
|
35
|
+
m[16] !== D || m[17] !== A || m[18] !== M ? (N = [
|
|
36
|
+
D,
|
|
37
|
+
A,
|
|
38
|
+
M
|
|
39
|
+
], m[16] = D, m[17] = A, m[18] = M, m[19] = N) : N = m[19];
|
|
40
|
+
let P = N, F;
|
|
41
|
+
m[20] === x.error ? F = m[21] : (F = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: x.error }), m[20] = x.error, m[21] = F);
|
|
42
|
+
let I;
|
|
43
|
+
m[22] !== P || m[23] !== x.data || m[24] !== x.error || m[25] !== x.isLoading || m[26] !== g || m[27] !== T ? (I = x.data ? /* @__PURE__ */ jsx(Workbench, {
|
|
44
|
+
workflow: x.data,
|
|
45
|
+
breadcrumbData: P,
|
|
49
46
|
getPreviewUrl: g,
|
|
50
|
-
getEnvironmentPreviewUrl:
|
|
51
|
-
|
|
52
|
-
}) : !S.isLoading && !S.error ? /* @__PURE__ */ jsx("p", {
|
|
47
|
+
getEnvironmentPreviewUrl: T
|
|
48
|
+
}) : !x.isLoading && !x.error ? /* @__PURE__ */ jsx("p", {
|
|
53
49
|
className: "text-muted-foreground py-8 text-center text-sm",
|
|
54
50
|
children: "Workflow not found."
|
|
55
|
-
}) : null, m[22] =
|
|
56
|
-
let
|
|
57
|
-
m[
|
|
58
|
-
loading:
|
|
59
|
-
children:
|
|
60
|
-
}), m[
|
|
61
|
-
let
|
|
62
|
-
return m[
|
|
51
|
+
}) : null, m[22] = P, m[23] = x.data, m[24] = x.error, m[25] = x.isLoading, m[26] = g, m[27] = T, m[28] = I) : I = m[28];
|
|
52
|
+
let L;
|
|
53
|
+
m[29] !== x.isLoading || m[30] !== I ? (L = /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
54
|
+
loading: x.isLoading,
|
|
55
|
+
children: I
|
|
56
|
+
}), m[29] = x.isLoading, m[30] = I, m[31] = L) : L = m[31];
|
|
57
|
+
let R;
|
|
58
|
+
return m[32] !== F || m[33] !== L ? (R = /* @__PURE__ */ jsx("div", {
|
|
63
59
|
className: "flex h-svh flex-col",
|
|
64
60
|
children: /* @__PURE__ */ jsxs("div", {
|
|
65
61
|
className: "flex-1 overflow-hidden",
|
|
66
|
-
children: [
|
|
62
|
+
children: [F, L]
|
|
67
63
|
})
|
|
68
|
-
}), m[
|
|
64
|
+
}), m[32] = F, m[33] = L, m[34] = R) : R = m[34], R;
|
|
69
65
|
}
|
|
70
66
|
export { WorkbenchPage as default };
|
|
@@ -18,7 +18,7 @@ var WorkflowDebugPage_default = () => {
|
|
|
18
18
|
_[0] === y ? b = _[1] : (b = requireParam(y, "workflowId"), _[0] = y, _[1] = b);
|
|
19
19
|
let x = b, S = useWorkflow(x), C = S.data?.workspaceId, w = useWorkspace(C), T = useChildWorkflows(x), E;
|
|
20
20
|
_[2] === T.data ? E = _[3] : (E = T.data ?? [], _[2] = T.data, _[3] = E);
|
|
21
|
-
let D = E, O = useWorkflowConfigByName(S.data?.
|
|
21
|
+
let D = E, O = useWorkflowConfigByName(S.data?.workflowName), k;
|
|
22
22
|
_[4] === v ? k = _[5] : (k = v.getWorkspaces(), _[4] = v, _[5] = k);
|
|
23
23
|
let A;
|
|
24
24
|
_[6] === k ? A = _[7] : (A = {
|
|
@@ -63,7 +63,7 @@ var WorkflowDebugPage_default = () => {
|
|
|
63
63
|
}
|
|
64
64
|
let B;
|
|
65
65
|
_[28] === S.error ? B = _[29] : (B = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), _[28] = S.error, _[29] = B);
|
|
66
|
-
let V = S.data?.title ?? S.data?.
|
|
66
|
+
let V = S.data?.title ?? S.data?.workflowName ?? "Workflow", H = S.data?.run, U;
|
|
67
67
|
_[30] !== v || _[31] !== x ? (U = () => void v.navigateToWorkflow(x), _[30] = v, _[31] = x, _[32] = U) : U = _[32];
|
|
68
68
|
let W;
|
|
69
69
|
_[33] !== V || _[34] !== H || _[35] !== U ? (W = /* @__PURE__ */ jsx(WorkflowDebugHeader_default, {
|
|
@@ -72,20 +72,14 @@ var WorkflowDebugPage_default = () => {
|
|
|
72
72
|
onBack: U
|
|
73
73
|
}), _[33] = V, _[34] = H, _[35] = U, _[36] = W) : W = _[36];
|
|
74
74
|
let G;
|
|
75
|
-
_[37] !== D || _[38] !== O || _[39] !== x ? (G = /* @__PURE__ */ jsx("div", {
|
|
75
|
+
_[37] !== D || _[38] !== O.data || _[39] !== x ? (G = /* @__PURE__ */ jsx("div", {
|
|
76
76
|
className: "bg-card border-border flex-1 overflow-hidden rounded-2xl border shadow-sm",
|
|
77
|
-
children:
|
|
77
|
+
children: /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(WorkflowFlowViewer_default, {
|
|
78
78
|
workflowId: x,
|
|
79
79
|
workflows: D,
|
|
80
80
|
workflowConfig: O.data
|
|
81
|
-
}) })
|
|
82
|
-
|
|
83
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
84
|
-
className: "font-medium",
|
|
85
|
-
children: "No child workflows found for this workflow"
|
|
86
|
-
})
|
|
87
|
-
})
|
|
88
|
-
}), _[37] = D, _[38] = O, _[39] = x, _[40] = G) : G = _[40];
|
|
81
|
+
}) })
|
|
82
|
+
}), _[37] = D, _[38] = O.data, _[39] = x, _[40] = G) : G = _[40];
|
|
89
83
|
let K;
|
|
90
84
|
_[41] !== W || _[42] !== G ? (K = /* @__PURE__ */ jsxs("div", {
|
|
91
85
|
className: "flex h-[calc(100vh-8rem)] flex-col gap-6",
|
|
@@ -1,88 +1,62 @@
|
|
|
1
1
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
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
|
|
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
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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:
|
|
34
|
-
},
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
label:
|
|
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
|
-
},
|
|
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
|
-
|
|
42
|
-
let j
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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,
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
] }),
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
breadcrumbsData:
|
|
74
|
-
children:
|
|
75
|
-
}) }),
|
|
76
|
-
let
|
|
77
|
-
return
|
|
78
|
-
workspaceId:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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 };
|