@loopstack/loopstack-studio 0.29.5 → 0.30.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/_virtual/rolldown_runtime.js +3 -1
- package/dist/api/config.js +5 -4
- package/dist/api/environments.js +5 -1
- package/dist/api/processor.js +4 -1
- package/dist/app/EnvironmentEmbedRoot.js +22 -30
- package/dist/components/ai-elements/code-block.js +4 -4
- package/dist/components/dynamic-form/CodeContent.js +1 -1
- package/dist/components/dynamic-form/FormBody.js +1 -1
- package/dist/components/motion/FadeIn.js +72 -0
- package/dist/components/motion/StreamingText.js +49 -0
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui-widgets/UiWidget.js +11 -10
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
- package/dist/events/sse-client-events.js +7 -1
- package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
- package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
- package/dist/features/documents/DocumentRenderer.js +18 -17
- package/dist/features/documents/components/DocumentItem.js +42 -20
- package/dist/features/documents/components/DocumentList.js +34 -36
- package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
- package/dist/features/documents/document-details/DocumentDetails.js +577 -377
- package/dist/features/documents/document-details/PromptDetails.js +118 -130
- package/dist/features/documents/document-details/document-debug-utils.js +100 -0
- package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
- package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
- package/dist/features/documents/renderers/LlmMessage.js +52 -47
- package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
- package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
- package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
- package/dist/features/feature-registry/available-features.js +12 -0
- package/dist/features/feature-registry/index.js +2 -1
- package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
- package/dist/features/git/components/GitBranchBadge.js +31 -0
- package/dist/features/git/components/GitCommitList.js +46 -0
- package/dist/features/git/components/GitRemoteStatus.js +84 -0
- package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
- package/dist/features/git/git-feature.js +12 -0
- package/dist/features/git/hooks/useGit.js +78 -0
- package/dist/features/git/index.js +1 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
- package/dist/features/runs/Runs.js +4 -4
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
- package/dist/features/workbench/Workbench.js +25 -33
- package/dist/features/workbench/WorkflowItem.js +9 -9
- package/dist/features/workbench/WorkflowList.js +61 -62
- package/dist/features/workbench/components/NewRunDialog.js +237 -209
- package/dist/features/workbench/components/RecentRunItem.js +3 -3
- package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/components/WorkflowForms.js +11 -10
- package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
- package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
- package/dist/features/workbench/index.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
- package/dist/features/workspaces/Workspaces.js +134 -125
- package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
- package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
- package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
- package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
- package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/query-keys.js +43 -30
- package/dist/hooks/useConfig.js +28 -22
- package/dist/hooks/useEnvironments.js +27 -2
- package/dist/hooks/useProcessor.js +14 -1
- package/dist/hooks/useWorkflows.js +4 -4
- package/dist/index.d.ts +116 -15
- package/dist/index.js +9 -8
- package/dist/node_modules/d3/src/index.js +13 -13
- package/dist/node_modules/d3-scale/src/continuous.js +16 -16
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
- package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
- package/dist/node_modules/motion/dist/es/react.js +9 -2
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +76 -106
- package/dist/pages/EmbedWorkbenchPage.js +1 -1
- package/dist/pages/PreviewWorkbenchPage.js +6 -6
- package/dist/pages/WorkbenchPage.js +43 -47
- package/dist/pages/WorkflowDebugPage.js +6 -12
- package/dist/pages/WorkspacePage.js +40 -66
- package/dist/pages/WorkspaceRunsPage.js +24 -31
- package/package.json +2 -2
|
@@ -11,8 +11,10 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
11
11
|
enumerable: !(s = __getOwnPropDesc(i, d)) || s.enumerable
|
|
12
12
|
});
|
|
13
13
|
return e;
|
|
14
|
+
}, __reExport = (e, n, r, i) => {
|
|
15
|
+
i && (__defProp(e, Symbol.toStringTag, { value: "Module" }), r && __defProp(r, Symbol.toStringTag, { value: "Module" })), __copyProps(e, n, "default"), r && __copyProps(r, n, "default");
|
|
14
16
|
}, __toESM = (n, r, a) => (a = n == null ? {} : __create(__getProtoOf(n)), __copyProps(r || !n || !n.__esModule ? __defProp(a, "default", {
|
|
15
17
|
value: n,
|
|
16
18
|
enumerable: !0
|
|
17
19
|
}) : a, n));
|
|
18
|
-
export { __commonJSMin, __export, __toESM };
|
|
20
|
+
export { __commonJSMin, __export, __reExport, __toESM };
|
package/dist/api/config.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
function createConfigApi(e) {
|
|
2
2
|
return {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
getApps: () => e.get("/api/v1/config/apps").then((e) => e.data),
|
|
4
|
+
getWorkflowConfig: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.workflowName)}`).then((e) => e.data),
|
|
5
|
+
getWorkflowSource: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.workflowName)}/source`).then((e) => e.data),
|
|
6
|
+
getToolConfigs: () => e.get("/api/v1/config/tools").then((e) => e.data),
|
|
7
|
+
getToolConfig: (t) => e.get(`/api/v1/config/tools/${encodeURIComponent(t.toolName)}`).then((e) => e.data),
|
|
7
8
|
getAvailableEnvironments: () => e.get("/api/v1/config/environments").then((e) => e.data)
|
|
8
9
|
};
|
|
9
10
|
}
|
package/dist/api/environments.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
function createEnvironmentsApi(e) {
|
|
2
|
-
return {
|
|
2
|
+
return {
|
|
3
|
+
getByWorkspace: (t) => e.get(`/api/v1/workspaces/${t}/environments`).then((e) => e.data),
|
|
4
|
+
replaceEnvironments: (t, n) => e.put(`/api/v1/workspaces/${t}/environments`, n).then((e) => e.data),
|
|
5
|
+
resetEnvironment: (t) => e.post(`/api/v1/workspaces/${t.workspaceId}/environments/${t.slotId}/reset`).then((e) => e.data)
|
|
6
|
+
};
|
|
3
7
|
}
|
|
4
8
|
export { createEnvironmentsApi };
|
package/dist/api/processor.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
function createProcessorApi(e) {
|
|
2
|
-
return {
|
|
2
|
+
return {
|
|
3
|
+
startWorkflow: (t) => e.post("/api/v1/processor/start", t.payload).then((e) => e.data),
|
|
4
|
+
runWorkflow: (t) => e.post(`/api/v1/processor/run/${t.workflowId}`, t.runWorkflowPayloadDto, t.force === void 0 ? void 0 : { params: { force: t.force } }).then((e) => e.data)
|
|
5
|
+
};
|
|
3
6
|
}
|
|
4
7
|
export { createProcessorApi };
|
|
@@ -4,42 +4,34 @@ import { InvalidationEventsProvider } from "../providers/InvalidationEventsProvi
|
|
|
4
4
|
import { useRouter } from "../routing/LocalRouter.js";
|
|
5
5
|
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
6
6
|
import "../features/feature-registry/index.js";
|
|
7
|
-
import { fileExplorerFeature } from "../features/file-explorer/file-explorer-feature.js";
|
|
8
|
-
import "../features/file-explorer/index.js";
|
|
9
7
|
import LocalHealthCheck_default from "../features/health/LocalHealthCheck.js";
|
|
10
|
-
import { secretsFeature } from "../features/secrets/secrets-feature.js";
|
|
11
|
-
import "../features/secrets/index.js";
|
|
12
8
|
import { QueryProvider } from "../providers/QueryProvider.js";
|
|
13
9
|
import { c } from "react/compiler-runtime";
|
|
14
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
11
|
import { Outlet, useSearchParams } from "react-router-dom";
|
|
16
|
-
var defaultFeatures = [secretsFeature, fileExplorerFeature];
|
|
17
12
|
function EnvironmentEmbedRoot() {
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
|
|
13
|
+
let p = c(11), [m] = useSearchParams(), h;
|
|
14
|
+
p[0] === m ? h = p[1] : (h = m.get("url") ?? "http://localhost:3080", p[0] = m, p[1] = h);
|
|
15
|
+
let g = h, _;
|
|
16
|
+
p[2] === m ? _ = p[3] : (_ = m.get("name") ?? "Preview Environment", p[2] = m, p[3] = _);
|
|
17
|
+
let v = _, y;
|
|
18
|
+
p[4] !== v || p[5] !== g ? (y = {
|
|
24
19
|
id: "preview-env",
|
|
25
|
-
name:
|
|
26
|
-
url:
|
|
27
|
-
},
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
environment: x,
|
|
42
|
-
children: C
|
|
43
|
-
}) }), m[8] = x, m[9] = S, m[10] = w) : w = m[10], w;
|
|
20
|
+
name: v,
|
|
21
|
+
url: g
|
|
22
|
+
}, p[4] = v, p[5] = g, p[6] = y) : y = p[6];
|
|
23
|
+
let b = y, x = useRouter(b.id, "/embed/env"), S;
|
|
24
|
+
p[7] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsxs(FeatureRegistryProvider, { children: [
|
|
25
|
+
/* @__PURE__ */ jsx(LocalHealthCheck_default, {}),
|
|
26
|
+
/* @__PURE__ */ jsx(SseProvider, {}),
|
|
27
|
+
/* @__PURE__ */ jsx(InvalidationEventsProvider, {}),
|
|
28
|
+
/* @__PURE__ */ jsx(Outlet, {})
|
|
29
|
+
] }), p[7] = S) : S = p[7];
|
|
30
|
+
let C;
|
|
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;
|
|
44
36
|
}
|
|
45
37
|
export { EnvironmentEmbedRoot as default };
|
|
@@ -56,15 +56,15 @@ const CodeBlock = (l) => {
|
|
|
56
56
|
let E;
|
|
57
57
|
d[12] === m ? E = d[13] : (E = { code: m }, d[12] = m, d[13] = E);
|
|
58
58
|
let D;
|
|
59
|
-
d[14] === p ? D = d[15] : (D = cn("group bg-background text-foreground relative w-full overflow-
|
|
59
|
+
d[14] === p ? D = d[15] : (D = cn("group bg-background text-foreground relative min-w-0 w-full overflow-auto overscroll-contain rounded-md border", p), d[14] = p, d[15] = D);
|
|
60
60
|
let O;
|
|
61
61
|
d[16] === y ? O = d[17] : (O = /* @__PURE__ */ jsx("div", {
|
|
62
|
-
className: "[&>pre]:bg-background! [&>pre]:text-foreground!
|
|
62
|
+
className: "[&>pre]:bg-background! [&>pre]:text-foreground! dark:hidden [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
|
|
63
63
|
dangerouslySetInnerHTML: { __html: y }
|
|
64
64
|
}), d[16] = y, d[17] = O);
|
|
65
65
|
let k;
|
|
66
66
|
d[18] === x ? k = d[19] : (k = /* @__PURE__ */ jsx("div", {
|
|
67
|
-
className: "[&>pre]:bg-background! [&>pre]:text-foreground! hidden
|
|
67
|
+
className: "[&>pre]:bg-background! [&>pre]:text-foreground! hidden dark:block [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
|
|
68
68
|
dangerouslySetInnerHTML: { __html: x }
|
|
69
69
|
}), d[18] = x, d[19] = k);
|
|
70
70
|
let A;
|
|
@@ -74,7 +74,7 @@ const CodeBlock = (l) => {
|
|
|
74
74
|
}), d[20] = f, d[21] = A);
|
|
75
75
|
let j;
|
|
76
76
|
d[22] !== O || d[23] !== k || d[24] !== A ? (j = /* @__PURE__ */ jsxs("div", {
|
|
77
|
-
className: "relative",
|
|
77
|
+
className: "relative min-w-max",
|
|
78
78
|
children: [
|
|
79
79
|
O,
|
|
80
80
|
k,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
4
|
-
import Markdown from "react-markdown";
|
|
5
4
|
import { Prism } from "react-syntax-highlighter";
|
|
5
|
+
import Markdown from "react-markdown";
|
|
6
6
|
var adaptedPrism = {
|
|
7
7
|
"code[class*=\"language-\"]": {
|
|
8
8
|
color: "black",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import CodeContent_default from "./CodeContent.js";
|
|
2
1
|
import MarkdownContent_default from "./MarkdownContent.js";
|
|
2
|
+
import CodeContent_default from "./CodeContent.js";
|
|
3
3
|
import { ObjectController } from "./ObjectController.js";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { motion, react_exports } from "../../node_modules/motion/dist/es/react.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function FadeIn(a) {
|
|
6
|
+
let o = c(16), { children: s, className: l, delay: u, y: d, duration: f } = a, p = u === void 0 ? 0 : u, m = d === void 0 ? 6 : d, h = f === void 0 ? .22 : f;
|
|
7
|
+
if ((0, react_exports.useReducedMotion)()) {
|
|
8
|
+
let e;
|
|
9
|
+
return o[0] !== s || o[1] !== l ? (e = /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: l,
|
|
11
|
+
children: s
|
|
12
|
+
}), o[0] = s, o[1] = l, o[2] = e) : e = o[2], e;
|
|
13
|
+
}
|
|
14
|
+
let g;
|
|
15
|
+
o[3] === l ? g = o[4] : (g = cn(l), o[3] = l, o[4] = g);
|
|
16
|
+
let _;
|
|
17
|
+
o[5] === m ? _ = o[6] : (_ = {
|
|
18
|
+
opacity: 0,
|
|
19
|
+
y: m
|
|
20
|
+
}, o[5] = m, o[6] = _);
|
|
21
|
+
let v;
|
|
22
|
+
o[7] === Symbol.for("react.memo_cache_sentinel") ? (v = {
|
|
23
|
+
opacity: 1,
|
|
24
|
+
y: 0
|
|
25
|
+
}, o[7] = v) : v = o[7];
|
|
26
|
+
let y;
|
|
27
|
+
o[8] !== p || o[9] !== h ? (y = {
|
|
28
|
+
duration: h,
|
|
29
|
+
delay: p,
|
|
30
|
+
ease: "easeOut"
|
|
31
|
+
}, o[8] = p, o[9] = h, o[10] = y) : y = o[10];
|
|
32
|
+
let b;
|
|
33
|
+
return o[11] !== s || o[12] !== g || o[13] !== _ || o[14] !== y ? (b = /* @__PURE__ */ jsx(motion.div, {
|
|
34
|
+
className: g,
|
|
35
|
+
initial: _,
|
|
36
|
+
animate: v,
|
|
37
|
+
transition: y,
|
|
38
|
+
children: s
|
|
39
|
+
}), o[11] = s, o[12] = g, o[13] = _, o[14] = y, o[15] = b) : b = o[15], b;
|
|
40
|
+
}
|
|
41
|
+
function FadeInBlock(a) {
|
|
42
|
+
let o = c(11), { children: s, className: l } = a;
|
|
43
|
+
if ((0, react_exports.useReducedMotion)()) {
|
|
44
|
+
let e;
|
|
45
|
+
return o[0] !== s || o[1] !== l ? (e = /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: l,
|
|
47
|
+
children: s
|
|
48
|
+
}), o[0] = s, o[1] = l, o[2] = e) : e = o[2], e;
|
|
49
|
+
}
|
|
50
|
+
let u;
|
|
51
|
+
o[3] === l ? u = o[4] : (u = cn(l), o[3] = l, o[4] = u);
|
|
52
|
+
let d, f, p;
|
|
53
|
+
o[5] === Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
54
|
+
opacity: 0,
|
|
55
|
+
y: 4
|
|
56
|
+
}, f = {
|
|
57
|
+
opacity: 1,
|
|
58
|
+
y: 0
|
|
59
|
+
}, p = {
|
|
60
|
+
duration: .18,
|
|
61
|
+
ease: "easeOut"
|
|
62
|
+
}, o[5] = d, o[6] = f, o[7] = p) : (d = o[5], f = o[6], p = o[7]);
|
|
63
|
+
let m;
|
|
64
|
+
return o[8] !== s || o[9] !== u ? (m = /* @__PURE__ */ jsx(motion.div, {
|
|
65
|
+
className: u,
|
|
66
|
+
initial: d,
|
|
67
|
+
animate: f,
|
|
68
|
+
transition: p,
|
|
69
|
+
children: s
|
|
70
|
+
}), o[8] = s, o[9] = u, o[10] = m) : m = o[10], m;
|
|
71
|
+
}
|
|
72
|
+
export { FadeIn, FadeInBlock };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { motion, react_exports } from "../../node_modules/motion/dist/es/react.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function StreamingText(a) {
|
|
7
|
+
let o = c(16), { text: s, className: l } = a, u = (0, react_exports.useReducedMotion)(), d;
|
|
8
|
+
o[0] === s ? d = o[1] : (d = s.match(/\S+\s*|\s+/g) ?? (s ? [s] : []), o[0] = s, o[1] = d);
|
|
9
|
+
let f = d;
|
|
10
|
+
if (u) {
|
|
11
|
+
let n;
|
|
12
|
+
o[2] === l ? n = o[3] : (n = cn("whitespace-pre-wrap", l), o[2] = l, o[3] = n);
|
|
13
|
+
let r;
|
|
14
|
+
return o[4] !== n || o[5] !== s ? (r = /* @__PURE__ */ jsx("span", {
|
|
15
|
+
className: n,
|
|
16
|
+
children: s
|
|
17
|
+
}), o[4] = n, o[5] = s, o[6] = r) : r = o[6], r;
|
|
18
|
+
}
|
|
19
|
+
let p;
|
|
20
|
+
o[7] === l ? p = o[8] : (p = cn("whitespace-pre-wrap", l), o[7] = l, o[8] = p);
|
|
21
|
+
let m;
|
|
22
|
+
if (o[9] !== f) {
|
|
23
|
+
let e;
|
|
24
|
+
o[11] === f.length ? e = o[12] : (e = (e, r) => {
|
|
25
|
+
let i = r === f.length - 1;
|
|
26
|
+
return /* @__PURE__ */ jsx(motion.span, {
|
|
27
|
+
initial: i ? {
|
|
28
|
+
opacity: 0,
|
|
29
|
+
y: 2
|
|
30
|
+
} : !1,
|
|
31
|
+
animate: {
|
|
32
|
+
opacity: 1,
|
|
33
|
+
y: 0
|
|
34
|
+
},
|
|
35
|
+
transition: {
|
|
36
|
+
duration: .18,
|
|
37
|
+
ease: "easeOut"
|
|
38
|
+
},
|
|
39
|
+
children: e
|
|
40
|
+
}, r);
|
|
41
|
+
}, o[11] = f.length, o[12] = e), m = f.map(e), o[9] = f, o[10] = m;
|
|
42
|
+
} else m = o[10];
|
|
43
|
+
let h;
|
|
44
|
+
return o[13] !== p || o[14] !== m ? (h = /* @__PURE__ */ jsx("span", {
|
|
45
|
+
className: p,
|
|
46
|
+
children: m
|
|
47
|
+
}), o[13] = p, o[14] = m, o[15] = h) : h = o[15], h;
|
|
48
|
+
}
|
|
49
|
+
export { StreamingText };
|
|
@@ -47,7 +47,7 @@ function AccordionContent(i) {
|
|
|
47
47
|
let a = c(12), o, s, l;
|
|
48
48
|
a[0] === i ? (o = a[1], s = a[2], l = a[3]) : ({className: s, children: o, ...l} = i, a[0] = i, a[1] = o, a[2] = s, a[3] = l);
|
|
49
49
|
let u;
|
|
50
|
-
a[4] === s ? u = a[5] : (u = cn("pt-0 pb-4", s), a[4] = s, a[5] = u);
|
|
50
|
+
a[4] === s ? u = a[5] : (u = cn("min-w-0 pt-0 pb-4", s), a[4] = s, a[5] = u);
|
|
51
51
|
let d;
|
|
52
52
|
a[6] !== o || a[7] !== u ? (d = /* @__PURE__ */ jsx("div", {
|
|
53
53
|
className: u,
|
|
@@ -56,7 +56,7 @@ function AccordionContent(i) {
|
|
|
56
56
|
let f;
|
|
57
57
|
return a[9] !== l || a[10] !== d ? (f = /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
|
|
58
58
|
"data-slot": "accordion-content",
|
|
59
|
-
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
59
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm data-[state=open]:overflow-visible",
|
|
60
60
|
...l,
|
|
61
61
|
children: d
|
|
62
62
|
}), a[9] = l, a[10] = d, a[11] = f) : f = a[11], f;
|
|
@@ -6,43 +6,44 @@ import { c } from "react/compiler-runtime";
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
8
8
|
var UiWidget_default = (s) => {
|
|
9
|
-
let l = c(
|
|
9
|
+
let l = c(19), { config: u, onSubmit: d, disabled: f, isLoading: p } = s, m = u.options;
|
|
10
10
|
switch (u.widget) {
|
|
11
11
|
case "prompt-input": {
|
|
12
12
|
let a;
|
|
13
|
-
return l[0] !== f || l[1] !==
|
|
13
|
+
return l[0] !== f || l[1] !== p || l[2] !== d || l[3] !== m ? (a = /* @__PURE__ */ jsx(AiPromptInput_default, {
|
|
14
14
|
disabled: f,
|
|
15
|
+
isLoading: p,
|
|
15
16
|
onSubmit: d,
|
|
16
17
|
ui: m
|
|
17
|
-
}), l[0] = f, l[1] =
|
|
18
|
+
}), l[0] = f, l[1] = p, l[2] = d, l[3] = m, l[4] = a) : a = l[4], a;
|
|
18
19
|
}
|
|
19
20
|
case "button": {
|
|
20
21
|
let e = m, a;
|
|
21
|
-
return l[
|
|
22
|
+
return l[5] !== f || l[6] !== p || l[7] !== d || l[8] !== e ? (a = /* @__PURE__ */ jsx(SubmitButton, {
|
|
22
23
|
ui: e,
|
|
23
24
|
disabled: f,
|
|
24
25
|
onClick: d,
|
|
25
26
|
isLoading: p
|
|
26
|
-
}), l[
|
|
27
|
+
}), l[5] = f, l[6] = p, l[7] = d, l[8] = e, l[9] = a) : a = l[9], a;
|
|
27
28
|
}
|
|
28
29
|
case "button-full-w": {
|
|
29
30
|
let e = m, o;
|
|
30
|
-
return l[
|
|
31
|
+
return l[10] !== f || l[11] !== p || l[12] !== d || l[13] !== e ? (o = /* @__PURE__ */ jsx(ButtonFullWidth, {
|
|
31
32
|
ui: e,
|
|
32
33
|
disabled: f,
|
|
33
34
|
onClick: d,
|
|
34
35
|
isLoading: p
|
|
35
|
-
}), l[
|
|
36
|
+
}), l[10] = f, l[11] = p, l[12] = d, l[13] = e, l[14] = o) : o = l[14], o;
|
|
36
37
|
}
|
|
37
38
|
case "sandbox-run": {
|
|
38
39
|
let e = m, a;
|
|
39
|
-
return l[
|
|
40
|
+
return l[15] !== f || l[16] !== e ? (a = /* @__PURE__ */ jsx(SandboxRun, {
|
|
40
41
|
ui: e,
|
|
41
42
|
disabled: f
|
|
42
|
-
}), l[
|
|
43
|
+
}), l[15] = f, l[16] = e, l[17] = a) : a = l[17], a;
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
let h;
|
|
46
|
-
return l[
|
|
47
|
+
return l[18] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ jsx(Fragment$1, {}), l[18] = h) : h = l[18], h;
|
|
47
48
|
};
|
|
48
49
|
export { UiWidget_default as default };
|
|
@@ -4,40 +4,43 @@ import { useState } from "react";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Pill } from "lucide-react";
|
|
6
6
|
function AiPromptInput(d) {
|
|
7
|
-
let f = c(
|
|
8
|
-
f[0] === p ?
|
|
9
|
-
u.preventDefault(), e.text && (p(e.text),
|
|
10
|
-
}, f[0] = p, f[1] =
|
|
11
|
-
let
|
|
12
|
-
f[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
13
|
-
let
|
|
14
|
-
f[3] !==
|
|
15
|
-
value:
|
|
16
|
-
onChange:
|
|
7
|
+
let f = c(19), { onSubmit: p, disabled: m, isLoading: h, ui: g } = d, _ = h === void 0 ? !1 : h, [v, y] = useState(""), b = g?.label ?? "Submit", x;
|
|
8
|
+
f[0] === p ? x = f[1] : (x = (e, u) => {
|
|
9
|
+
u.preventDefault(), e.text && (p(e.text), y(""));
|
|
10
|
+
}, f[0] = p, f[1] = x);
|
|
11
|
+
let S;
|
|
12
|
+
f[2] === Symbol.for("react.memo_cache_sentinel") ? (S = (e) => y(e.target.value), f[2] = S) : S = f[2];
|
|
13
|
+
let C = m || _, w;
|
|
14
|
+
f[3] !== v || f[4] !== C ? (w = /* @__PURE__ */ jsx(PromptInputBody, { children: /* @__PURE__ */ jsx(PromptInputTextarea, {
|
|
15
|
+
value: v,
|
|
16
|
+
onChange: S,
|
|
17
17
|
placeholder: "Type your message...",
|
|
18
|
-
disabled:
|
|
18
|
+
disabled: C,
|
|
19
19
|
rows: 1,
|
|
20
20
|
className: "flex-1"
|
|
21
|
-
}) }), f[3] =
|
|
22
|
-
let
|
|
23
|
-
f[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
21
|
+
}) }), f[3] = v, f[4] = C, f[5] = w) : w = f[5];
|
|
22
|
+
let T;
|
|
23
|
+
f[6] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ jsx(Pill, {
|
|
24
24
|
size: "16",
|
|
25
25
|
className: "mr-2"
|
|
26
|
-
}), f[6] =
|
|
27
|
-
let
|
|
28
|
-
f[7] ===
|
|
26
|
+
}), f[6] = T) : T = f[6];
|
|
27
|
+
let E;
|
|
28
|
+
f[7] === b ? E = f[8] : (E = /* @__PURE__ */ jsxs("div", {
|
|
29
29
|
className: "mr-4 flex items-center",
|
|
30
|
-
children: [
|
|
31
|
-
}), f[7] =
|
|
32
|
-
let
|
|
33
|
-
f[9]
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
children: [T, b]
|
|
31
|
+
}), f[7] = b, f[8] = E);
|
|
32
|
+
let D = m || _, O = _ ? "streaming" : "ready", k;
|
|
33
|
+
f[9] !== D || f[10] !== O ? (k = /* @__PURE__ */ jsx(PromptInputSubmit, {
|
|
34
|
+
disabled: D,
|
|
35
|
+
status: O
|
|
36
|
+
}), f[9] = D, f[10] = O, f[11] = k) : k = f[11];
|
|
37
|
+
let A;
|
|
38
|
+
f[12] !== k || f[13] !== E ? (A = /* @__PURE__ */ jsxs(PromptInputFooter, { children: [E, k] }), f[12] = k, f[13] = E, f[14] = A) : A = f[14];
|
|
39
|
+
let j;
|
|
40
|
+
return f[15] !== A || f[16] !== x || f[17] !== w ? (j = /* @__PURE__ */ jsxs(PromptInput, {
|
|
41
|
+
onSubmit: x,
|
|
42
|
+
children: [w, A]
|
|
43
|
+
}), f[15] = A, f[16] = x, f[17] = w, f[18] = j) : j = f[18], j;
|
|
41
44
|
}
|
|
42
45
|
var AiPromptInput_default = AiPromptInput;
|
|
43
46
|
export { AiPromptInput_default as default };
|
|
@@ -2,6 +2,12 @@ const SseClientEvents = {
|
|
|
2
2
|
WORKFLOW_CREATED: "workflow.created",
|
|
3
3
|
WORKFLOW_UPDATED: "workflow.updated",
|
|
4
4
|
DOCUMENT_CREATED: "document.created",
|
|
5
|
-
SSE_CONNECTED: "sse.connected"
|
|
5
|
+
SSE_CONNECTED: "sse.connected",
|
|
6
|
+
LLM_RESPONSE_START: "llm.response.start",
|
|
7
|
+
LLM_RESPONSE_TEXT_DELTA: "llm.response.text_delta",
|
|
8
|
+
LLM_RESPONSE_THINKING_DELTA: "llm.response.thinking_delta",
|
|
9
|
+
LLM_RESPONSE_TOOL_CALL: "llm.response.tool_call",
|
|
10
|
+
LLM_RESPONSE_DONE: "llm.response.done",
|
|
11
|
+
LLM_RESPONSE_ERROR: "llm.response.error"
|
|
6
12
|
};
|
|
7
13
|
export { SseClientEvents };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.js";
|
|
2
2
|
import { ScrollArea, ScrollBar } from "../../../components/ui/scroll-area.js";
|
|
3
|
-
import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
|
|
4
3
|
import { ReactFlowProvider } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
4
|
+
import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
|
|
5
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../components/ui/tabs.js";
|
|
5
6
|
import ConfigFlowViewer_default from "../../debug/components/ConfigFlowViewer.js";
|
|
6
7
|
import "../../debug/index.js";
|
|
7
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../components/ui/tabs.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { Loader2 } from "lucide-react";
|
|
@@ -8,79 +8,77 @@ import { c } from "react/compiler-runtime";
|
|
|
8
8
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { Loader2 } from "lucide-react";
|
|
11
|
-
var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransition: WorkflowTransitionEdge_default }, WorkflowFlowViewer_default = (
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
let [w, T
|
|
15
|
-
|
|
16
|
-
let [O, k
|
|
17
|
-
|
|
18
|
-
let [P, F] = useState(N), [I, L] = useState(!0), R =
|
|
19
|
-
if (
|
|
11
|
+
var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransition: WorkflowTransitionEdge_default }, WorkflowFlowViewer_default = (f) => {
|
|
12
|
+
let p = c(41), { workflowId: m, workflows: h, workflowConfig: g, direction: _ } = f, v = _ === void 0 ? "LR" : _, { data: y, isPending: b, isLoading: x } = useWorkflow(m), S;
|
|
13
|
+
p[0] === Symbol.for("react.memo_cache_sentinel") ? (S = [], p[0] = S) : S = p[0];
|
|
14
|
+
let [C, w, T] = useNodesState(S), E;
|
|
15
|
+
p[1] === Symbol.for("react.memo_cache_sentinel") ? (E = [], p[1] = E) : E = p[1];
|
|
16
|
+
let [D, O, k] = useEdgesState(E), { fitView: A } = useReactFlow(), j = useRef(!1), M = useRef(m), N;
|
|
17
|
+
p[2] === Symbol.for("react.memo_cache_sentinel") ? (N = {}, p[2] = N) : N = p[2];
|
|
18
|
+
let [P, F] = useState(N), [I, L] = useState(!0), R = y, z;
|
|
19
|
+
if (p[3] !== m || p[4] !== h) {
|
|
20
20
|
let t;
|
|
21
|
-
|
|
22
|
-
} else z =
|
|
23
|
-
let B = z, V = Object.values(P).some(_temp), H = !!
|
|
24
|
-
|
|
25
|
-
F((
|
|
26
|
-
...
|
|
27
|
-
[t]:
|
|
21
|
+
p[6] === m ? t = p[7] : (t = (t) => t.id !== m, p[6] = m, p[7] = t), z = h.filter(t), p[3] = m, p[4] = h, p[5] = z;
|
|
22
|
+
} else z = p[5];
|
|
23
|
+
let B = z, V = Object.values(P).some(_temp), H = !!m && !y && (b || x) || V, U;
|
|
24
|
+
p[8] === Symbol.for("react.memo_cache_sentinel") ? (U = (t, u) => {
|
|
25
|
+
F((d) => d[t] === u ? d : {
|
|
26
|
+
...d,
|
|
27
|
+
[t]: u
|
|
28
28
|
});
|
|
29
|
-
},
|
|
29
|
+
}, p[8] = U) : U = p[8];
|
|
30
30
|
let W = U, G;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
let K = G, q;
|
|
35
|
-
|
|
36
|
-
M.current = !1,
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
k
|
|
43
|
-
], m[15] = k, m[16] = T, m[17] = h, m[18] = J) : J = m[18], useLayoutEffect(q, J);
|
|
31
|
+
p[9] !== O || p[10] !== w ? (G = (t, u, d) => {
|
|
32
|
+
w(u), O(d);
|
|
33
|
+
}, p[9] = O, p[10] = w, p[11] = G) : G = p[11];
|
|
34
|
+
let K = G, q, J;
|
|
35
|
+
p[12] !== O || p[13] !== w || p[14] !== m ? (q = () => {
|
|
36
|
+
M.current !== m && (M.current = m, j.current = !1, w([]), O([]));
|
|
37
|
+
}, J = [
|
|
38
|
+
m,
|
|
39
|
+
w,
|
|
40
|
+
O
|
|
41
|
+
], p[12] = O, p[13] = w, p[14] = m, p[15] = q, p[16] = J) : (q = p[15], J = p[16]), useLayoutEffect(q, J);
|
|
44
42
|
let Y, X;
|
|
45
|
-
|
|
46
|
-
if (!H &&
|
|
47
|
-
|
|
43
|
+
p[17] !== A || p[18] !== H || p[19] !== C.length ? (Y = () => {
|
|
44
|
+
if (!H && C.length > 0 && !j.current) {
|
|
45
|
+
j.current = !0;
|
|
48
46
|
let t = setTimeout(() => {
|
|
49
|
-
|
|
47
|
+
A({ padding: .2 });
|
|
50
48
|
}, 150);
|
|
51
49
|
return () => clearTimeout(t);
|
|
52
50
|
}
|
|
53
51
|
}, X = [
|
|
54
52
|
H,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
],
|
|
53
|
+
C.length,
|
|
54
|
+
A
|
|
55
|
+
], p[17] = A, p[18] = H, p[19] = C.length, p[20] = Y, p[21] = X) : (Y = p[20], X = p[21]), useEffect(Y, X);
|
|
58
56
|
let Z;
|
|
59
|
-
|
|
60
|
-
parentWorkflow:
|
|
57
|
+
p[22] !== v || p[23] !== B || p[24] !== K || p[25] !== y || p[26] !== R || p[27] !== I || p[28] !== g || p[29] !== m ? (Z = R && /* @__PURE__ */ jsx(WorkflowGraph_default, {
|
|
58
|
+
parentWorkflow: y,
|
|
61
59
|
workflow: R,
|
|
62
|
-
workflowConfig:
|
|
60
|
+
workflowConfig: g,
|
|
63
61
|
extraTransitionSources: B,
|
|
64
62
|
onGraphReady: K,
|
|
65
63
|
onLoadingChange: W,
|
|
66
|
-
direction:
|
|
64
|
+
direction: v,
|
|
67
65
|
hideSameStateTransitions: !I
|
|
68
|
-
},
|
|
66
|
+
}, m), p[22] = v, p[23] = B, p[24] = K, p[25] = y, p[26] = R, p[27] = I, p[28] = g, p[29] = m, p[30] = Z) : Z = p[30];
|
|
69
67
|
let Q;
|
|
70
|
-
|
|
68
|
+
p[31] !== D || p[32] !== H || p[33] !== C || p[34] !== k || p[35] !== T || p[36] !== I ? (Q = H && C.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
71
69
|
className: "flex h-full items-center justify-center",
|
|
72
70
|
children: /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-8 w-8 animate-spin" })
|
|
73
|
-
}) :
|
|
71
|
+
}) : C.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
74
72
|
className: "text-muted-foreground flex h-full items-center justify-center",
|
|
75
73
|
children: /* @__PURE__ */ jsx("p", {
|
|
76
74
|
className: "font-medium",
|
|
77
75
|
children: "No workflow transitions available"
|
|
78
76
|
})
|
|
79
77
|
}) : /* @__PURE__ */ jsxs(index, {
|
|
80
|
-
nodes:
|
|
81
|
-
edges:
|
|
82
|
-
onNodesChange:
|
|
83
|
-
onEdgesChange:
|
|
78
|
+
nodes: C,
|
|
79
|
+
edges: D,
|
|
80
|
+
onNodesChange: T,
|
|
81
|
+
onEdgesChange: k,
|
|
84
82
|
nodeTypes,
|
|
85
83
|
edgeTypes,
|
|
86
84
|
fitView: !0,
|
|
@@ -110,12 +108,12 @@ var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransiti
|
|
|
110
108
|
}),
|
|
111
109
|
/* @__PURE__ */ jsx(Controls, { className: "bg-card border-border rounded-lg border shadow-md" })
|
|
112
110
|
]
|
|
113
|
-
}),
|
|
111
|
+
}), p[31] = D, p[32] = H, p[33] = C, p[34] = k, p[35] = T, p[36] = I, p[37] = Q) : Q = p[37];
|
|
114
112
|
let $;
|
|
115
|
-
return
|
|
113
|
+
return p[38] !== Z || p[39] !== Q ? ($ = /* @__PURE__ */ jsxs("div", {
|
|
116
114
|
className: "h-full w-full",
|
|
117
115
|
children: [Z, Q]
|
|
118
|
-
}),
|
|
116
|
+
}), p[38] = Z, p[39] = Q, p[40] = $) : $ = p[40], $;
|
|
119
117
|
};
|
|
120
118
|
function _temp(t) {
|
|
121
119
|
return t;
|