@loopstack/loopstack-studio 0.34.0 → 0.35.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 +18 -24
- package/dist/components/layout/StudioSidebar.js +34 -34
- 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 +1 -1
- package/dist/features/debug/components/WorkflowFlowViewer.js +2 -1
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +2 -1
- 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 +2 -1
- 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/hooks/useFileExplorer.js +36 -31
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +94 -92
- package/dist/features/git/components/WorkbenchGitPanel.js +6 -9
- 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/renderers/SecretInputRenderer.js +3 -2
- package/dist/features/workbench/WorkflowItem.js +5 -8
- package/dist/features/workbench/components/NewRunDialog.js +172 -170
- package/dist/features/workbench/components/PreviewEmptyState.js +1 -1
- package/dist/features/workbench/components/WorkbenchRunsPanel.js +2 -1
- 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/workspaces/Workspaces.js +4 -2
- 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 +78 -24
- package/dist/hooks/useWorkflows.js +43 -172
- package/dist/hooks/useWorkspaces.js +24 -130
- package/dist/index.d.ts +130 -488
- package/dist/index.js +10 -12
- 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 +5 -4
- package/dist/pages/PreviewWorkbenchPage.js +60 -59
- package/dist/pages/StudioLandingPage.js +1 -1
- package/dist/pages/WorkbenchPage.js +3 -2
- package/dist/pages/WorkflowDebugPage.js +3 -2
- package/dist/pages/WorkspacePage.js +3 -2
- package/dist/pages/WorkspaceRunsPage.js +2 -1
- package/dist/providers/LoopstackClientProvider.js +35 -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 -31
- 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 -15
- 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 -12
- 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 -43
- package/dist/providers/SseProvider.js +0 -37
- package/dist/services/eventEmitter.js +0 -12
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { useAppsConfig } from "../../../hooks/
|
|
1
|
+
import { useAppsConfig } from "../../../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import { useStartWorkflow } from "../../../packages/react/dist/hooks/mutations.js";
|
|
3
|
+
import "../../../hooks/useConfig.js";
|
|
2
4
|
import { useFilterWorkspaces } from "../../../hooks/useWorkspaces.js";
|
|
3
5
|
import { useComponentOverrides } from "../../../providers/ComponentOverridesProvider.js";
|
|
4
6
|
import { Button } from "../../../components/ui/button.js";
|
|
@@ -6,7 +8,7 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../co
|
|
|
6
8
|
import { Dialog, DialogContent, DialogTitle } from "../../../components/ui/dialog.js";
|
|
7
9
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select.js";
|
|
8
10
|
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
9
|
-
import
|
|
11
|
+
import "../../../hooks/useProcessor.js";
|
|
10
12
|
import Form_default from "../../../components/dynamic-form/Form.js";
|
|
11
13
|
import CreateWorkspace_default from "../../workspaces/components/CreateWorkspace.js";
|
|
12
14
|
import "../../workspaces/index.js";
|
|
@@ -17,197 +19,197 @@ import { Check, CheckIcon, ChevronDown, Loader2, Plus } from "lucide-react";
|
|
|
17
19
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
18
20
|
import { useForm } from "react-hook-form";
|
|
19
21
|
function NewRunDialog(e) {
|
|
20
|
-
let t = c(8), { open: n, onOpenChange: r, onSuccess:
|
|
21
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
22
|
-
let
|
|
23
|
-
t[1] !==
|
|
22
|
+
let t = c(8), { open: n, onOpenChange: r, onSuccess: i } = e, a;
|
|
23
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ jsx(DialogTitle, { children: "New Run" }), t[0] = a) : a = t[0];
|
|
24
|
+
let o;
|
|
25
|
+
t[1] !== i || t[2] !== n ? (o = /* @__PURE__ */ jsxs(DialogContent, {
|
|
24
26
|
className: "max-h-[80vh] min-h-[300px] !max-w-2xl",
|
|
25
|
-
children: [
|
|
27
|
+
children: [a, /* @__PURE__ */ jsx(NewRunDialogContent, {
|
|
26
28
|
open: n,
|
|
27
|
-
onSuccess:
|
|
29
|
+
onSuccess: i
|
|
28
30
|
})]
|
|
29
|
-
}), t[1] =
|
|
30
|
-
let
|
|
31
|
-
return t[4] !== r || t[5] !== n || t[6] !==
|
|
31
|
+
}), t[1] = i, t[2] = n, t[3] = o) : o = t[3];
|
|
32
|
+
let s;
|
|
33
|
+
return t[4] !== r || t[5] !== n || t[6] !== o ? (s = /* @__PURE__ */ jsx(Dialog, {
|
|
32
34
|
open: n,
|
|
33
35
|
onOpenChange: r,
|
|
34
|
-
children:
|
|
35
|
-
}), t[4] = r, t[5] = n, t[6] =
|
|
36
|
+
children: o
|
|
37
|
+
}), t[4] = r, t[5] = n, t[6] = o, t[7] = s) : s = t[7], s;
|
|
36
38
|
}
|
|
37
|
-
function NewRunDialogContent(
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
let
|
|
41
|
-
|
|
42
|
-
let
|
|
43
|
-
if (
|
|
39
|
+
function NewRunDialogContent(a) {
|
|
40
|
+
let o = c(116), { open: s, onSuccess: l } = a, [u, d] = useState("workspace"), [f, g] = useState(!1), [v, y] = useState(""), [b, S] = useState(""), { CreateWorkspace: w } = useComponentOverrides(), T = w ?? CreateWorkspace_default, E = useAppsConfig(), me;
|
|
41
|
+
o[0] === Symbol.for("react.memo_cache_sentinel") ? (me = {}, o[0] = me) : me = o[0];
|
|
42
|
+
let D = useFilterWorkspaces(void 0, me, "title", "ASC", 0, 100), he;
|
|
43
|
+
o[1] === D.data?.data ? he = o[2] : (he = D.data?.data ?? [], o[1] = D.data?.data, o[2] = he);
|
|
44
|
+
let O = he, ge;
|
|
45
|
+
if (o[3] !== v || o[4] !== O) {
|
|
44
46
|
let e;
|
|
45
|
-
|
|
46
|
-
} else
|
|
47
|
-
let
|
|
47
|
+
o[6] === v ? e = o[7] : (e = (e) => e.id === v, o[6] = v, o[7] = e), ge = O.find(e), o[3] = v, o[4] = O, o[5] = ge;
|
|
48
|
+
} else ge = o[5];
|
|
49
|
+
let k = ge, _e;
|
|
48
50
|
bb0: {
|
|
49
|
-
if (!
|
|
50
|
-
|
|
51
|
+
if (!k || !E.data) {
|
|
52
|
+
_e = void 0;
|
|
51
53
|
break bb0;
|
|
52
54
|
}
|
|
53
55
|
let e;
|
|
54
|
-
if (
|
|
56
|
+
if (o[8] !== E.data || o[9] !== k) {
|
|
55
57
|
let t;
|
|
56
|
-
|
|
57
|
-
} else e =
|
|
58
|
-
|
|
58
|
+
o[11] === k ? t = o[12] : (t = (e) => e.appName === k.appName, o[11] = k, o[12] = t), e = E.data.find(t), o[8] = E.data, o[9] = k, o[10] = e;
|
|
59
|
+
} else e = o[10];
|
|
60
|
+
_e = e;
|
|
59
61
|
}
|
|
60
|
-
let
|
|
62
|
+
let ve = _e, ye;
|
|
61
63
|
bb1: {
|
|
62
|
-
if (!
|
|
64
|
+
if (!ve) {
|
|
63
65
|
let e;
|
|
64
|
-
|
|
66
|
+
o[13] === Symbol.for("react.memo_cache_sentinel") ? (e = [], o[13] = e) : e = o[13], ye = e;
|
|
65
67
|
break bb1;
|
|
66
68
|
}
|
|
67
|
-
|
|
69
|
+
ye = ve.workflows;
|
|
68
70
|
}
|
|
69
|
-
let
|
|
71
|
+
let A = ye, be;
|
|
70
72
|
bb2: {
|
|
71
|
-
if (!
|
|
73
|
+
if (!E.data) {
|
|
72
74
|
let e;
|
|
73
|
-
|
|
75
|
+
o[14] === Symbol.for("react.memo_cache_sentinel") ? (e = [], o[14] = e) : e = o[14], be = e;
|
|
74
76
|
break bb2;
|
|
75
77
|
}
|
|
76
78
|
let e;
|
|
77
|
-
|
|
79
|
+
o[15] === E.data ? e = o[16] : (e = E.data.map(_temp), o[15] = E.data, o[16] = e), be = e;
|
|
78
80
|
}
|
|
79
|
-
let
|
|
80
|
-
|
|
81
|
+
let xe = be, j = useStartWorkflow(), M = j.isPending, Se;
|
|
82
|
+
o[17] === Symbol.for("react.memo_cache_sentinel") ? (Se = {
|
|
81
83
|
defaultValues: {},
|
|
82
84
|
mode: "onChange"
|
|
83
|
-
},
|
|
84
|
-
let N = useForm(
|
|
85
|
+
}, o[17] = Se) : Se = o[17];
|
|
86
|
+
let N = useForm(Se), Ce;
|
|
85
87
|
bb3: {
|
|
86
|
-
if (!
|
|
88
|
+
if (!b) {
|
|
87
89
|
Ce = void 0;
|
|
88
90
|
break bb3;
|
|
89
91
|
}
|
|
90
92
|
let e;
|
|
91
|
-
if (
|
|
93
|
+
if (o[18] !== A || o[19] !== b) {
|
|
92
94
|
let t;
|
|
93
|
-
|
|
94
|
-
} else e =
|
|
95
|
+
o[21] === b ? t = o[22] : (t = (e) => e.workflowName === b, o[21] = b, o[22] = t), e = A.find(t), o[18] = A, o[19] = b, o[20] = e;
|
|
96
|
+
} else e = o[20];
|
|
95
97
|
Ce = e;
|
|
96
98
|
}
|
|
97
99
|
let P = Ce, F = P?.schema, I = !!F, we;
|
|
98
|
-
|
|
100
|
+
o[23] === A ? we = o[24] : (we = A.map(_temp2), o[23] = A, o[24] = we);
|
|
99
101
|
let L = we, Te;
|
|
100
|
-
|
|
101
|
-
!
|
|
102
|
-
},
|
|
102
|
+
o[25] !== v || o[26] !== O[0] || o[27] !== O.length ? (Te = () => {
|
|
103
|
+
!v && O.length > 0 && y(O[0].id);
|
|
104
|
+
}, o[25] = v, o[26] = O[0], o[27] = O.length, o[28] = Te) : Te = o[28];
|
|
103
105
|
let Ee;
|
|
104
|
-
|
|
106
|
+
o[29] !== v || o[30] !== O ? (Ee = [O, v], o[29] = v, o[30] = O, o[31] = Ee) : Ee = o[31], useEffect(Te, Ee);
|
|
105
107
|
let De, Oe;
|
|
106
|
-
|
|
107
|
-
L.length > 0 && !L.find((e) => e.key ===
|
|
108
|
-
}, Oe = [L,
|
|
108
|
+
o[32] !== b || o[33] !== L ? (De = () => {
|
|
109
|
+
L.length > 0 && !L.find((e) => e.key === b) && S(L[0].key);
|
|
110
|
+
}, Oe = [L, b], o[32] = b, o[33] = L, o[34] = De, o[35] = Oe) : (De = o[34], Oe = o[35]), useEffect(De, Oe);
|
|
109
111
|
let ke;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
112
|
+
o[36] !== N || o[37] !== s || o[38] !== j ? (ke = () => {
|
|
113
|
+
s || (d("workspace"), g(!1), y(""), S(""), N.reset({}), j.reset());
|
|
114
|
+
}, o[36] = N, o[37] = s, o[38] = j, o[39] = ke) : ke = o[39];
|
|
113
115
|
let Ae;
|
|
114
|
-
|
|
116
|
+
o[40] === s ? Ae = o[41] : (Ae = [s], o[40] = s, o[41] = Ae), useEffect(ke, Ae);
|
|
115
117
|
let je;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
},
|
|
118
|
+
o[42] === Symbol.for("react.memo_cache_sentinel") ? (je = (e) => {
|
|
119
|
+
y(e), S(""), d("automation");
|
|
120
|
+
}, o[42] = je) : je = o[42];
|
|
119
121
|
let Me = je, Ne;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
},
|
|
122
|
+
o[43] === N ? Ne = o[44] : (Ne = (e) => {
|
|
123
|
+
S(e), N.reset({});
|
|
124
|
+
}, o[43] = N, o[44] = Ne);
|
|
123
125
|
let Pe = Ne, Fe, Ie;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}, Ie = [
|
|
126
|
+
o[45] !== I || o[46] !== b ? (Fe = () => {
|
|
127
|
+
b && I && d("config");
|
|
128
|
+
}, Ie = [b, I], o[45] = I, o[46] = b, o[47] = Fe, o[48] = Ie) : (Fe = o[47], Ie = o[48]), useEffect(Fe, Ie);
|
|
127
129
|
let Le;
|
|
128
|
-
|
|
130
|
+
o[49] !== N || o[50] !== I || o[51] !== l || o[52] !== P || o[53] !== v || o[54] !== j ? (Le = () => {
|
|
129
131
|
let e = (e) => {
|
|
130
|
-
!
|
|
132
|
+
!v || !P || j.mutate({
|
|
131
133
|
workflowName: P.workflowName,
|
|
132
|
-
workspaceId:
|
|
134
|
+
workspaceId: v,
|
|
133
135
|
args: e ?? {}
|
|
134
|
-
}
|
|
136
|
+
}, { onSuccess: (e) => l(e.workflowId) });
|
|
135
137
|
};
|
|
136
138
|
I ? N.handleSubmit((t) => e(t))() : e();
|
|
137
|
-
},
|
|
138
|
-
let Re = Le, ze = !!
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
let Ve = Be, He = !!
|
|
143
|
-
|
|
144
|
-
let We =
|
|
145
|
-
|
|
139
|
+
}, o[49] = N, o[50] = I, o[51] = l, o[52] = P, o[53] = v, o[54] = j, o[55] = Le) : Le = o[55];
|
|
140
|
+
let Re = Le, ze = !!v && !!b, Be;
|
|
141
|
+
o[56] === Symbol.for("react.memo_cache_sentinel") ? (Be = (e) => {
|
|
142
|
+
d((t) => t === e ? null : e);
|
|
143
|
+
}, o[56] = Be) : Be = o[56];
|
|
144
|
+
let Ve = Be, He = !!v, R = !!b, z = He, Ue = R && I, B;
|
|
145
|
+
o[57] === j.error ? B = o[58] : (B = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: j.error }), o[57] = j.error, o[58] = B);
|
|
146
|
+
let We = k?.title, Ge = u === "workspace", Ke = He && u !== "workspace", qe;
|
|
147
|
+
o[59] === Symbol.for("react.memo_cache_sentinel") ? (qe = () => Ve("workspace"), o[59] = qe) : qe = o[59];
|
|
146
148
|
let V;
|
|
147
|
-
|
|
149
|
+
o[60] !== T || o[61] !== xe || o[62] !== v || o[63] !== f || o[64] !== O ? (V = f ? /* @__PURE__ */ jsx("div", {
|
|
148
150
|
className: "pt-2",
|
|
149
|
-
children: /* @__PURE__ */ jsx(
|
|
150
|
-
types:
|
|
151
|
+
children: /* @__PURE__ */ jsx(T, {
|
|
152
|
+
types: xe,
|
|
151
153
|
onSuccess: () => {
|
|
152
|
-
|
|
154
|
+
g(!1);
|
|
153
155
|
}
|
|
154
156
|
})
|
|
155
157
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
156
158
|
className: "flex gap-2 pt-2",
|
|
157
159
|
children: [/* @__PURE__ */ jsxs(Select, {
|
|
158
|
-
value:
|
|
160
|
+
value: v,
|
|
159
161
|
onValueChange: Me,
|
|
160
162
|
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
161
163
|
id: "workspace",
|
|
162
164
|
className: "flex-1",
|
|
163
165
|
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a workspace..." })
|
|
164
|
-
}), /* @__PURE__ */ jsx(SelectContent, { children:
|
|
166
|
+
}), /* @__PURE__ */ jsx(SelectContent, { children: O.map(_temp3) })]
|
|
165
167
|
}), /* @__PURE__ */ jsx(Button, {
|
|
166
168
|
variant: "outline",
|
|
167
|
-
onClick: () =>
|
|
169
|
+
onClick: () => g(!0),
|
|
168
170
|
className: "px-3",
|
|
169
171
|
title: "Create new workspace",
|
|
170
172
|
children: /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4" })
|
|
171
173
|
})]
|
|
172
|
-
}),
|
|
174
|
+
}), o[60] = T, o[61] = xe, o[62] = v, o[63] = f, o[64] = O, o[65] = V) : V = o[65];
|
|
173
175
|
let H;
|
|
174
|
-
|
|
176
|
+
o[66] !== D.isLoading || o[67] !== We || o[68] !== Ge || o[69] !== Ke || o[70] !== V ? (H = /* @__PURE__ */ jsx(StepSection, {
|
|
175
177
|
step: 1,
|
|
176
178
|
title: "Select Workspace",
|
|
177
179
|
summary: We,
|
|
178
180
|
isActive: Ge,
|
|
179
181
|
isComplete: Ke,
|
|
180
182
|
isEnabled: !0,
|
|
181
|
-
isLoading:
|
|
183
|
+
isLoading: D.isLoading,
|
|
182
184
|
onToggle: qe,
|
|
183
185
|
children: V
|
|
184
|
-
}),
|
|
186
|
+
}), o[66] = D.isLoading, o[67] = We, o[68] = Ge, o[69] = Ke, o[70] = V, o[71] = H) : H = o[71];
|
|
185
187
|
let U;
|
|
186
|
-
|
|
187
|
-
let Je =
|
|
188
|
-
|
|
189
|
-
let
|
|
190
|
-
|
|
188
|
+
o[72] !== R || o[73] !== b || o[74] !== L ? (U = R ? L.find((e) => e.key === b)?.title ?? b : void 0, o[72] = R, o[73] = b, o[74] = L, o[75] = U) : U = o[75];
|
|
189
|
+
let Je = u === "automation", Ye = R && u !== "automation", Xe = E.isLoading, W;
|
|
190
|
+
o[76] === z ? W = o[77] : (W = () => z && Ve("automation"), o[76] = z, o[77] = W);
|
|
191
|
+
let Ze;
|
|
192
|
+
o[78] === Symbol.for("react.memo_cache_sentinel") ? (Ze = /* @__PURE__ */ jsx(SelectTrigger, {
|
|
191
193
|
id: "automation",
|
|
192
194
|
className: "w-full",
|
|
193
195
|
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a workflow..." })
|
|
194
|
-
}),
|
|
196
|
+
}), o[78] = Ze) : Ze = o[78];
|
|
197
|
+
let G;
|
|
198
|
+
o[79] === L ? G = o[80] : (G = L.map(_temp4), o[79] = L, o[80] = G);
|
|
195
199
|
let K;
|
|
196
|
-
|
|
200
|
+
o[81] === G ? K = o[82] : (K = /* @__PURE__ */ jsx(SelectContent, { children: G }), o[81] = G, o[82] = K);
|
|
197
201
|
let q;
|
|
198
|
-
|
|
199
|
-
let J;
|
|
200
|
-
i[83] !== Pe || i[84] !== j || i[85] !== y || i[86] !== q ? (J = /* @__PURE__ */ jsx("div", {
|
|
202
|
+
o[83] !== Pe || o[84] !== M || o[85] !== b || o[86] !== K ? (q = /* @__PURE__ */ jsx("div", {
|
|
201
203
|
className: "pt-2",
|
|
202
204
|
children: /* @__PURE__ */ jsxs(Select, {
|
|
203
|
-
value:
|
|
205
|
+
value: b,
|
|
204
206
|
onValueChange: Pe,
|
|
205
|
-
disabled:
|
|
206
|
-
children: [
|
|
207
|
+
disabled: M,
|
|
208
|
+
children: [Ze, K]
|
|
207
209
|
})
|
|
208
|
-
}),
|
|
209
|
-
let
|
|
210
|
-
|
|
210
|
+
}), o[83] = Pe, o[84] = M, o[85] = b, o[86] = K, o[87] = q) : q = o[87];
|
|
211
|
+
let J;
|
|
212
|
+
o[88] !== z || o[89] !== E.isLoading || o[90] !== U || o[91] !== Je || o[92] !== Ye || o[93] !== W || o[94] !== q ? (J = /* @__PURE__ */ jsx(StepSection, {
|
|
211
213
|
step: 2,
|
|
212
214
|
title: "Select Workflow",
|
|
213
215
|
summary: U,
|
|
@@ -216,13 +218,13 @@ function NewRunDialogContent(ce) {
|
|
|
216
218
|
isEnabled: z,
|
|
217
219
|
isLoading: Xe,
|
|
218
220
|
onToggle: W,
|
|
219
|
-
children:
|
|
220
|
-
}),
|
|
221
|
-
let
|
|
222
|
-
|
|
221
|
+
children: q
|
|
222
|
+
}), o[88] = z, o[89] = E.isLoading, o[90] = U, o[91] = Je, o[92] = Ye, o[93] = W, o[94] = q, o[95] = J) : J = o[95];
|
|
223
|
+
let Y;
|
|
224
|
+
o[96] !== u || o[97] !== Ue || o[98] !== N || o[99] !== I || o[100] !== F ? (Y = I && /* @__PURE__ */ jsx(StepSection, {
|
|
223
225
|
step: 3,
|
|
224
226
|
title: "Configuration",
|
|
225
|
-
isActive:
|
|
227
|
+
isActive: u === "config",
|
|
226
228
|
isComplete: !1,
|
|
227
229
|
isEnabled: Ue,
|
|
228
230
|
onToggle: () => Ue && Ve("config"),
|
|
@@ -235,39 +237,39 @@ function NewRunDialogContent(ce) {
|
|
|
235
237
|
viewOnly: !1
|
|
236
238
|
})
|
|
237
239
|
})
|
|
238
|
-
}),
|
|
239
|
-
let
|
|
240
|
-
|
|
240
|
+
}), o[96] = u, o[97] = Ue, o[98] = N, o[99] = I, o[100] = F, o[101] = Y) : Y = o[101];
|
|
241
|
+
let X;
|
|
242
|
+
o[102] !== H || o[103] !== J || o[104] !== Y ? (X = /* @__PURE__ */ jsxs("div", {
|
|
241
243
|
className: "space-y-2",
|
|
242
244
|
children: [
|
|
243
245
|
H,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
J,
|
|
247
|
+
Y
|
|
246
248
|
]
|
|
247
|
-
}),
|
|
248
|
-
let
|
|
249
|
-
|
|
250
|
-
let
|
|
251
|
-
|
|
249
|
+
}), o[102] = H, o[103] = J, o[104] = Y, o[105] = X) : X = o[105];
|
|
250
|
+
let Qe = !ze || M, Z;
|
|
251
|
+
o[106] === M ? Z = o[107] : (Z = M && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), o[106] = M, o[107] = Z);
|
|
252
|
+
let Q;
|
|
253
|
+
o[108] !== Re || o[109] !== Qe || o[110] !== Z ? (Q = /* @__PURE__ */ jsx("div", {
|
|
252
254
|
className: "mt-4 flex justify-end border-t pt-4",
|
|
253
255
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
254
256
|
variant: "default",
|
|
255
|
-
disabled:
|
|
257
|
+
disabled: Qe,
|
|
256
258
|
onClick: Re,
|
|
257
259
|
size: "lg",
|
|
258
260
|
className: "font-medium",
|
|
259
|
-
children: [
|
|
261
|
+
children: [Z, "Run Now"]
|
|
260
262
|
})
|
|
261
|
-
}),
|
|
262
|
-
let
|
|
263
|
-
return
|
|
263
|
+
}), o[108] = Re, o[109] = Qe, o[110] = Z, o[111] = Q) : Q = o[111];
|
|
264
|
+
let $;
|
|
265
|
+
return o[112] !== B || o[113] !== X || o[114] !== Q ? ($ = /* @__PURE__ */ jsxs("div", {
|
|
264
266
|
className: "mt-2 overflow-y-auto",
|
|
265
267
|
children: [
|
|
266
268
|
B,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
+
X,
|
|
270
|
+
Q
|
|
269
271
|
]
|
|
270
|
-
}),
|
|
272
|
+
}), o[112] = B, o[113] = X, o[114] = Q, o[115] = $) : $ = o[115], $;
|
|
271
273
|
}
|
|
272
274
|
function _temp4(e) {
|
|
273
275
|
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
@@ -307,51 +309,51 @@ function _temp(e) {
|
|
|
307
309
|
};
|
|
308
310
|
}
|
|
309
311
|
function StepSection(e) {
|
|
310
|
-
let t = c(35), { step: n, title: r, summary:
|
|
311
|
-
t[0] ===
|
|
312
|
-
let
|
|
313
|
-
t[2] !==
|
|
314
|
-
let
|
|
315
|
-
t[5] !==
|
|
316
|
-
className:
|
|
317
|
-
children:
|
|
318
|
-
}), t[5] =
|
|
319
|
-
let
|
|
320
|
-
t[8] !==
|
|
321
|
-
className:
|
|
312
|
+
let t = c(35), { step: n, title: r, summary: i, isActive: l, isComplete: u, isEnabled: d, isLoading: ce, onToggle: le, children: f } = e, p;
|
|
313
|
+
t[0] === le ? p = t[1] : (p = () => le(), t[0] = le, t[1] = p);
|
|
314
|
+
let ue = `flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-colors ${d ? "hover:bg-muted/50 cursor-pointer" : "cursor-not-allowed opacity-50"}`, de = !d, fe = `flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full text-xs font-semibold ${u ? "bg-primary text-primary-foreground" : l ? "border-primary text-primary border-2" : "border-border text-muted-foreground border"}`, m;
|
|
315
|
+
t[2] !== u || t[3] !== n ? (m = u ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5" }) : n, t[2] = u, t[3] = n, t[4] = m) : m = t[4];
|
|
316
|
+
let h;
|
|
317
|
+
t[5] !== fe || t[6] !== m ? (h = /* @__PURE__ */ jsx("div", {
|
|
318
|
+
className: fe,
|
|
319
|
+
children: m
|
|
320
|
+
}), t[5] = fe, t[6] = m, t[7] = h) : h = t[7];
|
|
321
|
+
let g = `flex-1 text-sm font-medium ${d ? "text-foreground" : "text-muted-foreground"}`, _;
|
|
322
|
+
t[8] !== g || t[9] !== r ? (_ = /* @__PURE__ */ jsx("span", {
|
|
323
|
+
className: g,
|
|
322
324
|
children: r
|
|
323
|
-
}), t[8] =
|
|
324
|
-
let
|
|
325
|
-
t[11] !==
|
|
325
|
+
}), t[8] = g, t[9] = r, t[10] = _) : _ = t[10];
|
|
326
|
+
let y;
|
|
327
|
+
t[11] !== l || t[12] !== u || t[13] !== i ? (y = !l && u && i && /* @__PURE__ */ jsx("span", {
|
|
326
328
|
className: "text-muted-foreground mr-1 max-w-48 truncate text-sm",
|
|
327
|
-
children:
|
|
328
|
-
}), t[11] =
|
|
329
|
-
let
|
|
330
|
-
t[15] !==
|
|
331
|
-
let
|
|
332
|
-
t[18] ===
|
|
333
|
-
let
|
|
334
|
-
t[20] !==
|
|
335
|
-
className:
|
|
336
|
-
disabled:
|
|
329
|
+
children: i
|
|
330
|
+
}), t[11] = l, t[12] = u, t[13] = i, t[14] = y) : y = t[14];
|
|
331
|
+
let x;
|
|
332
|
+
t[15] !== l || t[16] !== ce ? (x = ce && l && /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-4 w-4 animate-spin" }), t[15] = l, t[16] = ce, t[17] = x) : x = t[17];
|
|
333
|
+
let S = `text-muted-foreground h-4 w-4 transition-transform ${l ? "rotate-180" : ""}`, C;
|
|
334
|
+
t[18] === S ? C = t[19] : (C = /* @__PURE__ */ jsx(ChevronDown, { className: S }), t[18] = S, t[19] = C);
|
|
335
|
+
let w;
|
|
336
|
+
t[20] !== x || t[21] !== C || t[22] !== ue || t[23] !== de || t[24] !== h || t[25] !== _ || t[26] !== y ? (w = /* @__PURE__ */ jsxs(CollapsibleTrigger, {
|
|
337
|
+
className: ue,
|
|
338
|
+
disabled: de,
|
|
337
339
|
children: [
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
340
|
+
h,
|
|
341
|
+
_,
|
|
342
|
+
y,
|
|
343
|
+
x,
|
|
344
|
+
C
|
|
343
345
|
]
|
|
344
|
-
}), t[20] =
|
|
345
|
-
let
|
|
346
|
-
t[28] ===
|
|
346
|
+
}), t[20] = x, t[21] = C, t[22] = ue, t[23] = de, t[24] = h, t[25] = _, t[26] = y, t[27] = w) : w = t[27];
|
|
347
|
+
let T;
|
|
348
|
+
t[28] === f ? T = t[29] : (T = /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
347
349
|
className: "px-3 pb-3 pl-13",
|
|
348
|
-
children:
|
|
349
|
-
}), t[28] =
|
|
350
|
-
let
|
|
351
|
-
return t[30] !==
|
|
352
|
-
open:
|
|
353
|
-
onOpenChange:
|
|
354
|
-
children: [
|
|
355
|
-
}), t[30] =
|
|
350
|
+
children: f
|
|
351
|
+
}), t[28] = f, t[29] = T);
|
|
352
|
+
let pe;
|
|
353
|
+
return t[30] !== l || t[31] !== p || t[32] !== w || t[33] !== T ? (pe = /* @__PURE__ */ jsxs(Collapsible, {
|
|
354
|
+
open: l,
|
|
355
|
+
onOpenChange: p,
|
|
356
|
+
children: [w, T]
|
|
357
|
+
}), t[30] = l, t[31] = p, t[32] = w, t[33] = T, t[34] = pe) : pe = t[34], pe;
|
|
356
358
|
}
|
|
357
359
|
export { NewRunDialog };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useWorkspace } from "../../../hooks/
|
|
1
|
+
import { useWorkspace } from "../../../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../../../hooks/useWorkspaces.js";
|
|
2
3
|
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
3
4
|
import { SidebarPanel } from "./SidebarPanel.js";
|
|
4
5
|
import ExecutionTimeline_default from "../../workspaces/components/ExecutionTimeline.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useWorkflowConfigByName } from "../../../hooks/useWorkflows.js";
|
|
2
1
|
import { WorkflowState } from "../../../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
3
2
|
import "../../../packages/contracts/dist/enums/index.js";
|
|
3
|
+
import { useWorkflowConfigByName } from "../../../hooks/useWorkflows.js";
|
|
4
4
|
import UiActions_default from "../../../components/ui-widgets/UiActions.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import React from "react";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useWorkflowCheckpoints } from "../../../hooks/
|
|
1
|
+
import { useWorkflowCheckpoints } from "../../../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../../../hooks/useWorkflows.js";
|
|
2
3
|
import { cn } from "../../../lib/utils.js";
|
|
3
4
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
4
5
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { useWorkflow } from "../../../../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import { useCreateWorkflow, useRunWorkflow } from "../../../../packages/react/dist/hooks/mutations.js";
|
|
3
|
+
import "../../../../hooks/useWorkflows.js";
|
|
1
4
|
import { useStudio } from "../../../../providers/StudioProvider.js";
|
|
2
|
-
import { useCreateWorkflow, useWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
3
5
|
import { Button } from "../../../../components/ui/button.js";
|
|
4
6
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../../../../components/ui/alert-dialog.js";
|
|
5
7
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../components/ui/tooltip.js";
|
|
6
|
-
import
|
|
8
|
+
import "../../../../hooks/useProcessor.js";
|
|
7
9
|
import { c } from "react/compiler-runtime";
|
|
8
10
|
import React from "react";
|
|
9
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -11,18 +13,14 @@ import { LockOpen, Repeat } from "lucide-react";
|
|
|
11
13
|
var WorkflowButtons_default = (T) => {
|
|
12
14
|
let E = c(34), { workflow: D, workflowId: O } = T, { router: k } = useStudio(), A = useWorkflow(O).data, j = useCreateWorkflow(), M = useRunWorkflow(), N = j.isPending || M.isPending, P;
|
|
13
15
|
E[0] !== j || E[1] !== k || E[2] !== M || E[3] !== D.args || E[4] !== D.workflowName || E[5] !== D.workspaceId ? (P = () => {
|
|
14
|
-
j.mutate({
|
|
16
|
+
j.mutate({
|
|
15
17
|
workflowName: D.workflowName,
|
|
16
18
|
title: null,
|
|
17
19
|
workspaceId: D.workspaceId,
|
|
18
20
|
transition: null,
|
|
19
21
|
args: D.args ?? {}
|
|
20
|
-
}
|
|
21
|
-
M.mutate({
|
|
22
|
-
workflowId: t.id,
|
|
23
|
-
runWorkflowPayloadDto: {},
|
|
24
|
-
force: !0
|
|
25
|
-
}, { onSuccess: () => {
|
|
22
|
+
}, { onSuccess: (t) => {
|
|
23
|
+
M.mutate({ workflowId: t.id }, { onSuccess: () => {
|
|
26
24
|
k.navigateToWorkflow(t.id);
|
|
27
25
|
} });
|
|
28
26
|
} });
|
|
@@ -31,11 +29,7 @@ var WorkflowButtons_default = (T) => {
|
|
|
31
29
|
E[7] !== M || E[8] !== D.id || E[9] !== O ? (I = () => {
|
|
32
30
|
M.mutate({
|
|
33
31
|
workflowId: D.id,
|
|
34
|
-
|
|
35
|
-
name: "unlock",
|
|
36
|
-
workflowId: O
|
|
37
|
-
} },
|
|
38
|
-
force: !1
|
|
32
|
+
payload: { transition: { workflowId: O } }
|
|
39
33
|
});
|
|
40
34
|
}, E[7] = M, E[8] = D.id, E[9] = O, E[10] = I) : I = E[10];
|
|
41
35
|
let L = I;
|