@loopstack/loopstack-studio 0.21.3 → 0.23.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/api/auth.js +10 -0
- package/dist/api/client.js +13 -0
- package/dist/api/config.js +10 -0
- package/dist/api/dashboard.js +4 -0
- package/dist/api/documents.js +7 -0
- package/dist/api/index.js +24 -0
- package/dist/api/namespaces.js +7 -0
- package/dist/api/pipelines.js +13 -0
- package/dist/api/processor.js +4 -0
- package/dist/api/workflows.js +8 -0
- package/dist/api/workspaces.js +12 -0
- package/dist/app/EnvironmentEmbedRoot.js +35 -0
- package/dist/components/data-table/DataTableFilters.js +74 -63
- package/dist/components/feedback/ErrorBoundary.js +43 -0
- package/dist/components/{LoadingCentered.js → feedback/LoadingCentered.js} +1 -1
- package/dist/components/feedback/index.js +5 -0
- package/dist/components/index.js +6 -3
- package/dist/components/layout/MainLayout.js +36 -17
- package/dist/components/layout/StudioSidebar.js +165 -0
- package/dist/components/page/PageBreadcrumbs.js +1 -1
- package/dist/components/ui/sidebar.js +359 -359
- package/dist/components/ui-widgets/UiActions.js +22 -15
- package/dist/components/ui-widgets/UiWidget.js +31 -26
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +27 -27
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +12 -12
- package/dist/components/ui-widgets/widgets/SandboxRun.js +33 -0
- package/dist/components/ui-widgets/widgets/SubmitButton.js +11 -11
- package/dist/features/code-explorer/CodeExplorer.js +4 -67
- package/dist/features/code-explorer/components/CodeExplorerTree.js +3 -41
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +4 -80
- package/dist/features/code-explorer/components/FileContentViewer.js +1 -0
- package/dist/features/code-explorer/components/FileTabsBar.js +1 -1
- package/dist/features/code-explorer/index.js +4 -0
- package/dist/features/code-explorer/utils/fileIcons.js +4 -7
- package/dist/features/debug/components/ConfigFlowViewer.js +1 -1
- package/dist/features/debug/components/PipelineFlowViewer.js +1 -1
- package/dist/features/debug/index.js +3 -0
- package/dist/features/documents/DocumentRenderer.js +53 -0
- package/dist/features/{workbench → documents}/components/DocumentItem.js +1 -1
- package/dist/features/documents/components/DocumentList.js +40 -0
- package/dist/features/{workbench → documents}/components/DocumentMetadataPills.js +2 -2
- package/dist/features/{workbench/components → documents}/document-details/DocumentDetails.js +3 -3
- package/dist/features/{workbench/components → documents}/document-details/PromptDetails.js +3 -3
- package/dist/features/documents/index.js +4 -0
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessage.js +5 -5
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentDebugRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentFormRenderer.js +9 -8
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/ErrorMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/LinkMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/MarkdownMessageRenderer.js +2 -2
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/PlainMessageRenderer.js +1 -1
- package/dist/features/health/index.js +1 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +1 -1
- package/dist/features/runs/Runs.js +197 -0
- package/dist/features/workbench/NavigationItems.js +29 -29
- package/dist/features/workbench/Workbench.js +100 -78
- package/dist/features/workbench/WorkflowItem.js +63 -58
- package/dist/features/workbench/WorkflowList.js +62 -82
- package/dist/features/workbench/components/NewRunDialog.js +329 -0
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +88 -0
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +49 -0
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +68 -0
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +128 -0
- package/dist/features/workbench/components/WorkflowForms.js +7 -6
- package/dist/features/workbench/components/WorkflowHistoryItem.js +74 -69
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +78 -61
- package/dist/features/workbench/hooks/useWorkflowData.js +49 -0
- package/dist/features/workbench/hooks/useWorkflowListState.js +50 -0
- package/dist/features/workbench/index.js +8 -0
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +76 -0
- package/dist/features/workspaces/Workspaces.js +2 -2
- package/dist/features/workspaces/components/CreateWorkspace.js +165 -82
- package/dist/features/workspaces/components/EnvironmentSlotSelector.js +63 -0
- package/dist/features/workspaces/components/ExecutionTimeline.js +70 -69
- package/dist/features/workspaces/components/PipelineForm.js +4 -4
- package/dist/features/workspaces/index.js +3 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/query-keys.js +138 -0
- package/dist/hooks/useApi.js +9 -33
- package/dist/hooks/useAuth.js +37 -56
- package/dist/hooks/useConfig.js +27 -33
- package/dist/hooks/useDashboard.js +9 -16
- package/dist/hooks/useDebounce.js +8 -17
- package/dist/hooks/useDocuments.js +7 -16
- package/dist/hooks/useFiles.js +24 -42
- package/dist/hooks/useNamespaces.js +7 -16
- package/dist/hooks/usePipelines.js +141 -174
- package/dist/hooks/useProcessor.js +11 -17
- package/dist/hooks/useWorkflows.js +51 -89
- package/dist/hooks/useWorkspaces.js +97 -129
- package/dist/index.d.ts +364 -50
- package/dist/index.js +21 -6
- package/dist/packages/contracts/dist/enums/index.js +25 -0
- package/dist/packages/contracts/dist/enums/pipeline-state.js +10 -0
- package/dist/packages/contracts/dist/enums/registry.enum.js +20 -0
- package/dist/packages/contracts/dist/enums/sort-order.enum.js +10 -0
- package/dist/packages/contracts/dist/enums/user-type.enum.js +10 -0
- package/dist/packages/contracts/dist/enums/workflow-state.enum.js +10 -0
- package/dist/pages/DashboardPage.js +1 -1
- package/dist/pages/DebugPage.js +12 -14
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +3 -4
- package/dist/pages/EmbedWorkbenchPage.js +7 -5
- package/dist/pages/PipelineDebugPage.js +7 -6
- package/dist/pages/PreviewWorkbenchPage.js +419 -0
- package/dist/pages/RunsListPage.js +64 -0
- package/dist/pages/RunsPage.js +49 -0
- package/dist/pages/StudioLandingPage.js +146 -0
- package/dist/pages/WorkbenchPage.js +78 -53
- package/dist/pages/WorkspacePage.js +1 -1
- package/dist/providers/InvalidationEventsProvider.js +15 -17
- package/dist/providers/QueryProvider.js +21 -0
- package/dist/providers/StudioProvider.js +2 -2
- package/dist/routing/LocalRouter.js +20 -7
- package/dist/services/createApiClient.js +4 -10
- package/dist/services/index.js +1 -1
- package/package.json +2 -3
- package/dist/features/workbench/components/DocumentList.js +0 -40
- package/dist/features/workbench/components/DocumentRenderer.js +0 -54
- package/dist/features/workbench/components/WorkbenchSidebar.js +0 -109
- package/dist/features/workbench/providers/WorkbenchContextProvider.js +0 -3
- /package/dist/components/{content → feedback}/ErrorAlert.js +0 -0
- /package/dist/components/{snackbars → feedback}/ErrorSnackbar.js +0 -0
- /package/dist/components/{snackbars → feedback}/Snackbar.js +0 -0
- /package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessageContent.js +0 -0
|
@@ -1,101 +1,123 @@
|
|
|
1
1
|
import { useWorkspace } from "../../hooks/useWorkspaces.js";
|
|
2
|
-
import
|
|
3
|
-
import { FileContentViewer } from "../code-explorer/components/FileContentViewer.js";
|
|
2
|
+
import PageBreadcrumbs_default from "../../components/page/PageBreadcrumbs.js";
|
|
4
3
|
import { CodeExplorerProvider, useCodeExplorerContext } from "../code-explorer/providers/CodeExplorerProvider.js";
|
|
4
|
+
import { FileContentViewer } from "../code-explorer/components/FileContentViewer.js";
|
|
5
5
|
import { FileTabsBar } from "../code-explorer/components/FileTabsBar.js";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
6
|
+
import "../code-explorer/index.js";
|
|
7
|
+
import { WorkbenchLayoutProvider, useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
8
8
|
import WorkflowList_default from "./WorkflowList.js";
|
|
9
9
|
import { ScrollProvider } from "./providers/ScrollProvider.js";
|
|
10
|
-
import
|
|
10
|
+
import { WorkbenchFloatingPanel } from "./components/WorkbenchFloatingPanel.js";
|
|
11
|
+
import { WorkbenchFlowPanel } from "./components/WorkbenchFlowPanel.js";
|
|
12
|
+
import { WorkbenchIconSidebar } from "./components/WorkbenchIconSidebar.js";
|
|
13
|
+
import { WorkbenchPreviewPanel } from "./components/WorkbenchPreviewPanel.js";
|
|
11
14
|
import { c } from "react/compiler-runtime";
|
|
12
|
-
import { useCallback, useMemo, useState } from "react";
|
|
13
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
function WorkbenchContent(
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
className: "flex-
|
|
18
|
-
children: /* @__PURE__ */ jsx(
|
|
19
|
-
className: "
|
|
20
|
-
children:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
function WorkbenchContent(t) {
|
|
17
|
+
let i = c(16), { pipeline: l, breadcrumbData: u } = t, { openFiles: p, selectedFile: m, fileContent: h, workflowConfig: g, isContentLoading: v } = useCodeExplorerContext(), y;
|
|
18
|
+
i[0] === u ? y = i[1] : (y = /* @__PURE__ */ jsx("div", {
|
|
19
|
+
className: "border-b flex h-12 shrink-0 items-center",
|
|
20
|
+
children: u ? /* @__PURE__ */ jsx(PageBreadcrumbs_default, { breadcrumbData: u }) : /* @__PURE__ */ jsx("span", {
|
|
21
|
+
className: "px-3 text-sm font-medium",
|
|
22
|
+
children: "Workflows"
|
|
23
|
+
})
|
|
24
|
+
}), i[0] = u, i[1] = y);
|
|
25
|
+
let b;
|
|
26
|
+
i[2] === l ? b = i[3] : (b = /* @__PURE__ */ jsx(ScrollProvider, { children: /* @__PURE__ */ jsx("div", {
|
|
27
|
+
className: "flex-1 overflow-auto",
|
|
28
|
+
children: /* @__PURE__ */ jsx(WorkflowList_default, { pipeline: l })
|
|
29
|
+
}) }), i[2] = l, i[3] = b);
|
|
30
|
+
let x;
|
|
31
|
+
i[4] !== y || i[5] !== b ? (x = /* @__PURE__ */ jsxs("div", {
|
|
32
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
33
|
+
children: [y, b]
|
|
34
|
+
}), i[4] = y, i[5] = b, i[6] = x) : x = i[6];
|
|
35
|
+
let S;
|
|
36
|
+
i[7] !== h || i[8] !== v || i[9] !== p.length || i[10] !== m || i[11] !== g ? (S = p.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
28
37
|
className: "w-full md:w-1/2 shrink-0 overflow-hidden flex flex-col",
|
|
29
38
|
children: [/* @__PURE__ */ jsx(FileTabsBar, {}), /* @__PURE__ */ jsx("div", {
|
|
30
39
|
className: "flex-1 overflow-hidden",
|
|
31
40
|
children: /* @__PURE__ */ jsx(FileContentViewer, {
|
|
32
|
-
selectedFile:
|
|
33
|
-
content:
|
|
34
|
-
workflowConfig:
|
|
35
|
-
isLoading:
|
|
41
|
+
selectedFile: m,
|
|
42
|
+
content: h,
|
|
43
|
+
workflowConfig: g,
|
|
44
|
+
isLoading: v,
|
|
36
45
|
className: "h-full"
|
|
37
46
|
})
|
|
38
47
|
})]
|
|
39
|
-
}),
|
|
40
|
-
let
|
|
41
|
-
return
|
|
48
|
+
}), i[7] = h, i[8] = v, i[9] = p.length, i[10] = m, i[11] = g, i[12] = S) : S = i[12];
|
|
49
|
+
let C;
|
|
50
|
+
return i[13] !== x || i[14] !== S ? (C = /* @__PURE__ */ jsx("div", {
|
|
42
51
|
className: "flex h-full flex-col",
|
|
43
52
|
children: /* @__PURE__ */ jsxs("div", {
|
|
44
53
|
className: "flex flex-1 gap-4 overflow-hidden md:flex-row flex-col",
|
|
45
|
-
children: [
|
|
54
|
+
children: [x, S]
|
|
46
55
|
})
|
|
47
|
-
}),
|
|
56
|
+
}), i[13] = x, i[14] = S, i[15] = C) : C = i[15], C;
|
|
48
57
|
}
|
|
49
|
-
function
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
d[7] === v.data ? j = d[8] : (j = v.data ? {
|
|
70
|
-
volumes: v.data.volumes,
|
|
71
|
-
features: v.data.features
|
|
72
|
-
} : void 0, d[7] = v.data, d[8] = j);
|
|
73
|
-
let M;
|
|
74
|
-
d[9] !== h || d[10] !== f || d[11] !== j ? (M = /* @__PURE__ */ jsx(WorkbenchSidebar_default, {
|
|
75
|
-
namespaceTree: h,
|
|
76
|
-
pipeline: f,
|
|
77
|
-
workspaceConfig: j
|
|
78
|
-
}), d[9] = h, d[10] = f, d[11] = j, d[12] = M) : M = d[12];
|
|
79
|
-
let N;
|
|
80
|
-
d[13] !== A || d[14] !== M ? (N = /* @__PURE__ */ jsxs(SidebarProvider, {
|
|
81
|
-
defaultOpen: !0,
|
|
82
|
-
className: "workbench-sidebar min-h-0",
|
|
58
|
+
function WorkbenchInner(t) {
|
|
59
|
+
let r = c(18), { pipeline: i, breadcrumbData: a } = t, { activeSidePanel: o } = useWorkbenchLayout(), s = o ? "w-1/2 overflow-hidden" : "w-full overflow-hidden", l;
|
|
60
|
+
r[0] !== a || r[1] !== i ? (l = /* @__PURE__ */ jsx(WorkbenchContent, {
|
|
61
|
+
pipeline: i,
|
|
62
|
+
breadcrumbData: a
|
|
63
|
+
}), r[0] = a, r[1] = i, r[2] = l) : l = r[2];
|
|
64
|
+
let d;
|
|
65
|
+
r[3] !== s || r[4] !== l ? (d = /* @__PURE__ */ jsx("div", {
|
|
66
|
+
className: s,
|
|
67
|
+
children: l
|
|
68
|
+
}), r[3] = s, r[4] = l, r[5] = d) : d = r[5];
|
|
69
|
+
let f;
|
|
70
|
+
r[6] === o ? f = r[7] : (f = o === "preview" && /* @__PURE__ */ jsx(WorkbenchPreviewPanel, {}), r[6] = o, r[7] = f);
|
|
71
|
+
let y;
|
|
72
|
+
r[8] === o ? y = r[9] : (y = o === "flow" && /* @__PURE__ */ jsx(WorkbenchFlowPanel, {}), r[8] = o, r[9] = y);
|
|
73
|
+
let b;
|
|
74
|
+
r[10] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ jsx(WorkbenchFloatingPanel, {}), r[10] = b) : b = r[10];
|
|
75
|
+
let x;
|
|
76
|
+
r[11] !== d || r[12] !== f || r[13] !== y ? (x = /* @__PURE__ */ jsxs("div", {
|
|
77
|
+
className: "relative flex flex-1 overflow-hidden",
|
|
83
78
|
children: [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
d,
|
|
80
|
+
f,
|
|
81
|
+
y,
|
|
82
|
+
b
|
|
87
83
|
]
|
|
88
|
-
}), d[
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
}), r[11] = d, r[12] = f, r[13] = y, r[14] = x) : x = r[14];
|
|
85
|
+
let S;
|
|
86
|
+
r[15] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(WorkbenchIconSidebar, {}), r[15] = S) : S = r[15];
|
|
87
|
+
let C;
|
|
88
|
+
return r[16] === x ? C = r[17] : (C = /* @__PURE__ */ jsxs("div", {
|
|
89
|
+
className: "flex h-full w-full",
|
|
90
|
+
children: [x, S]
|
|
91
|
+
}), r[16] = x, r[17] = C), C;
|
|
92
|
+
}
|
|
93
|
+
function Workbench(r) {
|
|
94
|
+
let a = c(19), { pipeline: o, breadcrumbData: s, previewPanelOpen: u, onPreviewPanelOpenChange: d, isDeveloperMode: f, getPreviewUrl: p, getEnvironmentPreviewUrl: m, environments: h } = r, g = o?.workspaceId, _ = useWorkspace(g), v = _.data?.features?.fileExplorer?.enabled ?? !1, b;
|
|
95
|
+
a[0] === _.data ? b = a[1] : (b = _.data ? {
|
|
96
|
+
volumes: _.data.volumes,
|
|
97
|
+
features: _.data.features
|
|
98
|
+
} : void 0, a[0] = _.data, a[1] = b);
|
|
99
|
+
let x = b, S = h ?? _.data?.environments, C = o?.id, w;
|
|
100
|
+
a[2] !== s || a[3] !== o ? (w = /* @__PURE__ */ jsx(WorkbenchInner, {
|
|
101
|
+
pipeline: o,
|
|
102
|
+
breadcrumbData: s
|
|
103
|
+
}), a[2] = s, a[3] = o, a[4] = w) : w = a[4];
|
|
104
|
+
let T;
|
|
105
|
+
a[5] !== v || a[6] !== C || a[7] !== w ? (T = /* @__PURE__ */ jsx(CodeExplorerProvider, {
|
|
106
|
+
pipelineId: C,
|
|
107
|
+
fileExplorerEnabled: v,
|
|
108
|
+
children: w
|
|
109
|
+
}), a[5] = v, a[6] = C, a[7] = w, a[8] = T) : T = a[8];
|
|
110
|
+
let E;
|
|
111
|
+
return a[9] !== m || a[10] !== p || a[11] !== f || a[12] !== d || a[13] !== o || a[14] !== u || a[15] !== S || a[16] !== T || a[17] !== x ? (E = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
112
|
+
pipeline: o,
|
|
113
|
+
isDeveloperMode: f,
|
|
114
|
+
workspaceConfig: x,
|
|
115
|
+
getPreviewUrl: p,
|
|
116
|
+
getEnvironmentPreviewUrl: m,
|
|
117
|
+
environments: S,
|
|
118
|
+
previewPanelOpen: u,
|
|
119
|
+
onPreviewPanelOpenChange: d,
|
|
120
|
+
children: T
|
|
121
|
+
}), a[9] = m, a[10] = p, a[11] = f, a[12] = d, a[13] = o, a[14] = u, a[15] = S, a[16] = T, a[17] = x, a[18] = E) : E = a[18], E;
|
|
100
122
|
}
|
|
101
123
|
export { Workbench as default };
|
|
@@ -1,67 +1,72 @@
|
|
|
1
|
-
import { useFilterDocuments } from "../../hooks/useDocuments.js";
|
|
2
|
-
import { useWorkflow } from "../../hooks/useWorkflows.js";
|
|
3
1
|
import { cn } from "../../lib/utils.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import DocumentList_default from "
|
|
2
|
+
import LoadingCentered_default from "../../components/feedback/LoadingCentered.js";
|
|
3
|
+
import ErrorSnackbar_default from "../../components/feedback/ErrorSnackbar.js";
|
|
4
|
+
import ErrorAlert_default from "../../components/feedback/ErrorAlert.js";
|
|
5
|
+
import DocumentList_default from "../documents/components/DocumentList.js";
|
|
6
|
+
import "../documents/index.js";
|
|
8
7
|
import WorkflowForms_default from "./components/WorkflowForms.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import React, {
|
|
8
|
+
import { useWorkflowData } from "./hooks/useWorkflowData.js";
|
|
9
|
+
import { c } from "react/compiler-runtime";
|
|
10
|
+
import React, { useEffect } from "react";
|
|
12
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { useParams } from "react-router-dom";
|
|
14
|
-
var WorkflowItem_default = (
|
|
15
|
-
let { workflowId:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
var WorkflowItem_default = (p) => {
|
|
14
|
+
let m = c(46), { pipeline: h, workflowId: g, scrollTo: _, settings: v, embed: y } = p, { workflowId: b, clickId: x } = useParams(), S;
|
|
15
|
+
m[0] !== v.showFullMessageHistory || m[1] !== g ? (S = {
|
|
16
|
+
workflowId: g,
|
|
17
|
+
showFullMessageHistory: v.showFullMessageHistory
|
|
18
|
+
}, m[0] = v.showFullMessageHistory, m[1] = g, m[2] = S) : S = m[2];
|
|
19
|
+
let { workflow: C, workflowLoading: w, workflowReady: T, workflowError: E, documents: D, documentsLoading: O, documentsReady: k, documentsError: A, isLoading: j, handleRun: M } = useWorkflowData(S), N;
|
|
20
|
+
m[3] !== k || m[4] !== b || m[5] !== _ || m[6] !== g || m[7] !== T ? (N = () => {
|
|
21
|
+
b === g && T && k && _(g);
|
|
22
|
+
}, m[3] = k, m[4] = b, m[5] = _, m[6] = g, m[7] = T, m[8] = N) : N = m[8];
|
|
23
|
+
let P;
|
|
24
|
+
m[9] !== x || m[10] !== k || m[11] !== b || m[12] !== _ || m[13] !== g || m[14] !== T ? (P = [
|
|
25
|
+
T,
|
|
26
|
+
k,
|
|
27
|
+
g,
|
|
28
|
+
b,
|
|
22
29
|
x,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
_
|
|
31
|
+
], m[9] = x, m[10] = k, m[11] = b, m[12] = _, m[13] = g, m[14] = T, m[15] = P) : P = m[15], useEffect(N, P);
|
|
32
|
+
let F = y ? "p-0" : "p-4", I;
|
|
33
|
+
m[16] === F ? I = m[17] : (I = cn("flex flex-col", F), m[16] = F, m[17] = I);
|
|
34
|
+
let L = w || O, R;
|
|
35
|
+
m[18] === L ? R = m[19] : (R = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: L }), m[18] = L, m[19] = R);
|
|
36
|
+
let z;
|
|
37
|
+
m[20] === A ? z = m[21] : (z = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: A }), m[20] = A, m[21] = z);
|
|
38
|
+
let B;
|
|
39
|
+
m[22] === E ? B = m[23] : (B = /* @__PURE__ */ jsx(ErrorAlert_default, { error: E }), m[22] = E, m[23] = B);
|
|
40
|
+
let V;
|
|
41
|
+
m[24] !== D || m[25] !== j || m[26] !== h || m[27] !== _ || m[28] !== v || m[29] !== C || m[30] !== T ? (V = T && C && /* @__PURE__ */ jsx(DocumentList_default, {
|
|
42
|
+
pipeline: h,
|
|
43
|
+
workflow: C,
|
|
44
|
+
documents: D,
|
|
45
|
+
scrollTo: _,
|
|
46
|
+
settings: v,
|
|
47
|
+
isLoading: j
|
|
48
|
+
}), m[24] = D, m[25] = j, m[26] = h, m[27] = _, m[28] = v, m[29] = C, m[30] = T, m[31] = V) : V = m[31];
|
|
49
|
+
let H;
|
|
50
|
+
m[32] === j ? H = m[33] : (H = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: j }), m[32] = j, m[33] = H);
|
|
51
|
+
let U;
|
|
52
|
+
m[34] !== y || m[35] !== M || m[36] !== C ? (U = !!C && !y && /* @__PURE__ */ jsx("div", {
|
|
53
|
+
className: "mt-6",
|
|
54
|
+
children: /* @__PURE__ */ jsx(WorkflowForms_default, {
|
|
55
|
+
workflow: C,
|
|
56
|
+
onSubmit: M
|
|
57
|
+
})
|
|
58
|
+
}), m[34] = y, m[35] = M, m[36] = C, m[37] = U) : U = m[37];
|
|
59
|
+
let W;
|
|
60
|
+
return m[38] !== V || m[39] !== H || m[40] !== U || m[41] !== I || m[42] !== R || m[43] !== z || m[44] !== B ? (W = /* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: I,
|
|
41
62
|
children: [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
documents: E,
|
|
49
|
-
scrollTo: v,
|
|
50
|
-
settings: y,
|
|
51
|
-
isLoading: k
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ jsx(LoadingCentered_default, { loading: k }),
|
|
54
|
-
!!C.data && !b && /* @__PURE__ */ jsxs("div", {
|
|
55
|
-
className: "mt-auto flex flex-col gap-6 pt-12",
|
|
56
|
-
children: [/* @__PURE__ */ jsx(WorkflowForms_default, {
|
|
57
|
-
workflow: C.data,
|
|
58
|
-
onSubmit: O
|
|
59
|
-
}), /* @__PURE__ */ jsx(WorkflowButtons_default, {
|
|
60
|
-
pipeline: g,
|
|
61
|
-
workflow: C.data
|
|
62
|
-
})]
|
|
63
|
-
})
|
|
63
|
+
R,
|
|
64
|
+
z,
|
|
65
|
+
B,
|
|
66
|
+
V,
|
|
67
|
+
H,
|
|
68
|
+
U
|
|
64
69
|
]
|
|
65
|
-
});
|
|
70
|
+
}), m[38] = V, m[39] = H, m[40] = U, m[41] = I, m[42] = R, m[43] = z, m[44] = B, m[45] = W) : W = m[45], W;
|
|
66
71
|
};
|
|
67
72
|
export { WorkflowItem_default as default };
|
|
@@ -1,110 +1,90 @@
|
|
|
1
|
-
import { useFetchWorkflowsByPipeline } from "../../hooks/useWorkflows.js";
|
|
2
1
|
import { cn } from "../../lib/utils.js";
|
|
3
2
|
import { Button } from "../../components/ui/button.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import LoadingCentered_default from "../../components/feedback/LoadingCentered.js";
|
|
4
|
+
import ErrorSnackbar_default from "../../components/feedback/ErrorSnackbar.js";
|
|
5
|
+
import { useFetchWorkflowsByPipeline } from "../../hooks/useWorkflows.js";
|
|
6
6
|
import WorkflowItem_default from "./WorkflowItem.js";
|
|
7
|
-
import { useScrollToBottom } from "./hooks/useAutoScrollBottom.js";
|
|
8
|
-
import { useIntersectionObserver } from "./hooks/useIntersectionObserver.js";
|
|
9
|
-
import { useScrollToListItem } from "./hooks/useScrollToListItem.js";
|
|
10
|
-
import { WorkbenchContextProvider } from "./providers/WorkbenchContextProvider.js";
|
|
11
7
|
import WorkbenchSettingsModal_default from "./components/WorkbenchSettingsModal.js";
|
|
8
|
+
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
9
|
+
import { useWorkflowListState } from "./hooks/useWorkflowListState.js";
|
|
12
10
|
import { c } from "react/compiler-runtime";
|
|
13
|
-
import React, {
|
|
11
|
+
import React, { useState } from "react";
|
|
14
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { ArrowDownIcon,
|
|
16
|
-
var WorkflowList_default = (
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
let [k, A] = useState(O), j;
|
|
20
|
-
C[1] === Symbol.for("react.memo_cache_sentinel") ? (j = {
|
|
13
|
+
import { ArrowDownIcon, ChevronRightIcon, Play } from "lucide-react";
|
|
14
|
+
var WorkflowList_default = (_) => {
|
|
15
|
+
let v = c(24), { pipeline: y } = _, b = useFetchWorkflowsByPipeline(y.id), [x, S] = useState(!1), C;
|
|
16
|
+
v[0] === Symbol.for("react.memo_cache_sentinel") ? (C = {
|
|
21
17
|
enableDebugMode: !1,
|
|
22
18
|
showFullMessageHistory: !1
|
|
23
|
-
},
|
|
24
|
-
let [
|
|
25
|
-
|
|
26
|
-
B && B.setActiveSectionId && B.state.activeSectionId !== P && (B.setActiveSectionId(P), P && A((t) => ({
|
|
27
|
-
...t,
|
|
28
|
-
[P]: !0
|
|
29
|
-
})));
|
|
30
|
-
}, H = [P, B], C[2] = P, C[3] = B, C[4] = V, C[5] = H) : (V = C[4], H = C[5]), useEffect(V, H);
|
|
31
|
-
let U, W;
|
|
32
|
-
C[6] !== P || C[7] !== T.data ? (U = () => {
|
|
33
|
-
if (T.data && T.data.length > 0) {
|
|
34
|
-
let t = T.data.length - 1, y = T.data[t], b = `section-${y.index}-${y.id}`;
|
|
35
|
-
A({
|
|
36
|
-
[b]: !0,
|
|
37
|
-
...P && P !== b ? { [P]: !0 } : {}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}, W = [T.data, P], C[6] = P, C[7] = T.data, C[8] = U, C[9] = W) : (U = C[8], W = C[9]), useEffect(U, W);
|
|
41
|
-
let G;
|
|
42
|
-
C[10] === Symbol.for("react.memo_cache_sentinel") ? (G = (t) => {
|
|
43
|
-
A((y) => ({
|
|
44
|
-
...y,
|
|
45
|
-
[t]: !y[t]
|
|
46
|
-
}));
|
|
47
|
-
}, C[10] = G) : G = C[10];
|
|
48
|
-
let K = G, q;
|
|
49
|
-
C[11] !== R || C[12] !== z ? (q = R && /* @__PURE__ */ jsx(Button, {
|
|
19
|
+
}, v[0] = C) : C = v[0];
|
|
20
|
+
let [w, T] = useState(C), { activeId: E, expandedSections: D, observe: O, listRef: k, scrollTo: A, canScrollDown: j, scrollToBottom: M, toggleSection: N } = useWorkflowListState(b.data), P;
|
|
21
|
+
v[1] !== j || v[2] !== M ? (P = j && /* @__PURE__ */ jsx(Button, {
|
|
50
22
|
variant: "outline",
|
|
51
23
|
size: "icon",
|
|
52
|
-
onClick:
|
|
24
|
+
onClick: M,
|
|
53
25
|
className: "bg-background/80 fixed right-[calc(var(--sidebar-width)+1.5rem)] bottom-6 z-50 rounded-full shadow-md backdrop-blur-sm",
|
|
54
26
|
children: /* @__PURE__ */ jsx(ArrowDownIcon, { className: "size-4" })
|
|
55
|
-
}),
|
|
56
|
-
let
|
|
57
|
-
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
let
|
|
61
|
-
|
|
27
|
+
}), v[1] = j, v[2] = M, v[3] = P) : P = v[3];
|
|
28
|
+
let F;
|
|
29
|
+
v[4] === b.isLoading ? F = v[5] : (F = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: b.isLoading }), v[4] = b.isLoading, v[5] = F);
|
|
30
|
+
let I;
|
|
31
|
+
v[6] === b.error ? I = v[7] : (I = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: b.error }), v[6] = b.error, v[7] = I);
|
|
32
|
+
let L;
|
|
33
|
+
v[8] !== E || v[9] !== D || v[10] !== b.data || v[11] !== k || v[12] !== O || v[13] !== x || v[14] !== y || v[15] !== A || v[16] !== w || v[17] !== N ? (L = b.data ? /* @__PURE__ */ jsx("div", {
|
|
62
34
|
className: "mb-10",
|
|
63
|
-
ref:
|
|
64
|
-
children: /* @__PURE__ */ jsx("div", { children:
|
|
65
|
-
let
|
|
35
|
+
ref: k,
|
|
36
|
+
children: /* @__PURE__ */ jsx("div", { children: b.data.map((f) => {
|
|
37
|
+
let p = `section-${f.index}-${f.id}`, m = E === p, h = b.data.length === 1, g = h || D[p];
|
|
66
38
|
return /* @__PURE__ */ jsxs("div", {
|
|
67
|
-
ref: (
|
|
68
|
-
"data-id":
|
|
69
|
-
className: "space-y-0",
|
|
39
|
+
ref: (i) => O(i),
|
|
40
|
+
"data-id": p,
|
|
70
41
|
children: [/* @__PURE__ */ jsx("div", {
|
|
71
42
|
className: "bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-10 backdrop-blur",
|
|
72
43
|
children: /* @__PURE__ */ jsxs("div", {
|
|
73
|
-
|
|
74
|
-
|
|
44
|
+
role: "button",
|
|
45
|
+
tabIndex: h ? void 0 : 0,
|
|
46
|
+
className: cn("flex w-full items-center gap-2 rounded-md p-2 px-3 text-left text-sm font-medium", !h && "hover:bg-accent hover:text-accent-foreground cursor-pointer", h && "cursor-default"),
|
|
47
|
+
onClick: h ? void 0 : () => N(p),
|
|
48
|
+
onKeyDown: h ? void 0 : (i) => {
|
|
49
|
+
(i.key === "Enter" || i.key === " ") && (i.preventDefault(), N(p));
|
|
50
|
+
},
|
|
75
51
|
children: [
|
|
76
|
-
|
|
77
|
-
/* @__PURE__ */ jsx(LayersIcon, { className: cn("size-4", x ? "text-primary" : "text-muted-foreground") }),
|
|
52
|
+
/* @__PURE__ */ jsx(Play, { className: "text-primary h-3.5 w-3.5 fill-current" }),
|
|
78
53
|
/* @__PURE__ */ jsx("span", {
|
|
79
|
-
className:
|
|
80
|
-
children:
|
|
54
|
+
className: "flex-1 truncate text-sm",
|
|
55
|
+
children: f.title ?? f.blockName
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx(WorkflowButtons_default, {
|
|
58
|
+
pipeline: y,
|
|
59
|
+
workflowId: f.id
|
|
60
|
+
}),
|
|
61
|
+
m && /* @__PURE__ */ jsx(WorkbenchSettingsModal_default, {
|
|
62
|
+
settings: w,
|
|
63
|
+
onSettingsChange: T,
|
|
64
|
+
open: x,
|
|
65
|
+
onOpenChange: S
|
|
81
66
|
}),
|
|
82
|
-
|
|
83
|
-
settings: M,
|
|
84
|
-
onSettingsChange: N,
|
|
85
|
-
open: E,
|
|
86
|
-
onOpenChange: D
|
|
87
|
-
})
|
|
67
|
+
!h && /* @__PURE__ */ jsx(ChevronRightIcon, { className: cn("text-muted-foreground h-3.5 w-3.5 transition-transform", g && "rotate-90") })
|
|
88
68
|
]
|
|
89
69
|
})
|
|
90
|
-
}),
|
|
91
|
-
className: "max-w-4xl
|
|
70
|
+
}), g && /* @__PURE__ */ jsx("div", {
|
|
71
|
+
className: "max-w-4xl py-1",
|
|
92
72
|
children: /* @__PURE__ */ jsx(WorkflowItem_default, {
|
|
93
|
-
pipeline:
|
|
94
|
-
workflowId:
|
|
95
|
-
scrollTo:
|
|
96
|
-
settings:
|
|
73
|
+
pipeline: y,
|
|
74
|
+
workflowId: f.id,
|
|
75
|
+
scrollTo: A,
|
|
76
|
+
settings: w
|
|
97
77
|
})
|
|
98
78
|
})]
|
|
99
|
-
},
|
|
79
|
+
}, f.id);
|
|
100
80
|
}) })
|
|
101
|
-
}) : null,
|
|
102
|
-
let
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
] }),
|
|
81
|
+
}) : null, v[8] = E, v[9] = D, v[10] = b.data, v[11] = k, v[12] = O, v[13] = x, v[14] = y, v[15] = A, v[16] = w, v[17] = N, v[18] = L) : L = v[18];
|
|
82
|
+
let R;
|
|
83
|
+
return v[19] !== P || v[20] !== F || v[21] !== I || v[22] !== L ? (R = /* @__PURE__ */ jsxs("div", { children: [
|
|
84
|
+
P,
|
|
85
|
+
F,
|
|
86
|
+
I,
|
|
87
|
+
L
|
|
88
|
+
] }), v[19] = P, v[20] = F, v[21] = I, v[22] = L, v[23] = R) : R = v[23], R;
|
|
109
89
|
};
|
|
110
90
|
export { WorkflowList_default as default };
|