@loopstack/loopstack-studio 0.33.0 → 0.35.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/app/EnvironmentEmbedRoot.js +17 -25
- package/dist/components/layout/StudioSidebar.js +34 -34
- package/dist/components/messages/CompletionMessagePaper.js +25 -29
- package/dist/events/api-client-events.js +13 -1
- package/dist/events/index.js +1 -0
- package/dist/features/code-explorer/components/FileTabsBarBase.js +1 -1
- package/dist/features/code-explorer/index.js +0 -3
- package/dist/features/dashboard/AppLauncher.js +111 -64
- package/dist/features/debug/components/WorkflowFlowViewer.js +2 -1
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +2 -1
- package/dist/features/documents/DocumentRenderer.js +42 -42
- package/dist/features/documents/components/DocumentList.js +1 -1
- package/dist/features/documents/document-details/DocumentDetails.js +0 -5
- package/dist/features/documents/renderers/DocumentFormRenderer.js +13 -12
- package/dist/features/documents/renderers/LinkMessageRenderer.js +2 -1
- package/dist/features/documents/renderers/useDocumentTransition.js +3 -2
- package/dist/features/feature-registry/FeatureRegistryProvider.js +17 -18
- package/dist/features/feature-registry/available-features.js +3 -2
- package/dist/features/feature-registry/index.js +1 -1
- package/dist/features/file-explorer/components/FileExplorerPanel.js +64 -43
- package/dist/features/file-explorer/components/FileTabsBar.js +1 -1
- package/dist/features/file-explorer/components/FileTree.js +1 -1
- package/dist/features/file-explorer/file-explorer-feature.js +15 -7
- package/dist/features/file-explorer/hooks/useFileExplorer.js +41 -34
- package/dist/features/file-explorer/index.js +1 -1
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +91 -89
- package/dist/features/git/components/WorkbenchGitPanel.js +7 -10
- package/dist/features/git/hooks/useGit.js +55 -57
- package/dist/features/health/LocalHealthCheck.js +46 -47
- package/dist/features/oauth/OAuthPromptRenderer.js +6 -5
- package/dist/features/runs/Runs.js +3 -2
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/secrets/renderers/SecretInputRenderer.js +3 -2
- package/dist/features/workbench/Workbench.js +16 -16
- package/dist/features/workbench/WorkflowItem.js +5 -8
- package/dist/features/workbench/components/NewRunDialog.js +173 -171
- package/dist/features/workbench/components/PreviewEmptyState.js +1 -1
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
- package/dist/features/workbench/components/WorkbenchRunsPanel.js +2 -1
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/components/WorkflowForms.js +1 -1
- package/dist/features/workbench/components/WorkflowHistoryItem.js +2 -1
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +8 -14
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +65 -132
- package/dist/features/workbench/hooks/useWorkflowData.js +8 -6
- package/dist/features/workbench/index.js +1 -1
- package/dist/features/workspaces/Workspaces.js +5 -3
- package/dist/features/workspaces/components/CreateWorkspace.js +7 -5
- package/dist/features/workspaces/components/ExecutionTimeline.js +69 -65
- package/dist/features/workspaces/components/WorkflowRunForm.js +6 -4
- package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/useAuth.js +14 -53
- package/dist/hooks/useConfig.js +13 -37
- package/dist/hooks/useDocuments.js +5 -30
- package/dist/hooks/useEnvironments.js +34 -24
- package/dist/hooks/useProcessor.js +2 -31
- package/dist/hooks/useSecrets.js +71 -53
- package/dist/hooks/useWorkflows.js +43 -172
- package/dist/hooks/useWorkspaces.js +24 -130
- package/dist/index.d.ts +137 -481
- package/dist/index.js +15 -17
- package/dist/loopstack-studio.css +1 -1
- package/dist/packages/client/dist/client.js +35 -0
- package/dist/packages/client/dist/http.js +47 -0
- package/dist/packages/client/dist/index.js +15 -0
- package/dist/packages/client/dist/queries/query-keys.js +94 -0
- package/dist/packages/client/dist/queries/query-options.js +97 -0
- package/dist/packages/client/dist/resources/auth.js +10 -0
- package/dist/packages/client/dist/resources/config.js +11 -0
- package/dist/packages/client/dist/resources/dashboard.js +4 -0
- package/dist/packages/client/dist/resources/documents.js +7 -0
- package/dist/packages/client/dist/resources/processor.js +7 -0
- package/dist/packages/client/dist/resources/workflows.js +13 -0
- package/dist/packages/client/dist/resources/workspaces.js +12 -0
- package/dist/packages/client/dist/stream/invalidations.js +20 -0
- package/dist/packages/client/dist/stream/llm-reducer.js +65 -0
- package/dist/packages/client/dist/stream/sse-parser.js +40 -0
- package/dist/packages/client/dist/stream/stream.js +147 -0
- package/dist/packages/contracts/dist/events/client-message-base.schema.js +6 -0
- package/dist/packages/contracts/dist/events/client-message.schema.js +24 -0
- package/dist/packages/contracts/dist/events/index.js +6 -0
- package/dist/packages/contracts/dist/events/llm-events.schema.js +44 -0
- package/dist/packages/contracts/dist/events/stream-events.schema.js +4 -0
- package/dist/packages/contracts/dist/events/workflow-events.schema.js +20 -0
- package/dist/packages/contracts/dist/events/workspace-events.schema.js +5 -0
- package/dist/packages/contracts/dist/types/types/ui-message.type.js +39 -0
- package/dist/packages/react/dist/hooks/mutations.js +175 -0
- package/dist/packages/react/dist/hooks/queries.js +139 -0
- package/dist/packages/react/dist/hooks/use-live-invalidation.js +39 -0
- package/dist/packages/react/dist/hooks/use-llm-stream.js +18 -0
- package/dist/packages/react/dist/index.js +5 -0
- package/dist/packages/react/dist/provider.js +15 -0
- package/dist/pages/DashboardPage.js +2 -1
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -1
- package/dist/pages/DebugWorkflowsPage.js +2 -1
- package/dist/pages/EmbedWorkbenchPage.js +50 -43
- package/dist/pages/PreviewWorkbenchPage.js +60 -59
- package/dist/pages/StudioLandingPage.js +1 -1
- package/dist/pages/WorkbenchPage.js +53 -47
- package/dist/pages/WorkflowDebugPage.js +3 -2
- package/dist/pages/WorkspacePage.js +42 -27
- package/dist/pages/WorkspaceRunsPage.js +36 -27
- package/dist/providers/LoopstackClientProvider.js +31 -0
- package/dist/services/createApiClient.js +9 -3
- package/dist/services/index.js +0 -1
- package/dist/services/reporting-fetch.js +13 -0
- package/package.json +4 -3
- package/dist/api/auth.js +0 -10
- package/dist/api/client.js +0 -13
- package/dist/api/config.js +0 -11
- package/dist/api/dashboard.js +0 -4
- package/dist/api/documents.js +0 -7
- package/dist/api/environments.js +0 -8
- package/dist/api/index.js +0 -28
- package/dist/api/processor.js +0 -7
- package/dist/api/secrets.js +0 -16
- package/dist/api/workflows.js +0 -15
- package/dist/api/workspaces.js +0 -12
- package/dist/events/sse-client-events.js +0 -13
- package/dist/features/code-explorer/CodeExplorer.js +0 -6
- package/dist/features/code-explorer/components/CodeExplorerTree.js +0 -6
- package/dist/features/code-explorer/components/FileTabsBar.js +0 -4
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +0 -5
- package/dist/features/file-explorer/api/files.js +0 -7
- package/dist/features/git/api/git.js +0 -9
- package/dist/hooks/query-keys.js +0 -145
- package/dist/hooks/useApi.js +0 -15
- package/dist/hooks/useFiles.js +0 -3
- package/dist/node_modules/lodash/_Symbol.js +0 -7
- package/dist/node_modules/lodash/_baseGetTag.js +0 -13
- package/dist/node_modules/lodash/_baseTrim.js +0 -11
- package/dist/node_modules/lodash/_freeGlobal.js +0 -6
- package/dist/node_modules/lodash/_getRawTag.js +0 -17
- package/dist/node_modules/lodash/_objectToString.js +0 -10
- package/dist/node_modules/lodash/_root.js +0 -8
- package/dist/node_modules/lodash/_trimmedEndIndex.js +0 -11
- package/dist/node_modules/lodash/debounce.js +0 -53
- package/dist/node_modules/lodash/isObject.js +0 -10
- package/dist/node_modules/lodash/isObjectLike.js +0 -9
- package/dist/node_modules/lodash/isSymbol.js +0 -12
- package/dist/node_modules/lodash/now.js +0 -10
- package/dist/node_modules/lodash/toNumber.js +0 -22
- package/dist/providers/InvalidationEventsProvider.js +0 -41
- package/dist/providers/SseProvider.js +0 -37
- package/dist/services/eventEmitter.js +0 -12
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { useWorkflow } from "../hooks/
|
|
2
|
-
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
3
|
-
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
1
|
+
import { useWorkflow, useWorkspace } from "../packages/react/dist/hooks/queries.js";
|
|
4
2
|
import { WorkflowState } from "../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
5
3
|
import "../packages/contracts/dist/enums/index.js";
|
|
4
|
+
import "../hooks/useWorkflows.js";
|
|
5
|
+
import "../hooks/useWorkspaces.js";
|
|
6
|
+
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
7
|
+
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
8
|
+
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
9
|
+
import "../features/feature-registry/index.js";
|
|
6
10
|
import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
|
|
7
11
|
import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
|
|
8
12
|
import "../features/workbench/index.js";
|
|
@@ -13,59 +17,62 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
17
|
import { useParams } from "react-router-dom";
|
|
14
18
|
var EMBED_MESSAGE_TYPE = "loopstack:embed:workflow-completed", EMBED_RESIZE_MESSAGE_TYPE = "loopstack:embed:resize";
|
|
15
19
|
function EmbedWorkbenchPage() {
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
!
|
|
20
|
+
let y = c(21), b = useParams(), x;
|
|
21
|
+
y[0] === b ? x = y[1] : (x = requireParam(b, "workflowId"), y[0] = b, y[1] = x);
|
|
22
|
+
let S = x, C = useRef(null), w = useWorkflow(S), T = useWorkspace(w.data?.workspaceId), E = useRef(!1), D, O;
|
|
23
|
+
y[2] !== w.data || y[3] !== S ? (D = () => {
|
|
24
|
+
!w.data || E.current || w.data.status === WorkflowState.Completed && window.parent !== window && (E.current = !0, window.parent.postMessage({
|
|
21
25
|
type: EMBED_MESSAGE_TYPE,
|
|
22
|
-
workflowId:
|
|
26
|
+
workflowId: S
|
|
23
27
|
}, window.location.origin));
|
|
24
|
-
},
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
if (window.parent === window || !
|
|
28
|
+
}, O = [w.data, S], y[2] = w.data, y[3] = S, y[4] = D, y[5] = O) : (D = y[4], O = y[5]), useEffect(D, O);
|
|
29
|
+
let k, A;
|
|
30
|
+
y[6] === S ? (k = y[7], A = y[8]) : (k = () => {
|
|
31
|
+
if (window.parent === window || !C.current) return;
|
|
28
32
|
let t = new ResizeObserver(() => {
|
|
29
|
-
if (!
|
|
33
|
+
if (!C.current) return;
|
|
30
34
|
let t = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);
|
|
31
35
|
window.parent.postMessage({
|
|
32
36
|
type: EMBED_RESIZE_MESSAGE_TYPE,
|
|
33
|
-
workflowId:
|
|
37
|
+
workflowId: S,
|
|
34
38
|
height: t
|
|
35
39
|
}, window.location.origin);
|
|
36
40
|
});
|
|
37
|
-
return t.observe(
|
|
38
|
-
},
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
+
return t.observe(C.current), () => t.disconnect();
|
|
42
|
+
}, A = [S], y[6] = S, y[7] = k, y[8] = A), useEffect(k, A);
|
|
43
|
+
let j = _temp, M;
|
|
44
|
+
y[9] === Symbol.for("react.memo_cache_sentinel") ? (M = {
|
|
41
45
|
enableDebugMode: !1,
|
|
42
46
|
showFullMessageHistory: !1
|
|
43
|
-
},
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
workflow:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
}, y[9] = M) : M = y[9];
|
|
48
|
+
let N = M, P;
|
|
49
|
+
y[10] === w.error ? P = y[11] : (P = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: w.error }), y[10] = w.error, y[11] = P);
|
|
50
|
+
let F = w.isLoading || T.isLoading, I;
|
|
51
|
+
y[12] !== w.data || y[13] !== T ? (I = w.data && T.data ? /* @__PURE__ */ jsx(FeatureRegistryProvider, {
|
|
52
|
+
appName: T.data.appName,
|
|
53
|
+
children: /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
54
|
+
workspaceId: w.data.workspaceId,
|
|
55
|
+
workflow: w.data,
|
|
56
|
+
children: /* @__PURE__ */ jsx(WorkflowItem_default, {
|
|
57
|
+
workflow: w.data,
|
|
58
|
+
workflowId: w.data.id,
|
|
59
|
+
scrollTo: j,
|
|
60
|
+
settings: N,
|
|
61
|
+
embed: !0
|
|
62
|
+
})
|
|
56
63
|
})
|
|
57
|
-
}) : null,
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
loading:
|
|
61
|
-
children:
|
|
62
|
-
}),
|
|
63
|
-
let
|
|
64
|
-
return
|
|
65
|
-
ref:
|
|
64
|
+
}) : null, y[12] = w.data, y[13] = T, y[14] = I) : I = y[14];
|
|
65
|
+
let L;
|
|
66
|
+
y[15] !== F || y[16] !== I ? (L = /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
67
|
+
loading: F,
|
|
68
|
+
children: I
|
|
69
|
+
}), y[15] = F, y[16] = I, y[17] = L) : L = y[17];
|
|
70
|
+
let R;
|
|
71
|
+
return y[18] !== P || y[19] !== L ? (R = /* @__PURE__ */ jsxs("div", {
|
|
72
|
+
ref: C,
|
|
66
73
|
className: "overflow-hidden pl-3 py-4",
|
|
67
|
-
children: [
|
|
68
|
-
}),
|
|
74
|
+
children: [P, L]
|
|
75
|
+
}), y[18] = P, y[19] = L, y[20] = R) : R = y[20], R;
|
|
69
76
|
}
|
|
70
77
|
function _temp() {}
|
|
71
78
|
export { EmbedWorkbenchPage as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { useWorkflow } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import { WorkflowState } from "../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
3
|
+
import "../packages/contracts/dist/enums/index.js";
|
|
4
|
+
import { useFilterWorkflows, useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
1
5
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useFilterWorkflows, useWorkflow, useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
3
6
|
import { Button } from "../components/ui/button.js";
|
|
4
7
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
5
8
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
6
9
|
import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
|
|
7
10
|
import WorkflowFlowViewer_default from "../features/debug/components/WorkflowFlowViewer.js";
|
|
8
11
|
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
12
|
import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
|
|
12
13
|
import WorkflowHistoryList_default from "../features/workbench/components/WorkflowHistoryList.js";
|
|
13
14
|
import { NewRunDialog } from "../features/workbench/components/NewRunDialog.js";
|
|
@@ -44,16 +45,16 @@ function PreviewWorkbenchPage() {
|
|
|
44
45
|
onNewRunSuccess: a
|
|
45
46
|
}), e[3] = t, e[4] = o), o;
|
|
46
47
|
}
|
|
47
|
-
function PreviewWorkbenchContent(
|
|
48
|
-
let
|
|
49
|
-
|
|
48
|
+
function PreviewWorkbenchContent(n) {
|
|
49
|
+
let i = c(49), { workflowId: m, onNewRunSuccess: h } = n, _ = useRef(null), [y, b] = useState("output"), [x, S] = useState(!1), w = useWorkflow(m), T = useRef(!1), O = useWorkflowConfigByName(w.data?.workflowName), A, j;
|
|
50
|
+
i[0] !== w.data || i[1] !== m ? (A = () => {
|
|
50
51
|
!w.data || T.current || w.data.status === WorkflowState.Completed && window.parent !== window && (T.current = !0, window.parent.postMessage({
|
|
51
52
|
type: EMBED_MESSAGE_TYPE,
|
|
52
53
|
workflowId: m
|
|
53
54
|
}, window.location.origin));
|
|
54
|
-
}, j = [w.data, m],
|
|
55
|
+
}, j = [w.data, m], i[0] = w.data, i[1] = m, i[2] = A, i[3] = j) : (A = i[2], j = i[3]), useEffect(A, j);
|
|
55
56
|
let M, N;
|
|
56
|
-
|
|
57
|
+
i[4] === m ? (M = i[5], N = i[6]) : (M = () => {
|
|
57
58
|
if (window.parent === window || !_.current) return;
|
|
58
59
|
let e = new ResizeObserver(() => {
|
|
59
60
|
if (!_.current) return;
|
|
@@ -65,36 +66,36 @@ function PreviewWorkbenchContent(e) {
|
|
|
65
66
|
}, window.location.origin);
|
|
66
67
|
});
|
|
67
68
|
return e.observe(_.current), () => e.disconnect();
|
|
68
|
-
}, N = [m],
|
|
69
|
+
}, N = [m], i[4] = m, i[5] = M, i[6] = N), useEffect(M, N);
|
|
69
70
|
let P;
|
|
70
|
-
|
|
71
|
+
i[7] === h ? P = i[8] : (P = (e) => {
|
|
71
72
|
S(!1), h(e);
|
|
72
|
-
},
|
|
73
|
+
}, i[7] = h, i[8] = P);
|
|
73
74
|
let F = P, I = _temp, L;
|
|
74
|
-
|
|
75
|
+
i[9] === Symbol.for("react.memo_cache_sentinel") ? (L = {
|
|
75
76
|
enableDebugMode: !1,
|
|
76
77
|
showFullMessageHistory: !1
|
|
77
|
-
},
|
|
78
|
+
}, i[9] = L) : L = i[9];
|
|
78
79
|
let R = L, z;
|
|
79
|
-
|
|
80
|
+
i[10] === Symbol.for("react.memo_cache_sentinel") ? (z = {
|
|
80
81
|
value: "output",
|
|
81
82
|
label: "Output",
|
|
82
83
|
icon: /* @__PURE__ */ jsx(ScrollText, { className: "h-3.5 w-3.5" })
|
|
83
|
-
},
|
|
84
|
+
}, i[10] = z) : z = i[10];
|
|
84
85
|
let B;
|
|
85
|
-
|
|
86
|
+
i[11] === Symbol.for("react.memo_cache_sentinel") ? (B = {
|
|
86
87
|
value: "graph",
|
|
87
88
|
label: "Graph",
|
|
88
89
|
icon: /* @__PURE__ */ jsx(Workflow, { className: "h-3.5 w-3.5" })
|
|
89
|
-
},
|
|
90
|
+
}, i[11] = B) : B = i[11];
|
|
90
91
|
let V;
|
|
91
|
-
|
|
92
|
+
i[12] === Symbol.for("react.memo_cache_sentinel") ? (V = {
|
|
92
93
|
value: "run-log",
|
|
93
94
|
label: "Run Log",
|
|
94
95
|
icon: /* @__PURE__ */ jsx(ListOrdered, { className: "h-3.5 w-3.5" })
|
|
95
|
-
},
|
|
96
|
+
}, i[12] = V) : V = i[12];
|
|
96
97
|
let H;
|
|
97
|
-
|
|
98
|
+
i[13] === Symbol.for("react.memo_cache_sentinel") ? (H = [
|
|
98
99
|
z,
|
|
99
100
|
B,
|
|
100
101
|
V,
|
|
@@ -103,33 +104,33 @@ function PreviewWorkbenchContent(e) {
|
|
|
103
104
|
label: "Logs",
|
|
104
105
|
icon: /* @__PURE__ */ jsx(ScrollText, { className: "h-3.5 w-3.5" })
|
|
105
106
|
}
|
|
106
|
-
],
|
|
107
|
+
], i[13] = H) : H = i[13];
|
|
107
108
|
let ce = H, U;
|
|
108
|
-
|
|
109
|
+
i[14] === y ? U = i[15] : (U = /* @__PURE__ */ jsx("div", {
|
|
109
110
|
className: "bg-background flex items-center rounded-md border p-0.5",
|
|
110
111
|
children: ce.map((e) => /* @__PURE__ */ jsxs("button", {
|
|
111
112
|
onClick: () => b(e.value),
|
|
112
113
|
className: `flex items-center gap-1.5 rounded-sm px-2.5 py-1 text-xs font-medium transition-colors ${y === e.value ? "bg-foreground text-background shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
|
|
113
114
|
children: [e.icon, e.label]
|
|
114
115
|
}, e.value))
|
|
115
|
-
}),
|
|
116
|
+
}), i[14] = y, i[15] = U);
|
|
116
117
|
let W;
|
|
117
|
-
|
|
118
|
+
i[16] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ jsxs(Button, {
|
|
118
119
|
variant: "outline",
|
|
119
120
|
size: "sm",
|
|
120
121
|
className: "h-7 gap-1.5",
|
|
121
122
|
onClick: () => S(!0),
|
|
122
123
|
children: [/* @__PURE__ */ jsx(Play, { className: "h-3 w-3" }), "New Run"]
|
|
123
|
-
}),
|
|
124
|
+
}), i[16] = W) : W = i[16];
|
|
124
125
|
let G;
|
|
125
|
-
|
|
126
|
+
i[17] === U ? G = i[18] : (G = /* @__PURE__ */ jsxs("div", {
|
|
126
127
|
className: "bg-muted/50 flex h-11 shrink-0 items-center justify-between border-b px-3",
|
|
127
128
|
children: [U, W]
|
|
128
|
-
}),
|
|
129
|
+
}), i[17] = U, i[18] = G);
|
|
129
130
|
let K;
|
|
130
|
-
|
|
131
|
+
i[19] === w.error ? K = i[20] : (K = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: w.error }), i[19] = w.error, i[20] = K);
|
|
131
132
|
let q;
|
|
132
|
-
|
|
133
|
+
i[21] !== y || i[22] !== w.data || i[23] !== w.isLoading ? (q = y === "output" && /* @__PURE__ */ jsx("div", {
|
|
133
134
|
className: "px-4 py-3",
|
|
134
135
|
children: /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
135
136
|
loading: w.isLoading,
|
|
@@ -140,9 +141,9 @@ function PreviewWorkbenchContent(e) {
|
|
|
140
141
|
settings: R
|
|
141
142
|
}) : null
|
|
142
143
|
})
|
|
143
|
-
}),
|
|
144
|
+
}), i[21] = y, i[22] = w.data, i[23] = w.isLoading, i[24] = q) : q = i[24];
|
|
144
145
|
let J;
|
|
145
|
-
|
|
146
|
+
i[25] !== y || i[26] !== w.data || i[27] !== w.isLoading || i[28] !== O || i[29] !== m ? (J = y === "graph" && /* @__PURE__ */ jsx("div", {
|
|
146
147
|
className: "h-full",
|
|
147
148
|
children: /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
148
149
|
loading: w.isLoading,
|
|
@@ -159,16 +160,16 @@ function PreviewWorkbenchContent(e) {
|
|
|
159
160
|
})
|
|
160
161
|
})
|
|
161
162
|
})
|
|
162
|
-
}),
|
|
163
|
+
}), i[25] = y, i[26] = w.data, i[27] = w.isLoading, i[28] = O, i[29] = m, i[30] = J) : J = i[30];
|
|
163
164
|
let Y;
|
|
164
|
-
|
|
165
|
+
i[31] !== y || i[32] !== w.data ? (Y = y === "run-log" && /* @__PURE__ */ jsx("div", {
|
|
165
166
|
className: "px-4",
|
|
166
167
|
children: /* @__PURE__ */ jsx(WorkflowHistoryList_default, { workflow: w.data })
|
|
167
|
-
}),
|
|
168
|
+
}), i[31] = y, i[32] = w.data, i[33] = Y) : Y = i[33];
|
|
168
169
|
let X;
|
|
169
|
-
|
|
170
|
+
i[34] === y ? X = i[35] : (X = y === "logs" && /* @__PURE__ */ jsx(EmbedLogsContent, {}), i[34] = y, i[35] = X);
|
|
170
171
|
let Z;
|
|
171
|
-
|
|
172
|
+
i[36] !== K || i[37] !== q || i[38] !== J || i[39] !== Y || i[40] !== X ? (Z = /* @__PURE__ */ jsxs("div", {
|
|
172
173
|
className: "flex-1 overflow-auto",
|
|
173
174
|
children: [
|
|
174
175
|
K,
|
|
@@ -177,15 +178,15 @@ function PreviewWorkbenchContent(e) {
|
|
|
177
178
|
Y,
|
|
178
179
|
X
|
|
179
180
|
]
|
|
180
|
-
}),
|
|
181
|
+
}), i[36] = K, i[37] = q, i[38] = J, i[39] = Y, i[40] = X, i[41] = Z) : Z = i[41];
|
|
181
182
|
let Q;
|
|
182
|
-
|
|
183
|
+
i[42] !== F || i[43] !== x ? (Q = /* @__PURE__ */ jsx(NewRunDialog, {
|
|
183
184
|
open: x,
|
|
184
185
|
onOpenChange: S,
|
|
185
186
|
onSuccess: F
|
|
186
|
-
}),
|
|
187
|
+
}), i[42] = F, i[43] = x, i[44] = Q) : Q = i[44];
|
|
187
188
|
let $;
|
|
188
|
-
return
|
|
189
|
+
return i[45] !== G || i[46] !== Z || i[47] !== Q ? ($ = /* @__PURE__ */ jsxs("div", {
|
|
189
190
|
ref: _,
|
|
190
191
|
className: "flex h-screen flex-col overflow-hidden",
|
|
191
192
|
children: [
|
|
@@ -193,7 +194,7 @@ function PreviewWorkbenchContent(e) {
|
|
|
193
194
|
Z,
|
|
194
195
|
Q
|
|
195
196
|
]
|
|
196
|
-
}),
|
|
197
|
+
}), i[45] = G, i[46] = Z, i[47] = Q, i[48] = $) : $ = i[48], $;
|
|
197
198
|
}
|
|
198
199
|
function _temp() {}
|
|
199
200
|
var STATUS_DOT_COLORS = {
|
|
@@ -204,17 +205,17 @@ var STATUS_DOT_COLORS = {
|
|
|
204
205
|
canceled: "bg-orange-500",
|
|
205
206
|
pending: "bg-muted-foreground"
|
|
206
207
|
};
|
|
207
|
-
function PreviewEmptyState(
|
|
208
|
-
let
|
|
209
|
-
|
|
208
|
+
function PreviewEmptyState(e) {
|
|
209
|
+
let t = c(24), { newRunDialogOpen: r, onNewRunDialogOpenChange: o, onNewRunSuccess: s } = e, l = useNavigate(), { router: u } = useStudio(), [d, f] = useState(3), m;
|
|
210
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (m = { parentId: null }, t[0] = m) : m = t[0];
|
|
210
211
|
let h = useFilterWorkflows(void 0, m, "createdAt", "DESC", 0, d), g;
|
|
211
|
-
|
|
212
|
+
t[1] === h.data?.data ? g = t[2] : (g = h.data?.data ?? [], t[1] = h.data?.data, t[2] = g);
|
|
212
213
|
let _ = g, se = h.data?.total ?? 0, y = _.length < se, x;
|
|
213
|
-
|
|
214
|
+
t[3] === o ? x = t[4] : (x = () => o(!0), t[3] = o, t[4] = x);
|
|
214
215
|
let C;
|
|
215
|
-
|
|
216
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(Play, { className: "h-3.5 w-3.5" }), t[5] = C) : C = t[5];
|
|
216
217
|
let T;
|
|
217
|
-
|
|
218
|
+
t[6] === x ? T = t[7] : (T = /* @__PURE__ */ jsx("div", {
|
|
218
219
|
className: "flex justify-center",
|
|
219
220
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
220
221
|
variant: "secondary",
|
|
@@ -223,9 +224,9 @@ function PreviewEmptyState(n) {
|
|
|
223
224
|
onClick: x,
|
|
224
225
|
children: [C, "New Run"]
|
|
225
226
|
})
|
|
226
|
-
}),
|
|
227
|
+
}), t[6] = x, t[7] = T);
|
|
227
228
|
let E;
|
|
228
|
-
|
|
229
|
+
t[8] !== h.isLoading || t[9] !== y || t[10] !== l || t[11] !== u || t[12] !== _ ? (E = h.isLoading && _.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
229
230
|
className: "flex justify-center py-4",
|
|
230
231
|
children: /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-4 w-4 animate-spin" })
|
|
231
232
|
}) : _.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -248,23 +249,23 @@ function PreviewEmptyState(n) {
|
|
|
248
249
|
onClick: () => f(_temp2),
|
|
249
250
|
children: [/* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3" }), "Load more"]
|
|
250
251
|
})
|
|
251
|
-
] }) : null,
|
|
252
|
+
] }) : null, t[8] = h.isLoading, t[9] = y, t[10] = l, t[11] = u, t[12] = _, t[13] = E) : E = t[13];
|
|
252
253
|
let D;
|
|
253
|
-
|
|
254
|
+
t[14] !== T || t[15] !== E ? (D = /* @__PURE__ */ jsxs("div", {
|
|
254
255
|
className: "w-full max-w-sm space-y-6 px-4",
|
|
255
256
|
children: [T, E]
|
|
256
|
-
}),
|
|
257
|
+
}), t[14] = T, t[15] = E, t[16] = D) : D = t[16];
|
|
257
258
|
let O;
|
|
258
|
-
|
|
259
|
-
open:
|
|
259
|
+
t[17] !== r || t[18] !== o || t[19] !== s ? (O = /* @__PURE__ */ jsx(NewRunDialog, {
|
|
260
|
+
open: r,
|
|
260
261
|
onOpenChange: o,
|
|
261
262
|
onSuccess: s
|
|
262
|
-
}),
|
|
263
|
+
}), t[17] = r, t[18] = o, t[19] = s, t[20] = O) : O = t[20];
|
|
263
264
|
let k;
|
|
264
|
-
return
|
|
265
|
+
return t[21] !== D || t[22] !== O ? (k = /* @__PURE__ */ jsxs("div", {
|
|
265
266
|
className: "flex h-screen flex-col items-center justify-center",
|
|
266
267
|
children: [D, O]
|
|
267
|
-
}),
|
|
268
|
+
}), t[21] = D, t[22] = O, t[23] = k) : k = t[23], k;
|
|
268
269
|
}
|
|
269
270
|
function _temp2(e) {
|
|
270
271
|
return e + 5;
|
|
@@ -330,7 +331,7 @@ function LogLine(e) {
|
|
|
330
331
|
function EmbedLogsContent() {
|
|
331
332
|
let e = c(21), t = config_default.environment.url, n = useRef(null), r;
|
|
332
333
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = {
|
|
333
|
-
queryKey: ["remote-agent-app-logs"],
|
|
334
|
+
queryKey: ["remote-agent-app-logs", t],
|
|
334
335
|
queryFn: async () => {
|
|
335
336
|
let e = await fetch(`${t}/api/v1/app/logs?lines=200`, { credentials: "include" });
|
|
336
337
|
if (!e.ok) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
1
|
import { useFilterWorkflows } from "../hooks/useWorkflows.js";
|
|
2
|
+
import { useStudio } from "../providers/StudioProvider.js";
|
|
3
3
|
import { Button } from "../components/ui/button.js";
|
|
4
4
|
import { NewRunDialog } from "../features/workbench/components/NewRunDialog.js";
|
|
5
5
|
import { RecentRunItem } from "../features/workbench/components/RecentRunItem.js";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { useWorkflow, useWorkspace } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../hooks/useWorkflows.js";
|
|
3
|
+
import "../hooks/useWorkspaces.js";
|
|
1
4
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useWorkflow } from "../hooks/useWorkflows.js";
|
|
3
|
-
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
4
5
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
5
6
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
7
|
+
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
8
|
+
import "../features/feature-registry/index.js";
|
|
6
9
|
import Workbench from "../features/workbench/Workbench.js";
|
|
7
10
|
import "../features/workbench/index.js";
|
|
8
11
|
import { useDefaultEnvironmentPreviewUrl } from "../hooks/useEnvironmentPreviewUrl.js";
|
|
@@ -10,57 +13,60 @@ import { requireParam } from "../lib/requireParam.js";
|
|
|
10
13
|
import { c } from "react/compiler-runtime";
|
|
11
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
15
|
import { useParams } from "react-router-dom";
|
|
13
|
-
function WorkbenchPage(
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
let { getPreviewUrl:
|
|
17
|
-
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
let
|
|
21
|
-
|
|
16
|
+
function WorkbenchPage(m) {
|
|
17
|
+
let h = c(36), g;
|
|
18
|
+
h[0] === m ? g = h[1] : (g = m === void 0 ? {} : m, h[0] = m, h[1] = g);
|
|
19
|
+
let { getPreviewUrl: _, getEnvironmentPreviewUrl: v } = g, { router: y } = useStudio(), b = useParams(), x;
|
|
20
|
+
h[2] === b ? x = h[3] : (x = requireParam(b, "workflowId"), h[2] = b, h[3] = x);
|
|
21
|
+
let S = useWorkflow(x), C = S.data?.workspaceId, w = useWorkspace(C), T = useDefaultEnvironmentPreviewUrl(), E = v ?? T, D;
|
|
22
|
+
h[4] === y ? D = h[5] : (D = y.getWorkspaces(), h[4] = y, h[5] = D);
|
|
23
|
+
let O;
|
|
24
|
+
h[6] === D ? O = h[7] : (O = {
|
|
22
25
|
label: "Workspaces",
|
|
23
|
-
href:
|
|
24
|
-
},
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
label:
|
|
30
|
-
href:
|
|
31
|
-
},
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
],
|
|
40
|
-
let
|
|
41
|
-
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
26
|
+
href: D
|
|
27
|
+
}, h[6] = D, h[7] = O);
|
|
28
|
+
let k = w.data?.title ?? "", A;
|
|
29
|
+
h[8] !== y || h[9] !== C ? (A = C ? y.getWorkspace(C) : void 0, h[8] = y, h[9] = C, h[10] = A) : A = h[10];
|
|
30
|
+
let j;
|
|
31
|
+
h[11] !== k || h[12] !== A ? (j = {
|
|
32
|
+
label: k,
|
|
33
|
+
href: A
|
|
34
|
+
}, h[11] = k, h[12] = A, h[13] = j) : j = h[13];
|
|
35
|
+
let M = `Run #${S.data?.run}${S.data?.title ? ` (${S.data.title})` : ""}`, N;
|
|
36
|
+
h[14] === M ? N = h[15] : (N = { label: M }, h[14] = M, h[15] = N);
|
|
37
|
+
let P;
|
|
38
|
+
h[16] !== O || h[17] !== j || h[18] !== N ? (P = [
|
|
39
|
+
O,
|
|
40
|
+
j,
|
|
41
|
+
N
|
|
42
|
+
], h[16] = O, h[17] = j, h[18] = N, h[19] = P) : P = h[19];
|
|
43
|
+
let F = P, I;
|
|
44
|
+
h[20] === S.error ? I = h[21] : (I = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), h[20] = S.error, h[21] = I);
|
|
45
|
+
let L = S.isLoading || w.isLoading, R;
|
|
46
|
+
h[22] !== F || h[23] !== S.data || h[24] !== S.error || h[25] !== S.isLoading || h[26] !== w.data || h[27] !== _ || h[28] !== E ? (R = S.data && w.data ? /* @__PURE__ */ jsx(FeatureRegistryProvider, {
|
|
47
|
+
appName: w.data.appName,
|
|
48
|
+
children: /* @__PURE__ */ jsx(Workbench, {
|
|
49
|
+
workflow: S.data,
|
|
50
|
+
breadcrumbData: F,
|
|
51
|
+
getPreviewUrl: _,
|
|
52
|
+
getEnvironmentPreviewUrl: E
|
|
53
|
+
})
|
|
54
|
+
}) : !S.isLoading && !S.error ? /* @__PURE__ */ jsx("p", {
|
|
49
55
|
className: "text-muted-foreground py-8 text-center text-sm",
|
|
50
56
|
children: "Workflow not found."
|
|
51
|
-
}) : null,
|
|
52
|
-
let
|
|
53
|
-
|
|
54
|
-
loading:
|
|
55
|
-
children:
|
|
56
|
-
}),
|
|
57
|
-
let
|
|
58
|
-
return
|
|
57
|
+
}) : null, h[22] = F, h[23] = S.data, h[24] = S.error, h[25] = S.isLoading, h[26] = w.data, h[27] = _, h[28] = E, h[29] = R) : R = h[29];
|
|
58
|
+
let z;
|
|
59
|
+
h[30] !== L || h[31] !== R ? (z = /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
60
|
+
loading: L,
|
|
61
|
+
children: R
|
|
62
|
+
}), h[30] = L, h[31] = R, h[32] = z) : z = h[32];
|
|
63
|
+
let B;
|
|
64
|
+
return h[33] !== I || h[34] !== z ? (B = /* @__PURE__ */ jsx("div", {
|
|
59
65
|
className: "flex h-svh flex-col",
|
|
60
66
|
children: /* @__PURE__ */ jsxs("div", {
|
|
61
67
|
className: "flex-1 overflow-hidden",
|
|
62
|
-
children: [
|
|
68
|
+
children: [I, z]
|
|
63
69
|
})
|
|
64
|
-
}),
|
|
70
|
+
}), h[33] = I, h[34] = z, h[35] = B) : B = h[35], B;
|
|
65
71
|
}
|
|
66
72
|
export { WorkbenchPage as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { useWorkflow, useWorkspace } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import { useChildWorkflows, useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
3
|
+
import "../hooks/useWorkspaces.js";
|
|
1
4
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useChildWorkflows, useWorkflow, useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
3
|
-
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
4
5
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
5
6
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
6
7
|
import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
|