@loopstack/loopstack-studio 0.33.0 → 0.35.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/app/EnvironmentEmbedRoot.js +17 -25
- package/dist/components/layout/StudioSidebar.js +34 -34
- package/dist/components/messages/CompletionMessagePaper.js +25 -29
- package/dist/events/api-client-events.js +13 -1
- package/dist/events/index.js +1 -0
- package/dist/features/code-explorer/components/FileTabsBarBase.js +1 -1
- package/dist/features/code-explorer/index.js +0 -3
- package/dist/features/dashboard/AppLauncher.js +111 -64
- package/dist/features/debug/components/WorkflowFlowViewer.js +2 -1
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +2 -1
- package/dist/features/documents/DocumentRenderer.js +42 -42
- package/dist/features/documents/components/DocumentList.js +1 -1
- package/dist/features/documents/document-details/DocumentDetails.js +0 -5
- package/dist/features/documents/renderers/DocumentFormRenderer.js +13 -12
- package/dist/features/documents/renderers/LinkMessageRenderer.js +2 -1
- package/dist/features/documents/renderers/useDocumentTransition.js +3 -2
- package/dist/features/feature-registry/FeatureRegistryProvider.js +17 -18
- package/dist/features/feature-registry/available-features.js +3 -2
- package/dist/features/feature-registry/index.js +1 -1
- package/dist/features/file-explorer/components/FileExplorerPanel.js +64 -43
- package/dist/features/file-explorer/components/FileTabsBar.js +1 -1
- package/dist/features/file-explorer/components/FileTree.js +1 -1
- package/dist/features/file-explorer/file-explorer-feature.js +15 -7
- package/dist/features/file-explorer/hooks/useFileExplorer.js +41 -34
- package/dist/features/file-explorer/index.js +1 -1
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +91 -89
- package/dist/features/git/components/WorkbenchGitPanel.js +7 -10
- package/dist/features/git/hooks/useGit.js +55 -57
- package/dist/features/health/LocalHealthCheck.js +46 -47
- package/dist/features/oauth/OAuthPromptRenderer.js +6 -5
- package/dist/features/runs/Runs.js +3 -2
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/secrets/renderers/SecretInputRenderer.js +3 -2
- package/dist/features/workbench/Workbench.js +16 -16
- package/dist/features/workbench/WorkflowItem.js +5 -8
- package/dist/features/workbench/components/NewRunDialog.js +173 -171
- package/dist/features/workbench/components/PreviewEmptyState.js +1 -1
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
- package/dist/features/workbench/components/WorkbenchRunsPanel.js +2 -1
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/components/WorkflowForms.js +1 -1
- package/dist/features/workbench/components/WorkflowHistoryItem.js +2 -1
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +8 -14
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +65 -132
- package/dist/features/workbench/hooks/useWorkflowData.js +8 -6
- package/dist/features/workbench/index.js +1 -1
- package/dist/features/workspaces/Workspaces.js +5 -3
- package/dist/features/workspaces/components/CreateWorkspace.js +7 -5
- package/dist/features/workspaces/components/ExecutionTimeline.js +69 -65
- package/dist/features/workspaces/components/WorkflowRunForm.js +6 -4
- package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/useAuth.js +14 -53
- package/dist/hooks/useConfig.js +13 -37
- package/dist/hooks/useDocuments.js +5 -30
- package/dist/hooks/useEnvironments.js +34 -24
- package/dist/hooks/useProcessor.js +2 -31
- package/dist/hooks/useSecrets.js +71 -53
- package/dist/hooks/useWorkflows.js +43 -172
- package/dist/hooks/useWorkspaces.js +24 -130
- package/dist/index.d.ts +137 -481
- package/dist/index.js +15 -17
- package/dist/loopstack-studio.css +1 -1
- package/dist/packages/client/dist/client.js +35 -0
- package/dist/packages/client/dist/http.js +47 -0
- package/dist/packages/client/dist/index.js +15 -0
- package/dist/packages/client/dist/queries/query-keys.js +94 -0
- package/dist/packages/client/dist/queries/query-options.js +97 -0
- package/dist/packages/client/dist/resources/auth.js +10 -0
- package/dist/packages/client/dist/resources/config.js +11 -0
- package/dist/packages/client/dist/resources/dashboard.js +4 -0
- package/dist/packages/client/dist/resources/documents.js +7 -0
- package/dist/packages/client/dist/resources/processor.js +7 -0
- package/dist/packages/client/dist/resources/workflows.js +13 -0
- package/dist/packages/client/dist/resources/workspaces.js +12 -0
- package/dist/packages/client/dist/stream/invalidations.js +20 -0
- package/dist/packages/client/dist/stream/llm-reducer.js +65 -0
- package/dist/packages/client/dist/stream/sse-parser.js +40 -0
- package/dist/packages/client/dist/stream/stream.js +147 -0
- package/dist/packages/contracts/dist/events/client-message-base.schema.js +6 -0
- package/dist/packages/contracts/dist/events/client-message.schema.js +24 -0
- package/dist/packages/contracts/dist/events/index.js +6 -0
- package/dist/packages/contracts/dist/events/llm-events.schema.js +44 -0
- package/dist/packages/contracts/dist/events/stream-events.schema.js +4 -0
- package/dist/packages/contracts/dist/events/workflow-events.schema.js +20 -0
- package/dist/packages/contracts/dist/events/workspace-events.schema.js +5 -0
- package/dist/packages/contracts/dist/types/types/ui-message.type.js +39 -0
- package/dist/packages/react/dist/hooks/mutations.js +175 -0
- package/dist/packages/react/dist/hooks/queries.js +139 -0
- package/dist/packages/react/dist/hooks/use-live-invalidation.js +39 -0
- package/dist/packages/react/dist/hooks/use-llm-stream.js +18 -0
- package/dist/packages/react/dist/index.js +5 -0
- package/dist/packages/react/dist/provider.js +15 -0
- package/dist/pages/DashboardPage.js +2 -1
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -1
- package/dist/pages/DebugWorkflowsPage.js +2 -1
- package/dist/pages/EmbedWorkbenchPage.js +50 -43
- package/dist/pages/PreviewWorkbenchPage.js +60 -59
- package/dist/pages/StudioLandingPage.js +1 -1
- package/dist/pages/WorkbenchPage.js +53 -47
- package/dist/pages/WorkflowDebugPage.js +3 -2
- package/dist/pages/WorkspacePage.js +42 -27
- package/dist/pages/WorkspaceRunsPage.js +36 -27
- package/dist/providers/LoopstackClientProvider.js +31 -0
- package/dist/services/createApiClient.js +9 -3
- package/dist/services/index.js +0 -1
- package/dist/services/reporting-fetch.js +13 -0
- package/package.json +4 -3
- package/dist/api/auth.js +0 -10
- package/dist/api/client.js +0 -13
- package/dist/api/config.js +0 -11
- package/dist/api/dashboard.js +0 -4
- package/dist/api/documents.js +0 -7
- package/dist/api/environments.js +0 -8
- package/dist/api/index.js +0 -28
- package/dist/api/processor.js +0 -7
- package/dist/api/secrets.js +0 -16
- package/dist/api/workflows.js +0 -15
- package/dist/api/workspaces.js +0 -12
- package/dist/events/sse-client-events.js +0 -13
- package/dist/features/code-explorer/CodeExplorer.js +0 -6
- package/dist/features/code-explorer/components/CodeExplorerTree.js +0 -6
- package/dist/features/code-explorer/components/FileTabsBar.js +0 -4
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +0 -5
- package/dist/features/file-explorer/api/files.js +0 -7
- package/dist/features/git/api/git.js +0 -9
- package/dist/hooks/query-keys.js +0 -145
- package/dist/hooks/useApi.js +0 -15
- package/dist/hooks/useFiles.js +0 -3
- package/dist/node_modules/lodash/_Symbol.js +0 -7
- package/dist/node_modules/lodash/_baseGetTag.js +0 -13
- package/dist/node_modules/lodash/_baseTrim.js +0 -11
- package/dist/node_modules/lodash/_freeGlobal.js +0 -6
- package/dist/node_modules/lodash/_getRawTag.js +0 -17
- package/dist/node_modules/lodash/_objectToString.js +0 -10
- package/dist/node_modules/lodash/_root.js +0 -8
- package/dist/node_modules/lodash/_trimmedEndIndex.js +0 -11
- package/dist/node_modules/lodash/debounce.js +0 -53
- package/dist/node_modules/lodash/isObject.js +0 -10
- package/dist/node_modules/lodash/isObjectLike.js +0 -9
- package/dist/node_modules/lodash/isSymbol.js +0 -12
- package/dist/node_modules/lodash/now.js +0 -10
- package/dist/node_modules/lodash/toNumber.js +0 -22
- package/dist/providers/InvalidationEventsProvider.js +0 -41
- package/dist/providers/SseProvider.js +0 -37
- package/dist/services/eventEmitter.js +0 -12
|
@@ -1,37 +1,29 @@
|
|
|
1
1
|
import { StudioProvider } from "../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import { InvalidationEventsProvider } from "../providers/InvalidationEventsProvider.js";
|
|
2
|
+
import { LoopstackClientProvider } from "../providers/LoopstackClientProvider.js";
|
|
4
3
|
import { useRouter } from "../routing/LocalRouter.js";
|
|
5
|
-
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
6
|
-
import "../features/feature-registry/index.js";
|
|
7
4
|
import LocalHealthCheck_default from "../features/health/LocalHealthCheck.js";
|
|
8
5
|
import { QueryProvider } from "../providers/QueryProvider.js";
|
|
9
6
|
import { c } from "react/compiler-runtime";
|
|
10
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
8
|
import { Outlet, useSearchParams } from "react-router-dom";
|
|
12
9
|
function EnvironmentEmbedRoot() {
|
|
13
|
-
let
|
|
14
|
-
|
|
10
|
+
let d = c(11), [f] = useSearchParams(), p;
|
|
11
|
+
d[0] === f ? p = d[1] : (p = f.get("url") ?? "http://localhost:3080", d[0] = f, d[1] = p);
|
|
12
|
+
let m = p, h;
|
|
13
|
+
d[2] === f ? h = d[3] : (h = f.get("name") ?? "Preview Environment", d[2] = f, d[3] = h);
|
|
15
14
|
let g = h, _;
|
|
16
|
-
|
|
17
|
-
let v = _, y;
|
|
18
|
-
p[4] !== v || p[5] !== g ? (y = {
|
|
15
|
+
d[4] !== g || d[5] !== m ? (_ = {
|
|
19
16
|
id: "preview-env",
|
|
20
|
-
name:
|
|
21
|
-
url:
|
|
22
|
-
},
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return p[8] !== b || p[9] !== x ? (C = /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(StudioProvider, {
|
|
32
|
-
router: x,
|
|
33
|
-
environment: b,
|
|
34
|
-
children: S
|
|
35
|
-
}) }), p[8] = b, p[9] = x, p[10] = C) : C = p[10], C;
|
|
17
|
+
name: g,
|
|
18
|
+
url: m
|
|
19
|
+
}, d[4] = g, d[5] = m, d[6] = _) : _ = d[6];
|
|
20
|
+
let v = _, y = useRouter(v.id, "/embed/env"), b;
|
|
21
|
+
d[7] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ jsxs(LoopstackClientProvider, { children: [/* @__PURE__ */ jsx(LocalHealthCheck_default, {}), /* @__PURE__ */ jsx(Outlet, {})] }), d[7] = b) : b = d[7];
|
|
22
|
+
let x;
|
|
23
|
+
return d[8] !== v || d[9] !== y ? (x = /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(StudioProvider, {
|
|
24
|
+
router: y,
|
|
25
|
+
environment: v,
|
|
26
|
+
children: b
|
|
27
|
+
}) }), d[8] = v, d[9] = y, d[10] = x) : x = d[10], x;
|
|
36
28
|
}
|
|
37
29
|
export { EnvironmentEmbedRoot as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useStudio, useStudioOptional } from "../../providers/StudioProvider.js";
|
|
2
1
|
import { useFilterWorkspaces } from "../../hooks/useWorkspaces.js";
|
|
2
|
+
import { useStudio, useStudioOptional } from "../../providers/StudioProvider.js";
|
|
3
3
|
import { useComponentOverrides } from "../../providers/ComponentOverridesProvider.js";
|
|
4
4
|
import { cn } from "../../lib/utils.js";
|
|
5
5
|
import { Button } from "../ui/button.js";
|
|
@@ -87,73 +87,73 @@ var DefaultSidebarHeader = () => {
|
|
|
87
87
|
children: [h, E]
|
|
88
88
|
}), e[14] = m, e[15] = h, e[16] = E, e[17] = D) : D = e[17], D;
|
|
89
89
|
}, MainNav = () => {
|
|
90
|
-
let
|
|
91
|
-
|
|
90
|
+
let e = c(29), s = useLocation(), { router: l } = useStudio(), u;
|
|
91
|
+
e[0] === l ? u = e[1] : (u = l.getDashboard(), e[0] = l, e[1] = u);
|
|
92
92
|
let d = u, f;
|
|
93
|
-
|
|
93
|
+
e[2] === l ? f = e[3] : (f = l.getWorkspaces(), e[2] = l, e[3] = f);
|
|
94
94
|
let p = f, m = l.getRuns(), _ = s.pathname === d, v, S;
|
|
95
|
-
|
|
95
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ jsx(Boxes, {}), S = /* @__PURE__ */ jsx("span", { children: "Applications" }), e[4] = v, e[5] = S) : (v = e[4], S = e[5]);
|
|
96
96
|
let C;
|
|
97
|
-
|
|
97
|
+
e[6] === d ? C = e[7] : (C = /* @__PURE__ */ jsxs(Link, {
|
|
98
98
|
to: d,
|
|
99
99
|
children: [v, S]
|
|
100
|
-
}),
|
|
100
|
+
}), e[6] = d, e[7] = C);
|
|
101
101
|
let w;
|
|
102
|
-
|
|
102
|
+
e[8] !== _ || e[9] !== C ? (w = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
103
103
|
asChild: !0,
|
|
104
104
|
isActive: _,
|
|
105
105
|
tooltip: "Applications",
|
|
106
106
|
children: C
|
|
107
|
-
}) }),
|
|
107
|
+
}) }), e[8] = _, e[9] = C, e[10] = w) : w = e[10];
|
|
108
108
|
let T = s.pathname === p, k, A;
|
|
109
|
-
|
|
109
|
+
e[11] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ jsx(LayoutGrid, {}), A = /* @__PURE__ */ jsx("span", { children: "Workspaces" }), e[11] = k, e[12] = A) : (k = e[11], A = e[12]);
|
|
110
110
|
let j;
|
|
111
|
-
|
|
111
|
+
e[13] === p ? j = e[14] : (j = /* @__PURE__ */ jsxs(Link, {
|
|
112
112
|
to: p,
|
|
113
113
|
children: [k, A]
|
|
114
|
-
}),
|
|
114
|
+
}), e[13] = p, e[14] = j);
|
|
115
115
|
let M;
|
|
116
|
-
|
|
116
|
+
e[15] !== j || e[16] !== T ? (M = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
117
117
|
asChild: !0,
|
|
118
118
|
isActive: T,
|
|
119
119
|
tooltip: "Workspaces",
|
|
120
120
|
children: j
|
|
121
|
-
}) }),
|
|
121
|
+
}) }), e[15] = j, e[16] = T, e[17] = M) : M = e[17];
|
|
122
122
|
let N = s.pathname === m || s.pathname === m + "/", P, F;
|
|
123
|
-
|
|
123
|
+
e[18] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ jsx(Play, {}), F = /* @__PURE__ */ jsx("span", { children: "Runs" }), e[18] = P, e[19] = F) : (P = e[18], F = e[19]);
|
|
124
124
|
let I;
|
|
125
|
-
|
|
125
|
+
e[20] === m ? I = e[21] : (I = /* @__PURE__ */ jsxs(Link, {
|
|
126
126
|
to: m,
|
|
127
127
|
children: [P, F]
|
|
128
|
-
}),
|
|
128
|
+
}), e[20] = m, e[21] = I);
|
|
129
129
|
let L;
|
|
130
|
-
|
|
130
|
+
e[22] !== N || e[23] !== I ? (L = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
131
131
|
asChild: !0,
|
|
132
132
|
isActive: N,
|
|
133
133
|
tooltip: "Runs",
|
|
134
134
|
children: I
|
|
135
|
-
}) }),
|
|
135
|
+
}) }), e[22] = N, e[23] = I, e[24] = L) : L = e[24];
|
|
136
136
|
let R;
|
|
137
|
-
return
|
|
137
|
+
return e[25] !== M || e[26] !== L || e[27] !== w ? (R = /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsxs(SidebarMenu, { children: [
|
|
138
138
|
w,
|
|
139
139
|
M,
|
|
140
140
|
L
|
|
141
|
-
] }) }) }),
|
|
141
|
+
] }) }) }), e[25] = M, e[26] = L, e[27] = w, e[28] = R) : R = e[28], R;
|
|
142
142
|
}, FavouritesNav = () => {
|
|
143
|
-
let
|
|
144
|
-
|
|
143
|
+
let s = c(19), l = useLocation(), { router: u } = useStudio(), d;
|
|
144
|
+
s[0] === u ? d = s[1] : (d = u.getWorkspaces(), s[0] = u, s[1] = d);
|
|
145
145
|
let f = d, p;
|
|
146
|
-
|
|
146
|
+
s[2] === Symbol.for("react.memo_cache_sentinel") ? (p = { isFavourite: "true" }, s[2] = p) : p = s[2];
|
|
147
147
|
let m = useFilterWorkspaces(void 0, p, "createdAt", "ASC", 0, 10), v;
|
|
148
|
-
|
|
148
|
+
s[3] === m.data?.data ? v = s[4] : (v = m.data?.data ?? [], s[3] = m.data?.data, s[4] = v);
|
|
149
149
|
let S = v;
|
|
150
150
|
if (S.length === 0) return null;
|
|
151
151
|
let C;
|
|
152
|
-
|
|
152
|
+
s[5] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Favourites" }), s[5] = C) : C = s[5];
|
|
153
153
|
let w;
|
|
154
|
-
if (
|
|
154
|
+
if (s[6] !== S || s[7] !== l || s[8] !== u) {
|
|
155
155
|
let e;
|
|
156
|
-
|
|
156
|
+
s[10] !== l || s[11] !== u ? (e = (e) => {
|
|
157
157
|
let o = u.getWorkspace(e.id);
|
|
158
158
|
return /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
159
159
|
asChild: !0,
|
|
@@ -164,25 +164,25 @@ var DefaultSidebarHeader = () => {
|
|
|
164
164
|
children: [/* @__PURE__ */ jsx(Star, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", { children: e.title })]
|
|
165
165
|
})
|
|
166
166
|
}) }, e.id);
|
|
167
|
-
},
|
|
168
|
-
} else w =
|
|
167
|
+
}, s[10] = l, s[11] = u, s[12] = e) : e = s[12], w = S.map(e), s[6] = S, s[7] = l, s[8] = u, s[9] = w;
|
|
168
|
+
} else w = s[9];
|
|
169
169
|
let T;
|
|
170
|
-
|
|
170
|
+
s[13] !== m.data?.total || s[14] !== f ? (T = (m.data?.total ?? 0) > 10 && /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
171
171
|
asChild: !0,
|
|
172
172
|
tooltip: "More favourites",
|
|
173
173
|
children: /* @__PURE__ */ jsxs(Link, {
|
|
174
174
|
to: f,
|
|
175
175
|
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", { children: "More" })]
|
|
176
176
|
})
|
|
177
|
-
}) }),
|
|
177
|
+
}) }), s[13] = m.data?.total, s[14] = f, s[15] = T) : T = s[15];
|
|
178
178
|
let O;
|
|
179
|
-
return
|
|
179
|
+
return s[16] !== w || s[17] !== T ? (O = /* @__PURE__ */ jsxs(SidebarGroup, { children: [C, /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsxs(SidebarMenu, { children: [w, T] }) })] }), s[16] = w, s[17] = T, s[18] = O) : O = s[18], O;
|
|
180
180
|
}, DefaultSidebarFooter = () => {
|
|
181
181
|
let e = c(1), o;
|
|
182
182
|
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ jsx(SidebarFooter, {}), e[0] = o) : o = e[0], o;
|
|
183
183
|
};
|
|
184
184
|
const StudioSidebar = () => {
|
|
185
|
-
let e = c(13),
|
|
185
|
+
let e = c(13), o = useComponentOverrides(), u = useStudioOptional(), d = o.SidebarHeader ?? DefaultSidebarHeader, m = o.SidebarFooter ?? DefaultSidebarFooter, h;
|
|
186
186
|
e[0] === d ? h = e[1] : (h = /* @__PURE__ */ jsx(d, {}), e[0] = d, e[1] = h);
|
|
187
187
|
let g;
|
|
188
188
|
e[2] === u ? g = e[3] : (g = u && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(MainNav, {}), /* @__PURE__ */ jsx(FavouritesNav, {})] }), e[2] = u, e[3] = g);
|
|
@@ -4,7 +4,7 @@ import { c } from "react/compiler-runtime";
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
var CompletionMessagePaper_default = (s) => {
|
|
7
|
-
let l = c(
|
|
7
|
+
let l = c(33), { role: u, children: d, timestamp: f, metadata: p, fullWidth: m, className: h } = s, g = m === void 0 ? !1 : m, _;
|
|
8
8
|
l[0] === Symbol.for("react.memo_cache_sentinel") ? (_ = {
|
|
9
9
|
system: {
|
|
10
10
|
color: "#efb108",
|
|
@@ -58,46 +58,42 @@ var CompletionMessagePaper_default = (s) => {
|
|
|
58
58
|
}), l[15] = b, l[16] = p, l[17] = A) : A = l[17];
|
|
59
59
|
let j = g ? "w-full" : "w-auto", M;
|
|
60
60
|
l[18] === j ? M = l[19] : (M = cn("relative max-w-full px-6 py-4 wrap-break-word shadow-none", j), l[18] = j, l[19] = M);
|
|
61
|
-
let N
|
|
62
|
-
l[20] ===
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
children: F
|
|
72
|
-
}), l[24] = P, l[25] = F, l[26] = I) : I = l[26];
|
|
73
|
-
let L;
|
|
74
|
-
l[27] !== M || l[28] !== I ? (L = /* @__PURE__ */ jsx(Card, {
|
|
61
|
+
let N;
|
|
62
|
+
l[20] === d ? N = l[21] : (N = /* @__PURE__ */ jsx("div", {
|
|
63
|
+
className: "text-foreground leading-relaxed wrap-break-word whitespace-pre-wrap",
|
|
64
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: "message-content",
|
|
66
|
+
children: d
|
|
67
|
+
})
|
|
68
|
+
}), l[20] = d, l[21] = N);
|
|
69
|
+
let P;
|
|
70
|
+
l[22] !== M || l[23] !== N ? (P = /* @__PURE__ */ jsx(Card, {
|
|
75
71
|
className: M,
|
|
76
|
-
children:
|
|
77
|
-
}), l[
|
|
78
|
-
let
|
|
79
|
-
l[
|
|
72
|
+
children: N
|
|
73
|
+
}), l[22] = M, l[23] = N, l[24] = P) : P = l[24];
|
|
74
|
+
let F;
|
|
75
|
+
l[25] !== k || l[26] !== A || l[27] !== P || l[28] !== E ? (F = /* @__PURE__ */ jsxs("div", {
|
|
80
76
|
className: E,
|
|
81
77
|
children: [
|
|
82
78
|
k,
|
|
83
79
|
A,
|
|
84
|
-
|
|
80
|
+
P
|
|
85
81
|
]
|
|
86
|
-
}), l[
|
|
87
|
-
let
|
|
88
|
-
return l[
|
|
82
|
+
}), l[25] = k, l[26] = A, l[27] = P, l[28] = E, l[29] = F) : F = l[29];
|
|
83
|
+
let I;
|
|
84
|
+
return l[30] !== F || l[31] !== C ? (I = /* @__PURE__ */ jsx("div", {
|
|
89
85
|
className: C,
|
|
90
|
-
children:
|
|
91
|
-
}), l[
|
|
86
|
+
children: F
|
|
87
|
+
}), l[30] = F, l[31] = C, l[32] = I) : I = l[32], I;
|
|
92
88
|
};
|
|
93
|
-
function _temp(
|
|
94
|
-
return
|
|
89
|
+
function _temp(t) {
|
|
90
|
+
return t.toLocaleTimeString([], {
|
|
95
91
|
hour: "2-digit",
|
|
96
92
|
minute: "2-digit"
|
|
97
93
|
});
|
|
98
94
|
}
|
|
99
|
-
function _temp2(
|
|
100
|
-
let [a, o] =
|
|
95
|
+
function _temp2(t) {
|
|
96
|
+
let [a, o] = t;
|
|
101
97
|
return /* @__PURE__ */ jsxs("div", {
|
|
102
98
|
className: "text-muted-foreground font-mono text-xs",
|
|
103
99
|
children: [
|
|
@@ -2,4 +2,16 @@ const ApiClientEvents = {
|
|
|
2
2
|
UNAUTHORIZED: "api.unauthorized",
|
|
3
3
|
ERR_NETWORK: "api.ERR_NETWORK"
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
function createApiClientEventEmitter() {
|
|
6
|
+
let e = /* @__PURE__ */ new Map();
|
|
7
|
+
return {
|
|
8
|
+
on(t, n) {
|
|
9
|
+
return e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n), () => e.get(t)?.delete(n);
|
|
10
|
+
},
|
|
11
|
+
emit(t, n) {
|
|
12
|
+
for (let r of e.get(t) ?? []) r(n);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const apiClientEvents = createApiClientEventEmitter();
|
|
17
|
+
export { ApiClientEvents, apiClientEvents };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { ApiClientEvents, apiClientEvents } from "./api-client-events.js";
|
|
@@ -2,8 +2,8 @@ import { cn } from "../../../lib/utils.js";
|
|
|
2
2
|
import { Button } from "../../../components/ui/button.js";
|
|
3
3
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../../../components/ui/dropdown-menu.js";
|
|
4
4
|
import { ScrollArea, ScrollBar } from "../../../components/ui/scroll-area.js";
|
|
5
|
-
import { getFileIcon } from "../utils/fileIcons.js";
|
|
6
5
|
import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger } from "../../../components/ui/context-menu.js";
|
|
6
|
+
import { getFileIcon } from "../utils/fileIcons.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { useEffect, useRef } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,84 +1,131 @@
|
|
|
1
|
+
import { useFilterWorkspaces } from "../../hooks/useWorkspaces.js";
|
|
1
2
|
import { useStudio } from "../../providers/StudioProvider.js";
|
|
2
3
|
import { useComponentOverrides } from "../../providers/ComponentOverridesProvider.js";
|
|
3
4
|
import { Button } from "../../components/ui/button.js";
|
|
4
5
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../../components/ui/card.js";
|
|
5
6
|
import { Dialog, DialogContent } from "../../components/ui/dialog.js";
|
|
6
7
|
import CreateWorkspace_default from "../workspaces/components/CreateWorkspace.js";
|
|
8
|
+
import { AVAILABLE_FEATURES } from "../feature-registry/available-features.js";
|
|
7
9
|
import { c } from "react/compiler-runtime";
|
|
8
10
|
import { useMemo, useState } from "react";
|
|
9
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
12
|
import { Link } from "react-router-dom";
|
|
11
|
-
import { Boxes, FolderOpen, Plus } from "lucide-react";
|
|
12
|
-
function
|
|
13
|
-
let S =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
import { Boxes, FolderOpen, Plus, Server } from "lucide-react";
|
|
14
|
+
function getCapabilityIcons(e) {
|
|
15
|
+
let S = [];
|
|
16
|
+
for (let C of e.extensions?.environments ?? []) S.push({
|
|
17
|
+
key: `env:${C.id}`,
|
|
18
|
+
Icon: Server,
|
|
19
|
+
label: C.title ?? C.id
|
|
20
|
+
});
|
|
21
|
+
for (let C of e.features) {
|
|
22
|
+
if (C.enabled === !1) continue;
|
|
23
|
+
let e = AVAILABLE_FEATURES[C.id];
|
|
24
|
+
e?.sidebarPanel && S.push({
|
|
25
|
+
key: `feature:${e.id}`,
|
|
26
|
+
Icon: e.sidebarPanel.icon,
|
|
27
|
+
label: e.sidebarPanel.label
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return S;
|
|
31
|
+
}
|
|
32
|
+
function AppLauncher(w) {
|
|
33
|
+
let T = c(30), { apps: E } = w, { CreateWorkspace: D } = useComponentOverrides(), O = D ?? CreateWorkspace_default, { router: k } = useStudio(), [A, j] = useState(null), M;
|
|
34
|
+
T[0] === Symbol.for("react.memo_cache_sentinel") ? (M = {}, T[0] = M) : M = T[0];
|
|
35
|
+
let N = useFilterWorkspaces(void 0, M, "id", "DESC", 0, 1e3), P;
|
|
36
|
+
if (T[1] !== N.data?.data) {
|
|
37
|
+
P = {};
|
|
38
|
+
for (let e of N.data?.data ?? []) P[e.appName] = (P[e.appName] ?? 0) + 1;
|
|
39
|
+
T[1] = N.data?.data, T[2] = P;
|
|
40
|
+
} else P = T[2];
|
|
41
|
+
let F = P, I;
|
|
42
|
+
T[3] === A ? I = T[4] : (I = A ? [{
|
|
43
|
+
appName: A.appName,
|
|
44
|
+
title: A.title,
|
|
45
|
+
environments: A.extensions?.environments ?? []
|
|
46
|
+
}] : [], T[3] = A, T[4] = I);
|
|
47
|
+
let L = I, R;
|
|
48
|
+
T[5] === k ? R = T[6] : (R = (e) => {
|
|
49
|
+
j(null), e && k.navigateToWorkspace(e.id);
|
|
50
|
+
}, T[5] = k, T[6] = R);
|
|
51
|
+
let z = R, B;
|
|
52
|
+
if (T[7] !== E || T[8] !== k || T[9] !== F) {
|
|
25
53
|
let e;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
className: "flex
|
|
30
|
-
children: [/* @__PURE__ */
|
|
31
|
-
className: "
|
|
32
|
-
children:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
T[11] !== k || T[12] !== F ? (e = (e) => {
|
|
55
|
+
let S = getCapabilityIcons(e), C = F[e.appName] ?? 0;
|
|
56
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
57
|
+
className: "flex flex-col",
|
|
58
|
+
children: [/* @__PURE__ */ jsxs(CardHeader, { children: [/* @__PURE__ */ jsxs("div", {
|
|
59
|
+
className: "flex items-start justify-between gap-2",
|
|
60
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: "flex items-center gap-2",
|
|
62
|
+
children: [/* @__PURE__ */ jsx(Boxes, { className: "text-muted-foreground h-5 w-5" }), /* @__PURE__ */ jsx(CardTitle, {
|
|
63
|
+
className: "text-base",
|
|
64
|
+
children: e.title
|
|
65
|
+
})]
|
|
66
|
+
}), S.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: "text-muted-foreground flex shrink-0 items-center gap-1",
|
|
68
|
+
children: S.map(_temp)
|
|
69
|
+
})]
|
|
70
|
+
}), e.description && /* @__PURE__ */ jsx(CardDescription, { children: e.description })] }), /* @__PURE__ */ jsx(CardContent, {
|
|
71
|
+
className: "mt-auto",
|
|
72
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
73
|
+
className: "flex gap-2",
|
|
74
|
+
children: C > 0 ? /* @__PURE__ */ jsx(Button, {
|
|
75
|
+
variant: "ghost",
|
|
76
|
+
size: "sm",
|
|
77
|
+
className: "flex-1",
|
|
78
|
+
asChild: !0,
|
|
79
|
+
children: /* @__PURE__ */ jsxs(Link, {
|
|
80
|
+
to: `${k.getWorkspaces()}?appName=${encodeURIComponent(e.appName)}`,
|
|
81
|
+
children: [/* @__PURE__ */ jsx(FolderOpen, { className: "mr-1 h-4 w-4" }), "View Workspaces"]
|
|
82
|
+
})
|
|
83
|
+
}) : /* @__PURE__ */ jsxs(Button, {
|
|
84
|
+
variant: "outline",
|
|
85
|
+
size: "sm",
|
|
86
|
+
className: "flex-1",
|
|
87
|
+
onClick: () => j(e),
|
|
88
|
+
children: [/* @__PURE__ */ jsx(Plus, { className: "mr-1 h-4 w-4" }), "Configure"]
|
|
89
|
+
})
|
|
44
90
|
})
|
|
45
|
-
}), /* @__PURE__ */ jsxs(Button, {
|
|
46
|
-
variant: "outline",
|
|
47
|
-
size: "sm",
|
|
48
|
-
className: "flex-1",
|
|
49
|
-
onClick: () => O(e),
|
|
50
|
-
children: [/* @__PURE__ */ jsx(Plus, { className: "mr-1 h-4 w-4" }), "Create Workspace"]
|
|
51
91
|
})]
|
|
52
|
-
})
|
|
53
|
-
},
|
|
54
|
-
} else
|
|
55
|
-
let
|
|
56
|
-
|
|
92
|
+
}, e.appName);
|
|
93
|
+
}, T[11] = k, T[12] = F, T[13] = e) : e = T[13], B = E.map(e), T[7] = E, T[8] = k, T[9] = F, T[10] = B;
|
|
94
|
+
} else B = T[10];
|
|
95
|
+
let V;
|
|
96
|
+
T[14] === B ? V = T[15] : (V = /* @__PURE__ */ jsx("div", {
|
|
57
97
|
className: "mb-8",
|
|
58
98
|
children: /* @__PURE__ */ jsx("div", {
|
|
59
99
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
60
|
-
children:
|
|
100
|
+
children: B
|
|
61
101
|
})
|
|
62
|
-
}),
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
types:
|
|
68
|
-
onSuccess:
|
|
69
|
-
}),
|
|
70
|
-
let
|
|
71
|
-
|
|
102
|
+
}), T[14] = B, T[15] = V);
|
|
103
|
+
let H = !!A, U;
|
|
104
|
+
T[16] === Symbol.for("react.memo_cache_sentinel") ? (U = (e) => !e && j(null), T[16] = U) : U = T[16];
|
|
105
|
+
let W;
|
|
106
|
+
T[17] !== O || T[18] !== L || T[19] !== z || T[20] !== A ? (W = A && /* @__PURE__ */ jsx(O, {
|
|
107
|
+
types: L,
|
|
108
|
+
onSuccess: z
|
|
109
|
+
}), T[17] = O, T[18] = L, T[19] = z, T[20] = A, T[21] = W) : W = T[21];
|
|
110
|
+
let G;
|
|
111
|
+
T[22] === W ? G = T[23] : (G = /* @__PURE__ */ jsx(DialogContent, {
|
|
72
112
|
className: "max-w-2xl",
|
|
73
|
-
children:
|
|
74
|
-
}),
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
open:
|
|
78
|
-
onOpenChange:
|
|
79
|
-
children:
|
|
80
|
-
}),
|
|
81
|
-
let
|
|
82
|
-
return
|
|
113
|
+
children: W
|
|
114
|
+
}), T[22] = W, T[23] = G);
|
|
115
|
+
let K;
|
|
116
|
+
T[24] !== H || T[25] !== G ? (K = /* @__PURE__ */ jsx(Dialog, {
|
|
117
|
+
open: H,
|
|
118
|
+
onOpenChange: U,
|
|
119
|
+
children: G
|
|
120
|
+
}), T[24] = H, T[25] = G, T[26] = K) : K = T[26];
|
|
121
|
+
let q;
|
|
122
|
+
return T[27] !== K || T[28] !== V ? (q = /* @__PURE__ */ jsxs(Fragment$1, { children: [V, K] }), T[27] = K, T[28] = V, T[29] = q) : q = T[29], q;
|
|
123
|
+
}
|
|
124
|
+
function _temp(e) {
|
|
125
|
+
let { key: S, Icon: C } = e;
|
|
126
|
+
return /* @__PURE__ */ jsx("span", {
|
|
127
|
+
className: "inline-flex h-6 w-6 items-center justify-center",
|
|
128
|
+
children: /* @__PURE__ */ jsx(C, { className: "h-4 w-4" })
|
|
129
|
+
}, S);
|
|
83
130
|
}
|
|
84
131
|
export { AppLauncher as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useWorkflow } from "../../../hooks/
|
|
1
|
+
import { useWorkflow } from "../../../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../../../hooks/useWorkflows.js";
|
|
2
3
|
import { Background, BackgroundVariant, Controls, Panel, index, useEdgesState, useNodesState, useReactFlow } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
3
4
|
/* empty css */
|
|
4
5
|
import StateNode_default from "./workflow-flow/StateNode.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useWorkflow, useWorkflowCheckpoints } from "../../../../hooks/
|
|
1
|
+
import { useWorkflow, useWorkflowCheckpoints } from "../../../../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../../../../hooks/useWorkflows.js";
|
|
2
3
|
import { buildWorkflowGraph, getTransitions } from "../../lib/flow-utils.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import React, { useEffect, useRef } from "react";
|