@loopstack/loopstack-studio 0.23.1 → 0.25.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/config.js +3 -3
- package/dist/api/index.js +10 -12
- package/dist/api/processor.js +1 -1
- package/dist/api/secrets.js +16 -0
- package/dist/api/workflows.js +7 -1
- package/dist/components/dynamic-form/ArrayController.js +68 -64
- package/dist/components/dynamic-form/CodeContent.js +3 -3
- package/dist/components/dynamic-form/Form.js +46 -40
- package/dist/components/dynamic-form/FormElement.js +1 -1
- package/dist/components/dynamic-form/FormElementHeader.js +2 -2
- package/dist/components/dynamic-form/ObjectController.js +24 -21
- package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +1 -1
- package/dist/components/dynamic-form/fields/CodeViewField.js +36 -36
- package/dist/components/dynamic-form/fields/InputField.js +20 -19
- package/dist/components/dynamic-form/fields/RadioField.js +18 -18
- package/dist/components/dynamic-form/fields/SelectField.js +19 -19
- package/dist/components/dynamic-form/fields/TextareaField.js +17 -17
- package/dist/components/feedback/LoadingCentered.js +1 -1
- package/dist/components/layout/MainLayout.js +18 -31
- package/dist/components/layout/StudioSidebar.js +169 -109
- package/dist/components/loopstack-elements/link.js +77 -76
- package/dist/components/loopstack-elements/tool.js +171 -0
- package/dist/components/page/PageBreadcrumbs.js +79 -32
- package/dist/components/ui-widgets/UiActions.js +10 -4
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +8 -6
- package/dist/components/ui-widgets/widgets/SubmitButton.js +8 -6
- package/dist/features/code-explorer/components/FileContentViewer.js +92 -100
- package/dist/features/dashboard/RunItem.js +1 -1
- package/dist/features/debug/components/ConfigFlowViewer.js +2 -2
- package/dist/features/debug/components/{PipelineDebugHeader.js → WorkflowDebugHeader.js} +5 -5
- package/dist/features/debug/components/{PipelineDebugLegend.js → WorkflowDebugLegend.js} +2 -2
- package/dist/features/debug/components/{PipelineFlowViewer.js → WorkflowFlowViewer.js} +9 -9
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +46 -0
- package/dist/features/debug/index.js +2 -2
- package/dist/features/debug/lib/flow-utils.js +142 -150
- package/dist/features/documents/DocumentRenderer.js +66 -30
- package/dist/features/documents/components/DocumentItem.js +2 -2
- package/dist/features/documents/components/DocumentList.js +18 -11
- package/dist/features/documents/document-details/DocumentDetails.js +4 -4
- package/dist/features/documents/renderers/AiMessage.js +12 -12
- package/dist/features/documents/renderers/ChoicesRenderer.js +92 -0
- package/dist/features/documents/renderers/ClaudeMessage.js +1 -1
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +56 -0
- package/dist/features/documents/renderers/DocumentFormRenderer.js +95 -65
- package/dist/features/documents/renderers/LinkMessageRenderer.js +8 -10
- package/dist/features/documents/renderers/SecretInputRenderer.js +87 -0
- package/dist/features/documents/renderers/TextPromptRenderer.js +57 -0
- package/dist/features/documents/renderers/useDocumentTransition.js +30 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +20 -20
- package/dist/features/runs/Runs.js +8 -8
- package/dist/features/workbench/Workbench.js +35 -35
- package/dist/features/workbench/WorkflowItem.js +10 -9
- package/dist/features/workbench/WorkflowList.js +56 -73
- package/dist/features/workbench/components/NewRunDialog.js +18 -18
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +33 -26
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +13 -44
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +27 -29
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +17 -17
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +2 -2
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +182 -0
- package/dist/features/workbench/components/WorkbenchSettingsModal.js +16 -41
- package/dist/features/workbench/components/WorkflowForms.js +14 -13
- package/dist/features/workbench/components/WorkflowHistoryItem.js +60 -81
- package/dist/features/workbench/components/{PipelineHistoryList.js → WorkflowHistoryList.js} +5 -5
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +56 -54
- package/dist/features/workbench/hooks/useWorkflowData.js +10 -10
- package/dist/features/workbench/hooks/useWorkflowListState.js +8 -45
- package/dist/features/workbench/index.js +2 -3
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +132 -117
- package/dist/features/workbench/providers/ScrollProvider.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +4 -4
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/features/workspaces/components/CreateWorkspace.js +12 -12
- package/dist/features/workspaces/components/ExecutionTimeline.js +22 -21
- package/dist/features/workspaces/components/{NewPipelineRunDialog.js → NewWorkflowRunDialog.js} +6 -6
- package/dist/features/workspaces/components/{PipelineForm.js → WorkflowRunForm.js} +31 -31
- package/dist/features/workspaces/components/WorkspaceHomePage.js +11 -11
- package/dist/features/workspaces/components/{pipeline-form → workflow-form}/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/{pipeline-form → workflow-form}/SelectionView.js +16 -16
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/query-keys.js +34 -68
- package/dist/hooks/useConfig.js +5 -5
- package/dist/hooks/useProcessor.js +5 -5
- package/dist/hooks/useSecrets.js +69 -0
- package/dist/hooks/useWorkflows.js +155 -68
- package/dist/index.d.ts +158 -116
- package/dist/index.js +5 -5
- package/dist/packages/contracts/dist/enums/index.js +11 -12
- package/dist/packages/contracts/dist/enums/workflow-state.enum.js +1 -1
- package/dist/pages/DashboardPage.js +87 -35
- package/dist/pages/DebugWorkflowDetailsPage.js +8 -8
- package/dist/pages/DebugWorkflowsPage.js +10 -10
- package/dist/pages/EmbedWorkbenchPage.js +39 -45
- package/dist/pages/PreviewWorkbenchPage.js +130 -255
- package/dist/pages/RunsListPage.js +1 -1
- package/dist/pages/StudioLandingPage.js +13 -13
- package/dist/pages/WorkbenchPage.js +6 -6
- package/dist/pages/WorkflowDebugPage.js +114 -0
- package/dist/pages/WorkspacePage.js +4 -2
- package/dist/providers/InvalidationEventsProvider.js +19 -19
- package/dist/providers/SseProvider.js +0 -1
- package/dist/routing/LocalRouter.js +14 -17
- package/dist/types/ai.types.js +13 -0
- package/package.json +2 -3
- package/dist/api/namespaces.js +0 -7
- package/dist/api/pipelines.js +0 -13
- package/dist/components/ai-elements/tool.js +0 -158
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +0 -41
- package/dist/features/workbench/NavigationItems.js +0 -52
- package/dist/features/workbench/WorkbenchNavigation.js +0 -38
- package/dist/features/workbench/components/NavigationItem.js +0 -68
- package/dist/features/workbench/hooks/useIntersectionObserver.js +0 -44
- package/dist/hooks/useNamespaceTree.js +0 -27
- package/dist/hooks/useNamespaces.js +0 -25
- package/dist/hooks/usePipelines.js +0 -161
- package/dist/node_modules/@ai-sdk/provider/dist/index.js +0 -65
- package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -1008
- package/dist/node_modules/ai/dist/index.js +0 -1083
- package/dist/node_modules/zod/v3/ZodError.js +0 -79
- package/dist/node_modules/zod/v3/errors.js +0 -6
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -5
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -90
- package/dist/node_modules/zod/v3/helpers/util.js +0 -72
- package/dist/node_modules/zod/v3/locales/en.js +0 -58
- package/dist/node_modules/zod/v3/types.js +0 -2425
- package/dist/node_modules/zod/v4/classic/errors.js +0 -21
- package/dist/node_modules/zod/v4/classic/iso.js +0 -29
- package/dist/node_modules/zod/v4/classic/parse.js +0 -4
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -392
- package/dist/node_modules/zod/v4/core/api.js +0 -532
- package/dist/node_modules/zod/v4/core/checks.js +0 -283
- package/dist/node_modules/zod/v4/core/core.js +0 -44
- package/dist/node_modules/zod/v4/core/doc.js +0 -21
- package/dist/node_modules/zod/v4/core/errors.js +0 -40
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -305
- package/dist/node_modules/zod/v4/core/parse.js +0 -66
- package/dist/node_modules/zod/v4/core/regexes.js +0 -28
- package/dist/node_modules/zod/v4/core/registries.js +0 -38
- package/dist/node_modules/zod/v4/core/schemas.js +0 -863
- package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -220
- package/dist/node_modules/zod/v4/core/util.js +0 -267
- package/dist/node_modules/zod/v4/core/versions.js +0 -6
- package/dist/packages/contracts/dist/enums/pipeline-state.js +0 -10
- package/dist/pages/PipelineDebugPage.js +0 -115
- /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/StateNode.js +0 -0
- /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/WorkflowTransitionEdge.js +0 -0
- /package/dist/features/workspaces/components/{pipeline-form → workflow-form}/HeaderSection.js +0 -0
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { useStudio } from "../../providers/StudioProvider.js";
|
|
2
|
-
import { Skeleton } from "../../components/ui/skeleton.js";
|
|
3
|
-
import { SidebarMenuSubItem } from "../../components/ui/sidebar.js";
|
|
4
|
-
import { useFetchWorkflowsByNamespace } from "../../hooks/useWorkflows.js";
|
|
5
|
-
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
6
|
-
import NavigationItem_default from "./components/NavigationItem.js";
|
|
7
|
-
import { useScroll } from "./providers/ScrollProvider.js";
|
|
8
|
-
import { c } from "react/compiler-runtime";
|
|
9
|
-
import React from "react";
|
|
10
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { useParams } from "react-router-dom";
|
|
12
|
-
var NavigationItems_default = (p) => {
|
|
13
|
-
let m = c(17), { namespace: h } = p, { router: g } = useStudio(), { pipelineId: _, clickId: v } = useParams(), { activeSectionId: y } = useWorkbenchLayout(), b = useFetchWorkflowsByNamespace(h.id), { setScrollTo: x } = useScroll(), S;
|
|
14
|
-
m[0] !== v || m[1] !== _ || m[2] !== g || m[3] !== x ? (S = (e) => {
|
|
15
|
-
x(!0), _ && g.navigateToWorkflow(_, e, v);
|
|
16
|
-
}, m[0] = v, m[1] = _, m[2] = g, m[3] = x, m[4] = S) : S = m[4];
|
|
17
|
-
let C = S;
|
|
18
|
-
if (b.isPending) {
|
|
19
|
-
let e;
|
|
20
|
-
m[5] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
|
|
21
|
-
className: "flex items-center gap-2 p-2",
|
|
22
|
-
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" })]
|
|
23
|
-
}) }), m[5] = e) : e = m[5];
|
|
24
|
-
let d;
|
|
25
|
-
m[6] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
|
|
26
|
-
className: "flex items-center gap-2 p-2",
|
|
27
|
-
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" })]
|
|
28
|
-
}) }), m[6] = d) : d = m[6];
|
|
29
|
-
let f;
|
|
30
|
-
return m[7] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
31
|
-
e,
|
|
32
|
-
d,
|
|
33
|
-
/* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
|
|
34
|
-
className: "flex items-center gap-2 p-2",
|
|
35
|
-
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" })]
|
|
36
|
-
}) })
|
|
37
|
-
] }), m[7] = f) : f = m[7], f;
|
|
38
|
-
}
|
|
39
|
-
if (!_ || !b.data?.length) return null;
|
|
40
|
-
let w;
|
|
41
|
-
if (m[8] !== y || m[9] !== b.data || m[10] !== C) {
|
|
42
|
-
let e;
|
|
43
|
-
m[12] !== y || m[13] !== C ? (e = (e) => /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx(NavigationItem_default, {
|
|
44
|
-
workflow: e,
|
|
45
|
-
isSelected: y?.endsWith(e.id) ?? !1,
|
|
46
|
-
navigateTo: C
|
|
47
|
-
}) }, `wf-${e.id}`), m[12] = y, m[13] = C, m[14] = e) : e = m[14], w = b.data.map(e), m[8] = y, m[9] = b.data, m[10] = C, m[11] = w;
|
|
48
|
-
} else w = m[11];
|
|
49
|
-
let T;
|
|
50
|
-
return m[15] === w ? T = m[16] : (T = /* @__PURE__ */ jsx(Fragment$1, { children: w }), m[15] = w, m[16] = T), T;
|
|
51
|
-
};
|
|
52
|
-
export { NavigationItems_default as default };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { SidebarMenuDiv, SidebarMenuItem, SidebarMenuSub } from "../../components/ui/sidebar.js";
|
|
2
|
-
import NavigationItems_default from "./NavigationItems.js";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { RectangleHorizontal } from "lucide-react";
|
|
7
|
-
var WorkbenchNavigation_default = (d) => {
|
|
8
|
-
let f = c(6), { namespaceTree: p, indent: m } = d, h, g;
|
|
9
|
-
if (f[0] !== m || f[1] !== p) {
|
|
10
|
-
g = Symbol.for("react.early_return_sentinel");
|
|
11
|
-
bb0: {
|
|
12
|
-
let l = (u, d) => /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsxs(SidebarMenuItem, { children: [/* @__PURE__ */ jsx(SidebarMenuDiv, {
|
|
13
|
-
className: "hover:bg-accent-sidebar-foreground w-full justify-between",
|
|
14
|
-
style: { paddingLeft: `${d * 16 + 8}px` },
|
|
15
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
16
|
-
className: "flex min-w-0 items-center gap-2",
|
|
17
|
-
children: [/* @__PURE__ */ jsx(RectangleHorizontal, { className: "h-4 w-4 flex-shrink-0 text-gray-500" }), /* @__PURE__ */ jsx("span", {
|
|
18
|
-
className: "truncate",
|
|
19
|
-
children: u.name
|
|
20
|
-
})]
|
|
21
|
-
})
|
|
22
|
-
}), /* @__PURE__ */ jsx(SidebarMenuSub, {
|
|
23
|
-
style: { marginLeft: `${d * 16 + 8}px` },
|
|
24
|
-
children: /* @__PURE__ */ jsx(NavigationItems_default, { namespace: u })
|
|
25
|
-
})] }), u.childNodes?.map((e) => l(e, d + 1))] }, u.id);
|
|
26
|
-
if (!p || p.length === 0) {
|
|
27
|
-
g = null;
|
|
28
|
-
break bb0;
|
|
29
|
-
}
|
|
30
|
-
h = p.map((e) => l(e, m));
|
|
31
|
-
}
|
|
32
|
-
f[0] = m, f[1] = p, f[2] = h, f[3] = g;
|
|
33
|
-
} else h = f[2], g = f[3];
|
|
34
|
-
if (g !== Symbol.for("react.early_return_sentinel")) return g;
|
|
35
|
-
let _;
|
|
36
|
-
return f[4] === h ? _ = f[5] : (_ = /* @__PURE__ */ jsx(Fragment$1, { children: h }), f[4] = h, f[5] = _), _;
|
|
37
|
-
};
|
|
38
|
-
export { WorkbenchNavigation_default as default };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { CheckCircle, File, Play } from "lucide-react";
|
|
6
|
-
var NavigationItem_default = (s) => {
|
|
7
|
-
let l = c(25), { workflow: u, isSelected: d, navigateTo: f } = s, p = u.place === "end", m = !p && (u.progress ?? 0) > 0, h;
|
|
8
|
-
l[0] !== p || l[1] !== m ? (h = () => p ? /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4 flex-shrink-0 text-green-500" }) : m ? /* @__PURE__ */ jsx(Play, { className: "h-4 w-4 flex-shrink-0 text-blue-500" }) : /* @__PURE__ */ jsx(File, { className: "h-4 w-4 flex-shrink-0 text-gray-500" }), l[0] = p, l[1] = m, l[2] = h) : h = l[2];
|
|
9
|
-
let g = h, _;
|
|
10
|
-
l[3] !== p || l[4] !== u.progress ? (_ = () => !p && (u.progress ?? 0) > 0 ? /* @__PURE__ */ jsx("div", {
|
|
11
|
-
className: "ml-auto",
|
|
12
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
13
|
-
className: "relative h-4 w-4",
|
|
14
|
-
children: /* @__PURE__ */ jsxs("svg", {
|
|
15
|
-
className: "h-4 w-4 -rotate-90 transform",
|
|
16
|
-
viewBox: "0 0 32 32",
|
|
17
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
18
|
-
cx: "16",
|
|
19
|
-
cy: "16",
|
|
20
|
-
r: "12",
|
|
21
|
-
stroke: "currentColor",
|
|
22
|
-
strokeWidth: "3",
|
|
23
|
-
fill: "none",
|
|
24
|
-
className: "text-gray-300"
|
|
25
|
-
}), /* @__PURE__ */ jsx("circle", {
|
|
26
|
-
cx: "16",
|
|
27
|
-
cy: "16",
|
|
28
|
-
r: "12",
|
|
29
|
-
stroke: "currentColor",
|
|
30
|
-
strokeWidth: "3",
|
|
31
|
-
fill: "none",
|
|
32
|
-
strokeDasharray: `${(u.progress ?? 0) * .75} 75`,
|
|
33
|
-
className: "text-blue-500"
|
|
34
|
-
})]
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
}) : null, l[3] = p, l[4] = u.progress, l[5] = _) : _ = l[5];
|
|
38
|
-
let v = _, y;
|
|
39
|
-
l[6] !== f || l[7] !== u.id ? (y = (r) => {
|
|
40
|
-
r.preventDefault(), r.stopPropagation(), f(u.id);
|
|
41
|
-
}, l[6] = f, l[7] = u.id, l[8] = y) : y = l[8];
|
|
42
|
-
let b = y, x;
|
|
43
|
-
l[9] === d ? x = l[10] : (x = cn("hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-sidebar-ring flex w-full cursor-pointer items-center justify-between rounded-md p-2 text-left text-sm outline-hidden transition-colors focus-visible:ring-2", { "bg-sidebar-accent text-sidebar-accent-foreground font-medium": d }), l[9] = d, l[10] = x);
|
|
44
|
-
let S;
|
|
45
|
-
l[11] === g ? S = l[12] : (S = g(), l[11] = g, l[12] = S);
|
|
46
|
-
let C = u.title ?? u.blockName, w;
|
|
47
|
-
l[13] === C ? w = l[14] : (w = /* @__PURE__ */ jsx("span", {
|
|
48
|
-
className: "truncate text-sm",
|
|
49
|
-
children: C
|
|
50
|
-
}), l[13] = C, l[14] = w);
|
|
51
|
-
let T;
|
|
52
|
-
l[15] !== S || l[16] !== w ? (T = /* @__PURE__ */ jsxs("div", {
|
|
53
|
-
className: "flex min-w-0 items-center gap-2",
|
|
54
|
-
children: [S, w]
|
|
55
|
-
}), l[15] = S, l[16] = w, l[17] = T) : T = l[17];
|
|
56
|
-
let E;
|
|
57
|
-
l[18] === v ? E = l[19] : (E = v(), l[18] = v, l[19] = E);
|
|
58
|
-
let D;
|
|
59
|
-
return l[20] !== b || l[21] !== x || l[22] !== T || l[23] !== E ? (D = /* @__PURE__ */ jsx("div", {
|
|
60
|
-
className: "relative",
|
|
61
|
-
children: /* @__PURE__ */ jsxs("button", {
|
|
62
|
-
onClick: b,
|
|
63
|
-
className: x,
|
|
64
|
-
children: [T, E]
|
|
65
|
-
})
|
|
66
|
-
}), l[20] = b, l[21] = x, l[22] = T, l[23] = E, l[24] = D) : D = l[24], D;
|
|
67
|
-
};
|
|
68
|
-
export { NavigationItem_default as default };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
const useIntersectionObserver = (o) => {
|
|
4
|
-
let l = c(7), u = o === void 0 ? "0px" : o, [d, f] = useState(null), p = useRef(null), m;
|
|
5
|
-
l[0] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ new Map(), l[0] = m) : m = l[0];
|
|
6
|
-
let h = useRef(m), g, _;
|
|
7
|
-
l[1] === u ? (g = l[2], _ = l[3]) : (g = () => {
|
|
8
|
-
let e = h.current;
|
|
9
|
-
return p.current = new IntersectionObserver((o) => {
|
|
10
|
-
o.forEach((o) => {
|
|
11
|
-
o.target.getAttribute("data-id") && (o.isIntersecting ? e.set(o.target, !0) : e.set(o.target, !1));
|
|
12
|
-
});
|
|
13
|
-
let s = Array.from(e.entries()).filter(_temp).map(_temp2).filter(_temp3).sort();
|
|
14
|
-
s.length && f(s[0]);
|
|
15
|
-
}, {
|
|
16
|
-
root: document.querySelector(".list-container"),
|
|
17
|
-
threshold: .05,
|
|
18
|
-
rootMargin: u
|
|
19
|
-
}), () => {
|
|
20
|
-
p.current?.disconnect(), e.clear();
|
|
21
|
-
};
|
|
22
|
-
}, _ = [u], l[1] = u, l[2] = g, l[3] = _), useEffect(g, _);
|
|
23
|
-
let v;
|
|
24
|
-
l[4] === Symbol.for("react.memo_cache_sentinel") ? (v = (e) => {
|
|
25
|
-
e && p.current?.observe(e);
|
|
26
|
-
}, l[4] = v) : v = l[4];
|
|
27
|
-
let y = v, b;
|
|
28
|
-
return l[5] === d ? b = l[6] : (b = {
|
|
29
|
-
activeId: d,
|
|
30
|
-
observe: y
|
|
31
|
-
}, l[5] = d, l[6] = b), b;
|
|
32
|
-
};
|
|
33
|
-
function _temp(e) {
|
|
34
|
-
let [, o] = e;
|
|
35
|
-
return o;
|
|
36
|
-
}
|
|
37
|
-
function _temp2(e) {
|
|
38
|
-
let [o] = e;
|
|
39
|
-
return o.getAttribute("data-id");
|
|
40
|
-
}
|
|
41
|
-
function _temp3(e) {
|
|
42
|
-
return e !== null;
|
|
43
|
-
}
|
|
44
|
-
export { useIntersectionObserver };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useFilterNamespaces } from "./useNamespaces.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
function buildNamespaceTree(e) {
|
|
5
|
-
let t = /* @__PURE__ */ new Map();
|
|
6
|
-
e.forEach((e) => {
|
|
7
|
-
t.set(e.id, {
|
|
8
|
-
...e,
|
|
9
|
-
childNodes: []
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
let n = [];
|
|
13
|
-
return e.forEach((e) => {
|
|
14
|
-
let r = t.get(e.id);
|
|
15
|
-
if (e.parentId) {
|
|
16
|
-
let i = t.get(e.parentId);
|
|
17
|
-
i ? i.childNodes.push(r) : (console.warn(`Parent namespace with ID ${e.parentId} not found for ${e.id}`), n.push(r));
|
|
18
|
-
} else n.push(r);
|
|
19
|
-
}), n;
|
|
20
|
-
}
|
|
21
|
-
function useNamespaceTree(n) {
|
|
22
|
-
let i = c(4), a = useFilterNamespaces(n), o;
|
|
23
|
-
i[0] === a.data ? o = i[1] : (o = a.data ?? [], i[0] = a.data, i[1] = o);
|
|
24
|
-
let s = o, l;
|
|
25
|
-
return i[2] === s ? l = i[3] : (l = s.length ? buildNamespaceTree(s) : [], i[2] = s, i[3] = l), l;
|
|
26
|
-
}
|
|
27
|
-
export { useNamespaceTree };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { getNamespacesByPipelineCacheKey } from "./query-keys.js";
|
|
2
|
-
import { useApiClient } from "./useApi.js";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { useQuery } from "@tanstack/react-query";
|
|
5
|
-
function useFilterNamespaces(a) {
|
|
6
|
-
let o = c(14), { envKey: s, api: l } = useApiClient(), u;
|
|
7
|
-
o[0] === a ? u = o[1] : (u = JSON.stringify({ pipelineId: a }), o[0] = a, o[1] = u);
|
|
8
|
-
let d;
|
|
9
|
-
o[2] === u ? d = o[3] : (d = { filter: u }, o[2] = u, o[3] = d);
|
|
10
|
-
let f = d, p;
|
|
11
|
-
o[4] !== s || o[5] !== a ? (p = getNamespacesByPipelineCacheKey(s, a), o[4] = s, o[5] = a, o[6] = p) : p = o[6];
|
|
12
|
-
let m;
|
|
13
|
-
o[7] !== l || o[8] !== f ? (m = () => l.namespaces.getAll(f), o[7] = l, o[8] = f, o[9] = m) : m = o[9];
|
|
14
|
-
let h = !!a, g;
|
|
15
|
-
return o[10] !== p || o[11] !== m || o[12] !== h ? (g = {
|
|
16
|
-
queryKey: p,
|
|
17
|
-
queryFn: m,
|
|
18
|
-
select: _temp,
|
|
19
|
-
enabled: h
|
|
20
|
-
}, o[10] = p, o[11] = m, o[12] = h, o[13] = g) : g = o[13], useQuery(g);
|
|
21
|
-
}
|
|
22
|
-
function _temp(e) {
|
|
23
|
-
return e.data;
|
|
24
|
-
}
|
|
25
|
-
export { useFilterNamespaces };
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey } from "./query-keys.js";
|
|
2
|
-
import { useApiClient } from "./useApi.js";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
5
|
-
function usePipeline(r) {
|
|
6
|
-
let i = c(10), { envKey: a, api: o } = useApiClient(), s;
|
|
7
|
-
i[0] !== a || i[1] !== r ? (s = getPipelineCacheKey(a, r), i[0] = a, i[1] = r, i[2] = s) : s = i[2];
|
|
8
|
-
let u;
|
|
9
|
-
i[3] !== o || i[4] !== r ? (u = () => o.pipelines.getById({ id: r }), i[3] = o, i[4] = r, i[5] = u) : u = i[5];
|
|
10
|
-
let d = !!r, f;
|
|
11
|
-
return i[6] !== s || i[7] !== u || i[8] !== d ? (f = {
|
|
12
|
-
queryKey: s,
|
|
13
|
-
queryFn: u,
|
|
14
|
-
enabled: d
|
|
15
|
-
}, i[6] = s, i[7] = u, i[8] = d, i[9] = f) : f = i[9], useQuery(f);
|
|
16
|
-
}
|
|
17
|
-
function useFilterPipelines(e, r, i, o, s, u) {
|
|
18
|
-
let d = c(30), f = i === void 0 ? "id" : i, p = o === void 0 ? "DESC" : o, m = s === void 0 ? 0 : s, h = u === void 0 ? 10 : u, { envKey: g, api: _ } = useApiClient(), v = Object.keys(r).length > 0, y;
|
|
19
|
-
d[0] !== r || d[1] !== v ? (y = v ? JSON.stringify(r) : void 0, d[0] = r, d[1] = v, d[2] = y) : y = d[2];
|
|
20
|
-
let b = y, x;
|
|
21
|
-
d[3] === b ? x = d[4] : (x = b && { filter: b }, d[3] = b, d[4] = x);
|
|
22
|
-
let S;
|
|
23
|
-
d[5] !== p || d[6] !== f ? (S = JSON.stringify([{
|
|
24
|
-
field: f,
|
|
25
|
-
order: p
|
|
26
|
-
}]), d[5] = p, d[6] = f, d[7] = S) : S = d[7];
|
|
27
|
-
let C;
|
|
28
|
-
d[8] === e ? C = d[9] : (C = e && {
|
|
29
|
-
search: e,
|
|
30
|
-
searchColumns: JSON.stringify(["title", "model"])
|
|
31
|
-
}, d[8] = e, d[9] = C);
|
|
32
|
-
let w;
|
|
33
|
-
d[10] !== h || d[11] !== m || d[12] !== x || d[13] !== S || d[14] !== C ? (w = {
|
|
34
|
-
...x,
|
|
35
|
-
sortBy: S,
|
|
36
|
-
page: m,
|
|
37
|
-
limit: h,
|
|
38
|
-
...C
|
|
39
|
-
}, d[10] = h, d[11] = m, d[12] = x, d[13] = S, d[14] = C, d[15] = w) : w = d[15];
|
|
40
|
-
let T = w, E;
|
|
41
|
-
d[16] !== g || d[17] !== b || d[18] !== h || d[19] !== p || d[20] !== m || d[21] !== e || d[22] !== f ? (E = [
|
|
42
|
-
...getPipelinesCacheKey(g),
|
|
43
|
-
"list",
|
|
44
|
-
e ?? "",
|
|
45
|
-
b ?? "",
|
|
46
|
-
f,
|
|
47
|
-
p,
|
|
48
|
-
m,
|
|
49
|
-
h
|
|
50
|
-
], d[16] = g, d[17] = b, d[18] = h, d[19] = p, d[20] = m, d[21] = e, d[22] = f, d[23] = E) : E = d[23];
|
|
51
|
-
let D;
|
|
52
|
-
d[24] !== _ || d[25] !== T ? (D = () => _.pipelines.getAll(T), d[24] = _, d[25] = T, d[26] = D) : D = d[26];
|
|
53
|
-
let O;
|
|
54
|
-
return d[27] !== D || d[28] !== E ? (O = {
|
|
55
|
-
queryKey: E,
|
|
56
|
-
queryFn: D
|
|
57
|
-
}, d[27] = D, d[28] = E, d[29] = O) : O = d[29], useQuery(O);
|
|
58
|
-
}
|
|
59
|
-
function useCreatePipeline() {
|
|
60
|
-
let e = c(8), { envKey: r, api: i } = useApiClient(), o = useQueryClient(), l;
|
|
61
|
-
e[0] === i ? l = e[1] : (l = (e) => i.pipelines.create(e), e[0] = i, e[1] = l);
|
|
62
|
-
let d;
|
|
63
|
-
e[2] !== r || e[3] !== o ? (d = () => {
|
|
64
|
-
o.invalidateQueries({ queryKey: getPipelinesCacheKey(r) });
|
|
65
|
-
}, e[2] = r, e[3] = o, e[4] = d) : d = e[4];
|
|
66
|
-
let f;
|
|
67
|
-
return e[5] !== l || e[6] !== d ? (f = {
|
|
68
|
-
mutationFn: l,
|
|
69
|
-
onSuccess: d
|
|
70
|
-
}, e[5] = l, e[6] = d, e[7] = f) : f = e[7], useMutation(f);
|
|
71
|
-
}
|
|
72
|
-
function useUpdatePipeline() {
|
|
73
|
-
let r = c(8), { envKey: i, api: o } = useApiClient(), l = useQueryClient(), d;
|
|
74
|
-
r[0] === o ? d = r[1] : (d = (e) => o.pipelines.update(e), r[0] = o, r[1] = d);
|
|
75
|
-
let f;
|
|
76
|
-
r[2] !== i || r[3] !== l ? (f = (r, o) => {
|
|
77
|
-
l.invalidateQueries({ queryKey: getPipelineCacheKey(i, o.id) }), l.invalidateQueries({ queryKey: getPipelinesCacheKey(i) });
|
|
78
|
-
}, r[2] = i, r[3] = l, r[4] = f) : f = r[4];
|
|
79
|
-
let p;
|
|
80
|
-
return r[5] !== d || r[6] !== f ? (p = {
|
|
81
|
-
mutationFn: d,
|
|
82
|
-
onSuccess: f
|
|
83
|
-
}, r[5] = d, r[6] = f, r[7] = p) : p = r[7], useMutation(p);
|
|
84
|
-
}
|
|
85
|
-
function usePipelineConfigByName(e, i) {
|
|
86
|
-
let a = c(12), { envKey: o, api: s } = useApiClient(), u;
|
|
87
|
-
a[0] !== o || a[1] !== i || a[2] !== e ? (u = getPipelineConfigCacheKey(o, e, i), a[0] = o, a[1] = i, a[2] = e, a[3] = u) : u = a[3];
|
|
88
|
-
let d;
|
|
89
|
-
a[4] !== s || a[5] !== i || a[6] !== e ? (d = () => s.config.getPipelineConfigByName({
|
|
90
|
-
workspaceBlockName: e,
|
|
91
|
-
pipelineName: i
|
|
92
|
-
}), a[4] = s, a[5] = i, a[6] = e, a[7] = d) : d = a[7];
|
|
93
|
-
let f = !!e && !!i, p;
|
|
94
|
-
return a[8] !== u || a[9] !== d || a[10] !== f ? (p = {
|
|
95
|
-
queryKey: u,
|
|
96
|
-
queryFn: d,
|
|
97
|
-
enabled: f
|
|
98
|
-
}, a[8] = u, a[9] = d, a[10] = f, a[11] = p) : p = a[11], useQuery(p);
|
|
99
|
-
}
|
|
100
|
-
function useDeletePipeline() {
|
|
101
|
-
let r = c(8), { envKey: i, api: o } = useApiClient(), l = useQueryClient(), d;
|
|
102
|
-
r[0] === o ? d = r[1] : (d = (e) => o.pipelines.delete({ id: e }), r[0] = o, r[1] = d);
|
|
103
|
-
let f;
|
|
104
|
-
r[2] !== i || r[3] !== l ? (f = (r, o) => {
|
|
105
|
-
l.removeQueries({ queryKey: getPipelineCacheKey(i, o) }), l.invalidateQueries({ queryKey: getPipelinesCacheKey(i) });
|
|
106
|
-
}, r[2] = i, r[3] = l, r[4] = f) : f = r[4];
|
|
107
|
-
let p;
|
|
108
|
-
return r[5] !== d || r[6] !== f ? (p = {
|
|
109
|
-
mutationFn: d,
|
|
110
|
-
onSuccess: f
|
|
111
|
-
}, r[5] = d, r[6] = f, r[7] = p) : p = r[7], useMutation(p);
|
|
112
|
-
}
|
|
113
|
-
function useBatchDeletePipeline() {
|
|
114
|
-
let e = c(8), { envKey: r, api: i } = useApiClient(), o = useQueryClient(), l;
|
|
115
|
-
e[0] === i ? l = e[1] : (l = (e) => i.pipelines.batchDelete({ ids: e }), e[0] = i, e[1] = l);
|
|
116
|
-
let d;
|
|
117
|
-
e[2] !== r || e[3] !== o ? (d = () => {
|
|
118
|
-
o.invalidateQueries({ queryKey: getPipelinesCacheKey(r) });
|
|
119
|
-
}, e[2] = r, e[3] = o, e[4] = d) : d = e[4];
|
|
120
|
-
let f;
|
|
121
|
-
return e[5] !== l || e[6] !== d ? (f = {
|
|
122
|
-
mutationFn: l,
|
|
123
|
-
onSuccess: d
|
|
124
|
-
}, e[5] = l, e[6] = d, e[7] = f) : f = e[7], useMutation(f);
|
|
125
|
-
}
|
|
126
|
-
function useChildPipelines(e, r) {
|
|
127
|
-
let i = c(10), { envKey: a, api: s } = useApiClient(), u;
|
|
128
|
-
i[0] !== a || i[1] !== e ? (u = getPipelinesChildrenCacheKey(a, e), i[0] = a, i[1] = e, i[2] = u) : u = i[2];
|
|
129
|
-
let d;
|
|
130
|
-
i[3] !== s || i[4] !== e ? (d = () => s.pipelines.getAll({
|
|
131
|
-
filter: JSON.stringify({ parentId: e }),
|
|
132
|
-
sortBy: JSON.stringify([{
|
|
133
|
-
field: "createdAt",
|
|
134
|
-
order: "ASC"
|
|
135
|
-
}]),
|
|
136
|
-
page: 0,
|
|
137
|
-
limit: 100
|
|
138
|
-
}), i[3] = s, i[4] = e, i[5] = d) : d = i[5];
|
|
139
|
-
let f = r && !!e, p;
|
|
140
|
-
return i[6] !== u || i[7] !== d || i[8] !== f ? (p = {
|
|
141
|
-
queryKey: u,
|
|
142
|
-
queryFn: d,
|
|
143
|
-
enabled: f
|
|
144
|
-
}, i[6] = u, i[7] = d, i[8] = f, i[9] = p) : p = i[9], useQuery(p);
|
|
145
|
-
}
|
|
146
|
-
function usePipelineSource(e, r) {
|
|
147
|
-
let a = c(12), { envKey: o, api: s } = useApiClient(), u;
|
|
148
|
-
a[0] !== o || a[1] !== r || a[2] !== e ? (u = getPipelineSourceCacheKey(o, e, r), a[0] = o, a[1] = r, a[2] = e, a[3] = u) : u = a[3];
|
|
149
|
-
let d;
|
|
150
|
-
a[4] !== s || a[5] !== r || a[6] !== e ? (d = () => s.config.getPipelineSourceByName({
|
|
151
|
-
workspaceBlockName: e,
|
|
152
|
-
pipelineName: r
|
|
153
|
-
}), a[4] = s, a[5] = r, a[6] = e, a[7] = d) : d = a[7];
|
|
154
|
-
let f = !!e && !!r, p;
|
|
155
|
-
return a[8] !== u || a[9] !== d || a[10] !== f ? (p = {
|
|
156
|
-
queryKey: u,
|
|
157
|
-
queryFn: d,
|
|
158
|
-
enabled: f
|
|
159
|
-
}, a[8] = u, a[9] = d, a[10] = f, a[11] = p) : p = a[11], useQuery(p);
|
|
160
|
-
}
|
|
161
|
-
export { useBatchDeletePipeline, useChildPipelines, useCreatePipeline, useDeletePipeline, useFilterPipelines, usePipeline, usePipelineConfigByName, usePipelineSource, useUpdatePipeline };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var marker = "vercel.ai.error", symbol = Symbol.for(marker), _a, _b, AISDKError = class C extends (_b = Error, _a = symbol, _b) {
|
|
2
|
-
constructor({ name: e, message: b, cause: S }) {
|
|
3
|
-
super(b), this[_a] = !0, this.name = e, this.cause = S;
|
|
4
|
-
}
|
|
5
|
-
static isInstance(b) {
|
|
6
|
-
return C.hasMarker(b, marker);
|
|
7
|
-
}
|
|
8
|
-
static hasMarker(e, b) {
|
|
9
|
-
let x = Symbol.for(b);
|
|
10
|
-
return typeof e == "object" && !!e && x in e && typeof e[x] == "boolean" && e[x] === !0;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
function getErrorMessage(e) {
|
|
14
|
-
return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
|
|
15
|
-
}
|
|
16
|
-
var name3 = "AI_InvalidArgumentError", marker4 = `vercel.ai.error.${name3}`, symbol4 = Symbol.for(marker4), _a4, _b4, InvalidArgumentError = class extends (_b4 = AISDKError, _a4 = symbol4, _b4) {
|
|
17
|
-
constructor({ message: e, cause: b, argument: x }) {
|
|
18
|
-
super({
|
|
19
|
-
name: name3,
|
|
20
|
-
message: e,
|
|
21
|
-
cause: b
|
|
22
|
-
}), this[_a4] = !0, this.argument = x;
|
|
23
|
-
}
|
|
24
|
-
static isInstance(e) {
|
|
25
|
-
return AISDKError.hasMarker(e, marker4);
|
|
26
|
-
}
|
|
27
|
-
}, name6 = "AI_JSONParseError", marker7 = `vercel.ai.error.${name6}`, symbol7 = Symbol.for(marker7), _a7, _b7, JSONParseError = class extends (_b7 = AISDKError, _a7 = symbol7, _b7) {
|
|
28
|
-
constructor({ text: e, cause: b }) {
|
|
29
|
-
super({
|
|
30
|
-
name: name6,
|
|
31
|
-
message: `JSON parsing failed: Text: ${e}.
|
|
32
|
-
Error message: ${getErrorMessage(b)}`,
|
|
33
|
-
cause: b
|
|
34
|
-
}), this[_a7] = !0, this.text = e;
|
|
35
|
-
}
|
|
36
|
-
static isInstance(e) {
|
|
37
|
-
return AISDKError.hasMarker(e, marker7);
|
|
38
|
-
}
|
|
39
|
-
}, name12 = "AI_TypeValidationError", marker13 = `vercel.ai.error.${name12}`, symbol13 = Symbol.for(marker13), _a13, _b13, TypeValidationError = class e extends (_b13 = AISDKError, _a13 = symbol13, _b13) {
|
|
40
|
-
constructor({ value: e, cause: b, context: x }) {
|
|
41
|
-
let S = "Type validation failed";
|
|
42
|
-
if (x?.field && (S += ` for ${x.field}`), x?.entityName || x?.entityId) {
|
|
43
|
-
S += " (";
|
|
44
|
-
let e = [];
|
|
45
|
-
x.entityName && e.push(x.entityName), x.entityId && e.push(`id: "${x.entityId}"`), S += e.join(", "), S += ")";
|
|
46
|
-
}
|
|
47
|
-
super({
|
|
48
|
-
name: name12,
|
|
49
|
-
message: `${S}: Value: ${JSON.stringify(e)}.
|
|
50
|
-
Error message: ${getErrorMessage(b)}`,
|
|
51
|
-
cause: b
|
|
52
|
-
}), this[_a13] = !0, this.value = e, this.context = x;
|
|
53
|
-
}
|
|
54
|
-
static isInstance(e) {
|
|
55
|
-
return AISDKError.hasMarker(e, marker13);
|
|
56
|
-
}
|
|
57
|
-
static wrap({ value: b, cause: x, context: S }) {
|
|
58
|
-
return e.isInstance(x) && x.value === b && x.context?.field === S?.field && x.context?.entityName === S?.entityName && x.context?.entityId === S?.entityId ? x : new e({
|
|
59
|
-
value: b,
|
|
60
|
-
cause: x,
|
|
61
|
-
context: S
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
export { AISDKError, InvalidArgumentError, JSONParseError, TypeValidationError };
|