@loopstack/loopstack-studio 0.22.0 → 0.23.1
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 +20 -18
- package/dist/components/dynamic-form/Form.js +50 -27
- package/dist/components/dynamic-form/InputController.js +3 -1
- package/dist/components/dynamic-form/fields/MarkdownViewField.js +20 -0
- 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 +32 -16
- package/dist/components/layout/StudioSidebar.js +165 -0
- package/dist/components/ui-widgets/widgets/SandboxRun.js +1 -0
- package/dist/features/code-explorer/CodeExplorer.js +6 -0
- package/dist/features/code-explorer/components/CodeExplorerTree.js +5 -0
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +82 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +1 -0
- package/dist/features/code-explorer/components/FileTabsBar.js +3 -190
- package/dist/features/code-explorer/components/FileTabsBarBase.js +190 -0
- package/dist/features/code-explorer/index.js +4 -0
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +2 -162
- package/dist/features/code-explorer/utils/fileIcons.js +7 -4
- package/dist/features/debug/components/ConfigFlowViewer.js +1 -1
- package/dist/features/debug/components/PipelineFlowViewer.js +47 -46
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +19 -19
- package/dist/features/debug/index.js +3 -0
- package/dist/features/documents/DocumentRenderer.js +58 -0
- package/dist/features/{workbench → documents}/components/DocumentItem.js +1 -1
- 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/documents/renderers/ClaudeMessage.js +96 -0
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentDebugRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentFormRenderer.js +3 -3
- 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/workbench/NavigationItems.js +29 -29
- package/dist/features/workbench/Workbench.js +71 -99
- package/dist/features/workbench/WorkflowItem.js +63 -55
- package/dist/features/workbench/WorkflowList.js +52 -81
- package/dist/features/workbench/components/NewRunDialog.js +2 -1
- package/dist/features/workbench/components/RemoteFileTabsBar.js +18 -0
- package/dist/features/workbench/components/RemoteFileTree.js +90 -0
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +60 -0
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +4 -3
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +37 -29
- package/dist/features/workbench/components/WorkflowHistoryItem.js +11 -11
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +49 -50
- 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/RemoteFileExplorerProvider.js +145 -0
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +47 -45
- package/dist/features/workspaces/components/CreateWorkspace.js +1 -1
- package/dist/features/workspaces/components/ExecutionTimeline.js +1 -1
- package/dist/features/workspaces/components/PipelineForm.js +2 -2
- package/dist/features/workspaces/components/WorkspaceHomePage.js +93 -0
- package/dist/features/workspaces/index.js +3 -0
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/query-keys.js +138 -0
- package/dist/hooks/useAuth.js +43 -42
- package/dist/hooks/useConfig.js +31 -35
- package/dist/hooks/useDashboard.js +9 -13
- package/dist/hooks/useDebounce.js +8 -17
- package/dist/hooks/useDocuments.js +4 -9
- package/dist/hooks/useFiles.js +1 -51
- package/dist/hooks/useNamespaces.js +2 -8
- package/dist/hooks/usePipelines.js +132 -155
- package/dist/hooks/useProcessor.js +11 -14
- package/dist/hooks/useWorkflows.js +40 -62
- package/dist/hooks/useWorkspaces.js +105 -110
- package/dist/index.d.ts +105 -3
- package/dist/index.js +15 -7
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
- package/dist/pages/DashboardPage.js +1 -1
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/EmbedWorkbenchPage.js +4 -3
- package/dist/pages/PipelineDebugPage.js +6 -5
- package/dist/pages/PreviewWorkbenchPage.js +228 -128
- package/dist/pages/RunsListPage.js +52 -24
- package/dist/pages/StudioLandingPage.js +1 -0
- package/dist/pages/WorkbenchPage.js +3 -2
- package/dist/pages/WorkspacePage.js +103 -51
- package/dist/pages/WorkspaceRunsPage.js +71 -0
- package/dist/providers/InvalidationEventsProvider.js +9 -11
- package/dist/providers/StudioProvider.js +2 -2
- package/dist/routing/LocalRouter.js +18 -8
- package/package.json +2 -2
- package/dist/features/workbench/components/DocumentRenderer.js +0 -54
- /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 → documents}/components/DocumentList.js +0 -0
- /package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessageContent.js +0 -0
|
@@ -1,135 +1,107 @@
|
|
|
1
1
|
import { useWorkspace } from "../../hooks/useWorkspaces.js";
|
|
2
2
|
import PageBreadcrumbs_default from "../../components/page/PageBreadcrumbs.js";
|
|
3
|
-
import {
|
|
4
|
-
import { CodeExplorerProvider, useCodeExplorerContext } from "../code-explorer/providers/CodeExplorerProvider.js";
|
|
5
|
-
import { FileTabsBar } from "../code-explorer/components/FileTabsBar.js";
|
|
6
|
-
import { WorkbenchContextProvider, WorkbenchLayoutProvider, useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
3
|
+
import { WorkbenchLayoutProvider, useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
7
4
|
import WorkflowList_default from "./WorkflowList.js";
|
|
5
|
+
import { RemoteFileExplorerProvider } from "./providers/RemoteFileExplorerProvider.js";
|
|
6
|
+
import { WorkbenchFilesPanel } from "./components/WorkbenchFilesPanel.js";
|
|
8
7
|
import { ScrollProvider } from "./providers/ScrollProvider.js";
|
|
9
8
|
import { WorkbenchFloatingPanel } from "./components/WorkbenchFloatingPanel.js";
|
|
10
9
|
import { WorkbenchFlowPanel } from "./components/WorkbenchFlowPanel.js";
|
|
11
10
|
import { WorkbenchIconSidebar } from "./components/WorkbenchIconSidebar.js";
|
|
12
11
|
import { WorkbenchPreviewPanel } from "./components/WorkbenchPreviewPanel.js";
|
|
13
12
|
import { c } from "react/compiler-runtime";
|
|
14
|
-
import { useMemo } from "react";
|
|
15
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
function WorkbenchContent(
|
|
17
|
-
let
|
|
18
|
-
|
|
14
|
+
function WorkbenchContent(t) {
|
|
15
|
+
let i = c(7), { pipeline: a, breadcrumbData: s } = t, l;
|
|
16
|
+
i[0] === s ? l = i[1] : (l = /* @__PURE__ */ jsx("div", {
|
|
19
17
|
className: "border-b flex h-12 shrink-0 items-center",
|
|
20
|
-
children:
|
|
18
|
+
children: s ? /* @__PURE__ */ jsx(PageBreadcrumbs_default, { breadcrumbData: s }) : /* @__PURE__ */ jsx("span", {
|
|
21
19
|
className: "px-3 text-sm font-medium",
|
|
22
20
|
children: "Workflows"
|
|
23
21
|
})
|
|
24
|
-
}),
|
|
25
|
-
let
|
|
26
|
-
|
|
22
|
+
}), i[0] = s, i[1] = l);
|
|
23
|
+
let d;
|
|
24
|
+
i[2] === a ? d = i[3] : (d = /* @__PURE__ */ jsx(ScrollProvider, { children: /* @__PURE__ */ jsx("div", {
|
|
27
25
|
className: "flex-1 overflow-auto",
|
|
28
|
-
children: /* @__PURE__ */ jsx(WorkflowList_default, { pipeline:
|
|
29
|
-
}) }),
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
33
|
-
children: [v, b]
|
|
34
|
-
}), a[4] = v, a[5] = b, a[6] = x) : x = a[6];
|
|
35
|
-
let S;
|
|
36
|
-
a[7] !== h || a[8] !== _ || a[9] !== d.length || a[10] !== m || a[11] !== g ? (S = d.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
37
|
-
className: "w-full md:w-1/2 shrink-0 overflow-hidden flex flex-col",
|
|
38
|
-
children: [/* @__PURE__ */ jsx(FileTabsBar, {}), /* @__PURE__ */ jsx("div", {
|
|
39
|
-
className: "flex-1 overflow-hidden",
|
|
40
|
-
children: /* @__PURE__ */ jsx(FileContentViewer, {
|
|
41
|
-
selectedFile: m,
|
|
42
|
-
content: h,
|
|
43
|
-
workflowConfig: g,
|
|
44
|
-
isLoading: _,
|
|
45
|
-
className: "h-full"
|
|
46
|
-
})
|
|
47
|
-
})]
|
|
48
|
-
}), a[7] = h, a[8] = _, a[9] = d.length, a[10] = m, a[11] = g, a[12] = S) : S = a[12];
|
|
49
|
-
let C;
|
|
50
|
-
return a[13] !== x || a[14] !== S ? (C = /* @__PURE__ */ jsx("div", {
|
|
26
|
+
children: /* @__PURE__ */ jsx(WorkflowList_default, { pipeline: a })
|
|
27
|
+
}) }), i[2] = a, i[3] = d);
|
|
28
|
+
let f;
|
|
29
|
+
return i[4] !== l || i[5] !== d ? (f = /* @__PURE__ */ jsx("div", {
|
|
51
30
|
className: "flex h-full flex-col",
|
|
52
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
53
32
|
className: "flex flex-1 gap-4 overflow-hidden md:flex-row flex-col",
|
|
54
|
-
children:
|
|
33
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
35
|
+
children: [l, d]
|
|
36
|
+
})
|
|
55
37
|
})
|
|
56
|
-
}),
|
|
38
|
+
}), i[4] = l, i[5] = d, i[6] = f) : f = i[6], f;
|
|
57
39
|
}
|
|
58
|
-
function WorkbenchInner(
|
|
59
|
-
let r = c(
|
|
60
|
-
r[0]
|
|
61
|
-
let p;
|
|
62
|
-
r[2] !== u || r[3] !== f ? (p = {
|
|
63
|
-
state: f,
|
|
64
|
-
setActiveSectionId: u
|
|
65
|
-
}, r[2] = u, r[3] = f, r[4] = p) : p = r[4];
|
|
66
|
-
let v = p, x = o ? "w-1/2 overflow-hidden" : "w-full overflow-hidden", S;
|
|
67
|
-
r[5] !== a || r[6] !== i ? (S = /* @__PURE__ */ jsx(WorkbenchContent, {
|
|
40
|
+
function WorkbenchInner(t) {
|
|
41
|
+
let r = c(21), { pipeline: i, breadcrumbData: o } = t, { activeSidePanel: s } = useWorkbenchLayout(), u = s ? "w-1/2 overflow-hidden" : "w-full overflow-hidden", _;
|
|
42
|
+
r[0] !== o || r[1] !== i ? (_ = /* @__PURE__ */ jsx(WorkbenchContent, {
|
|
68
43
|
pipeline: i,
|
|
69
|
-
breadcrumbData:
|
|
70
|
-
}), r[
|
|
44
|
+
breadcrumbData: o
|
|
45
|
+
}), r[0] = o, r[1] = i, r[2] = _) : _ = r[2];
|
|
46
|
+
let v;
|
|
47
|
+
r[3] !== u || r[4] !== _ ? (v = /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: u,
|
|
49
|
+
children: _
|
|
50
|
+
}), r[3] = u, r[4] = _, r[5] = v) : v = r[5];
|
|
51
|
+
let y;
|
|
52
|
+
r[6] === s ? y = r[7] : (y = s === "preview" && /* @__PURE__ */ jsx(WorkbenchPreviewPanel, {}), r[6] = s, r[7] = y);
|
|
53
|
+
let b;
|
|
54
|
+
r[8] === s ? b = r[9] : (b = s === "flow" && /* @__PURE__ */ jsx(WorkbenchFlowPanel, {}), r[8] = s, r[9] = b);
|
|
55
|
+
let x;
|
|
56
|
+
r[10] === s ? x = r[11] : (x = s === "files" && /* @__PURE__ */ jsx(WorkbenchFilesPanel, {}), r[10] = s, r[11] = x);
|
|
57
|
+
let S;
|
|
58
|
+
r[12] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(WorkbenchFloatingPanel, {}), r[12] = S) : S = r[12];
|
|
71
59
|
let C;
|
|
72
|
-
r[
|
|
73
|
-
className: x,
|
|
74
|
-
children: S
|
|
75
|
-
}), r[8] = x, r[9] = S, r[10] = C) : C = r[10];
|
|
76
|
-
let w;
|
|
77
|
-
r[11] === o ? w = r[12] : (w = o === "preview" && /* @__PURE__ */ jsx(WorkbenchPreviewPanel, {}), r[11] = o, r[12] = w);
|
|
78
|
-
let T;
|
|
79
|
-
r[13] === o ? T = r[14] : (T = o === "flow" && /* @__PURE__ */ jsx(WorkbenchFlowPanel, {}), r[13] = o, r[14] = T);
|
|
80
|
-
let E;
|
|
81
|
-
r[15] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ jsx(WorkbenchFloatingPanel, {}), r[15] = E) : E = r[15];
|
|
82
|
-
let D;
|
|
83
|
-
r[16] !== C || r[17] !== w || r[18] !== T ? (D = /* @__PURE__ */ jsxs("div", {
|
|
60
|
+
r[13] !== v || r[14] !== y || r[15] !== b || r[16] !== x ? (C = /* @__PURE__ */ jsxs("div", {
|
|
84
61
|
className: "relative flex flex-1 overflow-hidden",
|
|
85
62
|
children: [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
63
|
+
v,
|
|
64
|
+
y,
|
|
65
|
+
b,
|
|
66
|
+
x,
|
|
67
|
+
S
|
|
90
68
|
]
|
|
91
|
-
}), r[
|
|
92
|
-
let
|
|
93
|
-
r[
|
|
94
|
-
let
|
|
95
|
-
r[
|
|
69
|
+
}), r[13] = v, r[14] = y, r[15] = b, r[16] = x, r[17] = C) : C = r[17];
|
|
70
|
+
let w;
|
|
71
|
+
r[18] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ jsx(WorkbenchIconSidebar, {}), r[18] = w) : w = r[18];
|
|
72
|
+
let T;
|
|
73
|
+
return r[19] === C ? T = r[20] : (T = /* @__PURE__ */ jsxs("div", {
|
|
96
74
|
className: "flex h-full w-full",
|
|
97
|
-
children: [
|
|
98
|
-
}), r[
|
|
99
|
-
let A;
|
|
100
|
-
return r[23] !== v || r[24] !== k ? (A = /* @__PURE__ */ jsx(WorkbenchContextProvider.Provider, {
|
|
101
|
-
value: v,
|
|
102
|
-
children: k
|
|
103
|
-
}), r[23] = v, r[24] = k, r[25] = A) : A = r[25], A;
|
|
75
|
+
children: [C, w]
|
|
76
|
+
}), r[19] = C, r[20] = T), T;
|
|
104
77
|
}
|
|
105
78
|
function Workbench(r) {
|
|
106
|
-
let
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
79
|
+
let a = c(20), { pipeline: o, breadcrumbData: l, previewPanelOpen: u, onPreviewPanelOpenChange: d, isDeveloperMode: f, getPreviewUrl: p, getEnvironmentPreviewUrl: m, environments: h } = r, g = o?.workspaceId, v = useWorkspace(g), y;
|
|
80
|
+
a[0] !== h?.[0]?.slotId || a[1] !== v.data?.features?.fileExplorer?.enabled || a[2] !== v.data?.features?.fileExplorer?.environments ? (y = v.data?.features?.fileExplorer?.enabled && v.data?.features?.fileExplorer?.environments?.includes(h?.[0]?.slotId ?? ""), a[0] = h?.[0]?.slotId, a[1] = v.data?.features?.fileExplorer?.enabled, a[2] = v.data?.features?.fileExplorer?.environments, a[3] = y) : y = a[3];
|
|
81
|
+
let b = y, x;
|
|
82
|
+
a[4] === v.data ? x = a[5] : (x = v.data ? {
|
|
83
|
+
volumes: v.data.volumes,
|
|
84
|
+
features: v.data.features
|
|
85
|
+
} : void 0, a[4] = v.data, a[5] = x);
|
|
86
|
+
let S = x, C = h ?? v.data?.environments, w;
|
|
87
|
+
a[6] !== l || a[7] !== b || a[8] !== o ? (w = b ? /* @__PURE__ */ jsx(RemoteFileExplorerProvider, { children: /* @__PURE__ */ jsx(WorkbenchInner, {
|
|
88
|
+
pipeline: o,
|
|
89
|
+
breadcrumbData: l
|
|
90
|
+
}) }) : /* @__PURE__ */ jsx(WorkbenchInner, {
|
|
113
91
|
pipeline: o,
|
|
114
|
-
breadcrumbData:
|
|
115
|
-
}),
|
|
92
|
+
breadcrumbData: l
|
|
93
|
+
}), a[6] = l, a[7] = b, a[8] = o, a[9] = w) : w = a[9];
|
|
116
94
|
let T;
|
|
117
|
-
|
|
118
|
-
pipelineId: C,
|
|
119
|
-
fileExplorerEnabled: v,
|
|
120
|
-
children: w
|
|
121
|
-
}), i[5] = v, i[6] = C, i[7] = w, i[8] = T) : T = i[8];
|
|
122
|
-
let E;
|
|
123
|
-
return i[9] !== m || i[10] !== p || i[11] !== f || i[12] !== d || i[13] !== o || i[14] !== l || i[15] !== S || i[16] !== T || i[17] !== b ? (E = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
95
|
+
return a[10] !== m || a[11] !== p || a[12] !== f || a[13] !== d || a[14] !== o || a[15] !== u || a[16] !== C || a[17] !== w || a[18] !== S ? (T = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
124
96
|
pipeline: o,
|
|
125
97
|
isDeveloperMode: f,
|
|
126
|
-
workspaceConfig:
|
|
98
|
+
workspaceConfig: S,
|
|
127
99
|
getPreviewUrl: p,
|
|
128
100
|
getEnvironmentPreviewUrl: m,
|
|
129
|
-
environments:
|
|
130
|
-
previewPanelOpen:
|
|
101
|
+
environments: C,
|
|
102
|
+
previewPanelOpen: u,
|
|
131
103
|
onPreviewPanelOpenChange: d,
|
|
132
|
-
children:
|
|
133
|
-
}),
|
|
104
|
+
children: w
|
|
105
|
+
}), a[10] = m, a[11] = p, a[12] = f, a[13] = d, a[14] = o, a[15] = u, a[16] = C, a[17] = w, a[18] = S, a[19] = T) : T = a[19], T;
|
|
134
106
|
}
|
|
135
107
|
export { Workbench as default };
|
|
@@ -1,64 +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
|
|
8
|
-
import
|
|
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";
|
|
9
7
|
import WorkflowForms_default from "./components/WorkflowForms.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
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
|
|
15
|
-
let { workflowId:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
var WorkflowItem_default = (p) => {
|
|
14
|
+
let m = c(45), { 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] !== M || m[35] !== C ? (U = !!C && /* @__PURE__ */ jsx("div", {
|
|
53
|
+
className: "mt-6",
|
|
54
|
+
children: /* @__PURE__ */ jsx(WorkflowForms_default, {
|
|
55
|
+
workflow: C,
|
|
56
|
+
onSubmit: M
|
|
57
|
+
})
|
|
58
|
+
}), m[34] = M, m[35] = C, m[36] = U) : U = m[36];
|
|
59
|
+
let W;
|
|
60
|
+
return m[37] !== V || m[38] !== H || m[39] !== U || m[40] !== I || m[41] !== R || m[42] !== z || m[43] !== 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__ */ jsx("div", {
|
|
55
|
-
className: "mt-6",
|
|
56
|
-
children: /* @__PURE__ */ jsx(WorkflowForms_default, {
|
|
57
|
-
workflow: C.data,
|
|
58
|
-
onSubmit: O
|
|
59
|
-
})
|
|
60
|
-
})
|
|
63
|
+
R,
|
|
64
|
+
z,
|
|
65
|
+
B,
|
|
66
|
+
V,
|
|
67
|
+
H,
|
|
68
|
+
U
|
|
61
69
|
]
|
|
62
|
-
});
|
|
70
|
+
}), m[37] = V, m[38] = H, m[39] = U, m[40] = I, m[41] = R, m[42] = z, m[43] = B, m[44] = W) : W = m[44], W;
|
|
63
71
|
};
|
|
64
72
|
export { WorkflowItem_default as default };
|
|
@@ -1,119 +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
|
|
6
|
-
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";
|
|
7
6
|
import WorkflowItem_default from "./WorkflowItem.js";
|
|
8
|
-
import { useScrollToBottom } from "./hooks/useAutoScrollBottom.js";
|
|
9
|
-
import { useIntersectionObserver } from "./hooks/useIntersectionObserver.js";
|
|
10
|
-
import { useScrollToListItem } from "./hooks/useScrollToListItem.js";
|
|
11
7
|
import WorkbenchSettingsModal_default from "./components/WorkbenchSettingsModal.js";
|
|
12
8
|
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
9
|
+
import { useWorkflowListState } from "./hooks/useWorkflowListState.js";
|
|
13
10
|
import { c } from "react/compiler-runtime";
|
|
14
|
-
import React, {
|
|
11
|
+
import React, { useState } from "react";
|
|
15
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
13
|
import { ArrowDownIcon, ChevronRightIcon, Play } from "lucide-react";
|
|
17
|
-
var WorkflowList_default = (
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
let [k, A] = useState(O), j;
|
|
21
|
-
C[1] === Symbol.for("react.memo_cache_sentinel") ? (j = {
|
|
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 = {
|
|
22
17
|
enableDebugMode: !1,
|
|
23
18
|
showFullMessageHistory: !1
|
|
24
|
-
},
|
|
25
|
-
let [
|
|
26
|
-
|
|
27
|
-
B && B.setActiveSectionId && B.state.activeSectionId !== P && (B.setActiveSectionId(P), P && A((t) => ({
|
|
28
|
-
...t,
|
|
29
|
-
[P]: !0
|
|
30
|
-
})));
|
|
31
|
-
}, H = [P, B], C[2] = P, C[3] = B, C[4] = V, C[5] = H) : (V = C[4], H = C[5]), useEffect(V, H);
|
|
32
|
-
let U, W;
|
|
33
|
-
C[6] !== P || C[7] !== T.data ? (U = () => {
|
|
34
|
-
if (T.data && T.data.length > 0) {
|
|
35
|
-
let t = T.data.length - 1, _ = T.data[t], v = `section-${_.index}-${_.id}`;
|
|
36
|
-
A({
|
|
37
|
-
[v]: !0,
|
|
38
|
-
...P && P !== v ? { [P]: !0 } : {}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}, 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);
|
|
42
|
-
let G;
|
|
43
|
-
C[10] === Symbol.for("react.memo_cache_sentinel") ? (G = (t) => {
|
|
44
|
-
A((_) => ({
|
|
45
|
-
..._,
|
|
46
|
-
[t]: !_[t]
|
|
47
|
-
}));
|
|
48
|
-
}, C[10] = G) : G = C[10];
|
|
49
|
-
let K = G, q;
|
|
50
|
-
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, {
|
|
51
22
|
variant: "outline",
|
|
52
23
|
size: "icon",
|
|
53
|
-
onClick:
|
|
24
|
+
onClick: M,
|
|
54
25
|
className: "bg-background/80 fixed right-[calc(var(--sidebar-width)+1.5rem)] bottom-6 z-50 rounded-full shadow-md backdrop-blur-sm",
|
|
55
26
|
children: /* @__PURE__ */ jsx(ArrowDownIcon, { className: "size-4" })
|
|
56
|
-
}),
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
let
|
|
62
|
-
|
|
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", {
|
|
63
34
|
className: "mb-10",
|
|
64
|
-
ref:
|
|
65
|
-
children: /* @__PURE__ */ jsx("div", { children:
|
|
66
|
-
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];
|
|
67
38
|
return /* @__PURE__ */ jsxs("div", {
|
|
68
|
-
ref: (
|
|
69
|
-
"data-id":
|
|
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
44
|
role: "button",
|
|
74
|
-
tabIndex:
|
|
75
|
-
className: cn("flex w-full items-center gap-2 rounded-md p-2 px-3 text-left text-sm font-medium", !
|
|
76
|
-
onClick:
|
|
77
|
-
onKeyDown:
|
|
78
|
-
(
|
|
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));
|
|
79
50
|
},
|
|
80
51
|
children: [
|
|
81
52
|
/* @__PURE__ */ jsx(Play, { className: "text-primary h-3.5 w-3.5 fill-current" }),
|
|
82
53
|
/* @__PURE__ */ jsx("span", {
|
|
83
54
|
className: "flex-1 truncate text-sm",
|
|
84
|
-
children:
|
|
55
|
+
children: f.title ?? f.blockName
|
|
85
56
|
}),
|
|
86
57
|
/* @__PURE__ */ jsx(WorkflowButtons_default, {
|
|
87
|
-
pipeline:
|
|
88
|
-
workflowId:
|
|
58
|
+
pipeline: y,
|
|
59
|
+
workflowId: f.id
|
|
89
60
|
}),
|
|
90
|
-
|
|
91
|
-
settings:
|
|
92
|
-
onSettingsChange:
|
|
93
|
-
open:
|
|
94
|
-
onOpenChange:
|
|
61
|
+
m && /* @__PURE__ */ jsx(WorkbenchSettingsModal_default, {
|
|
62
|
+
settings: w,
|
|
63
|
+
onSettingsChange: T,
|
|
64
|
+
open: x,
|
|
65
|
+
onOpenChange: S
|
|
95
66
|
}),
|
|
96
|
-
!
|
|
67
|
+
!h && /* @__PURE__ */ jsx(ChevronRightIcon, { className: cn("text-muted-foreground h-3.5 w-3.5 transition-transform", g && "rotate-90") })
|
|
97
68
|
]
|
|
98
69
|
})
|
|
99
|
-
}),
|
|
70
|
+
}), g && /* @__PURE__ */ jsx("div", {
|
|
100
71
|
className: "max-w-4xl py-1",
|
|
101
72
|
children: /* @__PURE__ */ jsx(WorkflowItem_default, {
|
|
102
|
-
pipeline:
|
|
103
|
-
workflowId:
|
|
104
|
-
scrollTo:
|
|
105
|
-
settings:
|
|
73
|
+
pipeline: y,
|
|
74
|
+
workflowId: f.id,
|
|
75
|
+
scrollTo: A,
|
|
76
|
+
settings: w
|
|
106
77
|
})
|
|
107
78
|
})]
|
|
108
|
-
},
|
|
79
|
+
}, f.id);
|
|
109
80
|
}) })
|
|
110
|
-
}) : null,
|
|
111
|
-
let
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
] }),
|
|
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;
|
|
118
89
|
};
|
|
119
90
|
export { WorkflowList_default as default };
|
|
@@ -6,10 +6,11 @@ import { Button } from "../../../components/ui/button.js";
|
|
|
6
6
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
7
7
|
import { Dialog, DialogContent, DialogTitle } from "../../../components/ui/dialog.js";
|
|
8
8
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select.js";
|
|
9
|
-
import ErrorSnackbar_default from "../../../components/
|
|
9
|
+
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
10
10
|
import CreateWorkspace_default from "../../workspaces/components/CreateWorkspace.js";
|
|
11
11
|
import Form_default from "../../../components/dynamic-form/Form.js";
|
|
12
12
|
import { useRunPipeline } from "../../../hooks/useProcessor.js";
|
|
13
|
+
import "../../workspaces/index.js";
|
|
13
14
|
import { c } from "react/compiler-runtime";
|
|
14
15
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
15
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FileTabsBarBase } from "../../code-explorer/components/FileTabsBarBase.js";
|
|
2
|
+
import { useRemoteFileExplorer } from "../providers/RemoteFileExplorerProvider.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function RemoteFileTabsBar() {
|
|
6
|
+
let i = c(9), { openFiles: a, selectedFile: o, selectFile: s, closeFile: l, closeAll: u, closeOthers: d, closeToLeft: f, closeToRight: p } = useRemoteFileExplorer(), m;
|
|
7
|
+
return i[0] !== u || i[1] !== l || i[2] !== d || i[3] !== f || i[4] !== p || i[5] !== a || i[6] !== s || i[7] !== o ? (m = /* @__PURE__ */ jsx(FileTabsBarBase, {
|
|
8
|
+
openFiles: a,
|
|
9
|
+
selectedFile: o,
|
|
10
|
+
selectFile: s,
|
|
11
|
+
closeFile: l,
|
|
12
|
+
closeAll: u,
|
|
13
|
+
closeOthers: d,
|
|
14
|
+
closeToLeft: f,
|
|
15
|
+
closeToRight: p
|
|
16
|
+
}), i[0] = u, i[1] = l, i[2] = d, i[3] = f, i[4] = p, i[5] = a, i[6] = s, i[7] = o, i[8] = m) : m = i[8], m;
|
|
17
|
+
}
|
|
18
|
+
export { RemoteFileTabsBar };
|