@loopstack/loopstack-studio 0.24.0 → 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 +9 -13
- package/dist/api/processor.js +1 -1
- package/dist/api/workflows.js +7 -1
- package/dist/components/dynamic-form/CodeContent.js +3 -3
- package/dist/components/dynamic-form/fields/CodeViewField.js +36 -36
- package/dist/components/feedback/LoadingCentered.js +1 -1
- package/dist/components/layout/StudioSidebar.js +2 -2
- package/dist/components/loopstack-elements/link.js +77 -76
- package/dist/components/loopstack-elements/tool.js +171 -0
- package/dist/components/ui-widgets/UiActions.js +10 -4
- package/dist/components/ui-widgets/UiWidget.js +27 -36
- 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 +87 -112
- 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 +15 -12
- package/dist/features/documents/document-details/DocumentDetails.js +4 -4
- package/dist/features/documents/renderers/AiMessage.js +1 -1
- 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 -71
- 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 +1 -1
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +33 -72
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +27 -29
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +30 -42
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +2 -2
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +1 -1
- 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/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 +31 -72
- package/dist/hooks/useConfig.js +5 -5
- package/dist/hooks/useProcessor.js +5 -5
- package/dist/hooks/useWorkflows.js +155 -68
- package/dist/index.d.ts +127 -128
- 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/DebugWorkflowDetailsPage.js +8 -8
- package/dist/pages/DebugWorkflowsPage.js +10 -10
- package/dist/pages/EmbedWorkbenchPage.js +42 -52
- 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/package.json +2 -2
- 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/components/ui-widgets/widgets/SecretInput.js +0 -42
- 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/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,96 +1,57 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.js";
|
|
2
|
-
import { SidebarMenu, SidebarProvider } from "../../../components/ui/sidebar.js";
|
|
3
2
|
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
|
-
import { useNamespaceTree } from "../../../hooks/useNamespaceTree.js";
|
|
5
|
-
import WorkbenchNavigation_default from "../WorkbenchNavigation.js";
|
|
6
|
-
import PipelineHistoryList_default from "./PipelineHistoryList.js";
|
|
7
3
|
import { WorkbenchSecretsPanel } from "./WorkbenchSecretsPanel.js";
|
|
4
|
+
import WorkflowHistoryList_default from "./WorkflowHistoryList.js";
|
|
8
5
|
import { c } from "react/compiler-runtime";
|
|
9
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
7
|
import { X } from "lucide-react";
|
|
11
8
|
var PANEL_TITLES = {
|
|
12
|
-
navigation: "Navigate",
|
|
13
9
|
history: "Run Log",
|
|
14
10
|
secrets: "Secrets"
|
|
15
11
|
};
|
|
16
|
-
function NavigationContent() {
|
|
17
|
-
let e = c(3), { pipeline: p } = useWorkbenchLayout(), m;
|
|
18
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (m = { "--sidebar-width": "100%" }, e[0] = m) : m = e[0];
|
|
19
|
-
let h;
|
|
20
|
-
return e[1] === p.id ? h = e[2] : (h = /* @__PURE__ */ jsx(SidebarProvider, {
|
|
21
|
-
defaultOpen: !0,
|
|
22
|
-
className: "min-h-0",
|
|
23
|
-
style: m,
|
|
24
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
25
|
-
className: "w-full overflow-auto p-2",
|
|
26
|
-
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(NavigationContentInner, { pipelineId: p.id }) })
|
|
27
|
-
})
|
|
28
|
-
}), e[1] = p.id, e[2] = h), h;
|
|
29
|
-
}
|
|
30
|
-
function NavigationContentInner(e) {
|
|
31
|
-
let u = c(3), { pipelineId: d } = e, f = useNamespaceTree(d);
|
|
32
|
-
if (!f || f.length === 0) {
|
|
33
|
-
let e;
|
|
34
|
-
return u[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
|
|
35
|
-
className: "text-muted-foreground py-4 text-center text-sm",
|
|
36
|
-
children: "No navigation items"
|
|
37
|
-
}), u[0] = e) : e = u[0], e;
|
|
38
|
-
}
|
|
39
|
-
let h;
|
|
40
|
-
return u[1] === f ? h = u[2] : (h = /* @__PURE__ */ jsx(WorkbenchNavigation_default, {
|
|
41
|
-
namespaceTree: f,
|
|
42
|
-
indent: 0
|
|
43
|
-
}), u[1] = f, u[2] = h), h;
|
|
44
|
-
}
|
|
45
12
|
function HistoryContent() {
|
|
46
|
-
let e = c(2), {
|
|
47
|
-
return e[0] ===
|
|
13
|
+
let e = c(2), { workflow: s } = useWorkbenchLayout(), u;
|
|
14
|
+
return e[0] === s ? u = e[1] : (u = /* @__PURE__ */ jsx("div", {
|
|
48
15
|
className: "overflow-auto p-2",
|
|
49
|
-
children: /* @__PURE__ */ jsx(
|
|
50
|
-
}), e[0] =
|
|
16
|
+
children: /* @__PURE__ */ jsx(WorkflowHistoryList_default, { workflow: s })
|
|
17
|
+
}), e[0] = s, e[1] = u), u;
|
|
51
18
|
}
|
|
52
19
|
function WorkbenchFloatingPanel() {
|
|
53
|
-
let
|
|
20
|
+
let l = c(19), { activeFloatingPanel: d, closeFloatingPanel: f } = useWorkbenchLayout();
|
|
54
21
|
if (!d) return null;
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
let
|
|
58
|
-
|
|
22
|
+
let p;
|
|
23
|
+
l[0] === Symbol.for("react.memo_cache_sentinel") ? (p = cn("border-l bg-background absolute right-0 top-0 bottom-0 z-20 flex w-80 flex-col shadow-lg", "animate-in slide-in-from-right duration-200"), l[0] = p) : p = l[0];
|
|
24
|
+
let m = PANEL_TITLES[d], h;
|
|
25
|
+
l[1] === m ? h = l[2] : (h = /* @__PURE__ */ jsx("span", {
|
|
59
26
|
className: "text-sm font-medium",
|
|
60
|
-
children:
|
|
61
|
-
}),
|
|
27
|
+
children: m
|
|
28
|
+
}), l[1] = m, l[2] = h);
|
|
29
|
+
let g;
|
|
30
|
+
l[3] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), l[3] = g) : g = l[3];
|
|
62
31
|
let _;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
u[4] === p ? v = u[5] : (v = /* @__PURE__ */ jsx("button", {
|
|
66
|
-
onClick: p,
|
|
32
|
+
l[4] === f ? _ = l[5] : (_ = /* @__PURE__ */ jsx("button", {
|
|
33
|
+
onClick: f,
|
|
67
34
|
className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
|
|
68
|
-
children:
|
|
69
|
-
}),
|
|
70
|
-
let
|
|
71
|
-
|
|
35
|
+
children: g
|
|
36
|
+
}), l[4] = f, l[5] = _);
|
|
37
|
+
let v;
|
|
38
|
+
l[6] !== h || l[7] !== _ ? (v = /* @__PURE__ */ jsxs("div", {
|
|
72
39
|
className: "border-b flex h-12 shrink-0 items-center justify-between px-3",
|
|
73
|
-
children: [
|
|
74
|
-
}),
|
|
40
|
+
children: [h, _]
|
|
41
|
+
}), l[6] = h, l[7] = _, l[8] = v) : v = l[8];
|
|
42
|
+
let y;
|
|
43
|
+
l[9] === d ? y = l[10] : (y = d === "history" && /* @__PURE__ */ jsx(HistoryContent, {}), l[9] = d, l[10] = y);
|
|
75
44
|
let b;
|
|
76
|
-
|
|
45
|
+
l[11] === d ? b = l[12] : (b = d === "secrets" && /* @__PURE__ */ jsx(WorkbenchSecretsPanel, {}), l[11] = d, l[12] = b);
|
|
77
46
|
let x;
|
|
78
|
-
|
|
79
|
-
let S;
|
|
80
|
-
u[13] === d ? S = u[14] : (S = d === "secrets" && /* @__PURE__ */ jsx(WorkbenchSecretsPanel, {}), u[13] = d, u[14] = S);
|
|
81
|
-
let C;
|
|
82
|
-
u[15] !== b || u[16] !== x || u[17] !== S ? (C = /* @__PURE__ */ jsxs("div", {
|
|
47
|
+
l[13] !== y || l[14] !== b ? (x = /* @__PURE__ */ jsxs("div", {
|
|
83
48
|
className: "flex-1 overflow-hidden",
|
|
84
|
-
children: [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return u[19] !== y || u[20] !== C ? (w = /* @__PURE__ */ jsxs("div", {
|
|
92
|
-
className: m,
|
|
93
|
-
children: [y, C]
|
|
94
|
-
}), u[19] = y, u[20] = C, u[21] = w) : w = u[21], w;
|
|
49
|
+
children: [y, b]
|
|
50
|
+
}), l[13] = y, l[14] = b, l[15] = x) : x = l[15];
|
|
51
|
+
let S;
|
|
52
|
+
return l[16] !== v || l[17] !== x ? (S = /* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: p,
|
|
54
|
+
children: [v, x]
|
|
55
|
+
}), l[16] = v, l[17] = x, l[18] = S) : S = l[18], S;
|
|
95
56
|
}
|
|
96
57
|
export { WorkbenchFloatingPanel };
|
|
@@ -1,49 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useWorkspace } from "../../../hooks/useWorkspaces.js";
|
|
3
|
-
import { useFetchWorkflowsByPipeline } from "../../../hooks/useWorkflows.js";
|
|
4
|
-
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
1
|
+
import { useChildWorkflows, useWorkflow, useWorkflowConfigByName } from "../../../hooks/useWorkflows.js";
|
|
5
2
|
import { ReactFlowProvider } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
6
|
-
import
|
|
3
|
+
import WorkflowFlowViewer_default from "../../debug/components/WorkflowFlowViewer.js";
|
|
7
4
|
import "../../debug/index.js";
|
|
5
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
8
6
|
import { c } from "react/compiler-runtime";
|
|
9
7
|
import { useMemo } from "react";
|
|
10
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
9
|
import { X } from "lucide-react";
|
|
12
10
|
function WorkbenchFlowPanel() {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
let
|
|
16
|
-
|
|
11
|
+
let d = c(13), { workflow: f, closeSidePanel: p } = useWorkbenchLayout(), m = useWorkflow(f.id), h = useChildWorkflows(f.id), g = useWorkflowConfigByName(m.data?.className ?? void 0), _;
|
|
12
|
+
d[0] === h.data ? _ = d[1] : (_ = h.data ?? [], d[0] = h.data, d[1] = _);
|
|
13
|
+
let v = _, y;
|
|
14
|
+
d[2] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ jsx("span", {
|
|
17
15
|
className: "text-sm font-medium",
|
|
18
16
|
children: "Graph"
|
|
19
|
-
}),
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
|
|
17
|
+
}), d[2] = y) : y = d[2];
|
|
18
|
+
let b;
|
|
19
|
+
d[3] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), d[3] = b) : b = d[3];
|
|
20
|
+
let x;
|
|
21
|
+
d[4] === p ? x = d[5] : (x = /* @__PURE__ */ jsxs("div", {
|
|
24
22
|
className: "border-b flex h-12 shrink-0 items-center justify-between px-3",
|
|
25
|
-
children: [
|
|
26
|
-
onClick:
|
|
23
|
+
children: [y, /* @__PURE__ */ jsx("button", {
|
|
24
|
+
onClick: p,
|
|
27
25
|
className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
|
|
28
|
-
children:
|
|
26
|
+
children: b
|
|
29
27
|
})]
|
|
30
|
-
}),
|
|
31
|
-
let
|
|
32
|
-
|
|
28
|
+
}), d[4] = p, d[5] = x);
|
|
29
|
+
let S;
|
|
30
|
+
d[6] !== v || d[7] !== g || d[8] !== f.id ? (S = /* @__PURE__ */ jsx("div", {
|
|
33
31
|
className: "flex-1 overflow-hidden",
|
|
34
|
-
children:
|
|
35
|
-
|
|
36
|
-
workflows:
|
|
37
|
-
|
|
32
|
+
children: v.length > 0 ? /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(WorkflowFlowViewer_default, {
|
|
33
|
+
workflowId: f.id,
|
|
34
|
+
workflows: v,
|
|
35
|
+
workflowConfig: g.data
|
|
38
36
|
}) }) : /* @__PURE__ */ jsx("div", {
|
|
39
37
|
className: "text-muted-foreground flex h-full items-center justify-center text-sm",
|
|
40
38
|
children: "No workflows found"
|
|
41
39
|
})
|
|
42
|
-
}),
|
|
43
|
-
let
|
|
44
|
-
return
|
|
40
|
+
}), d[6] = v, d[7] = g, d[8] = f.id, d[9] = S) : S = d[9];
|
|
41
|
+
let C;
|
|
42
|
+
return d[10] !== x || d[11] !== S ? (C = /* @__PURE__ */ jsxs("div", {
|
|
45
43
|
className: "border-l bg-background flex w-1/2 shrink-0 flex-col",
|
|
46
|
-
children: [
|
|
47
|
-
}),
|
|
44
|
+
children: [x, S]
|
|
45
|
+
}), d[10] = x, d[11] = S, d[12] = C) : C = d[12], C;
|
|
48
46
|
}
|
|
49
47
|
export { WorkbenchFlowPanel };
|
|
@@ -3,7 +3,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/
|
|
|
3
3
|
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Files, KeyRound, ListOrdered, MonitorPlay,
|
|
6
|
+
import { Files, KeyRound, ListOrdered, MonitorPlay, Workflow } from "lucide-react";
|
|
7
7
|
function IconButton(s) {
|
|
8
8
|
let l = c(11), { icon: u, label: d, active: f, onClick: p } = s, m = f ? "bg-foreground text-background" : "text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground", h;
|
|
9
9
|
l[0] === m ? h = l[1] : (h = cn("flex h-10 w-10 items-center justify-center rounded-md transition-colors hover:cursor-pointer", m), l[0] = m, l[1] = h);
|
|
@@ -25,64 +25,52 @@ function IconButton(s) {
|
|
|
25
25
|
return l[8] !== g || l[9] !== _ ? (v = /* @__PURE__ */ jsxs(Tooltip, { children: [g, _] }), l[8] = g, l[9] = _, l[10] = v) : v = l[10], v;
|
|
26
26
|
}
|
|
27
27
|
function WorkbenchIconSidebar() {
|
|
28
|
-
let e = c(
|
|
29
|
-
e[0] !==
|
|
28
|
+
let e = c(25), { previewPanelEnabled: i, fileExplorerEnabled: a, isDeveloperMode: o, activeFloatingPanel: g, toggleFloatingPanel: _, activeSidePanel: v, toggleSidePanel: y } = useWorkbenchLayout(), b;
|
|
29
|
+
e[0] !== v || e[1] !== i || e[2] !== y ? (b = i && /* @__PURE__ */ jsx(IconButton, {
|
|
30
30
|
icon: /* @__PURE__ */ jsx(MonitorPlay, { className: "h-5 w-5" }),
|
|
31
31
|
label: "Preview",
|
|
32
|
-
active:
|
|
33
|
-
onClick: () =>
|
|
34
|
-
}), e[0] =
|
|
35
|
-
let
|
|
36
|
-
e[4] !==
|
|
32
|
+
active: v === "preview",
|
|
33
|
+
onClick: () => y("preview")
|
|
34
|
+
}), e[0] = v, e[1] = i, e[2] = y, e[3] = b) : b = e[3];
|
|
35
|
+
let x;
|
|
36
|
+
e[4] !== g || e[5] !== v || e[6] !== o || e[7] !== _ || e[8] !== y ? (x = o && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
37
37
|
icon: /* @__PURE__ */ jsx(Workflow, { className: "h-5 w-5" }),
|
|
38
38
|
label: "Graph",
|
|
39
|
-
active:
|
|
40
|
-
onClick: () =>
|
|
39
|
+
active: v === "flow",
|
|
40
|
+
onClick: () => y("flow")
|
|
41
41
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
42
42
|
icon: /* @__PURE__ */ jsx(ListOrdered, { className: "h-5 w-5" }),
|
|
43
43
|
label: "Run Log",
|
|
44
|
-
active:
|
|
45
|
-
onClick: () =>
|
|
46
|
-
})] }), e[4] =
|
|
44
|
+
active: g === "history",
|
|
45
|
+
onClick: () => _("history")
|
|
46
|
+
})] }), e[4] = g, e[5] = v, e[6] = o, e[7] = _, e[8] = y, e[9] = x) : x = e[9];
|
|
47
|
+
let S;
|
|
48
|
+
e[10] !== v || e[11] !== a || e[12] !== y ? (S = a && /* @__PURE__ */ jsx(IconButton, {
|
|
49
|
+
icon: /* @__PURE__ */ jsx(Files, { className: "h-5 w-5" }),
|
|
50
|
+
label: "Files",
|
|
51
|
+
active: v === "files",
|
|
52
|
+
onClick: () => y("files")
|
|
53
|
+
}), e[10] = v, e[11] = a, e[12] = y, e[13] = S) : S = e[13];
|
|
47
54
|
let C;
|
|
48
|
-
e[
|
|
49
|
-
let w =
|
|
50
|
-
e[
|
|
55
|
+
e[14] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(KeyRound, { className: "h-5 w-5" }), e[14] = C) : C = e[14];
|
|
56
|
+
let w = g === "secrets", T;
|
|
57
|
+
e[15] === _ ? T = e[16] : (T = () => _("secrets"), e[15] = _, e[16] = T);
|
|
51
58
|
let E;
|
|
52
|
-
e[
|
|
59
|
+
e[17] !== w || e[18] !== T ? (E = /* @__PURE__ */ jsx(IconButton, {
|
|
53
60
|
icon: C,
|
|
54
|
-
label: "
|
|
61
|
+
label: "Secrets",
|
|
55
62
|
active: w,
|
|
56
63
|
onClick: T
|
|
57
|
-
}), e[
|
|
64
|
+
}), e[17] = w, e[18] = T, e[19] = E) : E = e[19];
|
|
58
65
|
let D;
|
|
59
|
-
e[
|
|
60
|
-
icon: /* @__PURE__ */ jsx(Files, { className: "h-5 w-5" }),
|
|
61
|
-
label: "Files",
|
|
62
|
-
active: y === "files",
|
|
63
|
-
onClick: () => b("files")
|
|
64
|
-
}), e[16] = y, e[17] = a, e[18] = b, e[19] = D) : D = e[19];
|
|
65
|
-
let O;
|
|
66
|
-
e[20] === Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ jsx(KeyRound, { className: "h-5 w-5" }), e[20] = O) : O = e[20];
|
|
67
|
-
let k = _ === "secrets", A;
|
|
68
|
-
e[21] === v ? A = e[22] : (A = () => v("secrets"), e[21] = v, e[22] = A);
|
|
69
|
-
let j;
|
|
70
|
-
e[23] !== k || e[24] !== A ? (j = /* @__PURE__ */ jsx(IconButton, {
|
|
71
|
-
icon: O,
|
|
72
|
-
label: "Secrets",
|
|
73
|
-
active: k,
|
|
74
|
-
onClick: A
|
|
75
|
-
}), e[23] = k, e[24] = A, e[25] = j) : j = e[25];
|
|
76
|
-
let M;
|
|
77
|
-
return e[26] !== x || e[27] !== S || e[28] !== j || e[29] !== E || e[30] !== D ? (M = /* @__PURE__ */ jsxs("div", {
|
|
66
|
+
return e[20] !== b || e[21] !== x || e[22] !== S || e[23] !== E ? (D = /* @__PURE__ */ jsxs("div", {
|
|
78
67
|
className: "border-l bg-background flex w-12 shrink-0 flex-col items-center gap-1 py-2",
|
|
79
68
|
children: [
|
|
69
|
+
b,
|
|
80
70
|
x,
|
|
81
71
|
S,
|
|
82
|
-
E
|
|
83
|
-
D,
|
|
84
|
-
j
|
|
72
|
+
E
|
|
85
73
|
]
|
|
86
|
-
}), e[
|
|
74
|
+
}), e[20] = b, e[21] = x, e[22] = S, e[23] = E, e[24] = D) : D = e[24], D;
|
|
87
75
|
}
|
|
88
76
|
export { WorkbenchIconSidebar };
|
|
@@ -26,7 +26,7 @@ function WorkbenchPreviewPanel() {
|
|
|
26
26
|
if (e.origin !== window.location.origin) return;
|
|
27
27
|
let _ = e.data;
|
|
28
28
|
if (_?.type !== EMBED_NEW_RUN_MESSAGE_TYPE) return;
|
|
29
|
-
let v = _?.
|
|
29
|
+
let v = _?.workflowId;
|
|
30
30
|
typeof v == "string" && D(v);
|
|
31
31
|
};
|
|
32
32
|
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
@@ -117,7 +117,7 @@ function WorkbenchPreviewPanel() {
|
|
|
117
117
|
ref: w,
|
|
118
118
|
src: k,
|
|
119
119
|
className: "bg-background h-full w-full rounded-lg",
|
|
120
|
-
title: "
|
|
120
|
+
title: "Workflow preview"
|
|
121
121
|
})
|
|
122
122
|
}) : /* @__PURE__ */ jsx("div", {
|
|
123
123
|
className: "text-zinc-400 flex flex-1 items-center justify-center text-sm",
|
|
@@ -8,7 +8,7 @@ import { useState } from "react";
|
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { KeyRound, Loader2, Plus, Trash2 } from "lucide-react";
|
|
10
10
|
function WorkbenchSecretsPanel() {
|
|
11
|
-
let _ = c(46), {
|
|
11
|
+
let _ = c(46), { workflow: v } = useWorkbenchLayout(), y = v?.workspaceId, { data: b, isLoading: x } = useWorkspaceSecrets(y), S = useCreateSecret(), C = useUpdateSecret(), w = useDeleteSecret(), [T, E] = useState(""), [D, O] = useState(""), [k, A] = useState(null), [j, M] = useState(""), N;
|
|
12
12
|
_[0] !== S || _[1] !== T || _[2] !== D || _[3] !== y ? (N = async () => {
|
|
13
13
|
!y || !T.trim() || !D.trim() || (await S.mutateAsync({
|
|
14
14
|
workspaceId: y,
|
|
@@ -6,7 +6,7 @@ import { c } from "react/compiler-runtime";
|
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Settings } from "lucide-react";
|
|
8
8
|
var WorkbenchSettingsModal_default = (p) => {
|
|
9
|
-
let m = c(
|
|
9
|
+
let m = c(15), { settings: h, onSettingsChange: g, open: _, onOpenChange: v } = p, y;
|
|
10
10
|
m[0] !== g || m[1] !== h ? (y = (e, f) => {
|
|
11
11
|
g({
|
|
12
12
|
...h,
|
|
@@ -40,50 +40,25 @@ var WorkbenchSettingsModal_default = (p) => {
|
|
|
40
40
|
let w;
|
|
41
41
|
m[6] === b ? w = m[7] : (w = (e) => b("enableDebugMode", e), m[6] = b, m[7] = w);
|
|
42
42
|
let T;
|
|
43
|
-
m[8] !== h.enableDebugMode || m[9] !== w ? (T = /* @__PURE__ */ jsxs(
|
|
44
|
-
className: "flex items-center justify-between space-x-2",
|
|
45
|
-
children: [C, /* @__PURE__ */ jsx(Switch, {
|
|
46
|
-
id: "debug-mode",
|
|
47
|
-
checked: h.enableDebugMode,
|
|
48
|
-
onCheckedChange: w
|
|
49
|
-
})]
|
|
50
|
-
}), m[8] = h.enableDebugMode, m[9] = w, m[10] = T) : T = m[10];
|
|
51
|
-
let E;
|
|
52
|
-
m[11] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ jsxs("div", {
|
|
53
|
-
className: "flex-1",
|
|
54
|
-
children: [/* @__PURE__ */ jsx(Label, {
|
|
55
|
-
htmlFor: "message-history",
|
|
56
|
-
className: "text-sm font-medium",
|
|
57
|
-
children: "Full Message History"
|
|
58
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
59
|
-
className: "text-muted-foreground text-sm",
|
|
60
|
-
children: "Show all internal messages and prompts"
|
|
61
|
-
})]
|
|
62
|
-
}), m[11] = E) : E = m[11];
|
|
63
|
-
let D;
|
|
64
|
-
m[12] === b ? D = m[13] : (D = (e) => b("showFullMessageHistory", e), m[12] = b, m[13] = D);
|
|
65
|
-
let O;
|
|
66
|
-
m[14] !== h.showFullMessageHistory || m[15] !== D ? (O = /* @__PURE__ */ jsxs("div", {
|
|
67
|
-
className: "flex items-center justify-between space-x-2",
|
|
68
|
-
children: [E, /* @__PURE__ */ jsx(Switch, {
|
|
69
|
-
id: "message-history",
|
|
70
|
-
checked: h.showFullMessageHistory,
|
|
71
|
-
onCheckedChange: D
|
|
72
|
-
})]
|
|
73
|
-
}), m[14] = h.showFullMessageHistory, m[15] = D, m[16] = O) : O = m[16];
|
|
74
|
-
let k;
|
|
75
|
-
m[17] !== T || m[18] !== O ? (k = /* @__PURE__ */ jsxs(DialogContent, {
|
|
43
|
+
m[8] !== h.enableDebugMode || m[9] !== w ? (T = /* @__PURE__ */ jsxs(DialogContent, {
|
|
76
44
|
className: "sm:max-w-md",
|
|
77
|
-
children: [S, /* @__PURE__ */
|
|
45
|
+
children: [S, /* @__PURE__ */ jsx("div", {
|
|
78
46
|
className: "flex flex-col gap-4 p-4",
|
|
79
|
-
children:
|
|
47
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: "flex items-center justify-between space-x-2",
|
|
49
|
+
children: [C, /* @__PURE__ */ jsx(Switch, {
|
|
50
|
+
id: "debug-mode",
|
|
51
|
+
checked: h.enableDebugMode,
|
|
52
|
+
onCheckedChange: w
|
|
53
|
+
})]
|
|
54
|
+
})
|
|
80
55
|
})]
|
|
81
|
-
}), m[
|
|
82
|
-
let
|
|
83
|
-
return m[
|
|
56
|
+
}), m[8] = h.enableDebugMode, m[9] = w, m[10] = T) : T = m[10];
|
|
57
|
+
let E;
|
|
58
|
+
return m[11] !== v || m[12] !== _ || m[13] !== T ? (E = /* @__PURE__ */ jsxs(Dialog, {
|
|
84
59
|
open: _,
|
|
85
60
|
onOpenChange: v,
|
|
86
|
-
children: [x,
|
|
87
|
-
}), m[
|
|
61
|
+
children: [x, T]
|
|
62
|
+
}), m[11] = v, m[12] = _, m[13] = T, m[14] = E) : E = m[14], E;
|
|
88
63
|
};
|
|
89
64
|
export { WorkbenchSettingsModal_default as default };
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import { useWorkflowConfigByName } from "../../../hooks/useWorkflows.js";
|
|
1
2
|
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
2
3
|
import UiActions_default from "../../../components/ui-widgets/UiActions.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import React from "react";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
var import_enums = require_enums(), WorkflowForms_default = (
|
|
7
|
-
let
|
|
8
|
-
if (!
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
return
|
|
13
|
-
actions:
|
|
14
|
-
availableTransitions:
|
|
15
|
-
currentPlace:
|
|
16
|
-
disabled:
|
|
17
|
-
onSubmit:
|
|
18
|
-
}) }),
|
|
7
|
+
var import_enums = require_enums(), WorkflowForms_default = (o) => {
|
|
8
|
+
let s = c(8), { workflow: l, onSubmit: u } = o, d = useWorkflowConfigByName(l.className ?? void 0).data?.ui, f = d?.widgets ?? d?.actions;
|
|
9
|
+
if (!f?.length) return null;
|
|
10
|
+
let p;
|
|
11
|
+
s[0] === l.availableTransitions ? p = s[1] : (p = l.availableTransitions?.map(_temp) ?? [], s[0] = l.availableTransitions, s[1] = p);
|
|
12
|
+
let m = p, h = f, g = l.status === import_enums.WorkflowState.Completed, _;
|
|
13
|
+
return s[2] !== m || s[3] !== u || s[4] !== h || s[5] !== g || s[6] !== l.place ? (_ = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UiActions_default, {
|
|
14
|
+
actions: h,
|
|
15
|
+
availableTransitions: m,
|
|
16
|
+
currentPlace: l.place,
|
|
17
|
+
disabled: g,
|
|
18
|
+
onSubmit: u
|
|
19
|
+
}) }), s[2] = m, s[3] = u, s[4] = h, s[5] = g, s[6] = l.place, s[7] = _) : _ = s[7], _;
|
|
19
20
|
};
|
|
20
21
|
function _temp(e) {
|
|
21
22
|
return e.id;
|