@loopstack/loopstack-studio 0.21.3 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/auth.js +10 -0
- package/dist/api/client.js +13 -0
- package/dist/api/config.js +10 -0
- package/dist/api/dashboard.js +4 -0
- package/dist/api/documents.js +7 -0
- package/dist/api/index.js +24 -0
- package/dist/api/namespaces.js +7 -0
- package/dist/api/pipelines.js +13 -0
- package/dist/api/processor.js +4 -0
- package/dist/api/workflows.js +8 -0
- package/dist/api/workspaces.js +12 -0
- package/dist/app/EnvironmentEmbedRoot.js +35 -0
- package/dist/components/data-table/DataTableFilters.js +74 -63
- package/dist/components/feedback/ErrorBoundary.js +43 -0
- package/dist/components/{LoadingCentered.js → feedback/LoadingCentered.js} +1 -1
- package/dist/components/feedback/index.js +5 -0
- package/dist/components/index.js +6 -3
- package/dist/components/layout/MainLayout.js +36 -17
- package/dist/components/layout/StudioSidebar.js +165 -0
- package/dist/components/page/PageBreadcrumbs.js +1 -1
- package/dist/components/ui/sidebar.js +359 -359
- package/dist/components/ui-widgets/UiActions.js +22 -15
- package/dist/components/ui-widgets/UiWidget.js +31 -26
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +27 -27
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +12 -12
- package/dist/components/ui-widgets/widgets/SandboxRun.js +33 -0
- package/dist/components/ui-widgets/widgets/SubmitButton.js +11 -11
- package/dist/features/code-explorer/CodeExplorer.js +4 -67
- package/dist/features/code-explorer/components/CodeExplorerTree.js +3 -41
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +4 -80
- package/dist/features/code-explorer/components/FileContentViewer.js +1 -0
- package/dist/features/code-explorer/components/FileTabsBar.js +1 -1
- package/dist/features/code-explorer/index.js +4 -0
- package/dist/features/code-explorer/utils/fileIcons.js +4 -7
- package/dist/features/debug/components/ConfigFlowViewer.js +1 -1
- package/dist/features/debug/components/PipelineFlowViewer.js +1 -1
- package/dist/features/debug/index.js +3 -0
- package/dist/features/documents/DocumentRenderer.js +53 -0
- package/dist/features/{workbench → documents}/components/DocumentItem.js +1 -1
- package/dist/features/documents/components/DocumentList.js +40 -0
- package/dist/features/{workbench → documents}/components/DocumentMetadataPills.js +2 -2
- package/dist/features/{workbench/components → documents}/document-details/DocumentDetails.js +3 -3
- package/dist/features/{workbench/components → documents}/document-details/PromptDetails.js +3 -3
- package/dist/features/documents/index.js +4 -0
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessage.js +5 -5
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentDebugRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentFormRenderer.js +9 -8
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/ErrorMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/LinkMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/MarkdownMessageRenderer.js +2 -2
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/PlainMessageRenderer.js +1 -1
- package/dist/features/health/index.js +1 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +1 -1
- package/dist/features/runs/Runs.js +197 -0
- package/dist/features/workbench/NavigationItems.js +29 -29
- package/dist/features/workbench/Workbench.js +100 -78
- package/dist/features/workbench/WorkflowItem.js +63 -58
- package/dist/features/workbench/WorkflowList.js +62 -82
- package/dist/features/workbench/components/NewRunDialog.js +329 -0
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +88 -0
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +49 -0
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +68 -0
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +128 -0
- package/dist/features/workbench/components/WorkflowForms.js +7 -6
- package/dist/features/workbench/components/WorkflowHistoryItem.js +74 -69
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +78 -61
- package/dist/features/workbench/hooks/useWorkflowData.js +49 -0
- package/dist/features/workbench/hooks/useWorkflowListState.js +50 -0
- package/dist/features/workbench/index.js +8 -0
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +76 -0
- package/dist/features/workspaces/Workspaces.js +2 -2
- package/dist/features/workspaces/components/CreateWorkspace.js +165 -82
- package/dist/features/workspaces/components/EnvironmentSlotSelector.js +63 -0
- package/dist/features/workspaces/components/ExecutionTimeline.js +70 -69
- package/dist/features/workspaces/components/PipelineForm.js +4 -4
- package/dist/features/workspaces/index.js +3 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/query-keys.js +138 -0
- package/dist/hooks/useApi.js +9 -33
- package/dist/hooks/useAuth.js +37 -56
- package/dist/hooks/useConfig.js +27 -33
- package/dist/hooks/useDashboard.js +9 -16
- package/dist/hooks/useDebounce.js +8 -17
- package/dist/hooks/useDocuments.js +7 -16
- package/dist/hooks/useFiles.js +24 -42
- package/dist/hooks/useNamespaces.js +7 -16
- package/dist/hooks/usePipelines.js +141 -174
- package/dist/hooks/useProcessor.js +11 -17
- package/dist/hooks/useWorkflows.js +51 -89
- package/dist/hooks/useWorkspaces.js +97 -129
- package/dist/index.d.ts +364 -50
- package/dist/index.js +21 -6
- package/dist/packages/contracts/dist/enums/index.js +25 -0
- package/dist/packages/contracts/dist/enums/pipeline-state.js +10 -0
- package/dist/packages/contracts/dist/enums/registry.enum.js +20 -0
- package/dist/packages/contracts/dist/enums/sort-order.enum.js +10 -0
- package/dist/packages/contracts/dist/enums/user-type.enum.js +10 -0
- package/dist/packages/contracts/dist/enums/workflow-state.enum.js +10 -0
- package/dist/pages/DashboardPage.js +1 -1
- package/dist/pages/DebugPage.js +12 -14
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +3 -4
- package/dist/pages/EmbedWorkbenchPage.js +7 -5
- package/dist/pages/PipelineDebugPage.js +7 -6
- package/dist/pages/PreviewWorkbenchPage.js +419 -0
- package/dist/pages/RunsListPage.js +64 -0
- package/dist/pages/RunsPage.js +49 -0
- package/dist/pages/StudioLandingPage.js +146 -0
- package/dist/pages/WorkbenchPage.js +78 -53
- package/dist/pages/WorkspacePage.js +1 -1
- package/dist/providers/InvalidationEventsProvider.js +15 -17
- package/dist/providers/QueryProvider.js +21 -0
- package/dist/providers/StudioProvider.js +2 -2
- package/dist/routing/LocalRouter.js +20 -7
- package/dist/services/createApiClient.js +4 -10
- package/dist/services/index.js +1 -1
- package/package.json +2 -3
- package/dist/features/workbench/components/DocumentList.js +0 -40
- package/dist/features/workbench/components/DocumentRenderer.js +0 -54
- package/dist/features/workbench/components/WorkbenchSidebar.js +0 -109
- package/dist/features/workbench/providers/WorkbenchContextProvider.js +0 -3
- /package/dist/components/{content → feedback}/ErrorAlert.js +0 -0
- /package/dist/components/{snackbars → feedback}/ErrorSnackbar.js +0 -0
- /package/dist/components/{snackbars → feedback}/Snackbar.js +0 -0
- /package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessageContent.js +0 -0
|
@@ -1,20 +1,21 @@
|
|
|
1
|
+
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
1
2
|
import UiActions_default from "../../../components/ui-widgets/UiActions.js";
|
|
2
3
|
import { c } from "react/compiler-runtime";
|
|
3
4
|
import React from "react";
|
|
4
|
-
import { WorkflowState } from "@loopstack/api-client";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
var WorkflowForms_default = (
|
|
7
|
-
let o = c(
|
|
6
|
+
var import_enums = require_enums(), WorkflowForms_default = (e) => {
|
|
7
|
+
let o = c(8), { workflow: s, onSubmit: l } = e, u = s.ui?.actions;
|
|
8
8
|
if (!u?.length) return null;
|
|
9
9
|
let d;
|
|
10
10
|
o[0] === s.availableTransitions ? d = o[1] : (d = s.availableTransitions?.map(_temp) ?? [], o[0] = s.availableTransitions, o[1] = d);
|
|
11
|
-
let f = d, p = u, m = s.status === WorkflowState.Completed, h;
|
|
12
|
-
return o[2] !== f || o[3] !== l || o[4] !== p || o[5] !== m ? (h = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UiActions_default, {
|
|
11
|
+
let f = d, p = u, m = s.status === import_enums.WorkflowState.Completed, h;
|
|
12
|
+
return o[2] !== f || o[3] !== l || o[4] !== p || o[5] !== m || o[6] !== s.place ? (h = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UiActions_default, {
|
|
13
13
|
actions: p,
|
|
14
14
|
availableTransitions: f,
|
|
15
|
+
currentPlace: s.place,
|
|
15
16
|
disabled: m,
|
|
16
17
|
onSubmit: l
|
|
17
|
-
}) }), o[2] = f, o[3] = l, o[4] = p, o[5] = m, o[6] = h) : h = o[
|
|
18
|
+
}) }), o[2] = f, o[3] = l, o[4] = p, o[5] = m, o[6] = s.place, o[7] = h) : h = o[7], h;
|
|
18
19
|
};
|
|
19
20
|
function _temp(e) {
|
|
20
21
|
return e.id;
|
|
@@ -1,103 +1,105 @@
|
|
|
1
|
-
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
2
1
|
import { cn } from "../../../lib/utils.js";
|
|
3
2
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
4
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip.js";
|
|
5
|
-
import {
|
|
4
|
+
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
6
5
|
import { c } from "react/compiler-runtime";
|
|
7
6
|
import React from "react";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { ChevronRight, Clock, Loader2, Play, Wrench } from "lucide-react";
|
|
10
9
|
import { format } from "date-fns";
|
|
11
|
-
var WorkflowHistoryItem_default = (
|
|
12
|
-
let
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
return
|
|
16
|
-
className: "
|
|
17
|
-
children:
|
|
18
|
-
className: "text-sm",
|
|
19
|
-
children: "
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
var WorkflowHistoryItem_default = (_) => {
|
|
11
|
+
let y = c(19), { workflowId: b, workflow: x } = _, S = useWorkflow(b), C = S.data?.history;
|
|
12
|
+
if (S.isLoading) {
|
|
13
|
+
let t;
|
|
14
|
+
return y[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ jsx("li", {
|
|
15
|
+
className: "group/menu-item relative list-none",
|
|
16
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: "flex w-full items-center gap-2 rounded-md p-2 text-sm opacity-50",
|
|
18
|
+
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin" }), /* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: "text-sm",
|
|
20
|
+
children: "Loading..."
|
|
21
|
+
})]
|
|
22
|
+
})
|
|
23
|
+
}), y[0] = t) : t = y[0], t;
|
|
22
24
|
}
|
|
23
|
-
if (!
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
let
|
|
27
|
-
|
|
25
|
+
if (!C?.length) return null;
|
|
26
|
+
let w;
|
|
27
|
+
y[1] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ jsx(Play, { className: "text-primary h-3.5 w-3.5 fill-current" }), y[1] = w) : w = y[1];
|
|
28
|
+
let T = x.title ?? x.blockName, E;
|
|
29
|
+
y[2] === T ? E = y[3] : (E = /* @__PURE__ */ jsx("span", {
|
|
28
30
|
className: "truncate text-sm",
|
|
29
|
-
children:
|
|
30
|
-
}),
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
let
|
|
34
|
-
|
|
31
|
+
children: T
|
|
32
|
+
}), y[2] = T, y[3] = E);
|
|
33
|
+
let D;
|
|
34
|
+
y[4] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsx(ChevronRight, { className: "text-muted-foreground ml-auto h-3.5 w-3.5 transition-transform group-data-[state=open]/collapsible:rotate-90" }), y[4] = D) : D = y[4];
|
|
35
|
+
let O;
|
|
36
|
+
y[5] === E ? O = y[6] : (O = /* @__PURE__ */ jsx(CollapsibleTrigger, {
|
|
35
37
|
asChild: !0,
|
|
36
|
-
children: /* @__PURE__ */ jsxs(
|
|
37
|
-
className: "group/trigger font-medium",
|
|
38
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
39
|
+
className: "hover:bg-accent hover:text-accent-foreground group/trigger flex w-full items-center gap-2 rounded-md p-2 text-left text-sm font-medium",
|
|
38
40
|
children: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
w,
|
|
42
|
+
E,
|
|
43
|
+
D
|
|
42
44
|
]
|
|
43
45
|
})
|
|
44
|
-
}),
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
|
|
46
|
+
}), y[5] = E, y[6] = O);
|
|
47
|
+
let k;
|
|
48
|
+
y[7] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ jsx("div", { className: "from-primary/60 via-primary/30 to-muted/20 absolute top-7 bottom-3 left-1.75 w-0.5 rounded-full bg-linear-to-b" }), y[7] = k) : k = y[7];
|
|
49
|
+
let A;
|
|
50
|
+
y[8] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ jsx("div", {
|
|
49
51
|
className: "relative z-10 flex shrink-0 items-center justify-center",
|
|
50
52
|
children: /* @__PURE__ */ jsx("div", { className: "border-primary/60 bg-primary/20 flex h-4 w-4 items-center justify-center rounded-full border-2" })
|
|
51
|
-
}),
|
|
52
|
-
let
|
|
53
|
-
|
|
53
|
+
}), y[8] = A) : A = y[8];
|
|
54
|
+
let j;
|
|
55
|
+
y[9] === Symbol.for("react.memo_cache_sentinel") ? (j = /* @__PURE__ */ jsxs("div", {
|
|
54
56
|
className: "group/entry relative flex gap-3 py-1 pl-0",
|
|
55
|
-
children: [
|
|
57
|
+
children: [A, /* @__PURE__ */ jsx("div", {
|
|
56
58
|
className: "flex min-w-0 flex-1 items-center gap-1.5",
|
|
57
59
|
children: /* @__PURE__ */ jsx("span", {
|
|
58
60
|
className: "bg-muted text-foreground w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium",
|
|
59
61
|
children: "start"
|
|
60
62
|
})
|
|
61
63
|
})]
|
|
62
|
-
}),
|
|
63
|
-
let
|
|
64
|
-
if (
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
console.log(
|
|
68
|
-
let
|
|
64
|
+
}), y[9] = j) : j = y[9];
|
|
65
|
+
let M;
|
|
66
|
+
if (y[10] !== C) {
|
|
67
|
+
let f;
|
|
68
|
+
y[12] === C.length ? f = y[13] : (f = (f, p) => {
|
|
69
|
+
console.log(f);
|
|
70
|
+
let m = f.data?.transition, h = Object.keys(f.data?.tools ?? {}), g = p === C.length - 1, _ = f.data?.place ?? m?.to ?? "unknown", v = m?.id;
|
|
69
71
|
return /* @__PURE__ */ jsxs("div", {
|
|
70
72
|
className: "group/entry relative flex gap-3 py-1 pl-0",
|
|
71
73
|
children: [/* @__PURE__ */ jsx("div", {
|
|
72
74
|
className: "relative z-10 flex shrink-0 items-center justify-center",
|
|
73
75
|
children: /* @__PURE__ */ jsx("div", {
|
|
74
|
-
className: cn("flex h-4 w-4 items-center justify-center rounded-full border-2 transition-all",
|
|
75
|
-
children:
|
|
76
|
+
className: cn("flex h-4 w-4 items-center justify-center rounded-full border-2 transition-all", g ? "border-primary bg-primary shadow-primary/40 shadow-sm" : "border-muted-foreground/30 bg-background"),
|
|
77
|
+
children: g && /* @__PURE__ */ jsx("div", { className: "bg-primary-foreground h-1.5 w-1.5 animate-pulse rounded-full" })
|
|
76
78
|
})
|
|
77
79
|
}), /* @__PURE__ */ jsxs("div", {
|
|
78
80
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
79
81
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
80
82
|
className: "flex items-baseline gap-1.5",
|
|
81
83
|
children: [/* @__PURE__ */ jsx("span", {
|
|
82
|
-
className: cn("w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium",
|
|
83
|
-
children:
|
|
84
|
-
}),
|
|
84
|
+
className: cn("w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium", g ? "bg-primary/15 text-primary" : "bg-muted/60 text-muted-foreground"),
|
|
85
|
+
children: _
|
|
86
|
+
}), v && /* @__PURE__ */ jsxs("span", {
|
|
85
87
|
className: "text-muted-foreground truncate text-[10px] italic",
|
|
86
88
|
children: [
|
|
87
89
|
"(via ",
|
|
88
|
-
|
|
90
|
+
v,
|
|
89
91
|
")"
|
|
90
92
|
]
|
|
91
93
|
})]
|
|
92
94
|
}), /* @__PURE__ */ jsxs("div", {
|
|
93
95
|
className: "text-muted-foreground flex items-center gap-2 text-[10px]",
|
|
94
|
-
children: [
|
|
96
|
+
children: [h.length > 0 && /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
95
97
|
asChild: !0,
|
|
96
98
|
children: /* @__PURE__ */ jsxs("div", {
|
|
97
99
|
className: "flex cursor-default items-center gap-0.5",
|
|
98
100
|
children: [/* @__PURE__ */ jsx(Wrench, { className: "h-3 w-3" }), /* @__PURE__ */ jsx("span", {
|
|
99
101
|
className: "tabular-nums",
|
|
100
|
-
children:
|
|
102
|
+
children: h.length
|
|
101
103
|
})]
|
|
102
104
|
})
|
|
103
105
|
}), /* @__PURE__ */ jsxs(TooltipContent, {
|
|
@@ -108,37 +110,40 @@ var WorkflowHistoryItem_default = (x) => {
|
|
|
108
110
|
children: "Tools used:"
|
|
109
111
|
}), /* @__PURE__ */ jsx("p", {
|
|
110
112
|
className: "text-muted-foreground text-[11px]",
|
|
111
|
-
children:
|
|
113
|
+
children: h.join(", ")
|
|
112
114
|
})]
|
|
113
115
|
})] }), /* @__PURE__ */ jsxs("div", {
|
|
114
116
|
className: "flex items-center gap-0.5",
|
|
115
117
|
children: [/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }), /* @__PURE__ */ jsx("span", {
|
|
116
118
|
className: "tabular-nums",
|
|
117
|
-
children: format(new Date(
|
|
119
|
+
children: format(new Date(f.timestamp), "HH:mm:ss")
|
|
118
120
|
})]
|
|
119
121
|
})]
|
|
120
122
|
})]
|
|
121
123
|
})]
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
} else
|
|
125
|
-
let
|
|
126
|
-
|
|
127
|
-
className: "ml-2
|
|
124
|
+
}, f.version);
|
|
125
|
+
}, y[12] = C.length, y[13] = f), M = C.map(f), y[10] = C, y[11] = M;
|
|
126
|
+
} else M = y[11];
|
|
127
|
+
let N;
|
|
128
|
+
y[14] === M ? N = y[15] : (N = /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("ul", {
|
|
129
|
+
className: "ml-2 flex min-w-0 flex-col gap-1 pl-0",
|
|
128
130
|
children: /* @__PURE__ */ jsxs("div", {
|
|
129
131
|
className: "relative py-2",
|
|
130
132
|
children: [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
k,
|
|
134
|
+
j,
|
|
135
|
+
M
|
|
134
136
|
]
|
|
135
137
|
})
|
|
136
|
-
}) }),
|
|
137
|
-
let
|
|
138
|
-
return
|
|
138
|
+
}) }), y[14] = M, y[15] = N);
|
|
139
|
+
let P;
|
|
140
|
+
return y[16] !== N || y[17] !== O ? (P = /* @__PURE__ */ jsx(Collapsible, {
|
|
139
141
|
defaultOpen: !0,
|
|
140
142
|
className: "group/collapsible",
|
|
141
|
-
children: /* @__PURE__ */ jsxs(
|
|
142
|
-
|
|
143
|
+
children: /* @__PURE__ */ jsxs("li", {
|
|
144
|
+
className: "group/menu-item relative list-none",
|
|
145
|
+
children: [O, N]
|
|
146
|
+
})
|
|
147
|
+
}), y[16] = N, y[17] = O, y[18] = P) : P = y[18], P;
|
|
143
148
|
};
|
|
144
149
|
export { WorkflowHistoryItem_default as default };
|
|
@@ -1,85 +1,102 @@
|
|
|
1
|
-
import { useStudio } from "../../../../providers/StudioProvider.js";
|
|
2
|
-
import { useDeleteWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
3
1
|
import { Button } from "../../../../components/ui/button.js";
|
|
4
2
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../../../../components/ui/alert-dialog.js";
|
|
3
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../components/ui/tooltip.js";
|
|
5
4
|
import { useRunPipeline } from "../../../../hooks/useProcessor.js";
|
|
5
|
+
import { useDeleteWorkflow, useWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { LockOpen,
|
|
10
|
-
var WorkflowButtons_default = (
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
pipelineId:
|
|
9
|
+
import { LockOpen, Repeat } from "lucide-react";
|
|
10
|
+
var WorkflowButtons_default = (w) => {
|
|
11
|
+
let T = c(34), { pipeline: E, workflowId: D } = w, O = useWorkflow(D).data, k = useDeleteWorkflow(), A = useRunPipeline(), j;
|
|
12
|
+
T[0] !== E.id || T[1] !== A ? (j = () => {
|
|
13
|
+
A.mutate({
|
|
14
|
+
pipelineId: E.id,
|
|
15
15
|
runPipelinePayloadDto: {},
|
|
16
16
|
force: !1
|
|
17
17
|
});
|
|
18
|
-
},
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
pipelineId:
|
|
18
|
+
}, T[0] = E.id, T[1] = A, T[2] = j) : j = T[2];
|
|
19
|
+
let M = j, N;
|
|
20
|
+
T[3] !== E.id || T[4] !== A || T[5] !== D ? (N = () => {
|
|
21
|
+
A.mutate({
|
|
22
|
+
pipelineId: E.id,
|
|
23
23
|
runPipelinePayloadDto: { transition: {
|
|
24
24
|
name: "unlock",
|
|
25
|
-
workflowId:
|
|
25
|
+
workflowId: D
|
|
26
26
|
} },
|
|
27
27
|
force: !1
|
|
28
28
|
});
|
|
29
|
-
},
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
try {
|
|
33
|
-
|
|
34
|
-
} catch (
|
|
35
|
-
let
|
|
36
|
-
console.error("Mutation failed:",
|
|
29
|
+
}, T[3] = E.id, T[4] = A, T[5] = D, T[6] = N) : N = T[6];
|
|
30
|
+
let P = N, F;
|
|
31
|
+
T[7] !== k || T[8] !== M || T[9] !== O ? (F = () => {
|
|
32
|
+
if (O) try {
|
|
33
|
+
k.mutate(O), M();
|
|
34
|
+
} catch (t) {
|
|
35
|
+
let C = t;
|
|
36
|
+
console.error("Mutation failed:", C);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
let P;
|
|
42
|
-
x[15] !== T.isPending || x[16] !== N ? (P = /* @__PURE__ */ jsx(AlertDialogTrigger, {
|
|
43
|
-
asChild: !0,
|
|
44
|
-
children: /* @__PURE__ */ jsxs(Button, {
|
|
45
|
-
variant: "ghost",
|
|
46
|
-
size: "sm",
|
|
47
|
-
disabled: T.isPending,
|
|
48
|
-
children: [N, "Delete and Repeat Workflow"]
|
|
49
|
-
})
|
|
50
|
-
}), x[15] = T.isPending, x[16] = N, x[17] = P) : P = x[17];
|
|
51
|
-
let F;
|
|
52
|
-
x[18] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Are you sure?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This action cannot be undone. This will permanently delete the workflow." })] }), x[18] = F) : F = x[18];
|
|
53
|
-
let I;
|
|
54
|
-
x[19] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), x[19] = I) : I = x[19];
|
|
38
|
+
}, T[7] = k, T[8] = M, T[9] = O, T[10] = F) : F = T[10];
|
|
39
|
+
let I = F;
|
|
40
|
+
if (!O) return null;
|
|
55
41
|
let L;
|
|
56
|
-
|
|
57
|
-
className: "bg-destructive hover:bg-destructive/90 text-white",
|
|
58
|
-
onClick: M,
|
|
59
|
-
children: "Delete"
|
|
60
|
-
})] })] }), x[20] = M, x[21] = L);
|
|
42
|
+
T[11] === k.isPending ? L = T[12] : (L = k.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(Repeat, { className: "h-3.5 w-3.5" }), T[11] = k.isPending, T[12] = L);
|
|
61
43
|
let R;
|
|
62
|
-
|
|
44
|
+
T[13] !== k.isPending || T[14] !== L ? (R = /* @__PURE__ */ jsx(TooltipTrigger, {
|
|
45
|
+
asChild: !0,
|
|
46
|
+
children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
|
|
47
|
+
asChild: !0,
|
|
48
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
49
|
+
variant: "ghost",
|
|
50
|
+
size: "icon",
|
|
51
|
+
className: "h-7 w-7",
|
|
52
|
+
disabled: k.isPending,
|
|
53
|
+
children: L
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
}), T[13] = k.isPending, T[14] = L, T[15] = R) : R = T[15];
|
|
63
57
|
let z;
|
|
64
|
-
|
|
58
|
+
T[16] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ jsx(TooltipContent, { children: "Repeat" }), T[16] = z) : z = T[16];
|
|
59
|
+
let B;
|
|
60
|
+
T[17] === R ? B = T[18] : (B = /* @__PURE__ */ jsxs(Tooltip, { children: [R, z] }), T[17] = R, T[18] = B);
|
|
61
|
+
let V;
|
|
62
|
+
T[19] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Repeat workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This will delete the current workflow run and re-trigger the pipeline." })] }), T[19] = V) : V = T[19];
|
|
63
|
+
let H;
|
|
64
|
+
T[20] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), T[20] = H) : H = T[20];
|
|
65
|
+
let U;
|
|
66
|
+
T[21] === I ? U = T[22] : (U = /* @__PURE__ */ jsxs(AlertDialogContent, { children: [V, /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [H, /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
67
|
+
onClick: I,
|
|
68
|
+
children: "Repeat"
|
|
69
|
+
})] })] }), T[21] = I, T[22] = U);
|
|
70
|
+
let W;
|
|
71
|
+
T[23] !== U || T[24] !== B ? (W = /* @__PURE__ */ jsxs(AlertDialog, { children: [B, U] }), T[23] = U, T[24] = B, T[25] = W) : W = T[25];
|
|
72
|
+
let G;
|
|
73
|
+
T[26] !== P || T[27] !== A.isPending || T[28] !== O.availableTransitions || T[29] !== O.place ? (G = O.place === "end" && O.availableTransitions?.find(_temp2) && /* @__PURE__ */ jsxs(AlertDialog, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
65
74
|
asChild: !0,
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
|
|
76
|
+
asChild: !0,
|
|
77
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
78
|
+
variant: "ghost",
|
|
79
|
+
size: "icon",
|
|
80
|
+
className: "h-7 w-7",
|
|
81
|
+
disabled: A.isPending,
|
|
82
|
+
children: A.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(LockOpen, { className: "h-3.5 w-3.5" })
|
|
83
|
+
})
|
|
71
84
|
})
|
|
72
|
-
}), /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Unlock workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "Are you sure you want to unlock this workflow?" })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
73
|
-
onClick:
|
|
85
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children: "Unlock Step" })] }), /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Unlock workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "Are you sure you want to unlock this workflow?" })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
86
|
+
onClick: P,
|
|
74
87
|
children: "Unlock"
|
|
75
|
-
})] })] })] }),
|
|
76
|
-
let
|
|
77
|
-
return
|
|
78
|
-
className: "flex",
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
})] })] })] }), T[26] = P, T[27] = A.isPending, T[28] = O.availableTransitions, T[29] = O.place, T[30] = G) : G = T[30];
|
|
89
|
+
let K;
|
|
90
|
+
return T[31] !== W || T[32] !== G ? (K = /* @__PURE__ */ jsxs("div", {
|
|
91
|
+
className: "flex items-center",
|
|
92
|
+
onClick: _temp,
|
|
93
|
+
children: [W, G]
|
|
94
|
+
}), T[31] = W, T[32] = G, T[33] = K) : K = T[33], K;
|
|
81
95
|
};
|
|
82
|
-
function _temp(
|
|
83
|
-
return
|
|
96
|
+
function _temp(t) {
|
|
97
|
+
return t.stopPropagation();
|
|
98
|
+
}
|
|
99
|
+
function _temp2(t) {
|
|
100
|
+
return t.id === "unlock";
|
|
84
101
|
}
|
|
85
102
|
export { WorkflowButtons_default as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
2
|
+
import { useRunPipeline } from "../../../hooks/useProcessor.js";
|
|
3
|
+
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
4
|
+
import { useFilterDocuments } from "../../../hooks/useDocuments.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { useCallback, useMemo } from "react";
|
|
7
|
+
var import_enums = require_enums();
|
|
8
|
+
function useWorkflowData(e) {
|
|
9
|
+
let o = c(22), { workflowId: s, showFullMessageHistory: l } = e, u = useWorkflow(s), d = useFilterDocuments(s), f = useRunPipeline(), p;
|
|
10
|
+
o[0] !== u.data?.place || o[1] !== l ? (p = (e) => {
|
|
11
|
+
let r = e.meta, i = e.ui, a = r?.hidden || i?.hidden || !!r?.hideAtPlaces?.includes(u.data?.place ?? "");
|
|
12
|
+
return !l && e.tags?.includes("internal") && (a = !0), !a;
|
|
13
|
+
}, o[0] = u.data?.place, o[1] = l, o[2] = p) : p = o[2];
|
|
14
|
+
let m = p, h;
|
|
15
|
+
bb0: {
|
|
16
|
+
if (!d.data) {
|
|
17
|
+
let e;
|
|
18
|
+
o[3] === Symbol.for("react.memo_cache_sentinel") ? (e = [], o[3] = e) : e = o[3], h = e;
|
|
19
|
+
break bb0;
|
|
20
|
+
}
|
|
21
|
+
let e;
|
|
22
|
+
o[4] !== d.data || o[5] !== m ? (e = d.data.filter(m), o[4] = d.data, o[5] = m, o[6] = e) : e = o[6], h = e;
|
|
23
|
+
}
|
|
24
|
+
let g = h, _;
|
|
25
|
+
o[7] !== u.data || o[8] !== f || o[9] !== s ? (_ = (e, r) => {
|
|
26
|
+
f.mutate({
|
|
27
|
+
pipelineId: u.data.pipelineId,
|
|
28
|
+
runPipelinePayloadDto: { transition: {
|
|
29
|
+
id: e,
|
|
30
|
+
workflowId: s,
|
|
31
|
+
payload: r
|
|
32
|
+
} }
|
|
33
|
+
});
|
|
34
|
+
}, o[7] = u.data, o[8] = f, o[9] = s, o[10] = _) : _ = o[10];
|
|
35
|
+
let v = _, y = f.isPending || u.data?.status === import_enums.WorkflowState.Running, b = u.data?.errorMessage, x;
|
|
36
|
+
return o[11] !== g || o[12] !== d.error || o[13] !== d.isLoading || o[14] !== d.isSuccess || o[15] !== u.data || o[16] !== u.isLoading || o[17] !== u.isSuccess || o[18] !== v || o[19] !== y || o[20] !== b ? (x = {
|
|
37
|
+
workflow: u.data,
|
|
38
|
+
workflowLoading: u.isLoading,
|
|
39
|
+
workflowReady: u.isSuccess,
|
|
40
|
+
workflowError: b,
|
|
41
|
+
documents: g,
|
|
42
|
+
documentsLoading: d.isLoading,
|
|
43
|
+
documentsReady: d.isSuccess,
|
|
44
|
+
documentsError: d.error,
|
|
45
|
+
isLoading: y,
|
|
46
|
+
handleRun: v
|
|
47
|
+
}, o[11] = g, o[12] = d.error, o[13] = d.isLoading, o[14] = d.isSuccess, o[15] = u.data, o[16] = u.isLoading, o[17] = u.isSuccess, o[18] = v, o[19] = y, o[20] = b, o[21] = x) : x = o[21], x;
|
|
48
|
+
}
|
|
49
|
+
export { useWorkflowData };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
2
|
+
import { useScrollToBottom } from "./useAutoScrollBottom.js";
|
|
3
|
+
import { useIntersectionObserver } from "./useIntersectionObserver.js";
|
|
4
|
+
import { useScrollToListItem } from "./useScrollToListItem.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
function useWorkflowListState(s) {
|
|
8
|
+
let l = c(19), u;
|
|
9
|
+
l[0] === Symbol.for("react.memo_cache_sentinel") ? (u = {}, l[0] = u) : u = l[0];
|
|
10
|
+
let [d, f] = useState(u), { activeId: p, observe: m } = useIntersectionObserver("0px 0px 0px 0px"), { listRef: h, scrollTo: g } = useScrollToListItem(), { canScrollDown: _, scrollToBottom: v } = useScrollToBottom(), { activeSectionId: y, setActiveSectionId: b } = useWorkbenchLayout(), x, S;
|
|
11
|
+
l[1] !== p || l[2] !== y || l[3] !== b ? (x = () => {
|
|
12
|
+
y !== p && (b(p), p && f((e) => ({
|
|
13
|
+
...e,
|
|
14
|
+
[p]: !0
|
|
15
|
+
})));
|
|
16
|
+
}, S = [
|
|
17
|
+
p,
|
|
18
|
+
y,
|
|
19
|
+
b
|
|
20
|
+
], l[1] = p, l[2] = y, l[3] = b, l[4] = x, l[5] = S) : (x = l[4], S = l[5]), useEffect(x, S);
|
|
21
|
+
let C, w;
|
|
22
|
+
l[6] !== p || l[7] !== s ? (C = () => {
|
|
23
|
+
if (s && s.length > 0) {
|
|
24
|
+
let e = s[s.length - 1], o = `section-${e.index}-${e.id}`;
|
|
25
|
+
f({
|
|
26
|
+
[o]: !0,
|
|
27
|
+
...p && p !== o ? { [p]: !0 } : {}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}, w = [s, p], l[6] = p, l[7] = s, l[8] = C, l[9] = w) : (C = l[8], w = l[9]), useEffect(C, w);
|
|
31
|
+
let T;
|
|
32
|
+
l[10] === Symbol.for("react.memo_cache_sentinel") ? (T = (e) => {
|
|
33
|
+
f((o) => ({
|
|
34
|
+
...o,
|
|
35
|
+
[e]: !o[e]
|
|
36
|
+
}));
|
|
37
|
+
}, l[10] = T) : T = l[10];
|
|
38
|
+
let E = T, D;
|
|
39
|
+
return l[11] !== p || l[12] !== _ || l[13] !== d || l[14] !== h || l[15] !== m || l[16] !== g || l[17] !== v ? (D = {
|
|
40
|
+
activeId: p,
|
|
41
|
+
expandedSections: d,
|
|
42
|
+
observe: m,
|
|
43
|
+
listRef: h,
|
|
44
|
+
scrollTo: g,
|
|
45
|
+
canScrollDown: _,
|
|
46
|
+
scrollToBottom: v,
|
|
47
|
+
toggleSection: E
|
|
48
|
+
}, l[11] = p, l[12] = _, l[13] = d, l[14] = h, l[15] = m, l[16] = g, l[17] = v, l[18] = D) : D = l[18], D;
|
|
49
|
+
}
|
|
50
|
+
export { useWorkflowListState };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import WorkflowItem_default from "./WorkflowItem.js";
|
|
2
|
+
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
3
|
+
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
4
|
+
import WorkflowList_default from "./WorkflowList.js";
|
|
5
|
+
import WorkbenchNavigation_default from "./WorkbenchNavigation.js";
|
|
6
|
+
import PipelineHistoryList_default from "./components/PipelineHistoryList.js";
|
|
7
|
+
import Workbench from "./Workbench.js";
|
|
8
|
+
import { NewRunDialog } from "./components/NewRunDialog.js";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var WorkbenchLayoutContext = createContext(null);
|
|
5
|
+
function WorkbenchLayoutProvider(a) {
|
|
6
|
+
let o = c(39), { children: s, pipeline: l, isDeveloperMode: u, workspaceConfig: d, getPreviewUrl: f, getEnvironmentPreviewUrl: p, environments: m, previewPanelOpen: h, onPreviewPanelOpenChange: g } = a, _ = u === void 0 ? !1 : u, [v, y] = useState(null), [b, x] = useState(null), [S, C] = useState("preview"), [w, T] = useState(null), [E, D] = useState(""), O = h !== void 0, k = O ? h ? b ?? "preview" : null : b, A = d?.features?.previewPanel?.enabled ?? !1, j;
|
|
7
|
+
o[0] === m ? j = o[1] : (j = m === void 0 || m.some(_temp), o[0] = m, o[1] = j);
|
|
8
|
+
let M = A && j, N = k !== null, P;
|
|
9
|
+
o[2] !== O || o[3] !== g ? (P = (t) => {
|
|
10
|
+
O && g?.(t !== null), x(t);
|
|
11
|
+
}, o[2] = O, o[3] = g, o[4] = P) : P = o[4];
|
|
12
|
+
let F = P, I;
|
|
13
|
+
o[5] === F ? I = o[6] : (I = (t) => {
|
|
14
|
+
y((a) => a === t ? null : t), F(null);
|
|
15
|
+
}, o[5] = F, o[6] = I);
|
|
16
|
+
let L = I, R;
|
|
17
|
+
o[7] === Symbol.for("react.memo_cache_sentinel") ? (R = () => {
|
|
18
|
+
y(null);
|
|
19
|
+
}, o[7] = R) : R = o[7];
|
|
20
|
+
let z = R, B;
|
|
21
|
+
o[8] !== k || o[9] !== F ? (B = (t) => {
|
|
22
|
+
let a = k === t ? null : t;
|
|
23
|
+
F(a), a && y(null);
|
|
24
|
+
}, o[8] = k, o[9] = F, o[10] = B) : B = o[10];
|
|
25
|
+
let V = B, H;
|
|
26
|
+
o[11] === F ? H = o[12] : (H = () => {
|
|
27
|
+
F(null);
|
|
28
|
+
}, o[11] = F, o[12] = H);
|
|
29
|
+
let U = H, W;
|
|
30
|
+
o[13] === F ? W = o[14] : (W = (t) => {
|
|
31
|
+
D(t), F("preview"), y(null);
|
|
32
|
+
}, o[13] = F, o[14] = W);
|
|
33
|
+
let G = W, K;
|
|
34
|
+
o[15] === V ? K = o[16] : (K = () => {
|
|
35
|
+
V("preview");
|
|
36
|
+
}, o[15] = V, o[16] = K);
|
|
37
|
+
let q = K, J;
|
|
38
|
+
o[17] !== v || o[18] !== S || o[19] !== w || o[20] !== k || o[21] !== U || o[22] !== m || o[23] !== p || o[24] !== f || o[25] !== _ || o[26] !== G || o[27] !== l || o[28] !== M || o[29] !== N || o[30] !== E || o[31] !== L || o[32] !== q || o[33] !== V || o[34] !== d ? (J = {
|
|
39
|
+
pipeline: l,
|
|
40
|
+
previewPanelEnabled: M,
|
|
41
|
+
isDeveloperMode: _,
|
|
42
|
+
workspaceConfig: d,
|
|
43
|
+
getPreviewUrl: f,
|
|
44
|
+
getEnvironmentPreviewUrl: p,
|
|
45
|
+
environments: m,
|
|
46
|
+
activeFloatingPanel: v,
|
|
47
|
+
toggleFloatingPanel: L,
|
|
48
|
+
closeFloatingPanel: z,
|
|
49
|
+
activeSidePanel: k,
|
|
50
|
+
toggleSidePanel: V,
|
|
51
|
+
closeSidePanel: U,
|
|
52
|
+
selectedSlotId: E,
|
|
53
|
+
setSelectedSlotId: D,
|
|
54
|
+
openPreviewWithEnvironment: G,
|
|
55
|
+
previewPanelOpen: N,
|
|
56
|
+
togglePreviewPanel: q,
|
|
57
|
+
activePreviewTab: S,
|
|
58
|
+
setActivePreviewTab: C,
|
|
59
|
+
activeSectionId: w,
|
|
60
|
+
setActiveSectionId: T
|
|
61
|
+
}, o[17] = v, o[18] = S, o[19] = w, o[20] = k, o[21] = U, o[22] = m, o[23] = p, o[24] = f, o[25] = _, o[26] = G, o[27] = l, o[28] = M, o[29] = N, o[30] = E, o[31] = L, o[32] = q, o[33] = V, o[34] = d, o[35] = J) : J = o[35];
|
|
62
|
+
let Y = J, X;
|
|
63
|
+
return o[36] !== s || o[37] !== Y ? (X = /* @__PURE__ */ jsx(WorkbenchLayoutContext.Provider, {
|
|
64
|
+
value: Y,
|
|
65
|
+
children: s
|
|
66
|
+
}), o[36] = s, o[37] = Y, o[38] = X) : X = o[38], X;
|
|
67
|
+
}
|
|
68
|
+
function _temp(t) {
|
|
69
|
+
return !!t.connectionUrl && (!!t.workerId || t.local);
|
|
70
|
+
}
|
|
71
|
+
function useWorkbenchLayout() {
|
|
72
|
+
let t = useContext(WorkbenchLayoutContext);
|
|
73
|
+
if (!t) throw Error("useWorkbenchLayout must be used within a WorkbenchLayoutProvider");
|
|
74
|
+
return t;
|
|
75
|
+
}
|
|
76
|
+
export { WorkbenchLayoutProvider, useWorkbenchLayout };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useStudio } from "../../providers/StudioProvider.js";
|
|
2
|
+
import { useWorkspaceConfig } from "../../hooks/useConfig.js";
|
|
2
3
|
import { useBatchDeleteWorkspaces, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace } from "../../hooks/useWorkspaces.js";
|
|
3
4
|
import { useComponentOverrides } from "../../providers/ComponentOverridesProvider.js";
|
|
4
5
|
import { Badge } from "../../components/ui/badge.js";
|
|
5
6
|
import { Dialog, DialogContent } from "../../components/ui/dialog.js";
|
|
6
7
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../components/ui/tooltip.js";
|
|
7
8
|
import ListView_default from "../../components/lists/ListView.js";
|
|
8
|
-
import { useWorkspaceConfig } from "../../hooks/useConfig.js";
|
|
9
9
|
import { useDebounce } from "../../hooks/useDebounce.js";
|
|
10
10
|
import CreateWorkspace_default from "./components/CreateWorkspace.js";
|
|
11
11
|
import { c } from "react/compiler-runtime";
|
|
@@ -200,7 +200,7 @@ function _temp(e) {
|
|
|
200
200
|
function _temp2(e) {
|
|
201
201
|
return /* @__PURE__ */ jsxs(Badge, {
|
|
202
202
|
variant: "secondary",
|
|
203
|
-
children: [e.
|
|
203
|
+
children: [e.envName ?? e.remoteEnvironmentId.slice(0, 8), e.type && /* @__PURE__ */ jsxs("span", {
|
|
204
204
|
className: "text-muted-foreground ml-1",
|
|
205
205
|
children: [
|
|
206
206
|
"(",
|